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

◆ ResetStats()

void Terraria.Item.ResetStats ( int Type)
inline

Definition at line 49116 of file Item.cs.

49117 {
49118 //IL_0226: Unknown result type (might be due to invalid IL or missing references)
49119 tooltipContext = -1;
49120 BestiaryNotes = null;
49121 ModItem = null;
49122 _globals = null;
49123 StatsModifiedBy = new List<Mod>();
49127 useLimitPerAnimation = null;
49130 InterruptChannelOnHurt = false;
49131 StopAnimationOnHurt = false;
49134 sentry = false;
49135 hasVanityEffects = false;
49136 DD2Summon = false;
49138 shopCustomPrice = null;
49139 expert = false;
49140 master = false;
49141 isAShopItem = false;
49142 expertOnly = false;
49143 masterOnly = false;
49144 instanced = false;
49145 questItem = false;
49146 fishingPole = 0;
49147 bait = 0;
49148 hairDye = -1;
49149 makeNPC = 0;
49150 dye = 0;
49151 paint = 0;
49152 paintCoating = 0;
49153 tileWand = -1;
49154 notAmmo = false;
49155 netID = 0;
49156 prefix = 0;
49157 crit = 0;
49158 mech = false;
49159 flame = false;
49160 reuseDelay = 0;
49161 placeStyle = 0;
49162 buffTime = 0;
49163 buffType = 0;
49164 mountType = -1;
49165 cartTrack = false;
49166 material = false;
49167 noWet = false;
49168 vanity = false;
49169 mana = 0;
49170 wet = false;
49171 wetCount = 0;
49172 lavaWet = false;
49173 channel = false;
49174 manaIncrease = 0;
49176 noMelee = false;
49177 noUseGraphic = false;
49178 lifeRegen = 0;
49179 shootSpeed = 0f;
49180 active = true;
49181 alpha = 0;
49182 ammo = AmmoID.None;
49184 autoReuse = false;
49185 accessory = false;
49186 axe = 0;
49187 healMana = 0;
49188 bodySlot = -1;
49189 legSlot = -1;
49190 headSlot = -1;
49191 potion = false;
49192 color = default(Color);
49193 glowMask = -1;
49194 consumable = false;
49196 createTile = -1;
49197 createWall = -1;
49198 damage = -1;
49199 defense = 0;
49200 hammer = 0;
49201 healLife = 0;
49202 holdStyle = 0;
49203 knockBack = 0f;
49204 maxStack = 1;
49205 pick = 0;
49206 rare = 0;
49207 scale = 1f;
49208 shoot = 0;
49209 stack = 1;
49210 ToolTip = null;
49211 tileBoost = 0;
49212 useStyle = 0;
49213 UseSound = null;
49214 useTime = 100;
49215 useAnimation = 100;
49216 value = 0;
49217 useTurn = false;
49218 buy = false;
49219 handOnSlot = -1;
49220 handOffSlot = -1;
49221 backSlot = -1;
49222 frontSlot = -1;
49223 shoeSlot = -1;
49224 waistSlot = -1;
49225 wingSlot = -1;
49226 shieldSlot = -1;
49227 neckSlot = -1;
49228 faceSlot = -1;
49229 balloonSlot = -1;
49230 beardSlot = -1;
49231 uniqueStack = false;
49232 favorited = false;
49233 shootsEveryUse = false;
49234 Variant = null;
49235 type = Type;
49236 }
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Definition Entity.cs:57
byte wetCount
Definition Entity.cs:63
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
Definition Entity.cs:21
static int None
Definition AmmoID.cs:133
AmmoID entries represent ammo types. Ammo items that share the same AmmoID value assigned to F:Terrar...
Definition AmmoID.cs:11
int ammo
The Ammo ID this item belongs to. Weapons with F:Terraria.Item.useAmmo set to the same AmmoID will co...
Definition Item.cs:606
int timeSinceTheItemHasBeenReservedForSomeone
Definition Item.cs:649
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
float knockBack
The force of the knock back. Max value is 20. The Knockback wiki pagehas info on existing values....
Definition Item.cs:462
bool expert
If true, then the given item is automatically given the Expert rarity, causing its name to be drawn i...
Definition Item.cs:283
bool useTurn
Whether the player can turn around while the using animation of this item is happening....
Definition Item.cs:500
bool consumeAmmoOnFirstShotOnly
Dictates whether or not this item should only consume ammo on its first shot of each use....
Definition Item.cs:1070
bool isAShopItem
If true, then the given item is being sold in a shop. Shop items display their price....
Definition Item.cs:302
int hairDye
The numerical ID of the hair shader in F:Terraria.Graphics.Shaders.GameShaders.Hair this item will ap...
Definition Item.cs:309
bool AllowReforgeForStackableItem
Set to true in SetDefaults to allow this item to receive a prefix on reforge even if maxStack is not ...
Definition Item.cs:1045
bool mech
If true, then the given item will show all placed wires and actuators when held. This item will also...
Definition Item.cs:176
int faceSlot
Definition Item.cs:566
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
Definition Item.cs:384
int neckSlot
Definition Item.cs:564
int dye
The numerical ID of the armor shader in F:Terraria.Graphics.Shaders.GameShaders.Armor this item activ...
Definition Item.cs:224
bool material
Indicates that an item should show the material tooltip. Typically this means that the item is used i...
Definition Item.cs:670
bool attackSpeedOnlyAffectsWeaponAnimation
Dictates whether or not attack speed modifiers on this weapon will actually affect its use time....
Definition Item.cs:1039
bool questItem
If true, categorizes the given item as a quest fish. Quest fish get a special tooltip,...
Definition Item.cs:129
int fishingPole
The numerical value this item adds to a player's fishing skill when held. If greater than 0,...
Definition Item.cs:232
int shoeSlot
Definition Item.cs:556
int wingSlot
Definition Item.cs:560
ItemTooltip ToolTip
Definition Item.cs:574
int tileWand
The numerical ID of the item this item consumes when used. If greater than 0, this item cannot be us...
Definition Item.cs:203
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
string BestiaryNotes
Definition Item.cs:576
int crit
The base critical chance for this item. Remember that the player has a base crit chance of 4....
Definition Item.cs:746
int value
The number of copper coins this item is worth (aka, cost to buy from a merchant). Setting it to 10462...
Definition Item.cs:655
int reuseDelay
A delay in frames added at the end of the using animation for the item, during which the player wont ...
Definition Item.cs:760
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
bool InterruptChannelOnHurt
When enabled and the player is hurt, F:Terraria.Player.channel will be set to false.
Definition Item.cs:1085
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
int useAmmo
The Ammo ID this weapon will consume. Ammo items with F:Terraria.Item.ammo set to this same AmmoID wi...
Definition Item.cs:618
bool StopAnimationOnHurt
When enabled and the player is hurt, F:Terraria.Player.channel will be set to false,...
Definition Item.cs:1090
byte paint
The numerical ID of the paint applied by this item when used with a paint brush or paint roller....
Definition Item.cs:317
int manaIncrease
Definition Item.cs:626
int healMana
The amount of mana this item restores on use. Use M:Terraria.ModLoader.ModItem.GetHealMana(Terraria...
Definition Item.cs:476
int rare
Indicates the rarity of an item. Assign to a T:Terraria.ID.ItemRarityID value. Vanilla values range f...
Definition Item.cs:587
bool ChangePlayerDirectionOnShoot
When true, shooting any projectile from this item will make the owner face the projectile....
Definition Item.cs:1097
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 maxStack
The maximum number of items that can be contained within a single stack. F:Terraria....
Definition Item.cs:402
float scale
The size multiplier of the item's sprite while the item is being used. Also increases range for melee...
Definition Item.cs:526
int makeNPC
The numerical ID of the NPC that this item creates when used. Mainly used for caught critters as ite...
Definition Item.cs:270
int headSlot
Definition Item.cs:542
int frontSlot
Definition Item.cs:554
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 DD2Summon
If true, the given item is categorized as a Dungeon Defenders 2 summon item. DD2 summon items get a ...
Definition Item.cs:737
int beardSlot
Definition Item.cs:570
int damage
The base damage inflicted by this item. The List of weapons wiki pagecan be a useful guide for decidi...
Definition Item.cs:455
bool hasVanityEffects
If true, this item has vanity effects even though it doesn't use equipment slots. Unused in vanilla...
Definition Item.cs:769
int createWall
The ID of the wall this item places on use. Either a T:Terraria.ID.WallID entry or M:Terraria....
Definition Item.cs:441
int createTile
The ID of the tile this item places on use. Either a T:Terraria.ID.TileID entry or M:Terraria....
Definition Item.cs:435
int handOffSlot
Definition Item.cs:550
bool consumable
Whether the item is consumed after use. If consumed, the item stack will decrease by 1....
Definition Item.cs:488
int healLife
The amount of health this item restores on use. Use M:Terraria.ModLoader.ModItem....
Definition Item.cs:469
int buffTime
The duration in ticks of the buff given by this item on use. There are 60 ticks per second,...
Definition Item.cs:690
int buffType
The Buff ID of the buff given by this item on use. To have a potion give multiple buffs,...
Definition Item.cs:683
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
Definition Item.cs:366
bool cartTrack
Definition Item.cs:698
int shopSpecialCurrency
The numerical ID of the special currency this item is bought using. To make an item bought using Def...
Definition Item.cs:715
bool noUseGraphic
If true, the item's sprite will not be visible while the item is in use. Defaults to false.
Definition Item.cs:641
bool instanced
If true, then the given item is instanced per-client. Instanced items only appear on the client they...
Definition Item.cs:332
bool noWet
If true, the item won't be drawn while the holding player is wet. The player will also not be in the ...
Definition Item.cs:676
bool favorited
If true, then the given item is favorited. Favorited items cannot be dropped, automatically moved in...
Definition Item.cs:354
bool buy
Definition Item.cs:657
float shootSpeed
The velocity in pixels the projectile fired by this item will have. Actual velocity depends on the pr...
Definition Item.cs:600
bool vanity
If true, this item is a vanity item. Vanity items can't receive prefixes and have a special vanity ...
Definition Item.cs:665
int mana
The amount of mana this item consumes on use. Use M:Terraria.ModLoader.ModItem.ModifyManaCost(Terra...
Definition Item.cs:635
int tileBoost
Additional tile range provided by this tool or tile. Copper Pickaxe has a value of -1,...
Definition Item.cs:429
bool accessory
Whether the item is an accessory. Defaults to false.
Definition Item.cs:378
bool shootsEveryUse
Definition Item.cs:727
bool chlorophyteExtractinatorConsumable
Definition Item.cs:729
int IEntityWithGlobals< GlobalItem >. Type
Definition Item.cs:1019
int? useLimitPerAnimation
Dictates the amount of times a weapon can be used (shot, etc) each time it animates (is swung,...
Definition Item.cs:1061
List< Mod > StatsModifiedBy
Definition Item.cs:1025
short glowMask
The index in F:Terraria.GameContent.TextureAssets.GlowMask of this item's glow mask,...
Definition Item.cs:519
int backSlot
Definition Item.cs:552
int balloonSlot
Definition Item.cs:568
int netID
Definition Item.cs:739
bool uniqueStack
Players cannot pick up a uniqueStack item if they have an item with the same F:Terraria....
Definition Item.cs:706
int tooltipContext
The context in which this item's tooltip is being drawn. See T:Terraria.UI.ItemSlot....
Definition Item.cs:217
bool sentry
Definition Item.cs:754
int placeStyle
The style of the tile being placed. Used for tiles that have a different look depending on the item u...
Definition Item.cs:448
int holdStyle
Assign to an T:Terraria.ID.ItemHoldStyleID value to give this item a specific animation while the pla...
Definition Item.cs:360
GlobalItem[] _globals
Definition Item.cs:787
ItemVariant Variant
Definition Item.cs:950
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
Definition Item.cs:391
int? shopCustomPrice
If not null, the custom value of the given item when being bought from a shop. Used for assigning a ...
Definition Item.cs:725
bool autoReuse
Whether the item is in continuous use while the mouse button is held down. Defaults to false.
Definition Item.cs:494
int defense
The amount of defense this item provides when equipped, either as an accessory or armor....
Definition Item.cs:540
int waistSlot
Definition Item.cs:558
int prefix
The current prefix applied to this item. Either a T:Terraria.ID.PrefixID entry or M:Terraria....
Definition Item.cs:752
int legSlot
Definition Item.cs:546
bool expertOnly
If true, then the given item's effects only function in Expert Mode or higher (P:Terraria....
Definition Item.cs:277
bool flame
If true, will cause the corresponding flame texture to be drawn while this item is held....
Definition Item.cs:169
int handOnSlot
Definition Item.cs:548
bool channel
Used for items that have special behavior when the attack button is held. Defaults to false.
Definition Item.cs:372
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
int mountType
Specifies which mount to equip when the item is used. Assign to ModContent.MountType<ModdedMountHere>...
Definition Item.cs:696
int bodySlot
Definition Item.cs:544
byte paintCoating
Definition Item.cs:319
DamageClass DamageType
The damage type of this Item. Assign to DamageClass.Melee/Ranged/Magic/Summon/Throwing for vanilla cl...
Definition Item.cs:1104
int alpha
Set to a value from 0 to 255 to control how transparent the item will appear when drawn....
Definition Item.cs:512
int bait
The numerical value this item adds to a player's fishing skill when used as bait. If greater than 0,...
Definition Item.cs:241
int lifeRegen
The value to add to F:Terraria.Player.lifeRegen of the equipping player. Defaults to 0.
Definition Item.cs:624
Color color
Draws the item sprite with a colored tint. Gel and Sharkfin use this to spawn different colored items...
Definition Item.cs:506
int shieldSlot
Definition Item.cs:562
bool potion
If true, this item will inflict potion sickness on use. Also determines whether the item cannot be us...
Definition Item.cs:482
bool master
If true, then the given item is automatically given the Master rarity, causing its name to be drawn i...
Definition Item.cs:296
bool notAmmo
If true and the item is ammo (sets F:Terraria.Item.ammo to something), the item will not count as amm...
Definition Item.cs:612
bool consumeAmmoOnLastShotOnly
Dictates whether or not this item should only consume ammo on its last shot of each use....
Definition Item.cs:1080
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
bool masterOnly
If true, then the given item's effects only function in Master Mode or higher (P:Terraria....
Definition Item.cs:290
bool useTurnOnAnimationStart
Similar to useTurn, but only allows turning when an animation starts (eg between swings)....
Definition Item.cs:1051
static DamageClass Default
Default damage class for non-classed weapons and items, does not benefit from Generic bonuses.
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
This class serves as a place for you to place all your properties and hooks for each item....
Definition ModItem.cs:24

References Terraria.Item._globals, Terraria.Item.accessory, Terraria.Entity.active, Terraria.Item.AllowReforgeForStackableItem, Terraria.Item.alpha, Terraria.Item.ammo, Terraria.Item.attackSpeedOnlyAffectsWeaponAnimation, Terraria.Item.autoReuse, Terraria.Item.axe, Terraria.Item.backSlot, Terraria.Item.bait, Terraria.Item.balloonSlot, Terraria.Item.beardSlot, Terraria.Item.BestiaryNotes, Terraria.Item.bodySlot, Terraria.Item.buffTime, Terraria.Item.buffType, Terraria.Item.buy, Terraria.Item.cartTrack, Terraria.Item.ChangePlayerDirectionOnShoot, Terraria.Item.channel, Terraria.Item.chlorophyteExtractinatorConsumable, Terraria.Item.color, Terraria.Item.consumable, Terraria.Item.consumeAmmoOnFirstShotOnly, Terraria.Item.consumeAmmoOnLastShotOnly, Terraria.Item.createTile, Terraria.Item.createWall, Terraria.Item.crit, Terraria.Item.damage, Terraria.Item.DamageType, Terraria.Item.DD2Summon, Terraria.ModLoader.DamageClass.Default, Terraria.Item.defense, Terraria.Item.dye, Terraria.Item.expert, Terraria.Item.expertOnly, Terraria.Item.faceSlot, Terraria.Item.favorited, Terraria.Item.fishingPole, Terraria.Item.flame, Terraria.Item.frontSlot, Terraria.Item.glowMask, Terraria.Item.hairDye, Terraria.Item.hammer, Terraria.Item.handOffSlot, Terraria.Item.handOnSlot, Terraria.Item.hasVanityEffects, Terraria.Item.headSlot, Terraria.Item.healLife, Terraria.Item.healMana, Terraria.Item.holdStyle, Terraria.Item.instanced, Terraria.Item.InterruptChannelOnHurt, Terraria.Item.isAShopItem, Terraria.Item.knockBack, Terraria.Entity.lavaWet, Terraria.Item.legSlot, Terraria.Item.lifeRegen, Terraria.Item.makeNPC, Terraria.Item.mana, Terraria.Item.manaIncrease, Terraria.Item.master, Terraria.Item.masterOnly, Terraria.Item.material, Terraria.Item.maxStack, Terraria.Item.mech, Terraria.Item.mountType, Terraria.Item.neckSlot, Terraria.Item.netID, Terraria.Item.noMelee, Terraria.ID.AmmoID.None, Terraria.Item.notAmmo, Terraria.Item.noUseGraphic, Terraria.Item.noWet, Terraria.Item.paint, Terraria.Item.paintCoating, Terraria.Item.pick, Terraria.Item.placeStyle, Terraria.Item.potion, Terraria.Item.prefix, Terraria.Item.questItem, Terraria.Item.rare, Terraria.Item.reuseDelay, Terraria.Item.scale, Terraria.Item.sentry, Terraria.Item.shieldSlot, Terraria.Item.shoeSlot, Terraria.Item.shoot, Terraria.Item.shootsEveryUse, Terraria.Item.shootSpeed, Terraria.Item.shopCustomPrice, Terraria.Item.shopSpecialCurrency, Terraria.Item.stack, Terraria.Item.StatsModifiedBy, Terraria.Item.StopAnimationOnHurt, Terraria.Item.tileBoost, Terraria.Item.tileWand, Terraria.Item.timeSinceTheItemHasBeenReservedForSomeone, Terraria.Item.ToolTip, Terraria.Item.tooltipContext, Terraria.Item.type, Terraria.Item.Type, Terraria.Item.uniqueStack, Terraria.Item.useAmmo, Terraria.Item.useAnimation, Terraria.Item.useLimitPerAnimation, Terraria.Item.UseSound, Terraria.Item.useStyle, Terraria.Item.useTime, Terraria.Item.useTurn, Terraria.Item.useTurnOnAnimationStart, Terraria.Item.value, Terraria.Item.vanity, Terraria.Item.Variant, Terraria.Item.waistSlot, Terraria.Entity.wet, Terraria.Entity.wetCount, and Terraria.Item.wingSlot.

Referenced by Terraria.ModLoader.ModItem.Register(), and Terraria.Item.SetDefaults().

+ Here is the caller graph for this function: