public OccupyTimer(VvVAltar altar, Guild occupier) : base(TimeSpan.FromSeconds(2), TimeSpan.FromSeconds(2)) { Occupier = occupier; Altar = altar; _Tick = 0; }
public void SpawnAltars() { foreach (Point3D p in CityInfo.Infos[City].AltarLocs) { VvVAltar altar = new VvVAltar(this); altar.MoveToWorld(p, Map.Felucca); Altars.Add(altar); } }
public VvVBattle(GenericReader reader, ViceVsVirtueSystem system) { int version = reader.ReadInt(); System = system; Altars = new List <VvVAltar>(); GuildStats = new Dictionary <Guild, VvVGuildBattleStats>(); KillCooldown = new Dictionary <Mobile, DateTime>(); Participants = new List <Guild>(); Messages = new List <string>(); Traps = new List <VvVTrap>(); Warned = new List <Mobile>(); Turrets = new List <CannonTurret>(); OnGoing = reader.ReadBool(); if (reader.ReadInt() == 0) { StartTime = reader.ReadDateTime(); CooldownEnds = reader.ReadDateTime(); LastOccupationCheck = reader.ReadDateTime(); NextSigilSpawn = reader.ReadDateTime(); NextAnnouncement = reader.ReadDateTime(); NextAltarActivate = reader.ReadDateTime(); City = (VvVCity)reader.ReadInt(); Sigil = reader.ReadItem() as VvVSigil; VicePriest = reader.ReadMobile() as VvVPriest; VirtuePriest = reader.ReadMobile() as VvVPriest; if (Sigil != null) { Sigil.Battle = this; } if (VicePriest != null) { VicePriest.Battle = this; } if (VirtuePriest != null) { VirtuePriest.Battle = this; } int count = reader.ReadInt(); for (int i = 0; i < count; i++) { VvVAltar altar = reader.ReadItem() as VvVAltar; if (altar != null) { altar.Battle = this; Altars.Add(altar); } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { Guild g = reader.ReadGuild() as Guild; VvVGuildBattleStats stats = new VvVGuildBattleStats(reader, g); if (g != null) { GuildStats[g] = stats; } } count = reader.ReadInt(); for (int i = 0; i < count; i++) { VvVTrap t = reader.ReadItem() as VvVTrap; if (t != null) { Traps.Add(t); } } Timer.DelayCall(TimeSpan.FromSeconds(10), () => { if (Region is GuardedRegion) { GuardedRegion.Disable((GuardedRegion)Region); } BeginTimer(); ActivateArrows(); }); } }