protected override void OnTick() { if (m_Altar.Boss == null || m_Altar.Boss.Deleted || !m_Altar.Boss.CheckAlive()) { m_Altar.DeleteKeys(PeerlessEntry.GetLabelNum(m_Altar.Peerless)); m_Altar.clearT = new ClearTimer(m_Altar); m_Altar.clearT.Start(); Stop(); } if (cont <= 0) { PeerlessRegion reg = m_Altar.Region; if (reg != null) { reg.KickAll(m_Altar.Peerless); } m_Altar.Clear(); m_Altar.DeleteKeys(PeerlessEntry.GetLabelNum(m_Altar.Peerless)); if (m_Altar.Boss != null && !m_Altar.Boss.Deleted) { m_Altar.Boss.Delete(); } Stop(); } cont--; }
protected override void OnTick() { PeerlessRegion region = m_Altar.Region; if (region != null) { region.KickAll(m_Altar.Peerless); } m_Altar.Clear(); m_Altar.DeleteKeys(PeerlessEntry.GetLabelNum(m_Altar.Peerless)); Stop(); }
public override bool OnDragDrop(Mobile from, Item dropped) { if (!base.OnDragDrop(from, dropped) || m_Peerless == PeerlessList.None) { return(false); } if (PeerlessEntry.IsPeerlessKey(m_Peerless, dropped)) { if (m_Owner != from && m_actived) { if (Boss != null && Boss.CheckAlive()) { from.SendLocalizedMessage(1075213); // The master of this realm has already been summoned and is engaged in combat. Your opportunity will come after he has squashed the current batch of intruders! } else { from.SendLocalizedMessage(1072683, m_Owner.Name); // ~1_NAME~ has already activated the Prism, please wait... } return(false); } for (int i = 0; i < m_Keys.Length; i++) { if (m_Keys[i] == dropped.GetType()) { from.SendLocalizedMessage(1072682); // This is not the proper key. return(false); } else if (m_Keys[i] == null) { m_Keys[i] = dropped.GetType(); if (i == 0) { m_actived = true; m_Owner = from; from.SendLocalizedMessage(1074575); // You have activated this object! m_ResetTimer = new ResetTimer(this); m_ResetTimer.Start(); } if (PeerlessEntry.GetAltarKeys(m_Peerless) == (i + 1)) { m_ResetTimer.Stop(); from.SendLocalizedMessage(1072678); // You have awakened the master of this realm. You need to hurry to defeat it in time! GiveKeys(from); Mobile boss = Activator.CreateInstance(PeerlessEntry.GetBoss(m_Peerless)) as Mobile; m_Boss = boss; boss.MoveToWorld(PeerlessEntry.GetSpawnPoint(m_Peerless), PeerlessEntry.GetMap(m_Peerless)); boss.OnBeforeSpawn(boss.Location, boss.Map); PeerlessT = new PeerlessTimer(this); PeerlessT.Start(); } dropped.Delete(); return(true); } } from.SendLocalizedMessage(1072682); // This is not the proper key. return(false); } else { from.SendLocalizedMessage(1072682); // This is not the proper key. return(false); } }