Пример #1
0
        public static void OnEnterRegion(OnEnterRegionEventArgs e)
        {
            WispOrb orb = GetWispOrb(e.From);

            if (orb != null && !Region.Find(e.From.Location, e.From.Map).IsPartOf <DespiseRegion>())
            {
                Timer.DelayCall(() =>
                {
                    e.From.SendLocalizedMessage(1153233);     // The Wisp Orb vanishes to whence it came...
                    orb.Delete();
                });
            }
        }
        public override void OnDeath(Container c)
        {
            base.OnDeath(c);

            if (m_Orb != null)
            {
                if (m_Orb.Owner != null)
                {
                    m_Orb.Owner.SendLocalizedMessage(1153312); // The Wisp Orb dissolves into aether.
                }
                m_Orb.Delete();
            }
        }
Пример #3
0
        public static void OnEnterRegion(OnEnterRegionEventArgs e)
        {
            WispOrb orb = GetWispOrb(e.From);

            if (orb != null && !Region.Find(e.From.Location, e.From.Map).IsPartOf <DespiseRegion>())
            {
                Timer.DelayCall(() =>
                {
                    if (orb.Pet != null && !orb.Pet.Deleted)
                    {
                        orb.Pet.Delete();
                    }

                    orb.Delete();
                });;
            }
        }
Пример #4
0
        private void KickFromBossRegion(bool deletepet)
        {
            if (m_LowerRegion == null)
            {
                return;
            }

            List <Mobile> mobiles = m_LowerRegion.GetPlayers();
            Rectangle2D   bounds  = m_SequenceAlignment == Alignment.Evil ? EvilKickBounds : GoodKickBounds;

            foreach (Mobile m in mobiles)
            {
                WispOrb orb = GetWispOrb(m);
                Point3D p   = GetRandomLoc(bounds);

                m.MoveToWorld(p, Map.Trammel);

                if (orb != null && deletepet)
                {
                    if (orb.Pet != null)
                    {
                        orb.Pet.Delete();
                        orb.Pet = null;
                    }

                    orb.Delete();
                    m.SendLocalizedMessage(1153312); // The Wisp Orb dissolves into aether.
                }
                else if (orb != null && orb.Pet != null && orb.Pet.Alive)
                {
                    orb.Pet.MoveToWorld(p, Map.Trammel);
                }

                m.SendLocalizedMessage(1153346); // You are summoned back to your stronghold.
            }

            ColUtility.Free(mobiles);
        }