Esempio n. 1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
            }
            else
            {
                if (ItemID == 0xF6B)
                {
                    ItemID = 0xA12;
                }
                else if (ItemID == 0xA12)
                {
                    ItemID = 0xF6B;
                }
            }

            var parent = Parent as Mobile;

            if (parent == from && Burning)
            {
                Mobiles.MeerMage.StopEffect(parent, true);
                SwarmContext.CheckRemove(parent);
            }
        }
Esempio n. 2
0
        public override void OnAdded(object parent)
        {
            base.OnAdded(parent);

            if (parent is Mobile && Burning)
            {
                Mobiles.MeerMage.StopEffect((Mobile)parent, true);
                SwarmContext.CheckRemove((Mobile)parent);
            }
        }
Esempio n. 3
0
        public override void Ignite()
        {
            base.Ignite();

            if (Parent is Mobile && Burning)
            {
                Mobiles.MeerMage.StopEffect((Mobile)Parent, true);
                SwarmContext.CheckRemove((Mobile)Parent);
            }
        }
Esempio n. 4
0
        public override void OnAdded(object parent)
        {
            if (parent is Mobile mobile)
            {
                var holding = mobile.FindItemOnLayer(Layer.TwoHanded);

                if (holding is Torch && Burning)
                {
                    Mobiles.MeerMage.StopEffect(mobile, true);
                    SwarmContext.CheckRemove(mobile);
                }
            }
        }
Esempio n. 5
0
        public override void Ignite()
        {
            base.Ignite();

            if (Parent is Mobile mobile)
            {
                var holding = mobile.FindItemOnLayer(Layer.TwoHanded);

                if (holding is Torch && Burning)
                {
                    Mobiles.MeerMage.StopEffect(mobile, true);
                    SwarmContext.CheckRemove(mobile);
                }
            }
        }
Esempio n. 6
0
        public static void CheckHit(Mobile attacker, Mobile defender)
        {
            if (IsImmune(defender))
            {
                attacker.SendLocalizedMessage(1157322); // Your target is currently immune to swarm!
                return;
            }

            SwarmContext context = PropertyEffect.GetContext <SwarmContext>(attacker, defender, EffectsType.Swarm);

            if (context != null)
            {
                context.RemoveEffects();
            }

            context = new SwarmContext(attacker, defender, null);

            defender.NonlocalOverheadMessage(MessageType.Regular, 0x5C, 1114447, defender.Name); // * ~1_NAME~ is stung by a swarm of insects *
            defender.LocalOverheadMessage(MessageType.Regular, 0x5C, 1071905);                   // * The swarm of insects bites and stings your flesh! *
        }
Esempio n. 7
0
        public static void CheckHit(Mobile attacker, Mobile defender)
        {
            if (IsImmune(defender))
            {
                attacker.SendLocalizedMessage(1157322); // Your target is currently immune to swarm!
                return;
            }

            SwarmContext context = PropertyEffect.GetContext <SwarmContext>(attacker, defender, EffectsType.Swarm);

            if (context == null)
            {
                context = new SwarmContext(attacker, defender, null);

                if (defender.NetState != null)
                {
                    defender.PrivateOverheadMessage(MessageType.Regular, 1150, 1157321, defender.NetState); // *You are engulfed in a swarm of insects!*
                }
                Server.Effects.SendTargetEffect(defender, context._ID, 40);

                defender.PlaySound(0x00E);
                defender.PlaySound(0x1BC);
            }
        }