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

PreKill() public static method

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