public GuardSpawner(Point3D location, TownStone town) : base(0x1f13) { m_Running = false; Location = location; Map = town.Map; m_SpawnedGuard = null; m_Town = town; m_Delay = TimeSpan.FromSeconds(600.0); Visible = false; Movable = false; PomiGuard guard = new PomiGuard(m_Town, this); m_SpawnedGuard = guard; if (m_Town.GardesPNJ.Count > 0) { m_RangeHome = ((GuardSpawner)(m_Town.GardesPNJ[0])).RangeHome; } else { m_RangeHome = 5; } guard.Home = Location; guard.RangeHome = 5; Name = guard.Name; }
protected override void OnTick() { PomiGuard guard = new PomiGuard(m_Town, m_spawner); m_spawner.SpawnedGuard = guard; guard.Home = m_spawner.Location; guard.RangeHome = 5; m_spawner.Name = guard.Name; m_spawner.Running = false; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Delay = reader.ReadTimeSpan(); m_Town = (TownStone)reader.ReadItem(); m_SpawnedGuard = (PomiGuard)reader.ReadMobile(); m_RangeHome = reader.ReadInt(); m_Running = reader.ReadBool(); if (m_Running) { m_timer = new SpawnTimer(m_Town, this, m_Delay); m_timer.Start(); } }
public GuardSpawner(Point3D location, TownStone town) : base( 0x1f13 ) { m_Running = false; Location = location; Map = town.Map; m_SpawnedGuard = null; m_Town = town; m_Delay = TimeSpan.FromSeconds( 600.0 ); Visible = false; Movable = false; PomiGuard guard = new PomiGuard(m_Town, this); m_SpawnedGuard = guard; if(m_Town.GardesPNJ.Count > 0 ) m_RangeHome = ((GuardSpawner)(m_Town.GardesPNJ[0])).RangeHome; else m_RangeHome = 5; guard.Home = Location; guard.RangeHome = 5; Name = guard.Name; }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Delay = reader.ReadTimeSpan(); m_Town = (TownStone)reader.ReadItem(); m_SpawnedGuard = (PomiGuard)reader.ReadMobile(); m_RangeHome = reader.ReadInt(); m_Running = reader.ReadBool(); if(m_Running) { m_timer = new SpawnTimer(m_Town, this, m_Delay); m_timer.Start(); } }