public CityLoyaltySystem(City city) { City = city; if (Cities == null) Cities = new List<CityLoyaltySystem>(); Election = new CityElection(this); Cities.Add(this); }
public override void Deserialize(GenericReader reader) { City = (City)reader.ReadInt(); base.Deserialize(reader); int version = reader.ReadInt(); CompletedTrades = reader.ReadInt(); Governor = reader.ReadMobile(); GovernorElect = reader.ReadMobile(); PendingGovernor = reader.ReadBool(); Treasury = reader.ReadLong(); ActiveTradeDeal = (TradeDeal)reader.ReadInt(); TradeDealStart = reader.ReadDateTime(); NextTradeDealCheck = reader.ReadDateTime(); CanUtilize = reader.ReadBool(); Headline = reader.ReadString(); Body = reader.ReadString(); PostedOn = reader.ReadDateTime(); if (reader.ReadInt() == 0) Election = new CityElection(this, reader); else Election = new CityElection(this); if (this.City == City.Britain) { _CitizenWait = new Dictionary<Mobile, DateTime>(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { Mobile m = reader.ReadMobile(); DateTime dt = reader.ReadDateTime(); if (m != null && dt > DateTime.UtcNow) _CitizenWait[m] = dt; } Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), OnTick); } }