Beispiel #1
0
        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);
        }
Beispiel #2
0
 private void InternalLogout(LogoutEventArgs e)
 {
     if (e != null && e.Mobile is PlayerMobile && !e.Mobile.Deleted && Instances.GetDungeon(e.Mobile) == this)
     {
         OnLogout((PlayerMobile)e.Mobile);
     }
 }