|
TModLoader v1.4.4.9
TModLoader source code documentation
|
|
inline |
A more-convenient-to-call variant of the vanilla PickAmmo method, which handles most vanilla ammunition logic to decide various common stats related to ammunition-consuming weapons.
The stats output by this method take into account any extra stats which the ammunition it finds may provide (read: it accounts for ammo damage and knockback).
| weapon | The weapon for which to handle ammunition logic. |
| projToShoot | The projectile that should be shot based on the given weapon and the located ammunition. |
| speed | The speed at which the projectile that would be made by the given weapon and located ammunition should move. |
| damage | The damage value that the projectile shot should have, based on the given weapon and the located ammunition. |
| knockBack | The knockback value that the projectile shot should have, based on the given weapon and the located ammunition. |
| usedAmmoItemId | The numerical ID of the located ammunition. |
| dontConsume | Whether or not ammo consumption logic should be called upon. This defaults to false, and if it is true for any reason, ammo will not be consumed at the end of the method. This is useful for gathering the data needed based on PickAmmo's calculations without incidentally consuming any ammunition in the process. |
Definition at line 54018 of file Player.cs.
References Terraria.Player.GetWeaponDamage(), Terraria.Player.GetWeaponKnockback(), and Terraria.Player.PickAmmo().
Referenced by Terraria.Projectile.AI_075(), Terraria.Player.ItemCheck_Shoot(), and Terraria.Player.PickAmmo().
Here is the call graph for this function:
Here is the caller graph for this function: