@nativewrappers/redm-codegen 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/classes/AnimScene.d.ts +126 -126
  2. package/dist/classes/AnimScene.d.ts.map +1 -1
  3. package/dist/classes/AnimScene.js +184 -184
  4. package/dist/classes/BaseModel.d.ts +17 -17
  5. package/dist/classes/BaseModel.d.ts.map +1 -1
  6. package/dist/classes/BaseModel.js +25 -25
  7. package/dist/classes/BaseTask.d.ts +12 -12
  8. package/dist/classes/BaseTask.d.ts.map +1 -1
  9. package/dist/classes/BaseTask.js +14 -14
  10. package/dist/classes/Cam.d.ts +94 -94
  11. package/dist/classes/Cam.d.ts.map +1 -1
  12. package/dist/classes/Cam.js +126 -126
  13. package/dist/classes/Entity.d.ts +471 -471
  14. package/dist/classes/Entity.d.ts.map +1 -1
  15. package/dist/classes/Entity.js +672 -672
  16. package/dist/classes/PedTask.d.ts +155 -155
  17. package/dist/classes/PedTask.d.ts.map +1 -1
  18. package/dist/classes/PedTask.js +204 -204
  19. package/dist/classes/PersChar.d.ts +9 -9
  20. package/dist/classes/PersChar.d.ts.map +1 -1
  21. package/dist/classes/PersChar.js +21 -21
  22. package/dist/classes/Pickup.d.ts +5 -5
  23. package/dist/classes/Pickup.d.ts.map +1 -1
  24. package/dist/classes/Pickup.js +9 -9
  25. package/dist/classes/Player.d.ts +687 -687
  26. package/dist/classes/Player.d.ts.map +1 -1
  27. package/dist/classes/Player.js +1013 -1013
  28. package/dist/classes/Prop.d.ts +87 -87
  29. package/dist/classes/Prop.d.ts.map +1 -1
  30. package/dist/classes/Prop.js +121 -121
  31. package/dist/classes/PropSet.d.ts +4 -4
  32. package/dist/classes/PropSet.d.ts.map +1 -1
  33. package/dist/classes/PropSet.js +6 -6
  34. package/dist/classes/VehicleTask.d.ts +17 -17
  35. package/dist/classes/VehicleTask.d.ts.map +1 -1
  36. package/dist/classes/VehicleTask.js +21 -21
  37. package/dist/classes/Weapon.d.ts +306 -306
  38. package/dist/classes/Weapon.d.ts.map +1 -1
  39. package/dist/classes/Weapon.js +411 -411
  40. package/dist/namespaces/Animscene.d.ts +59 -59
  41. package/dist/namespaces/Animscene.d.ts.map +1 -1
  42. package/dist/namespaces/Animscene.js +77 -77
  43. package/dist/namespaces/Audio.d.ts +569 -569
  44. package/dist/namespaces/Audio.d.ts.map +1 -1
  45. package/dist/namespaces/Audio.js +728 -728
  46. package/dist/namespaces/Bounty.d.ts +70 -70
  47. package/dist/namespaces/Bounty.d.ts.map +1 -1
  48. package/dist/namespaces/Bounty.js +115 -115
  49. package/dist/namespaces/Brain.d.ts +15 -15
  50. package/dist/namespaces/Brain.d.ts.map +1 -1
  51. package/dist/namespaces/Brain.js +20 -20
  52. package/dist/namespaces/CamStatics.d.ts +399 -399
  53. package/dist/namespaces/CamStatics.d.ts.map +1 -1
  54. package/dist/namespaces/CamStatics.js +574 -574
  55. package/dist/namespaces/Clock.d.ts +51 -51
  56. package/dist/namespaces/Clock.d.ts.map +1 -1
  57. package/dist/namespaces/Clock.js +73 -73
  58. package/dist/namespaces/Collection.d.ts +76 -76
  59. package/dist/namespaces/Collection.d.ts.map +1 -1
  60. package/dist/namespaces/Collection.js +108 -108
  61. package/dist/namespaces/Companion.d.ts +22 -22
  62. package/dist/namespaces/Companion.d.ts.map +1 -1
  63. package/dist/namespaces/Companion.js +30 -30
  64. package/dist/namespaces/Compendium.d.ts +38 -38
  65. package/dist/namespaces/Compendium.d.ts.map +1 -1
  66. package/dist/namespaces/Compendium.js +52 -52
  67. package/dist/namespaces/Crashlog.d.ts +10 -10
  68. package/dist/namespaces/Crashlog.d.ts.map +1 -1
  69. package/dist/namespaces/Crashlog.js +14 -14
  70. package/dist/namespaces/Crew.d.ts +9 -9
  71. package/dist/namespaces/Crew.d.ts.map +1 -1
  72. package/dist/namespaces/Crew.js +14 -14
  73. package/dist/namespaces/Databinding.d.ts +177 -177
  74. package/dist/namespaces/Databinding.d.ts.map +1 -1
  75. package/dist/namespaces/Databinding.js +271 -271
  76. package/dist/namespaces/Dlc.d.ts +5 -5
  77. package/dist/namespaces/Dlc.d.ts.map +1 -1
  78. package/dist/namespaces/Dlc.js +9 -9
  79. package/dist/namespaces/EntityStatics.d.ts +193 -193
  80. package/dist/namespaces/EntityStatics.d.ts.map +1 -1
  81. package/dist/namespaces/EntityStatics.js +263 -263
  82. package/dist/namespaces/Fire.d.ts +7 -7
  83. package/dist/namespaces/Fire.d.ts.map +1 -1
  84. package/dist/namespaces/Fire.js +9 -9
  85. package/dist/namespaces/Graphics.d.ts +820 -820
  86. package/dist/namespaces/Graphics.d.ts.map +1 -1
  87. package/dist/namespaces/Graphics.js +1118 -1118
  88. package/dist/namespaces/Hud.d.ts +494 -494
  89. package/dist/namespaces/Hud.d.ts.map +1 -1
  90. package/dist/namespaces/Hud.js +789 -789
  91. package/dist/namespaces/Inventory.d.ts +180 -180
  92. package/dist/namespaces/Inventory.d.ts.map +1 -1
  93. package/dist/namespaces/Inventory.js +239 -239
  94. package/dist/namespaces/Itemdatabase.d.ts +78 -78
  95. package/dist/namespaces/Itemdatabase.d.ts.map +1 -1
  96. package/dist/namespaces/Itemdatabase.js +106 -106
  97. package/dist/namespaces/Map.d.ts +156 -156
  98. package/dist/namespaces/Map.d.ts.map +1 -1
  99. package/dist/namespaces/Map.js +207 -207
  100. package/dist/namespaces/Minigame.d.ts +78 -78
  101. package/dist/namespaces/Minigame.d.ts.map +1 -1
  102. package/dist/namespaces/Minigame.js +116 -116
  103. package/dist/namespaces/Missiondata.d.ts +15 -15
  104. package/dist/namespaces/Missiondata.d.ts.map +1 -1
  105. package/dist/namespaces/Missiondata.js +23 -23
  106. package/dist/namespaces/Network.d.ts +636 -636
  107. package/dist/namespaces/Network.d.ts.map +1 -1
  108. package/dist/namespaces/Network.js +915 -915
  109. package/dist/namespaces/Object.d.ts +121 -121
  110. package/dist/namespaces/Object.d.ts.map +1 -1
  111. package/dist/namespaces/Object.js +162 -162
  112. package/dist/namespaces/Pad.d.ts +94 -94
  113. package/dist/namespaces/Pad.d.ts.map +1 -1
  114. package/dist/namespaces/Pad.js +127 -127
  115. package/dist/namespaces/Perschar.d.ts +44 -44
  116. package/dist/namespaces/Perschar.d.ts.map +1 -1
  117. package/dist/namespaces/Perschar.js +68 -68
  118. package/dist/namespaces/Physics.d.ts +158 -158
  119. package/dist/namespaces/Physics.d.ts.map +1 -1
  120. package/dist/namespaces/Physics.js +207 -207
  121. package/dist/namespaces/PlayerStatics.d.ts +127 -127
  122. package/dist/namespaces/PlayerStatics.d.ts.map +1 -1
  123. package/dist/namespaces/PlayerStatics.js +177 -177
  124. package/dist/namespaces/Population.d.ts +75 -75
  125. package/dist/namespaces/Population.d.ts.map +1 -1
  126. package/dist/namespaces/Population.js +101 -101
  127. package/dist/namespaces/Posse.d.ts +38 -38
  128. package/dist/namespaces/Posse.d.ts.map +1 -1
  129. package/dist/namespaces/Posse.js +62 -62
  130. package/dist/namespaces/Propset.d.ts +30 -30
  131. package/dist/namespaces/Propset.d.ts.map +1 -1
  132. package/dist/namespaces/Propset.js +38 -38
  133. package/dist/namespaces/Shapetest.d.ts +11 -11
  134. package/dist/namespaces/Shapetest.d.ts.map +1 -1
  135. package/dist/namespaces/Shapetest.js +13 -13
  136. package/dist/namespaces/Stats.d.ts +88 -88
  137. package/dist/namespaces/Stats.d.ts.map +1 -1
  138. package/dist/namespaces/Stats.js +123 -123
  139. package/dist/namespaces/Streaming.d.ts +58 -58
  140. package/dist/namespaces/Streaming.d.ts.map +1 -1
  141. package/dist/namespaces/Streaming.js +92 -92
  142. package/dist/namespaces/Task.d.ts +62 -62
  143. package/dist/namespaces/Task.d.ts.map +1 -1
  144. package/dist/namespaces/Task.js +90 -90
  145. package/dist/namespaces/Telemetry.d.ts +172 -172
  146. package/dist/namespaces/Telemetry.d.ts.map +1 -1
  147. package/dist/namespaces/Telemetry.js +240 -240
  148. package/dist/namespaces/Uifeed.d.ts +15 -15
  149. package/dist/namespaces/Uifeed.d.ts.map +1 -1
  150. package/dist/namespaces/Uifeed.js +24 -24
  151. package/dist/namespaces/Voice.d.ts +38 -38
  152. package/dist/namespaces/Voice.d.ts.map +1 -1
  153. package/dist/namespaces/Voice.js +56 -56
  154. package/dist/namespaces/Water.d.ts +27 -27
  155. package/dist/namespaces/Water.d.ts.map +1 -1
  156. package/dist/namespaces/Water.js +41 -41
  157. package/dist/namespaces/WeaponStatics.d.ts +250 -250
  158. package/dist/namespaces/WeaponStatics.d.ts.map +1 -1
  159. package/dist/namespaces/WeaponStatics.js +346 -346
  160. package/package.json +1 -1
  161. package/src/classes/AnimScene.ts +199 -199
  162. package/src/classes/BaseModel.ts +29 -29
  163. package/src/classes/BaseTask.ts +15 -15
  164. package/src/classes/Cam.ts +135 -135
  165. package/src/classes/Entity.ts +687 -687
  166. package/src/classes/PedTask.ts +223 -223
  167. package/src/classes/PersChar.ts +24 -24
  168. package/src/classes/Pickup.ts +10 -10
  169. package/src/classes/Player.ts +1024 -1024
  170. package/src/classes/Prop.ts +136 -136
  171. package/src/classes/PropSet.ts +7 -7
  172. package/src/classes/VehicleTask.ts +23 -23
  173. package/src/classes/Weapon.ts +429 -429
  174. package/src/namespaces/Animscene.ts +86 -86
  175. package/src/namespaces/Audio.ts +804 -804
  176. package/src/namespaces/Bounty.ts +131 -131
  177. package/src/namespaces/Brain.ts +22 -22
  178. package/src/namespaces/CamStatics.ts +599 -599
  179. package/src/namespaces/Clock.ts +82 -82
  180. package/src/namespaces/Collection.ts +109 -109
  181. package/src/namespaces/Companion.ts +34 -34
  182. package/src/namespaces/Compendium.ts +59 -59
  183. package/src/namespaces/Crashlog.ts +16 -16
  184. package/src/namespaces/Crew.ts +16 -16
  185. package/src/namespaces/Databinding.ts +286 -286
  186. package/src/namespaces/Dlc.ts +9 -9
  187. package/src/namespaces/EntityStatics.ts +279 -279
  188. package/src/namespaces/Fire.ts +10 -10
  189. package/src/namespaces/Graphics.ts +1196 -1196
  190. package/src/namespaces/Hud.ts +799 -799
  191. package/src/namespaces/Inventory.ts +245 -245
  192. package/src/namespaces/Itemdatabase.ts +118 -118
  193. package/src/namespaces/Map.ts +215 -215
  194. package/src/namespaces/Minigame.ts +132 -132
  195. package/src/namespaces/Missiondata.ts +27 -27
  196. package/src/namespaces/Network.ts +951 -951
  197. package/src/namespaces/Object.ts +171 -171
  198. package/src/namespaces/Pad.ts +127 -127
  199. package/src/namespaces/Perschar.ts +72 -72
  200. package/src/namespaces/Physics.ts +231 -231
  201. package/src/namespaces/PlayerStatics.ts +202 -202
  202. package/src/namespaces/Population.ts +114 -114
  203. package/src/namespaces/Posse.ts +62 -62
  204. package/src/namespaces/Propset.ts +42 -42
  205. package/src/namespaces/Shapetest.ts +14 -14
  206. package/src/namespaces/Stats.ts +139 -139
  207. package/src/namespaces/Streaming.ts +104 -104
  208. package/src/namespaces/Task.ts +100 -100
  209. package/src/namespaces/Telemetry.ts +265 -265
  210. package/src/namespaces/Uifeed.ts +27 -27
  211. package/src/namespaces/Voice.ts +65 -65
  212. package/src/namespaces/Water.ts +47 -47
  213. package/src/namespaces/WeaponStatics.ts +365 -365
@@ -1,129 +1,181 @@
1
1
  import { inv, rai, pvi, _h } from '../types/NativeAliases';
2
2
  export class Inventory {
3
3
  /**
4
- * Returns stats entry id of CatalogItemInspection container
5
- *
6
- * @param entryId
7
- * @param name
8
- * @param unk1
9
- * @param playerid
4
+ * @param provision
5
+ * @param slotId
10
6
  * @returns
11
7
  */
12
- static getCatalogItemInspectionStatsEntry(entryId, name, unk1, playerid) {
13
- return (inv('0x9D21B185ABC2DBC5', entryId, name, unk1, playerid.handle, rai())) & 0xFFFFFFFF;
8
+ static getItemSlotMaxCount(provision, slotId) {
9
+ return inv('0xE80E50BEE276A54A', _h(provision), _h(slotId), rai());
14
10
  }
15
11
  /**
16
- * Returns CopyID
12
+ * Params: p0 is only 0 or 1
13
+ * Only used in R* SP Scripts
17
14
  *
15
+ * @param p0
18
16
  * @param inventoryId
19
17
  * @returns guid
20
18
  */
21
- static getInventoryItemWeaponCopyId(inventoryId) {
22
- const result = inv('0xAB5F12746A099A0E', inventoryId, pvi(), rai());
23
- return [result[0], result[1]];
19
+ static N_0x0349404A22736740(p0, inventoryId) {
20
+ const result = inv('0x0349404A22736740', p0, inventoryId, pvi());
21
+ return result;
24
22
  }
25
23
  /**
26
24
  * @param inventoryId
27
- * @returns itemGUID
25
+ * @param eInventoryItem
26
+ * @param p2
27
+ * @returns
28
28
  */
29
- static N_0xB1DD74A1F5536622(inventoryId) {
30
- const result = inv('0xB1DD74A1F5536622', inventoryId, pvi(), rai());
31
- return [!!result[0], result[1]];
29
+ static getInventoryItemCountWithItemid(inventoryId, eInventoryItem, p2) {
30
+ return inv('0xE787F05DFC977BDE', inventoryId, _h(eInventoryItem), p2, rai());
32
31
  }
33
32
  /**
34
- * @param p0
35
- * @param p1
36
- * @param bCopySatchelItems
37
- * @param bCopyEmotes
38
- * @param bCopyHorse
39
- * @param p5
33
+ * Returns collectionId
34
+ *
35
+ * @returns collectionSize
40
36
  */
41
- static copyMpInventoryToMissionInventory(p0, p1, bCopySatchelItems, bCopyEmotes, bCopyHorse, p5) {
42
- inv('0x644CCB76A76CFBD6', p0, p1, bCopySatchelItems, bCopyEmotes, bCopyHorse, p5);
37
+ static createItemCollection2() {
38
+ const result = inv('0x97A3646645727F42', pvi(), rai());
39
+ return [result[0], result[1]];
43
40
  }
44
- static disableMissionInventoryPickups() {
45
- inv('0xE1F389F03DC83673');
41
+ /**
42
+ * @param inventoryId
43
+ * @param inventoryIdCloned
44
+ * @param p3
45
+ * @returns p2
46
+ */
47
+ static copyItemToInventory(inventoryId, inventoryIdCloned, p3) {
48
+ const result = inv('0xC04F47D488EF9EBA', inventoryId, inventoryIdCloned, pvi(), p3);
49
+ return result;
46
50
  }
47
51
  /**
48
- * inventoryId: see _INVENTORY_GET_PED_INVENTORY_ID
49
- *
50
52
  * @param inventoryId
51
- * @returns
53
+ * @returns filter; numInCollection
52
54
  */
53
- static areLocalChangesAllowed(inventoryId) {
54
- return inv('0x0FBBFFC891A97C81', inventoryId);
55
+ static createItemCollectionWithFilter(inventoryId) {
56
+ const result = inv('0x640F890C3E5A3FFD', inventoryId, pvi(), pvi(), rai());
57
+ return [result[0], result[1], result[2]];
55
58
  }
56
59
  /**
57
- * p1 (out) and p2 (in) are both script arrays?
58
- * item: can be a component item, see SHOP_CATALOG_BUILD_LIST_OF_WEAPON_COMPONENTS
60
+ * @param inventoryId
61
+ * @param p2
62
+ * @returns guid
63
+ */
64
+ static getInventoryItemCountWithGuid(inventoryId, p2) {
65
+ const result = inv('0xC97E0D2302382211', inventoryId, pvi(), p2, rai());
66
+ return [result[0], result[1]];
67
+ }
68
+ /**
69
+ * filterName (collections): "ALL", "ALL SATCHEL", "ALL HORSES", "ALL COACHES", "ALL MOUNTS", "ALL CLOTHING", "ALL WEAPONS", "ALL SATCHEL EXCLUDING CLOTHING", "ALL EXCLUDING CLOTHING"
70
+ * slotId: -1591664384
71
+ * p3: outCollectionSize (?)
72
+ * Returns collectionId
59
73
  *
60
- * @param item
61
- * @returns p1; p2
74
+ * @param inventoryId
75
+ * @param filterName
76
+ * @param slotId
77
+ * @returns size
62
78
  */
63
- static N_0x9AC53CB6907B4428(item) {
64
- const result = inv('0x9AC53CB6907B4428', _h(item), pvi(), pvi(), rai());
65
- return [!!result[0], result[1], result[2]];
79
+ static createItemCollection(inventoryId, filterName, slotId) {
80
+ const result = inv('0x80D78BDC9D88EF07', inventoryId, filterName, _h(slotId), pvi(), rai());
81
+ return [result[0], result[1]];
66
82
  }
67
83
  /**
68
- * This native has no functionality.
84
+ * p1: 32
85
+ * Returns collectionId
69
86
  *
70
- * @param toggle
87
+ * @param inventoryId
88
+ * @param p1
89
+ * @returns size
71
90
  */
72
- static setUseMissionInventory(toggle) {
73
- inv('0x597F571DDEE3FFAC', toggle);
91
+ static createSortedCollection(inventoryId, p1) {
92
+ const result = inv('0xBB7F968675B34B0C', inventoryId, p1, pvi(), rai());
93
+ return [result[0], result[1]];
74
94
  }
75
95
  /**
76
96
  * @param inventoryId
77
- * @returns parentGuid
97
+ * @param item
98
+ * @returns guid
78
99
  */
79
- static getChildrenCount(inventoryId) {
80
- const result = inv('0xE843D21A8E2498AA', inventoryId, pvi(), rai());
100
+ static doesItemOwnEquipment(inventoryId, item) {
101
+ const result = inv('0x88B58B83A43A8CAB', inventoryId, pvi(), _h(item));
81
102
  return [result[0], result[1]];
82
103
  }
83
104
  /**
84
- * @returns itemGUID
105
+ * Returns a unique inventory ID for this ped.
106
+ * For the local player ped, it is an eInventories value.
107
+ * For other peds, it is the inventory address casted to unsigned int. enum eInventories
108
+ * {
109
+ * INVENTORY_INVALID,
110
+ * INVENTORY_SP_PLAYER,
111
+ * INVENTORY_MP_PLAYER,
112
+ * INVENTORY_MP_MISSION,
113
+ * INVENTORY_SECOND_SCREEN,
114
+ * INVENTORY_SP_BACKUP,
115
+ * INVENTORY_SP_SNAPSHOT,
116
+ * INVENTORY_0xDE2AE452,
117
+ * INVENTORY_0x399D9B3A,
118
+ * INVENTORY_0x4BD43FA7,
119
+ * INVENTORY_0x9529D251,
120
+ * INVENTORY_0xA75776AC,
121
+ * INVENTORY_MAX_ID = 11,
122
+ * INVENTORY_IDS_COUNT
123
+ * };
124
+ *
125
+ * @param ped
126
+ * @returns
85
127
  */
86
- static isItemExpired() {
87
- const result = inv('0x0137C77A2EC64536', pvi(), rai());
88
- return [!!result[0], result[1]];
128
+ static getInventoryIdFromPed(ped) {
129
+ return inv('0x13D234A2A3F66E63', ped.handle, rai());
89
130
  }
90
131
  /**
91
- * Alternative Name: _INVENTORY_IS_ITEM_DISABLED
132
+ * Only works on CClothingItem
92
133
  *
93
134
  * @param inventoryId
94
- * @param item
95
- * @param p2
96
- * @returns
135
+ * @param inUse
136
+ * @returns guid
97
137
  */
98
- static isInventoryItemEquipped(inventoryId, item, p2) {
99
- return inv('0x3D10D7179D7034AF', inventoryId, _h(item), p2);
138
+ static setInventoryItemInUse(inventoryId, inUse) {
139
+ const result = inv('0x65A5F70F4A292EBE', inventoryId, pvi(), inUse);
140
+ return result;
100
141
  }
101
142
  /**
102
143
  * @param inventoryId
103
- * @param p3
104
- * @param p4
105
- * @returns guid; p2
144
+ * @param slotId
145
+ * @returns guid; outGuid
106
146
  */
107
- static getFullInventoryItemData(inventoryId, p3, p4) {
108
- const result = inv('0x025A1B1FB03FBF61', inventoryId, pvi(), pvi(), p3, p4);
147
+ static getInventoryItemEquippedInSlotByRef(inventoryId, slotId) {
148
+ const result = inv('0x22E590F108289A9D', inventoryId, pvi(), _h(slotId), pvi());
109
149
  return [result[0], result[1], result[2]];
110
150
  }
151
+ /**
152
+ * Apply the weapon stats to the CatalogItemInspection stats entry id. get entryId with _INVENTORY_GET_CATALOG_ITEM_INSPECTION_STATS_ENTRY
153
+ *
154
+ * @param entryId
155
+ * @param weapon
156
+ * @param ped
157
+ */
158
+ static applyWeaponStatsToEntry(entryId, weapon, ped) {
159
+ inv('0x75CFAC49301E134E', entryId, _h(weapon), ped.handle);
160
+ }
111
161
  /**
112
162
  * @param inventoryId
163
+ * @param item
113
164
  */
114
- static enableWeapons(inventoryId) {
115
- inv('0xD5D72F1624F3BA7C', inventoryId);
165
+ static enableItem(inventoryId, item) {
166
+ inv('0x6A564540FAC12211', inventoryId, _h(item));
116
167
  }
117
168
  /**
118
- * Params: p3 returns an int between 0 and 20 (?)
119
- * Only used in R* SP Scripts
169
+ * Returns databindingEntryId to be used with 0x951847CEF3D829FF (p0)
120
170
  *
121
- * @param inventoryId
122
- * @returns guid; p2; p3
171
+ * @param data
172
+ * @param stats
173
+ * @param ped
174
+ * @returns guid
123
175
  */
124
- static N_0xD08685BA892DBFAB(inventoryId) {
125
- const result = inv('0xD08685BA892DBFAB', inventoryId, pvi(), pvi(), pvi(), rai());
126
- return [!!result[0], result[1], result[2], result[3]];
176
+ static N_0x46DB71883EE9D5AF(data, stats, ped) {
177
+ const result = inv('0x46DB71883EE9D5AF', data, stats, pvi(), ped.handle, rai());
178
+ return [result[0] & 0xFFFFFFFF, result[1]];
127
179
  }
128
180
  /**
129
181
  * @param p0
@@ -275,181 +327,188 @@ export class Inventory {
275
327
  return [result[0], result[1], result[2]];
276
328
  }
277
329
  /**
278
- * @param provision
279
- * @param slotId
280
- * @returns
330
+ * @param ped
331
+ * @param p1
281
332
  */
282
- static getItemSlotMaxCount(provision, slotId) {
283
- return inv('0xE80E50BEE276A54A', _h(provision), _h(slotId), rai());
333
+ static N_0x9E58207B194488AC(ped, p1) {
334
+ inv('0x9E58207B194488AC', ped.handle, p1);
284
335
  }
285
336
  /**
286
- * Params: p0 is only 0 or 1
287
- * Only used in R* SP Scripts
288
- *
289
- * @param p0
290
337
  * @param inventoryId
291
338
  * @returns guid
292
339
  */
293
- static N_0x0349404A22736740(p0, inventoryId) {
294
- const result = inv('0x0349404A22736740', p0, inventoryId, pvi());
295
- return result;
340
+ static getInventoryItemHidden(inventoryId) {
341
+ const result = inv('0xF9933164965533B7', inventoryId, pvi());
342
+ return [result[0], result[1]];
296
343
  }
297
344
  /**
298
- * @param inventoryId
299
- * @param eInventoryItem
300
- * @param p2
345
+ * soundType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/CItemInfoSoundsInterface__sSoundsInfo__eSoundType
346
+ *
347
+ * @param item
348
+ * @param soundType Refer to [enum: eInventoryItemSound]
301
349
  * @returns
302
350
  */
303
- static getInventoryItemCountWithItemid(inventoryId, eInventoryItem, p2) {
304
- return inv('0xE787F05DFC977BDE', inventoryId, _h(eInventoryItem), p2, rai());
351
+ static getIsInventoryItemSoundValid(item, soundType) {
352
+ return inv('0x2BAE4880DCDD560B', _h(item), soundType);
305
353
  }
306
354
  /**
307
- * Returns collectionId
355
+ * Getter: _INVENTORY_GET_FULL_INVENTORY_ITEM_DATA
308
356
  *
309
- * @returns collectionSize
357
+ * @param inventoryId
358
+ * @param p3
359
+ * @returns guid1; guid2
310
360
  */
311
- static createItemCollection2() {
312
- const result = inv('0x97A3646645727F42', pvi(), rai());
313
- return [result[0], result[1]];
361
+ static updateInventoryItem(inventoryId, p3) {
362
+ const result = inv('0xD80A8854DB5CFBA5', inventoryId, pvi(), pvi(), p3);
363
+ return [result[0], result[1], result[2]];
314
364
  }
315
365
  /**
366
+ * OWE_INVALID = -1,
367
+ * OWE_GOOD_IN_HOT
368
+ * OWE_GOOD_IN_NONE
369
+ * OWE_GOOD_IN_COLD
370
+ * OWE_GOOD_IN_ALL
371
+ *
316
372
  * @param inventoryId
317
- * @param inventoryIdCloned
318
- * @param p3
319
- * @returns p2
373
+ * @param weatherEffectiveness
374
+ * @returns guid
320
375
  */
321
- static copyItemToInventory(inventoryId, inventoryIdCloned, p3) {
322
- const result = inv('0xC04F47D488EF9EBA', inventoryId, inventoryIdCloned, pvi(), p3);
376
+ static setInventoryItemWeatherEffectiveness(inventoryId, weatherEffectiveness) {
377
+ const result = inv('0x6D2F987736A42D4C', inventoryId, pvi(), weatherEffectiveness);
323
378
  return result;
324
379
  }
325
380
  /**
326
- * @param inventoryId
327
- * @returns filter; numInCollection
381
+ * Only used in R* SP Scripts
382
+ *
383
+ * @param p0
328
384
  */
329
- static createItemCollectionWithFilter(inventoryId) {
330
- const result = inv('0x640F890C3E5A3FFD', inventoryId, pvi(), pvi(), rai());
331
- return [result[0], result[1], result[2]];
385
+ static useBackupInventory(p0) {
386
+ inv('0xE36D4A38D28D9CFB', p0);
332
387
  }
333
388
  /**
334
- * @param inventoryId
335
- * @param p2
336
- * @returns guid
389
+ * Returns stats entry id of CatalogItemInspection container
390
+ *
391
+ * @param entryId
392
+ * @param name
393
+ * @param unk1
394
+ * @param playerid
395
+ * @returns
337
396
  */
338
- static getInventoryItemCountWithGuid(inventoryId, p2) {
339
- const result = inv('0xC97E0D2302382211', inventoryId, pvi(), p2, rai());
340
- return [result[0], result[1]];
397
+ static getCatalogItemInspectionStatsEntry(entryId, name, unk1, playerid) {
398
+ return (inv('0x9D21B185ABC2DBC5', entryId, name, unk1, playerid.handle, rai())) & 0xFFFFFFFF;
341
399
  }
342
400
  /**
343
- * filterName (collections): "ALL", "ALL SATCHEL", "ALL HORSES", "ALL COACHES", "ALL MOUNTS", "ALL CLOTHING", "ALL WEAPONS", "ALL SATCHEL EXCLUDING CLOTHING", "ALL EXCLUDING CLOTHING"
344
- * slotId: -1591664384
345
- * p3: outCollectionSize (?)
346
- * Returns collectionId
401
+ * Returns CopyID
347
402
  *
348
403
  * @param inventoryId
349
- * @param filterName
350
- * @param slotId
351
- * @returns size
404
+ * @returns guid
352
405
  */
353
- static createItemCollection(inventoryId, filterName, slotId) {
354
- const result = inv('0x80D78BDC9D88EF07', inventoryId, filterName, _h(slotId), pvi(), rai());
406
+ static getInventoryItemWeaponCopyId(inventoryId) {
407
+ const result = inv('0xAB5F12746A099A0E', inventoryId, pvi(), rai());
355
408
  return [result[0], result[1]];
356
409
  }
357
410
  /**
358
- * p1: 32
359
- * Returns collectionId
360
- *
361
411
  * @param inventoryId
412
+ * @returns itemGUID
413
+ */
414
+ static N_0xB1DD74A1F5536622(inventoryId) {
415
+ const result = inv('0xB1DD74A1F5536622', inventoryId, pvi(), rai());
416
+ return [!!result[0], result[1]];
417
+ }
418
+ /**
419
+ * @param p0
362
420
  * @param p1
363
- * @returns size
421
+ * @param bCopySatchelItems
422
+ * @param bCopyEmotes
423
+ * @param bCopyHorse
424
+ * @param p5
364
425
  */
365
- static createSortedCollection(inventoryId, p1) {
366
- const result = inv('0xBB7F968675B34B0C', inventoryId, p1, pvi(), rai());
367
- return [result[0], result[1]];
426
+ static copyMpInventoryToMissionInventory(p0, p1, bCopySatchelItems, bCopyEmotes, bCopyHorse, p5) {
427
+ inv('0x644CCB76A76CFBD6', p0, p1, bCopySatchelItems, bCopyEmotes, bCopyHorse, p5);
428
+ }
429
+ static disableMissionInventoryPickups() {
430
+ inv('0xE1F389F03DC83673');
368
431
  }
369
432
  /**
433
+ * inventoryId: see _INVENTORY_GET_PED_INVENTORY_ID
434
+ *
370
435
  * @param inventoryId
371
- * @param item
372
- * @returns guid
436
+ * @returns
373
437
  */
374
- static doesItemOwnEquipment(inventoryId, item) {
375
- const result = inv('0x88B58B83A43A8CAB', inventoryId, pvi(), _h(item));
376
- return [result[0], result[1]];
438
+ static areLocalChangesAllowed(inventoryId) {
439
+ return inv('0x0FBBFFC891A97C81', inventoryId);
377
440
  }
378
441
  /**
379
- * Returns a unique inventory ID for this ped.
380
- * For the local player ped, it is an eInventories value.
381
- * For other peds, it is the inventory address casted to unsigned int. enum eInventories
382
- * {
383
- * INVENTORY_INVALID,
384
- * INVENTORY_SP_PLAYER,
385
- * INVENTORY_MP_PLAYER,
386
- * INVENTORY_MP_MISSION,
387
- * INVENTORY_SECOND_SCREEN,
388
- * INVENTORY_SP_BACKUP,
389
- * INVENTORY_SP_SNAPSHOT,
390
- * INVENTORY_0xDE2AE452,
391
- * INVENTORY_0x399D9B3A,
392
- * INVENTORY_0x4BD43FA7,
393
- * INVENTORY_0x9529D251,
394
- * INVENTORY_0xA75776AC,
395
- * INVENTORY_MAX_ID = 11,
396
- * INVENTORY_IDS_COUNT
397
- * };
442
+ * p1 (out) and p2 (in) are both script arrays?
443
+ * item: can be a component item, see SHOP_CATALOG_BUILD_LIST_OF_WEAPON_COMPONENTS
398
444
  *
399
- * @param ped
400
- * @returns
445
+ * @param item
446
+ * @returns p1; p2
401
447
  */
402
- static getInventoryIdFromPed(ped) {
403
- return inv('0x13D234A2A3F66E63', ped.handle, rai());
448
+ static N_0x9AC53CB6907B4428(item) {
449
+ const result = inv('0x9AC53CB6907B4428', _h(item), pvi(), pvi(), rai());
450
+ return [!!result[0], result[1], result[2]];
404
451
  }
405
452
  /**
406
- * Only works on CClothingItem
453
+ * This native has no functionality.
407
454
  *
408
- * @param inventoryId
409
- * @param inUse
410
- * @returns guid
455
+ * @param toggle
411
456
  */
412
- static setInventoryItemInUse(inventoryId, inUse) {
413
- const result = inv('0x65A5F70F4A292EBE', inventoryId, pvi(), inUse);
414
- return result;
457
+ static setUseMissionInventory(toggle) {
458
+ inv('0x597F571DDEE3FFAC', toggle);
415
459
  }
416
460
  /**
417
461
  * @param inventoryId
418
- * @param slotId
419
- * @returns guid; outGuid
462
+ * @returns parentGuid
420
463
  */
421
- static getInventoryItemEquippedInSlotByRef(inventoryId, slotId) {
422
- const result = inv('0x22E590F108289A9D', inventoryId, pvi(), _h(slotId), pvi());
423
- return [result[0], result[1], result[2]];
464
+ static getChildrenCount(inventoryId) {
465
+ const result = inv('0xE843D21A8E2498AA', inventoryId, pvi(), rai());
466
+ return [result[0], result[1]];
424
467
  }
425
468
  /**
426
- * Apply the weapon stats to the CatalogItemInspection stats entry id. get entryId with _INVENTORY_GET_CATALOG_ITEM_INSPECTION_STATS_ENTRY
427
- *
428
- * @param entryId
429
- * @param weapon
430
- * @param ped
469
+ * @returns itemGUID
431
470
  */
432
- static applyWeaponStatsToEntry(entryId, weapon, ped) {
433
- inv('0x75CFAC49301E134E', entryId, _h(weapon), ped.handle);
471
+ static isItemExpired() {
472
+ const result = inv('0x0137C77A2EC64536', pvi(), rai());
473
+ return [!!result[0], result[1]];
434
474
  }
435
475
  /**
476
+ * Alternative Name: _INVENTORY_IS_ITEM_DISABLED
477
+ *
436
478
  * @param inventoryId
437
479
  * @param item
480
+ * @param p2
481
+ * @returns
438
482
  */
439
- static enableItem(inventoryId, item) {
440
- inv('0x6A564540FAC12211', inventoryId, _h(item));
483
+ static isInventoryItemEquipped(inventoryId, item, p2) {
484
+ return inv('0x3D10D7179D7034AF', inventoryId, _h(item), p2);
441
485
  }
442
486
  /**
443
- * Returns databindingEntryId to be used with 0x951847CEF3D829FF (p0)
487
+ * @param inventoryId
488
+ * @param p3
489
+ * @param p4
490
+ * @returns guid; p2
491
+ */
492
+ static getFullInventoryItemData(inventoryId, p3, p4) {
493
+ const result = inv('0x025A1B1FB03FBF61', inventoryId, pvi(), pvi(), p3, p4);
494
+ return [result[0], result[1], result[2]];
495
+ }
496
+ /**
497
+ * @param inventoryId
498
+ */
499
+ static enableWeapons(inventoryId) {
500
+ inv('0xD5D72F1624F3BA7C', inventoryId);
501
+ }
502
+ /**
503
+ * Params: p3 returns an int between 0 and 20 (?)
504
+ * Only used in R* SP Scripts
444
505
  *
445
- * @param data
446
- * @param stats
447
- * @param ped
448
- * @returns guid
506
+ * @param inventoryId
507
+ * @returns guid; p2; p3
449
508
  */
450
- static N_0x46DB71883EE9D5AF(data, stats, ped) {
451
- const result = inv('0x46DB71883EE9D5AF', data, stats, pvi(), ped.handle, rai());
452
- return [result[0] & 0xFFFFFFFF, result[1]];
509
+ static N_0xD08685BA892DBFAB(inventoryId) {
510
+ const result = inv('0xD08685BA892DBFAB', inventoryId, pvi(), pvi(), pvi(), rai());
511
+ return [!!result[0], result[1], result[2], result[3]];
453
512
  }
454
513
  /**
455
514
  * collectionId is < outCollectionSize
@@ -745,63 +804,4 @@ export class Inventory {
745
804
  const result = inv('0xF666EF30F4F0AC4E', pvi());
746
805
  return result;
747
806
  }
748
- /**
749
- * @param ped
750
- * @param p1
751
- */
752
- static N_0x9E58207B194488AC(ped, p1) {
753
- inv('0x9E58207B194488AC', ped.handle, p1);
754
- }
755
- /**
756
- * @param inventoryId
757
- * @returns guid
758
- */
759
- static getInventoryItemHidden(inventoryId) {
760
- const result = inv('0xF9933164965533B7', inventoryId, pvi());
761
- return [result[0], result[1]];
762
- }
763
- /**
764
- * soundType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/CItemInfoSoundsInterface__sSoundsInfo__eSoundType
765
- *
766
- * @param item
767
- * @param soundType Refer to [enum: eInventoryItemSound]
768
- * @returns
769
- */
770
- static getIsInventoryItemSoundValid(item, soundType) {
771
- return inv('0x2BAE4880DCDD560B', _h(item), soundType);
772
- }
773
- /**
774
- * Getter: _INVENTORY_GET_FULL_INVENTORY_ITEM_DATA
775
- *
776
- * @param inventoryId
777
- * @param p3
778
- * @returns guid1; guid2
779
- */
780
- static updateInventoryItem(inventoryId, p3) {
781
- const result = inv('0xD80A8854DB5CFBA5', inventoryId, pvi(), pvi(), p3);
782
- return [result[0], result[1], result[2]];
783
- }
784
- /**
785
- * OWE_INVALID = -1,
786
- * OWE_GOOD_IN_HOT
787
- * OWE_GOOD_IN_NONE
788
- * OWE_GOOD_IN_COLD
789
- * OWE_GOOD_IN_ALL
790
- *
791
- * @param inventoryId
792
- * @param weatherEffectiveness
793
- * @returns guid
794
- */
795
- static setInventoryItemWeatherEffectiveness(inventoryId, weatherEffectiveness) {
796
- const result = inv('0x6D2F987736A42D4C', inventoryId, pvi(), weatherEffectiveness);
797
- return result;
798
- }
799
- /**
800
- * Only used in R* SP Scripts
801
- *
802
- * @param p0
803
- */
804
- static useBackupInventory(p0) {
805
- inv('0xE36D4A38D28D9CFB', p0);
806
- }
807
807
  }