Terraria.ModLoader.PlayerHooks.PreHurt C# (CSharp) Method

PreHurt() public static method

public static PreHurt ( Player player, bool pvp, bool quiet, int &damage, int &hitDirection, bool &crit, bool &customDamage, bool &playSound, bool &genGore, PlayerDeathReason &damageSource ) : bool
player Player
pvp bool
quiet bool
damage int
hitDirection int
crit bool
customDamage bool
playSound bool
genGore bool
damageSource PlayerDeathReason
return bool
        public static bool PreHurt(Player player, bool pvp, bool quiet, ref int damage, ref int hitDirection,
			ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
        {
            bool flag = true;
            foreach (ModPlayer modPlayer in player.modPlayers)
            {
                if (!modPlayer.PreHurt(pvp, quiet, ref damage, ref hitDirection, ref crit, ref customDamage,
                        ref playSound, ref genGore, ref damageSource))
                {
                    flag = false;
                }
            }
            return flag;
        }