2{
3
5
6
7 if ( (dst && dst.
GetParent() && !dst.
GetParent().GetHierarchyRootPlayer()) || (src && src.GetParent() && !src.GetParent().GetHierarchyRootPlayer()) )
8 return -1;
9
11 {
13
14 }
16 {
18
19 }
20 else
21 {
22 return -1;
23 }
24
25 int val = -1;
26 if ( invloc1.
GetItem() && invloc1.
GetItem().GetInventoryHandAnimation(invloc1,val) )
27 {
28 return val;
29 }
30
32 {
33
35 {
37 {
39 {
41 }
42 else if (invloc1.
GetItem() && invloc1.
GetItem().IsOneHandedBehaviour())
43 {
45 }
47 }
49 {
51 {
53 }
54 else if (invloc1.
GetItem() && invloc1.
GetItem().IsOneHandedBehaviour())
55 {
57 }
59 }
61 {
63 Man owner;
64 if (parent_item)
65 owner = parent_item.GetHierarchyRootPlayer();
66 if (!owner)
67 return -1;
68
70 EntityAI item2 = parent_item.GetHierarchyParent();
71 if (owner && item1 == item2)
72 {
74 }
76 }
79
80
81
82
83
84
85
86
87
88
89 default:
91
92 };
93
94
95 }
97 {
99 if (item)
100 {
103 {
104
105 if (item.IsWeapon())
106 {
108 }
109 else if (item.IsOneHandedBehaviour())
110 {
112 }
114 }
115 }
116
118 }
119 return -1;
120}
InventoryLocationType
types of Inventory Location
proto native bool HasInventorySlot(int slotId)
script counterpart to engine's class Inventory
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
proto native InventoryLocation Copy(notnull InventoryLocation rhs)
copies location data to another location
proto native int GetType()
returns type of InventoryLocation
proto native EntityAI GetItem()
returns item of current inventory location
provides access to slot configuration