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); }
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); } }
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); } }