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
        public virtual bool OnCombatantChange(DungeonZone zone, Mobile m, Mobile oldMob, Mobile newMob)
#endif
        {
            if (m != null && !m.Deleted && m.Alive && MobileSpawns.Contains(m))
            {
                if (oldMob == null && newMob != null)
                {
                    OnSpawnActivate(m);
                }
                else if (oldMob != null && newMob == null)
                {
                    OnSpawnDeactivate(m);
                }
            }

            return(true);
        }
Beispiel #3
0
 public bool IsSpawn(Mobile m)
 {
     return(m != null && MobileSpawns.Contains(m));
 }