|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
inline |
Calculates a total damage modifier for the player for the provided T:Terraria.ModLoader.DamageClass.
Use in conjunction with M:Terraria.ModLoader.StatModifier.ApplyTo(System.Single) to calculate a final damage value for a given T:Terraria.ModLoader.DamageClass and base damage: int finalDamage = (int)player.GetTotalDamage(item.DamageType).ApplyTo(30);
The modifiers calculated here are important due to the possibility of damage classes inheriting modifiers from other damage classes. For instance, an attack can be classified as multiple damage types and each could have different modifiers to apply to the damage
| damageClass | The T:Terraria.ModLoader.DamageClass to use for total damage calculation |
Definition at line 58396 of file Player.cs.
References Terraria.ModLoader.DamageClassData.damage, Terraria.ModLoader.DamageClassLoader.DamageClasses, and Terraria.Player.damageData.
Referenced by Terraria.Projectile.AI_075(), Terraria.Player.CommandForbiddenStorm(), Terraria.Player.DashMovement(), Terraria.Player.GetTotalDamage< T >(), Terraria.Player.GetWeaponDamage(), Terraria.Player.HorizontalMovement(), Terraria.Player.JumpMovement(), Terraria.Player.OnHurt_Part2(), Terraria.Player.PickAmmo(), and Terraria.Projectile.Update().
Here is the caller graph for this function: