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

◆ RestoreMeleeSpeedBehaviorOnVanillaItems()

void Terraria.Item.RestoreMeleeSpeedBehaviorOnVanillaItems ( )
inlineprivate

Definition at line 52083 of file Item.cs.

52084 {
52085 bool isTool = pick > 0 || axe > 0 || hammer > 0 || type == 4711;
52086 if (type < ItemID.Count && melee && ((shoot > 0 && !ItemID.Sets.Spears[type] && !shootsEveryUse) || isTool))
52087 {
52088 if (noMelee)
52089 {
52091 }
52092 else
52093 {
52095 }
52096 }
52097 }
static bool[] Spears
Set for easily defining weapons as spears. Only used for vanilla spears to make sure they still scal...
Definition ItemID.cs:1606
static readonly short Count
Definition ItemID.cs:12719
bool melee
Definition Item.cs:800
bool attackSpeedOnlyAffectsWeaponAnimation
Dictates whether or not attack speed modifiers on this weapon will actually affect its use time....
Definition Item.cs:1039
bool noMelee
If true, the item's using animation will not deal damage. Set to true on most weapons that aren't swo...
Definition Item.cs:647
int pick
The Pickaxe power of this item. For example, Item.pick = 50; will appear as 50% Pickaxe Power in the ...
Definition Item.cs:409
int shoot
The ID of the projectile that is fired by this item on use. Either a T:Terraria.ID....
Definition Item.cs:594
int hammer
The Hammer power of this item. For example, Item.hammer = 70; will appear as 70% Hammer Power in the ...
Definition Item.cs:423
bool shootsEveryUse
Definition Item.cs:727
int axe
The Axe power of this item. The Axe power percentage shown to the user is five times this value,...
Definition Item.cs:416
DamageClass DamageType
The damage type of this Item. Assign to DamageClass.Melee/Ranged/Magic/Summon/Throwing for vanilla cl...
Definition Item.cs:1104
int type
The Item ID of this item. The Item ID is a unique number assigned to each Item loaded into the game....
Definition Item.cs:345
static DamageClass MeleeNoSpeed
This is a damage class used by various projectile-only vanilla melee weapons. Attack speed has no eff...
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...

References Terraria.Item.attackSpeedOnlyAffectsWeaponAnimation, Terraria.Item.axe, Terraria.ID.ItemID.Count, Terraria.Item.DamageType, Terraria.Item.hammer, Terraria.Item.melee, Terraria.ModLoader.DamageClass.MeleeNoSpeed, Terraria.Item.noMelee, Terraria.Item.pick, Terraria.Item.shoot, Terraria.Item.shootsEveryUse, Terraria.ID.ItemID.Sets.Spears, and Terraria.Item.type.

Referenced by Terraria.Item.SetDefaults().

+ Here is the caller graph for this function: