terraria-cpp2il v1.4.4.9
Terraria mobile dump, with CallAnalysis (see source code). Dump with reconstucted method: https://infinitynichto.github.io/terraria-cpp2il-methodrecon
Loading...
Searching...
No Matches
Terraria.Item Class Reference
+ Inheritance diagram for Terraria.Item:
+ Collaboration diagram for Terraria.Item:

Public Member Functions

IEntitySource GetNPCSource_FromThis ()
 
IEntitySource GetItemSource_Misc (int itemSourceId)
 
void Reset ()
 
override string ToString ()
 
bool Prefix (int prefixWeWant)
 
bool CanRollPrefix (int prefix)
 
bool CanApplyPrefix (int prefix)
 
int[] GetRollablePrefixes ()
 
bool IsAPrefixableAccessory ()
 
string AffixName ()
 
void RebuildTooltip ()
 
Rectangle getRect ()
 
bool checkMat ()
 
void netDefaults (int type)
 
bool FitsAmmoSlot ()
 
bool CanFillEmptyAmmoSlot ()
 
void SetDefaults1 (int type)
 
void SetDefaults2 (int type)
 
void SetDefaults3 (int type)
 
void DefaultToQuestFish ()
 
void SetDefaults4 (int type)
 
void DefaultToGolfBall (int projid)
 
void SetDefaults5 (int type)
 
void DefaultToSolution (int projectileId)
 
void DefaultToWhip (int projectileId, int dmg, float kb, float shootspeed, int animationTotalTime=30)
 
void DefaultTokite (int projId)
 
void ChangeItemType (int to)
 
void DefaultToVanitypet (int projId, int buffID)
 
void DefaultToCapturedCritter (short npcIdToSpawnOnUse)
 
void DefaultToStaff (int projType, float pushForwardSpeed, int singleShotTime, int manaPerShot)
 
void DefaultToSpear (int projType, float pushForwardSpeed, int animationTime)
 
void DefaultToMount (int mount)
 
void DefaultToPlaceableWall (ushort wallToPlace)
 
void SetWeaponValues (int dmg, float knockback, int bonusCritChance=0)
 
void DefaultToBow (int singleShotTime, float shotVelocity, bool hasAutoReuse=false)
 
void DefaultToMagicWeapon (int projType, int singleShotTime, float shotVelocity, bool hasAutoReuse=false)
 
void DefaultToRangedWeapon (int baseProjType, int ammoID, int singleShotTime, float shotVelocity, bool hasAutoReuse=false)
 
void DefaultToThrownWeapon (int baseProjType, int singleShotTime, float shotVelocity, bool hasAutoReuse=false)
 
void DefaultToPlaceableTile (int tileIDToPlace, int tileStyleToPlace=0)
 
void DefaultToPlaceableTile (ushort tileIDToPlace, int tileStyleToPlace=0)
 
void MakeUsableWithChlorophyteExtractinator ()
 
void DefaultToGolfClub (int newwidth, int newheight)
 
void DefaultToLawnMower (int newwidth, int newheight)
 
void DefaultToFood (int newwidth, int newheight, int foodbuff, int foodbuffduration, bool useGulpSound=false, int animationTime=17)
 
void DefaultToHealingPotion (int newwidth, int newheight, int healingAmount, int animationTime=17)
 
void SetShopValues (ItemRarityColor rarity, int coinValue)
 
void DefaultToHeadgear (int newwidth, int newheight, int helmetArtID)
 
void DefaultToAccessory (int newwidth=24, int newheight=24)
 
void DefaultToGuitar (int newwidth=24, int newheight=24)
 
void DefaultToMusicBox (int style)
 
void SetDefaults (int Type=0)
 
void SetDefaults (int Type, bool noMatCheck=false, ItemVariant variant=null)
 
void OnCreated (ItemCreationContext context)
 
void ResetStats (int Type)
 
Color GetAlphaFaded (Color newColor)
 
Color GetAlpha (Color newColor)
 
Color GetColor (Color newColor)
 
bool CanShimmer ()
 
void FixAgainstExploit ()
 
void UpdateItem (int i)
 
void TryCombiningIntoNearbyItems (int i)
 
FlexibleTileWand GetFlexibleTileWand ()
 
bool CanCombineStackInWorld ()
 
void FindOwner (int whoAmI, bool ignoreDistance=true)
 
Item Clone ()
 
Item clientClone (Item cloneDestination)
 
Item DeepClone ()
 
bool IsTheSameAs (Item compareItem)
 
bool IsNotTheSameAs (Item compareItem)
 
void SetNameOverride (string name)
 
void ClearNameOverride ()
 
