Пример #1
0
        public static void CheckDamage(Mobile from, int damage, int phys, int fire, int cold, int pois, int ergy, int direct)
        {
            DamageEaterContext context = (DamageEaterContext)PropertyEffect.GetContext(from, EffectsType.DamageEater);

            if (context == null && HasValue(from))
                context = new DamageEaterContext(from);

            if (context != null)
                context.OnDamage(damage, phys, fire, cold, pois, ergy, direct);
        }
Пример #2
0
        public static void CheckDamage(Mobile from, int damage, int phys, int fire, int cold, int pois, int ergy, int direct)
        {
            DamageEaterContext context = PropertyEffect.GetContext <DamageEaterContext>(from, EffectsType.DamageEater);

            if (context == null && HasValue(from))
            {
                context = new DamageEaterContext(from);
            }

            if (context != null)
            {
                context.OnDamage(damage, phys, fire, cold, pois, ergy, direct);
            }
        }
Пример #3
0
        public static void CheckDamage(Mobile from, int damage, int phys, int fire, int cold, int pois, int ergy, int direct)
        {
            DamageEaterContext context = GetContextForVictim <DamageEaterContext>(from);

            if (context == null && HasValue(from))
            {
                AddEffects(context = new DamageEaterContext(from));
            }

            if (context != null)
            {
                context.OnDamage(damage, phys, fire, cold, pois, ergy, direct);
            }
        }