This method sets a variety of Item values common to whip weapons.
Specifically:
autoReuse = false; useStyle = F:Terraria.ID.ItemUseStyleID.Swing; useAnimation = animationTotalTime; useTime = animationTotalTime; width = 18; height = 18; shoot = projectileId; UseSound = F:Terraria.ID.SoundID.Item152; noMelee = true; DamageType = P:Terraria.ModLoader.DamageClass.SummonMeleeSpeed; noUseGraphic = true; damage = dmg; knockBack = kb; shootSpeed = shootspeed ;
- Parameters
-
| projectileId | |
| dmg | |
| kb | |
| shootspeed | |
| animationTotalTime | |
Definition at line 47844 of file Item.cs.
47845 {
47860 }
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item152
SoundStyle? UseSound
The sound this item makes when used. Set this to an existing T:Terraria.ID.SoundID entry or assign to...
float knockBack
The force of the knock back. Max value is 20. The Knockback wiki pagehas info on existing values....
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
bool noMelee
If true, the item's using animation will not deal damage. Set to true on most weapons that aren't swo...
int shoot
The ID of the projectile that is fired by this item on use. Either a T:Terraria.ID....
int damage
The base damage inflicted by this item. The List of weapons wiki pagecan be a useful guide for decidi...
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
bool noUseGraphic
If true, the item's sprite will not be visible while the item is in use. Defaults to false.
float shootSpeed
The velocity in pixels the projectile fired by this item will have. Actual velocity depends on the pr...
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
bool autoReuse
Whether the item is in continuous use while the mouse button is held down. Defaults to false.
DamageClass DamageType
The damage type of this Item. Assign to DamageClass.Melee/Ranged/Magic/Summon/Throwing for vanilla cl...
static DamageClass SummonMeleeSpeed
This is a damage class used solely by vanilla whips. It benefits from melee attackSpeed bonuses.
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
References Terraria.Item.autoReuse, Terraria.Item.damage, Terraria.Item.DamageType, Terraria.Entity.height, Terraria.ID.SoundID.Item152, Terraria.Item.knockBack, Terraria.Item.noMelee, Terraria.Item.noUseGraphic, Terraria.Item.shoot, Terraria.Item.shootSpeed, Terraria.ModLoader.DamageClass.SummonMeleeSpeed, Terraria.Item.useAnimation, Terraria.Item.UseSound, Terraria.Item.useStyle, Terraria.Item.useTime, and Terraria.Entity.width.
Referenced by Terraria.Item.SetDefaults5().