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

◆ DeserializeFrom()

void Terraria.Item.DeserializeFrom ( BinaryReader reader,
ItemSerializationContext context )
inline

Definition at line 51837 of file Item.cs.

51838 {
51839 if (context == ItemSerializationContext.SavingAndLoading)
51840 {
51841 netDefaults(reader.ReadInt32());
51842 stack = reader.ReadInt32();
51843 Prefix(reader.ReadByte());
51844 }
51845 if (type >= ItemLoader.ItemCount)
51846 {
51847 TurnToAir();
51848 }
51849 }
void netDefaults(int type)
Definition Item.cs:1927
int stack
The current stack of the item. F:Terraria.Item.maxStack indicates the max possible stack.
Definition Item.cs:396
bool Prefix(int prefixWeWant)
Attempts to apply a prefix to this T:Terraria.Item.
Definition Item.cs:1279
void TurnToAir(bool fullReset=false)
Definition Item.cs:51791
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
This serves as the central class from which item-related functions are carried out....
Definition ItemLoader.cs:26

References Terraria.ModLoader.ItemLoader.ItemCount, Terraria.Item.netDefaults(), Terraria.Item.Prefix(), Terraria.Item.stack, Terraria.Item.TurnToAir(), and Terraria.Item.type.

Referenced by Terraria.EquipmentLoadout.Deserialize(), and Terraria.Player.LoadTemporaryItemSlotContents().

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