/// <summary> /// Returns entity by id or null. /// </summary> /// <param name="entityId"></param> /// <returns></returns> private Entity GetTargetEntity(Region region, long entityId) { var isProp = (entityId >= MabiId.ClientProps && entityId < MabiId.AreaEvents); var targetEntity = (isProp ? (Entity)region.GetProp(entityId) : (Entity)region.GetCreature(entityId)); return targetEntity; }