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

ModifyHitNPCWithProj() public static method

public static ModifyHitNPCWithProj ( Projectile proj, NPC target, int &damage, float &knockback, bool &crit, int &hitDirection ) : void
proj Projectile
target NPC
damage int
knockback float
crit bool
hitDirection int
return void
        public static void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
        {
            if (proj.npcProj || proj.trap)
            {
                return;
            }
            Player player = Main.player[proj.owner];
            foreach (ModPlayer modPlayer in player.modPlayers)
            {
                modPlayer.ModifyHitNPCWithProj(proj, target, ref damage, ref knockback, ref crit, ref hitDirection);
            }
        }