Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PlayerItemSlotID.cs
Go to the documentation of this file.
1using System;
2
3namespace Terraria.ID;
4
5public static class PlayerItemSlotID
6{
7 public static readonly int Inventory0;
8
9 public static readonly int InventoryMouseItem;
10
11 public static readonly int Armor0;
12
13 public static readonly int Dye0;
14
15 public static readonly int Misc0;
16
17 public static readonly int MiscDye0;
18
19 public static readonly int Bank1_0;
20
21 public static readonly int Bank2_0;
22
23 public static readonly int TrashItem;
24
25 public static readonly int Bank3_0;
26
27 public static readonly int Bank4_0;
28
29 public static readonly int Loadout1_Armor_0;
30
31 public static readonly int Loadout1_Dye_0;
32
33 public static readonly int Loadout2_Armor_0;
34
35 public static readonly int Loadout2_Dye_0;
36
37 public static readonly int Loadout3_Armor_0;
38
39 public static readonly int Loadout3_Dye_0;
40
41 public static bool[] CanRelay;
42
43 private static int _nextSlotId;
44
46 {
47 CanRelay = new bool[0];
48 Inventory0 = AllocateSlots(58, canNetRelay: true);
49 InventoryMouseItem = AllocateSlots(1, canNetRelay: true);
50 Armor0 = AllocateSlots(20, canNetRelay: true);
51 Dye0 = AllocateSlots(10, canNetRelay: true);
52 Misc0 = AllocateSlots(5, canNetRelay: true);
53 MiscDye0 = AllocateSlots(5, canNetRelay: true);
54 Bank1_0 = AllocateSlots(40, canNetRelay: false);
55 Bank2_0 = AllocateSlots(40, canNetRelay: false);
56 TrashItem = AllocateSlots(1, canNetRelay: false);
57 Bank3_0 = AllocateSlots(40, canNetRelay: false);
58 Bank4_0 = AllocateSlots(40, canNetRelay: true);
59 Loadout1_Armor_0 = AllocateSlots(20, canNetRelay: true);
60 Loadout1_Dye_0 = AllocateSlots(10, canNetRelay: true);
61 Loadout2_Armor_0 = AllocateSlots(20, canNetRelay: true);
62 Loadout2_Dye_0 = AllocateSlots(10, canNetRelay: true);
63 Loadout3_Armor_0 = AllocateSlots(20, canNetRelay: true);
64 Loadout3_Dye_0 = AllocateSlots(10, canNetRelay: true);
65 }
66
67 private static int AllocateSlots(int amount, bool canNetRelay)
68 {
69 int nextSlotId = _nextSlotId;
70 _nextSlotId += amount;
71 int num = CanRelay.Length;
72 Array.Resize(ref CanRelay, num + amount);
73 for (int i = num; i < _nextSlotId; i++)
74 {
75 CanRelay[i] = canNetRelay;
76 }
77 return nextSlotId;
78 }
79}
static readonly int Loadout1_Armor_0
static readonly int Loadout3_Dye_0
static readonly int Loadout2_Dye_0
static readonly int Loadout1_Dye_0
static readonly int InventoryMouseItem
static readonly int Loadout3_Armor_0
static readonly int Loadout2_Armor_0
static int AllocateSlots(int amount, bool canNetRelay)
static readonly int TrashItem
static readonly int Inventory0