|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
inline |
Calls M:Terraria.NPC.CalculateHitInfo(System.Int32,System.Int32,System.Boolean,System.Single,Terraria.ModLoader.DamageClass,System.Boolean,System.Single), M:Terraria.NPC.StrikeNPC(Terraria.NPC.HitInfo,System.Boolean,System.Boolean) and then M:Terraria.NetMessage.SendStrikeNPC(Terraria.NPC,Terraria.NPC.HitInfo@,System.Int32) (in multiplayer)
| damage | The damage to deal to the NPC, before modifications, defense, resistances etc |
| hitDirection | The hit direction of the resulting strike (1 or -1) |
| crit | Defaults to false |
| knockBack | Defaults to 0 |
| damageType | Defaults to P:Terraria.ModLoader.DamageClass.Default |
| damageVariation | Whether to apply damage variation. Defaults to false. |
| luck | Luck modifier to produce weight damageVariation towards higher (positive) or lower (negative) values. Defaults to 0 |
| noPlayerInteraction | Prevents M:Terraria.NPC.PlayerInteraction(System.Int32) from being called in single player. In multiplayer, player interaction is handled by the server. |
Definition at line 91776 of file NPC.cs.
References Terraria.Main.netMode, and Terraria.NetMessage.SendStrikeNPC().
Here is the call graph for this function: