Пример #1
0
        public static void CheckHit(Mobile attacker, Mobile defender)
        {
            if (IsImmune(defender))
            {
                attacker.SendLocalizedMessage(1157324); // Your target is currently immune to sparks!
                return;
            }

            SparksContext context = PropertyEffect.GetContext <SparksContext>(attacker, defender, EffectsType.Sparks);

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

                attacker.PlaySound(0x20A);
                defender.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Waist);
            }
        }
Пример #2
0
        public static void CheckHit(Mobile attacker, Mobile defender)
        {
            if (IsImmune(defender))
            {
                attacker.SendLocalizedMessage(1157324); // Your target is currently immune to sparks!
                return;
            }

            SparksContext context = GetContext <SparksContext>(attacker, defender);

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

                BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.Sparks, 1157330, 1157361));

                attacker.PlaySound(0x20A);
                defender.FixedParticles(0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Waist);
            }
        }