public void Kick(Mobile m) { if (m == null || m.Deleted || m.Map != Map || MobileSpawns.Contains(m) || !m.CanBeginAction(InstanceMap.KickPreventionLock)) { return; } if ((m.Player || m.IsDeadBondedPet) && !m.Alive) { m.Resurrect(); } var z = Zones.Find(m.InRegion); if (z != null && !z.Deleted) { z.Kick(m); } else if (Map != null && Instances.GetDungeon(m) == null) { Map.Kick(m); } OnExitDungeon(m); }
private void InternalLogout(LogoutEventArgs e) { if (e != null && e.Mobile is PlayerMobile && !e.Mobile.Deleted && Instances.GetDungeon(e.Mobile) == this) { OnLogout((PlayerMobile)e.Mobile); } }