void TurnToAir (bool fullReset=false)
 
void OnPurchase (Item item)
 
int GetStoreValue ()
 
void Serialize (BinaryWriter writer, ItemSerializationContext context)
 
void DeserializeFrom (BinaryReader reader, ItemSerializationContext context)
 
void ResetPrefix ()
 
void Refresh (bool onlyIfVariantChanged=true)
 
 Item ()
 
float AngleTo (Vector2 Destination)
 
float AngleFrom (Vector2 Source)
 
float Distance (Vector2 Other)
 
float DistanceSQ (Vector2 Other)
 
Vector2 DirectionTo (Vector2 Destination)
 
Vector2 DirectionFrom (Vector2 Source)
 
bool WithinRange (Vector2 Target, float MaxRange)
 

Static Public Member Functions

static void StartCachingType (int t)
 
static void DropCache (IEntitySource reason, Vector2 pos, Vector2 spread, int t, bool stopCaching=true)
 
static int BannerToItem (int banner)
 
static int NPCtoBanner (int i)
 
static int BannerToNPC (int i)
 
static bool IsAGolfingItem (Item item)
 
static bool MechSpawn (float x, float y, int type)
 
static int buyPrice (int platinum=0, int gold=0, int silver=0, int copper=0)
 
static int sellPrice (int platinum=0, int gold=0, int silver=0, int copper=0)
 
static void ShimmerEffect (Vector2 shimmerPositon)
 
static Rectangle GetDrawHitbox (int type, Player user)
 
