TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CalculateStrikeFromLegacyValues()

HitInfo Terraria.NPC.CalculateStrikeFromLegacyValues ( int Damage,
float knockBack,
int hitDirection,
bool crit )
inlinepackage

Definition at line 91684 of file NPC.cs.

91685 {
91686 HitInfo hit;
91687 if (Damage == 9999)
91688 {
91689 HitInfo hitInfo = new HitInfo();
91690 hitInfo.Crit = crit;
91691 hitInfo.Knockback = knockBack;
91692 hitInfo.HitDirection = hitDirection;
91693 hitInfo.InstantKill = true;
91694 hit = hitInfo;
91695 }
91696 else
91697 {
91699 }
91700 NetMessage.SetLegacyStrike(hit);
91701 return hit;
91702 }
static DamageClass Default
Default damage class for non-classed weapons and items, does not benefit from Generic bonuses.
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
HitModifiers GetIncomingStrikeModifiers(DamageClass damageType, int hitDirection, bool ignoreArmorDebuffs=false)
Initializes a T:Terraria.NPC.HitModifiers calculation with the properties of this NPC,...
Definition NPC.cs:91711

References Terraria.GameContent.Damage, Terraria.ModLoader.DamageClass.Default, and Terraria.NetMessage.SetLegacyStrike().

+ Here is the call graph for this function: