public PrismNpc(WorldMapPrismRecord record, int contextId) { this.m_record = record; this.m_contextId = contextId; if (!record.MapId.HasValue) { throw new Exception("Prism's map not found"); } this.Position = new ObjectPosition(record.Map, record.Map.Cells[this.m_record.Cell], DirectionsEnum.DIRECTION_EAST); this.Alliance = Singleton <AllianceManager> .Instance.TryGetAlliance(this.Record.AllianceId); }
// CONSTRUCTORS public PrismNpc(int globalId, int contextId, ObjectPosition position, Alliance alliance) { this.m_contextId = contextId; this.Position = position; this.Alliance = alliance; this.m_record = new WorldMapPrismRecord { Id = globalId, Map = this.Position.Map, Cell = (int)this.Position.Cell.Id, AllianceId = alliance.Id, Date = DateTime.Now }; this.IsDirty = true; }