static int NewItem (Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
 
static int NewItem (int X, int Y, int Width, int Height, int Type, int Stack=1, bool noBroadcast=false, int pfix=0, bool noGrabDelay=false, bool reverseLookup=false)
 
static int NewItem (IEntitySource source, Vector2 pos, Vector2 randomBox, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
 
static int NewItem (IEntitySource source, Vector2 pos, int Width, int Height, int Type, int Stack=1, bool noBroadcast=false, int prefixGiven=0, bool noGrabDelay=false, bool reverseLookup=false)
 
static int NewItem (IEntitySource source, int X, int Y, int Width, int Height, int Type, int Stack=1, bool noBroadcast=false, int pfix=0, bool noGrabDelay=false, bool reverseLookup=false)
 

Public Attributes

bool questItem
 
bool flame
 
bool mech
 
bool beingGrabbed
 
bool wornArmor
 
bool expertOnly
 
bool expert
 
bool isAShopItem
 
bool instanced
 
bool favorited
 
bool channel
 
bool accessory
 
bool potion
 
bool consumable
 
bool autoReuse
 
bool useTurn
 
bool notAmmo
 
bool buyOnce
 
bool noUseGraphic
 
bool noMelee
 
bool buy
 
bool reforge
 
bool social
 
bool vanity
 
bool material
 
bool noWet
 
bool cartTrack
 
bool uniqueStack
 
bool DD2Summon
 
bool melee
 
bool magic
 
bool ranged
 
bool summon
 
bool sentry
 
bool newAndShiny
 
bool canBePlacedInVanityRegardlessOfConditions
 
int noGrabDelay
 
int timeSinceItemSpawned
 
int tileWand
 
int tooltipContext
 
byte dye
 
int fishingPole
 
int bait
 
short makeNPC
 
short hairDye
 
byte paint
 
byte paintCoating
 
int ownIgnore
 
int ownTime
 
int keepTime
 
int timeLeftInWhichTheItemCannotBeTakenByEnemies
 
int type
 
byte holdStyle
 
byte useStyle
 
int useAnimation
 
int useTime
 
int stack
 
int maxStack
 
int pick
 
int axe
 
int hammer
 
int tileBoost
 
int createTile
 
int createWall
 
int placeStyle
 
int damage
 
float knockBack
 
int healLife
 
int healMana
 
Color color
 
int alpha
 
short glowMask
 
float scale
 
LegacySoundStyle UseSound
 
int defense
 
int headSlot
 
int bodySlot
 
int legSlot
 
sbyte handOnSlot
 
sbyte handOffSlot
 
sbyte backSlot
 
sbyte frontSlot
 
sbyte shoeSlot
 
sbyte waistSlot
 
sbyte wingSlot
 
sbyte shieldSlot
 
sbyte neckSlot
 
sbyte faceSlot
 
sbyte balloonSlot
 
sbyte beardSlot
 
int stringColor
 
ItemTooltip ToolTip
 
string BestiaryNotes
 
int playerIndexTheItemIsReservedFor
 
int rare
 
int shoot
 
float shootSpeed
 
int ammo
 
int useAmmo
 
int lifeRegen
 
int manaIncrease
 
int mana
 
int timeSinceTheItemHasBeenReservedForSomeone
 
int value
 
int buffType
 
int buffTime
 
int mountType
 
int shopSpecialCurrency
 
int? shopCustomPrice
 
bool shootsEveryUse
 
bool chlorophyteExtractinatorConsumable
 
int netID
 
int crit
 
byte prefix
 
int reuseDelay
 
bool hasVanityEffects
 
bool shimmered
 
float shimmerTime
 
int whoAmI
 
bool active
 
Vector2 position
 
Vector2 velocity
 
Vector2 oldPosition
 
Vector2 oldVelocity
 
int oldDirection
 
int direction
 
int width
 
int height
 
bool wet
 
bool shimmerWet
 
bool honeyWet
 
byte wetCount
 
bool lavaWet
 

Static Public Attributes

static int numberOfNewItems
 
const int luckPotionDuration1 = 18000
 
const int luckPotionDuration2 = 36000
 
const int luckPotionDuration3 = 54000
 
const int flaskTime = 72000
 
const int copper = 1
 
const int silver = 100
 
const int gold = 10000
 
const int platinum = 1000000
 
const int goldCritterRarityColor = 3
 
static int CommonMaxStack
 
static int[] cachedItemSpawnsByType
 
static int potionDelay
 
static int restorationDelay
 
static int mushroomDelay
 
static int[] headType
 
static int[] bodyType
 
static int[] legType
 
static bool[] staff
 
static bool[] claw
 
const int coinGrabRange = 350
 
const int manaGrabRange = 300
 
const int lifeGrabRange = 250
 
const int treasureGrabRange = 150
 
const int WALL_PLACEMENT_USETIME = 7
 

Package Attributes

long entityId
 

Properties

string Name [get, set]
 
string HoverName [get, set]
 
bool PaintOrCoating [get, set]
 
bool FitsAccessoryVanitySlot [get, set]
 
int OriginalRarity [get, set]
 
int OriginalDamage [get, set]
 
int OriginalDefense [get, set]
 
ItemVariant Variant [get, set, private set]
 
bool IsACoin [get, set]
 
bool IsAir [get, set]
 
bool IsCurrency [get, set]
 
bool CanBeQuickUsed [get, set]
 
virtual Vector2 VisualPosition [get, set]
 
Vector2 Center [get, set]
 
Vector2 Left [get, set]
 
Vector2 Right [get, set]
 
Vector2 Top [get, set]
 
Vector2 TopLeft [get, set]
 
Vector2 TopRight [get, set]
 
Vector2 Bottom [get, set]
 
Vector2 BottomLeft [get, set]
 
Vector2 BottomRight [get, set]
 
Vector2 Size [get, set]
 
Rectangle Hitbox [get, set]
 

Private Member Functions

bool CanHavePrefixes ()
 
bool TryGetPrefixStatMultipliersForItem (int rolledPrefix, out float dmg, out float kb, out float spd, out float size, out float shtspd, out float mcst, out int crt)
 
bool RollAPrefix (UnifiedRandom random, ref int rolledPrefix)
 
void DefaultToSeaShell ()
 
void SetFoodDefaults (int type)
 
void DefaultToTorch (int tileStyleToPlace, bool allowWaterPlacement=false)
 
void Shimmering ()
 
int FindDecraftAmount ()
 
int GetShimmerEquivalentType ()
 
void GetShimmered ()
 
void DespawnIfMeetingConditions (int i)
 
void CheckLavaDeath (int i)
 
void MoveInWorld (float gravity, float maxFallSpeed, ref Vector2 wetVelocity, int i)
 
void GetPickedUpByMonsters_Special (int i)
 
void GetPickedUpByMonsters_Money (int i)
 
void CombineWithNearbyItems (int myItemIndex)
 
void UpdateItem_VisualEffects ()
 

Static Private Member Functions

static int PickAnItemSlotToSpawnItemOn (bool reverseLookup, int nextItem)
 
static Item ()
 

Private Attributes

string _nameOverride
 
bool frozen
 
byte frozenCount
 
ItemVariant< Variantk__BackingField
 

Static Private Attributes

static readonly int shadowOrbPrice
 
static readonly int dungeonPrice
 
static readonly int queenBeePrice
 
static readonly int hellPrice
 
static readonly int eclipsePrice
 
static readonly int eclipsePostPlanteraPrice
 
static readonly int eclipseMothronPrice
 
const int foodWidth = 22
 
const int foodHeight = 22
 

Detailed Description

Definition at line 43 of file Item.cs.


The documentation for this class was generated from the following file: