public ChampionSpawn() : base(0xBD2) { Movable = false; Visible = false; m_Creatures = new List <Mobile>(); m_RedSkulls = new List <Item>(); m_WhiteSkulls = new List <Item>(); m_Platform = new ChampionPlatform(this); m_Altar = new ChampionAltar(this); m_Idol = new IdolOfTheChampion(this); m_ExpireDelay = TimeSpan.FromMinutes(10.0); m_RestartDelay = TimeSpan.FromMinutes(10.0); m_DamageEntries = new Dictionary <Mobile, int>(); Timer.DelayCall(TimeSpan.Zero, new TimerCallback(SetInitialSpawnArea)); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); m_DamageEntries = new Dictionary <Mobile, int>(); int version = reader.ReadInt(); switch (version) { case 6: { m_SPawnSzMod = reader.ReadInt(); goto case 5; } case 5: { int entries = reader.ReadInt(); Mobile m; int damage; for (int i = 0; i < entries; ++i) { m = reader.ReadMobile(); damage = reader.ReadInt(); if (m == null) { continue; } m_DamageEntries.Add(m, damage); } goto case 4; } case 4: { m_ConfinedRoaming = reader.ReadBool(); m_Idol = reader.ReadItem <IdolOfTheChampion>(); m_HasBeenAdvanced = reader.ReadBool(); goto case 3; } case 3: { m_SpawnArea = reader.ReadRect2D(); goto case 2; } case 2: { m_RandomizeType = reader.ReadBool(); goto case 1; } case 1: { if (version < 3) { int oldRange = reader.ReadInt(); m_SpawnArea = new Rectangle2D(new Point2D(X - oldRange, Y - oldRange), new Point2D(X + oldRange, Y + oldRange)); } m_Kills = reader.ReadInt(); goto case 0; } case 0: { if (version < 1) { m_SpawnArea = new Rectangle2D(new Point2D(X - 24, Y - 24), new Point2D(X + 24, Y + 24)); //Default was 24 } bool active = reader.ReadBool(); m_Type = (ChampionSpawnType)reader.ReadInt(); m_Creatures = reader.ReadStrongMobileList(); m_RedSkulls = reader.ReadStrongItemList(); m_WhiteSkulls = reader.ReadStrongItemList(); m_Platform = reader.ReadItem <ChampionPlatform>(); m_Altar = reader.ReadItem <ChampionAltar>(); m_ExpireDelay = reader.ReadTimeSpan(); m_ExpireTime = reader.ReadDeltaTime(); m_Champion = reader.ReadMobile(); m_RestartDelay = reader.ReadTimeSpan(); if (reader.ReadBool()) { m_RestartTime = reader.ReadDeltaTime(); BeginRestart(m_RestartTime - DateTime.UtcNow); } if (version < 4) { m_Idol = new IdolOfTheChampion(this); m_Idol.MoveToWorld(new Point3D(X, Y, Z - 15), Map); } if (m_Platform == null || m_Altar == null || m_Idol == null) { Delete(); } else if (active) { Start(); } break; } } Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateRegion)); }