Aura.Channel.Skills.SkillHelper.HandleMagicDefenseProtection C# (CSharp) Метод

HandleMagicDefenseProtection() публичный статический Метод

Reduces damage by target's magic defense and protection.
public static HandleMagicDefenseProtection ( Creature target, float &damage, bool defense = true, bool protection = true ) : void
target Aura.Channel.World.Entities.Creature
damage float
defense bool
protection bool
Результат void
		public static void HandleMagicDefenseProtection(Creature target, ref float damage, bool defense = true, bool protection = true)
		{
			if (defense)
				damage = Math.Max(1, damage - target.MagicDefense);
			if (protection && damage > 1)
				damage = Math.Max(1, damage - (damage / 100 * target.MagicProtection));
		}