public ChampionSpawn() : base( 0xBD2 ) { Movable = false; Visible = false; m_Creatures = new ArrayList(); m_RedSkulls = new ArrayList(); m_WhiteSkulls = new ArrayList(); m_Platform = new ChampionPlatform( this ); m_Altar = new ChampionAltar( this ); // *** Added for Valor *** m_Idol = new ChampionIdol( this ); m_UseRestartDelay = true; // *** *** m_ExpireDelay = TimeSpan.FromMinutes( 10.0 ); m_RestartDelay = TimeSpan.FromMinutes( 5.0 ); m_SpawnRange = 17; }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { // *** Added for Valor *** case 3: { m_IsValorUsed = reader.ReadBool(); m_Idol = reader.ReadItem() as ChampionIdol; m_UseRestartDelay = reader.ReadBool(); goto case 2; } // *** *** case 2: { m_RandomizeType = reader.ReadBool(); goto case 1; } case 1: { m_SpawnRange = reader.ReadInt(); m_Kills = reader.ReadInt(); goto case 0; } case 0: { if ( version < 1 ) m_SpawnRange = 24; bool active = reader.ReadBool(); m_Type = (ChampionSpawnType)reader.ReadInt(); m_Creatures = reader.ReadMobileList(); m_RedSkulls = reader.ReadItemList(); m_WhiteSkulls = reader.ReadItemList(); m_Platform = reader.ReadItem() as ChampionPlatform; m_Altar = reader.ReadItem() as 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.Now ); } if ( m_Platform == null || m_Altar == null ) Delete(); else if ( active ) Start(); break; } } }