public void OnLogout(LogoutEventArgs e) { /* Publish 59: Players can no longer log out without repercussions in Champ Spawn regions * - Players that log out in a champ spawn region will get teleported to a shrine * - If a player logs out in a champ spawn area all the non equipped "cursed" items on them will drop to the ground * - This will only affect players who log out beyond the 10 minute grace period; accidental disconnections will not be punished */ Mobile m = e.Mobile; if (m.Region.IsPartOf(m_Region)) { if (m.Backpack != null) { List <Item> list = new List <Item>(); RecurseGetCursedItems(m.Backpack, list); foreach (Item item in list) { item.MoveToWorld(m.Location, m.Map); } } m.Location = ExorcismSpell.GetNearestShrine(m); } }
public override void OnEnter(Mobile m) { // Publish 59: Ghosts without corpses cannot enter Champ Spawn regions or log in to them if (ChampionSpawn.IsGhost(m)) { m.Location = ExorcismSpell.GetNearestShrine(m); } }
public void OnLogin(LoginEventArgs e) { // Publish 59: Ghosts without corpses cannot enter Champ Spawn regions or log in to them Mobile m = e.Mobile; if (m.Region.IsPartOf(m_Region) && IsGhost(m)) { m.Location = ExorcismSpell.GetNearestShrine(m); } }
public void KickGhosts() { // Ghosts without corpses will be automatically exorcised periodically foreach (Mobile m in m_Region.GetMobiles()) { if (IsGhost(m)) { m.Location = ExorcismSpell.GetNearestShrine(m); } } m_KickTime = DateTime.Now + m_KickDelay; }