public static ObjectReference GetOrCreate(Map rgn, EntityId id) { var caster = rgn.GetObject(id); if (caster != null) { return caster.SharedReference; } return new ObjectReference(id, 1); }
public ObjectReference GetCasterInfo(Map map) { var id = new EntityId((ulong)CasterId); var caster = map.GetObject(id); if (caster != null) { return caster.SharedReference; } return new ObjectReference(id, Level); }