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

◆ DefaultToStaff()

void Terraria.Item.DefaultToStaff ( int projType,
float pushForwardSpeed,
int singleShotTime,
int manaPerShot )
inline

This method sets a variety of Item values common to staff magic weapons.
Specifically:

DefaultToMagicWeapon(projType, singleShotTime, pushForwardSpeed, hasAutoReuse: true); mana = manaPerShot; width = 40; height = 40; UseSound = F:Terraria.ID.SoundID.Item43; Additionally:

Parameters
projType
pushForwardSpeedPassed into DefaultToMagicWeapon as the shotVelocity parameter
singleShotTime
manaPerShot

Definition at line 47976 of file Item.cs.

47977 {
47979 mana = manaPerShot;
47980 width = 40;
47981 height = 40;
47983 }
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static readonly SoundStyle Item43
Definition SoundID.cs:763
SoundStyle? UseSound
The sound this item makes when used. Set this to an existing T:Terraria.ID.SoundID entry or assign to...
Definition Item.cs:534
void DefaultToMagicWeapon(int projType, int singleShotTime, float shotVelocity, bool hasAutoReuse=false)
This method sets a variety of Item values common to magic weapons. Specifically:
Definition Item.cs:48452
int mana
The amount of mana this item consumes on use. Use M:Terraria.ModLoader.ModItem.ModifyManaCost(Terra...
Definition Item.cs:635

References Terraria.Item.DefaultToMagicWeapon(), Terraria.Entity.height, Terraria.ID.SoundID.Item43, Terraria.Item.mana, Terraria.Item.UseSound, and Terraria.Entity.width.

Referenced by Terraria.Item.SetDefaults5().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: