Example #1
0
        public void Lockdown()
        {
            //teleporters do not need to be forcibly shut, as they simply won't function if they're not on.

            //TODO: if the teleporter is visible, have it report something?


            //don't bother tossing them if there's no toss point defined
            if (_TossPoint == Point3D.Zero || _TossMap == Map.Internal)
            {
                return;
            }


            IPooledEnumerable ie = GuardedMap.GetMobilesInBounds(GuardedRegion);

            List <Mobile> totoss = new List <Mobile>();

            foreach (Mobile m in ie)
            {
                //toss players and pets
                if (m is PlayerMobile || m is BaseCreature && ((BaseCreature)m).Controlled)
                {
                    totoss.Add(m);
                }
            }

            ie.Free();

            foreach (Mobile m in totoss)
            {
                m.MoveToWorld(_TossPoint, _TossMap);
            }
        }
Example #2
0
        public void Lockdown()
        {
            //slam the door shut!
            if (Open)
            {
                Open = false;
            }

            //don't bother tossing them if there's no toss point defined
            if (_TossPoint == Point3D.Zero || _TossMap == Map.Internal)
            {
                return;
            }


            IPooledEnumerable ie = GuardedMap.GetMobilesInBounds(GuardedRegion);

            List <Mobile> totoss = new List <Mobile>();

            foreach (Mobile m in ie)
            {
                //toss players and pets
                if (m is PlayerMobile || m is BaseCreature && ((BaseCreature)m).Controlled)
                {
                    totoss.Add(m);
                }
            }

            ie.Free();

            foreach (Mobile m in totoss)
            {
                m.MoveToWorld(_TossPoint, _TossMap);
            }
        }