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

◆ FixAgainstExploit()

void Terraria.Item.FixAgainstExploit ( )
inline

Definition at line 49916 of file Item.cs.

49917 {
49919 {
49920 SetDefaults();
49921 return;
49922 }
49923 if (stack > maxStack)
49924 {
49925 stack = maxStack;
49926 }
49927 if (prefix != 0 && !CanRollPrefix(prefix))
49928 {
49929 ResetPrefix();
49930 }
49931 }
static bool[] ItemsThatShouldNotBeInInventory
If true for a given item type (F:Terraria.Item.type), then that item will be deleted from inventories...
Definition ItemID.cs:117
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
bool CanRollPrefix(int prefix)
Determines if this T:Terraria.Item can roll the given prefix.
Definition Item.cs:1442
int maxStack
The maximum number of items that can be contained within a single stack. F:Terraria....
Definition Item.cs:402
int prefix
The current prefix applied to this item. Either a T:Terraria.ID.PrefixID entry or M:Terraria....
Definition Item.cs:752
void SetDefaults(int Type=0)
Definition Item.cs:48800
void ResetPrefix()
Definition Item.cs:51851
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

References Terraria.Item.CanRollPrefix(), Terraria.ID.ItemID.Sets.ItemsThatShouldNotBeInInventory, Terraria.Item.maxStack, Terraria.Item.prefix, Terraria.Item.ResetPrefix(), Terraria.Item.SetDefaults(), Terraria.Item.stack, and Terraria.Item.type.

Referenced by Terraria.GameContent.Tile_Entities.TEDisplayDoll.FixLoadedData(), Terraria.GameContent.Tile_Entities.TEFoodPlatter.FixLoadedData(), Terraria.GameContent.Tile_Entities.TEHatRack.FixLoadedData(), Terraria.GameContent.Tile_Entities.TEItemFrame.FixLoadedData(), Terraria.GameContent.Tile_Entities.TEWeaponsRack.FixLoadedData(), Terraria.Chest.FixLoadedData(), Terraria.EquipmentLoadout.FixLoadedData(), and Terraria.Player.FixLoadedData_Items().

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