@rpg-engine/shared 0.8.91 → 0.8.93

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 (139) hide show
  1. package/README.md +29 -29
  2. package/dist/constants/date.constants.d.ts +2 -2
  3. package/dist/constants/date.constants.js +5 -5
  4. package/dist/constants/npc.constants.d.ts +1 -1
  5. package/dist/constants/npc.constants.js +4 -4
  6. package/dist/constants/socket.constants.d.ts +2 -2
  7. package/dist/constants/socket.constants.js +6 -6
  8. package/dist/constants/world.constants.d.ts +10 -10
  9. package/dist/constants/world.constants.js +13 -13
  10. package/dist/helpers/deviceHelpers.d.ts +2 -2
  11. package/dist/helpers/deviceHelpers.js +16 -16
  12. package/dist/helpers/itemSlotHelper.d.ts +7 -7
  13. package/dist/helpers/itemSlotHelper.js +27 -27
  14. package/dist/helpers/skillHelpers.d.ts +4 -4
  15. package/dist/helpers/skillHelpers.js +25 -25
  16. package/dist/helpers/weightHelper.d.ts +1 -1
  17. package/dist/helpers/weightHelper.js +14 -14
  18. package/dist/index.d.ts +57 -57
  19. package/dist/index.js +73 -73
  20. package/dist/libs/GridHelper.d.ts +11 -11
  21. package/dist/libs/GridHelper.js +37 -37
  22. package/dist/libs/MathHelper.d.ts +16 -16
  23. package/dist/libs/MathHelper.js +14 -14
  24. package/dist/libs/SocketHelper.d.ts +2 -2
  25. package/dist/libs/SocketHelper.js +14 -14
  26. package/dist/libs/TextHelper.d.ts +7 -7
  27. package/dist/libs/TextHelper.js +21 -21
  28. package/dist/libs/TypeHelper.d.ts +3 -3
  29. package/dist/libs/TypeHelper.js +16 -16
  30. package/dist/translations/app-rate.lang.json +38 -38
  31. package/dist/translations/assets.lang.json +82 -82
  32. package/dist/translations/auth.lang.json +182 -182
  33. package/dist/translations/email.lang.json +70 -70
  34. package/dist/translations/error.lang.json +18 -18
  35. package/dist/translations/form.lang.json +94 -94
  36. package/dist/translations/global.lang.json +90 -90
  37. package/dist/translations/logs.lang.json +6 -6
  38. package/dist/translations/onboarding.lang.d.ts +10 -10
  39. package/dist/translations/onboarding.lang.js +21 -21
  40. package/dist/translations/onboarding.lang.json +50 -50
  41. package/dist/translations/order.lang.json +90 -90
  42. package/dist/translations/search.lang.json +50 -50
  43. package/dist/translations/settings.lang.json +14 -14
  44. package/dist/translations/tabs.lang.json +22 -22
  45. package/dist/translations/users.lang.json +22 -22
  46. package/dist/translations/validation.lang.json +86 -86
  47. package/dist/types/animation.types.d.ts +69 -69
  48. package/dist/types/animation.types.js +46 -46
  49. package/dist/types/api.types.d.ts +21 -21
  50. package/dist/types/api.types.js +20 -20
  51. package/dist/types/asset.types.d.ts +6 -6
  52. package/dist/types/asset.types.js +2 -2
  53. package/dist/types/auth.types.d.ts +7 -7
  54. package/dist/types/auth.types.js +2 -2
  55. package/dist/types/battle.types.d.ts +41 -41
  56. package/dist/types/battle.types.js +18 -18
  57. package/dist/types/buff.types.d.ts +39 -39
  58. package/dist/types/buff.types.js +13 -13
  59. package/dist/types/character.types.d.ts +233 -233
  60. package/dist/types/character.types.js +65 -65
  61. package/dist/types/chat.types.d.ts +72 -72
  62. package/dist/types/chat.types.js +22 -22
  63. package/dist/types/depot.types.d.ts +18 -18
  64. package/dist/types/depot.types.js +9 -9
  65. package/dist/types/device.types.d.ts +24 -24
  66. package/dist/types/device.types.js +7 -7
  67. package/dist/types/displayText.types.d.ts +10 -10
  68. package/dist/types/displayText.types.js +7 -7
  69. package/dist/types/entity.types.d.ts +30 -30
  70. package/dist/types/entity.types.js +20 -20
  71. package/dist/types/env.types.d.ts +5 -5
  72. package/dist/types/env.types.js +9 -9
  73. package/dist/types/equipment.types.d.ts +35 -35
  74. package/dist/types/equipment.types.js +18 -18
  75. package/dist/types/googleOAuth.types.d.ts +47 -47
  76. package/dist/types/googleOAuth.types.js +2 -2
  77. package/dist/types/inventory.types.d.ts +7 -7
  78. package/dist/types/inventory.types.js +2 -2
  79. package/dist/types/item.types.d.ts +377 -377
  80. package/dist/types/item.types.d.ts.map +1 -1
  81. package/dist/types/item.types.js +154 -154
  82. package/dist/types/itemContainer.types.d.ts +83 -83
  83. package/dist/types/itemContainer.types.js +11 -11
  84. package/dist/types/leaderboard.types.d.ts +32 -32
  85. package/dist/types/leaderboard.types.js +9 -9
  86. package/dist/types/macro.types.d.ts +8 -8
  87. package/dist/types/macro.types.js +12 -12
  88. package/dist/types/maps.types.d.ts +90 -90
  89. package/dist/types/maps.types.js +85 -85
  90. package/dist/types/marketplace.types.d.ts +61 -61
  91. package/dist/types/marketplace.types.js +15 -15
  92. package/dist/types/notification.types.d.ts +14 -14
  93. package/dist/types/notification.types.js +2 -2
  94. package/dist/types/npc.types.d.ts +165 -165
  95. package/dist/types/npc.types.js +49 -49
  96. package/dist/types/pagination.types.d.ts +13 -13
  97. package/dist/types/pagination.types.js +2 -2
  98. package/dist/types/party.types.d.ts +83 -83
  99. package/dist/types/party.types.js +54 -54
  100. package/dist/types/places.types.d.ts +16 -16
  101. package/dist/types/places.types.js +9 -9
  102. package/dist/types/preloadScene.types.d.ts +4 -4
  103. package/dist/types/preloadScene.types.js +7 -7
  104. package/dist/types/premiumAccount.types.d.ts +7 -7
  105. package/dist/types/premiumAccount.types.js +11 -11
  106. package/dist/types/quest.types.d.ts +74 -74
  107. package/dist/types/quest.types.js +21 -21
  108. package/dist/types/raid.types.d.ts +6 -6
  109. package/dist/types/raid.types.js +2 -2
  110. package/dist/types/resource.types.d.ts +5 -5
  111. package/dist/types/resource.types.js +2 -2
  112. package/dist/types/scene.types.d.ts +8 -8
  113. package/dist/types/scene.types.js +8 -8
  114. package/dist/types/shortcut.types.d.ts +11 -11
  115. package/dist/types/shortcut.types.js +9 -9
  116. package/dist/types/skills.types.d.ts +144 -144
  117. package/dist/types/skills.types.js +106 -106
  118. package/dist/types/socket.types.d.ts +18 -18
  119. package/dist/types/socket.types.js +8 -8
  120. package/dist/types/spell.types.d.ts +156 -156
  121. package/dist/types/spell.types.d.ts.map +1 -1
  122. package/dist/types/spell.types.js +108 -108
  123. package/dist/types/tiled.types.d.ts +119 -119
  124. package/dist/types/tiled.types.js +7 -7
  125. package/dist/types/trade.types.d.ts +65 -65
  126. package/dist/types/trade.types.js +15 -15
  127. package/dist/types/translation.types.d.ts +5 -5
  128. package/dist/types/translation.types.js +8 -8
  129. package/dist/types/ui.types.d.ts +8 -8
  130. package/dist/types/ui.types.js +7 -7
  131. package/dist/types/useWith.types.d.ts +25 -25
  132. package/dist/types/useWith.types.js +9 -9
  133. package/dist/types/user.types.d.ts +104 -104
  134. package/dist/types/user.types.js +38 -38
  135. package/dist/types/validation.types.d.ts +9 -9
  136. package/dist/types/validation.types.js +2 -2
  137. package/dist/types/view.types.d.ts +15 -15
  138. package/dist/types/view.types.js +7 -7
  139. package/package.json +43 -43
@@ -1,378 +1,378 @@
1
- import { AnimationEffectKeys } from "./animation.types";
2
- import { ICharacterPermanentBuff } from "./buff.types";
3
- import { ICharacter } from "./character.types";
4
- import { EntityAttackType } from "./entity.types";
5
- import { IEquipmentSet } from "./equipment.types";
6
- import { IItemContainer } from "./itemContainer.types";
7
- import { MapLayers } from "./maps.types";
8
- import { UserAccountTypes } from "./premiumAccount.types";
9
- import { IResource } from "./resource.types";
10
- export interface IItem extends IResource {
11
- tiledId?: number;
12
- owner?: ICharacter | string;
13
- type: ItemType;
14
- subType: ItemSubType;
15
- name: string;
16
- description: string;
17
- fullDescription: string;
18
- key: string;
19
- textureAtlas: string;
20
- texturePath: string;
21
- textureKey: string;
22
- attack?: number;
23
- defense?: number;
24
- weight: number;
25
- rarity: string;
26
- allowedEquipSlotType: ItemSlotType[];
27
- isEquipable: boolean;
28
- isStackable: boolean;
29
- isTwoHanded: boolean;
30
- hasUseWith: boolean;
31
- maxStackSize: number;
32
- stackQty?: number;
33
- isUsable: boolean;
34
- usableEffect?: string;
35
- isStorable: boolean;
36
- x?: number;
37
- y?: number;
38
- scene?: string;
39
- layer?: MapLayers;
40
- isSolid: boolean;
41
- isItemContainer: boolean;
42
- itemContainer?: string | IItemContainer;
43
- generateContainerSlots?: number;
44
- decayTime?: Date;
45
- maxRange?: number;
46
- requiredAmmoKeys?: string[];
47
- rangeType?: EntityAttackType;
48
- minRequirements?: MinRequirements;
49
- entityEffects?: string[];
50
- entityEffectChance?: number;
51
- usableEffectDescription?: string;
52
- equippedBuffDescription?: string;
53
- canBePurchasedOnlyByPremiumPlans?: UserAccountTypes[];
54
- }
55
- export declare enum ItemType {
56
- Weapon = "Weapon",
57
- Armor = "Armor",
58
- Accessory = "Accessory",
59
- Jewelry = "Jewelry",
60
- Consumable = "Consumable",
61
- Quest = "Quest",
62
- Information = "Information",
63
- Tool = "Tool",
64
- Container = "Container",
65
- Other = "Other",
66
- CraftingResource = "CraftingResource"
67
- }
68
- export declare enum ItemRarities {
69
- Common = "Common",
70
- Uncommon = "Uncommon",
71
- Rare = "Rare",
72
- Epic = "Epic",
73
- Legendary = "Legendary"
74
- }
75
- export declare enum ItemSubType {
76
- Accessory = "Accessory",
77
- CraftingResource = "CraftingResource",
78
- Armor = "Armor",
79
- Legs = "Legs",
80
- Axe = "Axe",
81
- Boot = "Boot",
82
- Ranged = "Ranged",
83
- Food = "Food",
84
- Glove = "Glove",
85
- Helmet = "Helmet",
86
- Magic = "Magic",
87
- Potion = "Potion",
88
- Shield = "Shield",
89
- Spear = "Spear",
90
- Staff = "Staff",
91
- Sword = "Sword",
92
- Other = "Other",
93
- DeadBody = "DeadBody",
94
- Dagger = "Dagger",
95
- Mace = "Mace",
96
- Tool = "Tool",
97
- Book = "Book"
98
- }
99
- export declare enum ItemSlotType {
100
- Head = "Head",
101
- Neck = "Neck",
102
- Torso = "Torso",
103
- LeftHand = "LeftHand",
104
- RightHand = "RightHand",
105
- Waist = "Waist",
106
- Legs = "Legs",
107
- Feet = "Feet",
108
- Ring = "Ring",
109
- Accessory = "Accessory",
110
- Inventory = "Inventory"
111
- }
112
- export declare enum ItemSocketEvents {
113
- Update = "Update",
114
- UpdateAll = "UpdateAll",
115
- Look = "Look",
116
- Equip = "Equip",
117
- Unequip = "Unequip",
118
- Pickup = "Pickup",
119
- Drop = "Drop",
120
- Move = "Move",
121
- Use = "Use",
122
- UseWith = "Use with...",
123
- GetItemInfo = "GetItemInfo",
124
- ReadItemInfo = "ReadItemInfo",
125
- ContainerOpen = "ContainerOpen",
126
- ContainerRead = "ContainerRead",
127
- ContainerTransfer = "ContainerTransfer",
128
- EquipmentAndInventoryUpdate = "EquipmentAndInventoryUpdate",
129
- RangedAttack = "RangedAttack",
130
- Buy = "Buy",
131
- Sell = "Sell",
132
- InventoryOpen = "InventoryOpen",
133
- LoadCraftBook = "LoadCraftBook",
134
- CraftableItems = "CraftableItems",
135
- CraftItem = "CraftItem"
136
- }
137
- interface IStringIndex {
138
- [key: string]: any;
139
- }
140
- export declare const ItemSocketEventsDisplayLabels: IStringIndex;
141
- export interface IGetItemInfo {
142
- id: string;
143
- fields: string[];
144
- }
145
- export interface IReadItemInfo {
146
- id: string;
147
- information: string;
148
- }
149
- export interface IItemUpdate {
150
- id: string;
151
- textureAtlas: string;
152
- texturePath: string;
153
- type: ItemType;
154
- subType: ItemSubType;
155
- name: string;
156
- x: number;
157
- y: number;
158
- scene?: string;
159
- layer: MapLayers;
160
- stackQty: number;
161
- isStackable?: boolean;
162
- isDeadBodyLootable?: boolean;
163
- }
164
- export interface IItemUpdateAll {
165
- items: IItemUpdate[];
166
- }
167
- export interface IItemsInView {
168
- [id: string]: IItemInViewBasicInfo;
169
- }
170
- export interface IItemInViewBasicInfo {
171
- id: string;
172
- x?: number;
173
- y?: number;
174
- }
175
- export declare const ActionsForInventory: {
176
- Equipment: ItemSocketEvents[];
177
- Consumable: ItemSocketEvents[];
178
- CraftingResource: ItemSocketEvents[];
179
- Tool: ItemSocketEvents[];
180
- Other: ItemSocketEvents[];
181
- Container: ItemSocketEvents[];
182
- };
183
- export declare const ActionsForLoot: {
184
- Equipment: ItemSocketEvents[];
185
- Consumable: ItemSocketEvents[];
186
- CraftingResource: ItemSocketEvents[];
187
- Tool: ItemSocketEvents[];
188
- Other: ItemSocketEvents[];
189
- };
190
- export declare const ActionsForEquipmentSet: {
191
- Equipment: ItemSocketEvents[];
192
- Container: ItemSocketEvents[];
193
- };
194
- export declare const ActionsForMapContainer: {
195
- Equipment: ItemSocketEvents[];
196
- Consumable: ItemSocketEvents[];
197
- CraftingResource: ItemSocketEvents[];
198
- Tool: ItemSocketEvents[];
199
- Other: ItemSocketEvents[];
200
- };
201
- export interface IPayloadProps {
202
- item: IItem | null;
203
- actionType: ItemSocketEvents | string;
204
- }
205
- export interface IEquipItemPayload {
206
- itemId: string;
207
- itemContainerId: string;
208
- }
209
- export interface IUnequipItemPayload {
210
- itemId: string;
211
- }
212
- export interface IEquipmentAndInventoryUpdatePayload {
213
- equipment?: IEquipmentSet;
214
- inventory?: IItemContainer;
215
- openEquipmentSetOnUpdate?: boolean;
216
- openInventoryOnUpdate?: boolean;
217
- }
218
- export declare type Direction = "down" | "up" | "left" | "right" | "down_right" | "down_left" | "up_right" | "up_left";
219
- export interface IRangedAttack {
220
- attackerId: string;
221
- targetId: string;
222
- direction: Direction;
223
- ammoKey?: string;
224
- type?: string;
225
- }
226
- export interface IUseItemPayload {
227
- itemId: string;
228
- }
229
- export declare enum SpellCastingType {
230
- SelfCasting = "self-casting",
231
- RangedCasting = "ranged-casting"
232
- }
233
- export interface ILoadCraftBookPayload {
234
- itemSubType: string;
235
- }
236
- export interface ICraftItemPayload {
237
- itemKey: string;
238
- itemSubType?: string;
239
- }
240
- export interface ICraftableItemIngredient {
241
- key: string;
242
- name: string;
243
- qty: number;
244
- texturePath: string;
245
- }
246
- export interface ICraftableItem extends IItem {
247
- canCraft: boolean;
248
- ingredients: ICraftableItemIngredient[];
249
- minCraftingRequirements?: [string, number];
250
- levelIsOk?: boolean;
251
- }
252
- export declare enum RangeTypes {
253
- UltraShort = 3,
254
- Short = 5,
255
- Medium = 6,
256
- High = 7
257
- }
258
- export interface IBaseItemBlueprint {
259
- key: string;
260
- type: ItemType;
261
- subType: ItemSubType;
262
- textureAtlas: string;
263
- texturePath: string;
264
- name: string;
265
- description: string;
266
- weight: number;
267
- basePrice?: number;
268
- canSell?: boolean;
269
- maxStackSize?: number;
270
- isTraining?: boolean;
271
- minRequirements?: MinRequirements;
272
- usableEffectDescription?: string;
273
- equippedBuffDescription?: string;
274
- canBePurchasedOnlyByPremiumPlans?: UserAccountTypes[];
275
- }
276
- export interface MinRequirements {
277
- level: number;
278
- skill: {
279
- name: string;
280
- level: number;
281
- };
282
- }
283
- export interface IEquippableItemBlueprint extends IBaseItemBlueprint {
284
- defense?: number;
285
- attack?: number;
286
- allowedEquipSlotType: ItemSlotType[];
287
- usableEffect?: (character: any) => void | Promise<void>;
288
- equippedBuff?: ICharacterPermanentBuff | ICharacterPermanentBuff[];
289
- isMageGear: Boolean;
290
- }
291
- export interface IEquippableRangedAmmoBlueprint extends IBaseItemBlueprint {
292
- type: ItemType.Weapon;
293
- subType: ItemSubType.Ranged;
294
- attack: number;
295
- allowedEquipSlotType: [ItemSlotType.Accessory];
296
- maxStackSize: number;
297
- entityEffects?: string[];
298
- entityEffectChance?: number;
299
- }
300
- export interface IEquippableArmorBlueprint extends Omit<IEquippableItemBlueprint, "attack"> {
301
- }
302
- export interface IEquippableWeaponBlueprint extends IEquippableItemBlueprint {
303
- type: ItemType.Weapon;
304
- attack: number;
305
- defense: number;
306
- rangeType: EntityAttackType;
307
- isTwoHanded?: boolean;
308
- entityEffects?: string[];
309
- entityEffectChance?: number;
310
- }
311
- export interface IEquippableRangedWeaponTwoHandedBlueprint extends Omit<IEquippableWeaponBlueprint, "defense"> {
312
- rangeType: EntityAttackType.Ranged;
313
- subType: ItemSubType.Ranged;
314
- maxRange: RangeTypes;
315
- requiredAmmoKeys: string[];
316
- attack: number;
317
- isTwoHanded: true;
318
- allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
319
- }
320
- export interface IEquippableRangedWeaponOneHandedBlueprint extends Omit<IEquippableWeaponBlueprint, "defense"> {
321
- rangeType: EntityAttackType.Ranged;
322
- subType: ItemSubType.Ranged;
323
- maxRange: RangeTypes;
324
- attack: number;
325
- allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
326
- }
327
- export interface ICraftableItemBlueprint extends IBaseItemBlueprint {
328
- type: ItemType.Consumable | ItemType.CraftingResource;
329
- maxStackSize?: number;
330
- usableEffect?: (character: any) => void | Promise<void>;
331
- usableEffectKey?: string;
332
- }
333
- export interface IToolItemBlueprint extends IBaseItemBlueprint {
334
- attack?: number;
335
- defense?: number;
336
- allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
337
- rangeType: EntityAttackType;
338
- hasUseWith: true;
339
- useWithMaxDistanceGrid: RangeTypes;
340
- canSell: false;
341
- usableEffect?: (character: any, targetItem: any, itemCraftable: any, skillIncrease: any, originItem: any) => void | Promise<void>;
342
- useWithTileEffect?: (originItem: any, targetTile: any, targetname: string, character: any, itemCraftable: any, skillIncrease: any) => Promise<void>;
343
- }
344
- export interface IConsumableItemBlueprint extends ICraftableItemBlueprint {
345
- type: ItemType.Consumable;
346
- usableEffect?: (character: any) => void | Promise<void>;
347
- usableEffectKey: string;
348
- }
349
- export declare enum MagicPower {
350
- UltraLow = 0.5,
351
- Low = 1.5,
352
- Medium = 2.5,
353
- High = 4.5,
354
- UltraHigh = 5,
355
- Fatal = 7
356
- }
357
- export interface IRuneItemBlueprint extends IBaseItemBlueprint {
358
- hasUseWith: true;
359
- canUseOnNonPVPZone: boolean;
360
- maxStackSize: number;
361
- useWithMaxDistanceGrid: RangeTypes;
362
- power: MagicPower;
363
- animationKey: AnimationEffectKeys;
364
- projectileAnimationKey: AnimationEffectKeys;
365
- minMagicLevelRequired: number;
366
- usableEffect?: (caster: any, target: any) => void | Promise<void> | Promise<number>;
367
- usableEntityEffect?: (caster: any, target: any) => void | Promise<void> | Promise<number>;
368
- usableEffectKey: string;
369
- hasAutoTarget?: boolean;
370
- hasSelfAutoTarget?: boolean;
371
- canTargetNPC?: boolean;
372
- }
373
- export interface IEquippableStaffBlueprint extends IEquippableWeaponBlueprint {
374
- projectileAnimationKey: AnimationEffectKeys;
375
- maxRange: RangeTypes;
376
- }
377
- export {};
1
+ import { AnimationEffectKeys } from "./animation.types";
2
+ import { ICharacterPermanentBuff } from "./buff.types";
3
+ import { ICharacter } from "./character.types";
4
+ import { EntityAttackType } from "./entity.types";
5
+ import { IEquipmentSet } from "./equipment.types";
6
+ import { IItemContainer } from "./itemContainer.types";
7
+ import { MapLayers } from "./maps.types";
8
+ import { UserAccountTypes } from "./premiumAccount.types";
9
+ import { IResource } from "./resource.types";
10
+ export interface IItem extends IResource {
11
+ tiledId?: number;
12
+ owner?: ICharacter | string;
13
+ type: ItemType;
14
+ subType: ItemSubType;
15
+ name: string;
16
+ description: string;
17
+ fullDescription: string;
18
+ key: string;
19
+ textureAtlas: string;
20
+ texturePath: string;
21
+ textureKey: string;
22
+ attack?: number;
23
+ defense?: number;
24
+ weight: number;
25
+ rarity: string;
26
+ allowedEquipSlotType: ItemSlotType[];
27
+ isEquipable: boolean;
28
+ isStackable: boolean;
29
+ isTwoHanded: boolean;
30
+ hasUseWith: boolean;
31
+ maxStackSize: number;
32
+ stackQty?: number;
33
+ isUsable: boolean;
34
+ usableEffect?: string;
35
+ isStorable: boolean;
36
+ x?: number;
37
+ y?: number;
38
+ scene?: string;
39
+ layer?: MapLayers;
40
+ isSolid: boolean;
41
+ isItemContainer: boolean;
42
+ itemContainer?: string | IItemContainer;
43
+ generateContainerSlots?: number;
44
+ decayTime?: Date;
45
+ maxRange?: number;
46
+ requiredAmmoKeys?: string[];
47
+ rangeType?: EntityAttackType;
48
+ minRequirements?: MinRequirements;
49
+ entityEffects?: string[];
50
+ entityEffectChance?: number;
51
+ usableEffectDescription?: string;
52
+ equippedBuffDescription?: string;
53
+ canBePurchasedOnlyByPremiumPlans?: UserAccountTypes[];
54
+ }
55
+ export declare enum ItemType {
56
+ Weapon = "Weapon",
57
+ Armor = "Armor",
58
+ Accessory = "Accessory",
59
+ Jewelry = "Jewelry",
60
+ Consumable = "Consumable",
61
+ Quest = "Quest",
62
+ Information = "Information",
63
+ Tool = "Tool",
64
+ Container = "Container",
65
+ Other = "Other",
66
+ CraftingResource = "CraftingResource"
67
+ }
68
+ export declare enum ItemRarities {
69
+ Common = "Common",
70
+ Uncommon = "Uncommon",
71
+ Rare = "Rare",
72
+ Epic = "Epic",
73
+ Legendary = "Legendary"
74
+ }
75
+ export declare enum ItemSubType {
76
+ Accessory = "Accessory",
77
+ CraftingResource = "CraftingResource",
78
+ Armor = "Armor",
79
+ Legs = "Legs",
80
+ Axe = "Axe",
81
+ Boot = "Boot",
82
+ Ranged = "Ranged",
83
+ Food = "Food",
84
+ Glove = "Glove",
85
+ Helmet = "Helmet",
86
+ Magic = "Magic",
87
+ Potion = "Potion",
88
+ Shield = "Shield",
89
+ Spear = "Spear",
90
+ Staff = "Staff",
91
+ Sword = "Sword",
92
+ Other = "Other",
93
+ DeadBody = "DeadBody",
94
+ Dagger = "Dagger",
95
+ Mace = "Mace",
96
+ Tool = "Tool",
97
+ Book = "Book"
98
+ }
99
+ export declare enum ItemSlotType {
100
+ Head = "Head",
101
+ Neck = "Neck",
102
+ Torso = "Torso",
103
+ LeftHand = "LeftHand",
104
+ RightHand = "RightHand",
105
+ Waist = "Waist",
106
+ Legs = "Legs",
107
+ Feet = "Feet",
108
+ Ring = "Ring",
109
+ Accessory = "Accessory",
110
+ Inventory = "Inventory"
111
+ }
112
+ export declare enum ItemSocketEvents {
113
+ Update = "Update",
114
+ UpdateAll = "UpdateAll",
115
+ Look = "Look",
116
+ Equip = "Equip",
117
+ Unequip = "Unequip",
118
+ Pickup = "Pickup",
119
+ Drop = "Drop",
120
+ Move = "Move",
121
+ Use = "Use",
122
+ UseWith = "Use with...",
123
+ GetItemInfo = "GetItemInfo",
124
+ ReadItemInfo = "ReadItemInfo",
125
+ ContainerOpen = "ContainerOpen",
126
+ ContainerRead = "ContainerRead",
127
+ ContainerTransfer = "ContainerTransfer",
128
+ EquipmentAndInventoryUpdate = "EquipmentAndInventoryUpdate",
129
+ RangedAttack = "RangedAttack",
130
+ Buy = "Buy",
131
+ Sell = "Sell",
132
+ InventoryOpen = "InventoryOpen",
133
+ LoadCraftBook = "LoadCraftBook",
134
+ CraftableItems = "CraftableItems",
135
+ CraftItem = "CraftItem"
136
+ }
137
+ interface IStringIndex {
138
+ [key: string]: any;
139
+ }
140
+ export declare const ItemSocketEventsDisplayLabels: IStringIndex;
141
+ export interface IGetItemInfo {
142
+ id: string;
143
+ fields: string[];
144
+ }
145
+ export interface IReadItemInfo {
146
+ id: string;
147
+ information: string;
148
+ }
149
+ export interface IItemUpdate {
150
+ id: string;
151
+ textureAtlas: string;
152
+ texturePath: string;
153
+ type: ItemType;
154
+ subType: ItemSubType;
155
+ name: string;
156
+ x: number;
157
+ y: number;
158
+ scene?: string;
159
+ layer: MapLayers;
160
+ stackQty: number;
161
+ isStackable?: boolean;
162
+ isDeadBodyLootable?: boolean;
163
+ }
164
+ export interface IItemUpdateAll {
165
+ items: IItemUpdate[];
166
+ }
167
+ export interface IItemsInView {
168
+ [id: string]: IItemInViewBasicInfo;
169
+ }
170
+ export interface IItemInViewBasicInfo {
171
+ id: string;
172
+ x?: number;
173
+ y?: number;
174
+ }
175
+ export declare const ActionsForInventory: {
176
+ Equipment: ItemSocketEvents[];
177
+ Consumable: ItemSocketEvents[];
178
+ CraftingResource: ItemSocketEvents[];
179
+ Tool: ItemSocketEvents[];
180
+ Other: ItemSocketEvents[];
181
+ Container: ItemSocketEvents[];
182
+ };
183
+ export declare const ActionsForLoot: {
184
+ Equipment: ItemSocketEvents[];
185
+ Consumable: ItemSocketEvents[];
186
+ CraftingResource: ItemSocketEvents[];
187
+ Tool: ItemSocketEvents[];
188
+ Other: ItemSocketEvents[];
189
+ };
190
+ export declare const ActionsForEquipmentSet: {
191
+ Equipment: ItemSocketEvents[];
192
+ Container: ItemSocketEvents[];
193
+ };
194
+ export declare const ActionsForMapContainer: {
195
+ Equipment: ItemSocketEvents[];
196
+ Consumable: ItemSocketEvents[];
197
+ CraftingResource: ItemSocketEvents[];
198
+ Tool: ItemSocketEvents[];
199
+ Other: ItemSocketEvents[];
200
+ };
201
+ export interface IPayloadProps {
202
+ item: IItem | null;
203
+ actionType: ItemSocketEvents | string;
204
+ }
205
+ export interface IEquipItemPayload {
206
+ itemId: string;
207
+ itemContainerId: string;
208
+ }
209
+ export interface IUnequipItemPayload {
210
+ itemId: string;
211
+ }
212
+ export interface IEquipmentAndInventoryUpdatePayload {
213
+ equipment?: IEquipmentSet;
214
+ inventory?: IItemContainer;
215
+ openEquipmentSetOnUpdate?: boolean;
216
+ openInventoryOnUpdate?: boolean;
217
+ }
218
+ export declare type Direction = "down" | "up" | "left" | "right" | "down_right" | "down_left" | "up_right" | "up_left";
219
+ export interface IRangedAttack {
220
+ attackerId: string;
221
+ targetId: string;
222
+ direction: Direction;
223
+ ammoKey?: string;
224
+ type?: string;
225
+ }
226
+ export interface IUseItemPayload {
227
+ itemId: string;
228
+ }
229
+ export declare enum SpellCastingType {
230
+ SelfCasting = "self-casting",
231
+ RangedCasting = "ranged-casting"
232
+ }
233
+ export interface ILoadCraftBookPayload {
234
+ itemSubType: string;
235
+ }
236
+ export interface ICraftItemPayload {
237
+ itemKey: string;
238
+ itemSubType?: string;
239
+ }
240
+ export interface ICraftableItemIngredient {
241
+ key: string;
242
+ name: string;
243
+ qty: number;
244
+ texturePath: string;
245
+ }
246
+ export interface ICraftableItem extends IItem {
247
+ canCraft: boolean;
248
+ ingredients: ICraftableItemIngredient[];
249
+ minCraftingRequirements?: [string, number];
250
+ levelIsOk?: boolean;
251
+ }
252
+ export declare enum RangeTypes {
253
+ UltraShort = 3,
254
+ Short = 5,
255
+ Medium = 6,
256
+ High = 7
257
+ }
258
+ export interface IBaseItemBlueprint {
259
+ key: string;
260
+ type: ItemType;
261
+ subType: ItemSubType;
262
+ textureAtlas: string;
263
+ texturePath: string;
264
+ name: string;
265
+ description: string;
266
+ weight: number;
267
+ basePrice?: number;
268
+ canSell?: boolean;
269
+ maxStackSize?: number;
270
+ isTraining?: boolean;
271
+ minRequirements?: MinRequirements;
272
+ usableEffectDescription?: string;
273
+ equippedBuffDescription?: string;
274
+ canBePurchasedOnlyByPremiumPlans?: UserAccountTypes[];
275
+ }
276
+ export interface MinRequirements {
277
+ level: number;
278
+ skill: {
279
+ name: string;
280
+ level: number;
281
+ };
282
+ }
283
+ export interface IEquippableItemBlueprint extends IBaseItemBlueprint {
284
+ defense?: number;
285
+ attack?: number;
286
+ allowedEquipSlotType: ItemSlotType[];
287
+ usableEffect?: (character: any) => void | Promise<void>;
288
+ equippedBuff?: ICharacterPermanentBuff | ICharacterPermanentBuff[];
289
+ isMageGear?: Boolean;
290
+ }
291
+ export interface IEquippableRangedAmmoBlueprint extends IBaseItemBlueprint {
292
+ type: ItemType.Weapon;
293
+ subType: ItemSubType.Ranged;
294
+ attack: number;
295
+ allowedEquipSlotType: [ItemSlotType.Accessory];
296
+ maxStackSize: number;
297
+ entityEffects?: string[];
298
+ entityEffectChance?: number;
299
+ }
300
+ export interface IEquippableArmorBlueprint extends Omit<IEquippableItemBlueprint, "attack"> {
301
+ }
302
+ export interface IEquippableWeaponBlueprint extends IEquippableItemBlueprint {
303
+ type: ItemType.Weapon;
304
+ attack: number;
305
+ defense: number;
306
+ rangeType: EntityAttackType;
307
+ isTwoHanded?: boolean;
308
+ entityEffects?: string[];
309
+ entityEffectChance?: number;
310
+ }
311
+ export interface IEquippableRangedWeaponTwoHandedBlueprint extends Omit<IEquippableWeaponBlueprint, "defense"> {
312
+ rangeType: EntityAttackType.Ranged;
313
+ subType: ItemSubType.Ranged;
314
+ maxRange: RangeTypes;
315
+ requiredAmmoKeys: string[];
316
+ attack: number;
317
+ isTwoHanded: true;
318
+ allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
319
+ }
320
+ export interface IEquippableRangedWeaponOneHandedBlueprint extends Omit<IEquippableWeaponBlueprint, "defense"> {
321
+ rangeType: EntityAttackType.Ranged;
322
+ subType: ItemSubType.Ranged;
323
+ maxRange: RangeTypes;
324
+ attack: number;
325
+ allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
326
+ }
327
+ export interface ICraftableItemBlueprint extends IBaseItemBlueprint {
328
+ type: ItemType.Consumable | ItemType.CraftingResource;
329
+ maxStackSize?: number;
330
+ usableEffect?: (character: any) => void | Promise<void>;
331
+ usableEffectKey?: string;
332
+ }
333
+ export interface IToolItemBlueprint extends IBaseItemBlueprint {
334
+ attack?: number;
335
+ defense?: number;
336
+ allowedEquipSlotType: [ItemSlotType.LeftHand, ItemSlotType.RightHand];
337
+ rangeType: EntityAttackType;
338
+ hasUseWith: true;
339
+ useWithMaxDistanceGrid: RangeTypes;
340
+ canSell: false;
341
+ usableEffect?: (character: any, targetItem: any, itemCraftable: any, skillIncrease: any, originItem: any) => void | Promise<void>;
342
+ useWithTileEffect?: (originItem: any, targetTile: any, targetname: string, character: any, itemCraftable: any, skillIncrease: any) => Promise<void>;
343
+ }
344
+ export interface IConsumableItemBlueprint extends ICraftableItemBlueprint {
345
+ type: ItemType.Consumable;
346
+ usableEffect?: (character: any) => void | Promise<void>;
347
+ usableEffectKey: string;
348
+ }
349
+ export declare enum MagicPower {
350
+ UltraLow = 0.5,
351
+ Low = 1.5,
352
+ Medium = 2.5,
353
+ High = 4.5,
354
+ UltraHigh = 5,
355
+ Fatal = 7
356
+ }
357
+ export interface IRuneItemBlueprint extends IBaseItemBlueprint {
358
+ hasUseWith: true;
359
+ canUseOnNonPVPZone: boolean;
360
+ maxStackSize: number;
361
+ useWithMaxDistanceGrid: RangeTypes;
362
+ power: MagicPower;
363
+ animationKey: AnimationEffectKeys;
364
+ projectileAnimationKey: AnimationEffectKeys;
365
+ minMagicLevelRequired: number;
366
+ usableEffect?: (caster: any, target: any) => void | Promise<void> | Promise<number>;
367
+ usableEntityEffect?: (caster: any, target: any) => void | Promise<void> | Promise<number>;
368
+ usableEffectKey: string;
369
+ hasAutoTarget?: boolean;
370
+ hasSelfAutoTarget?: boolean;
371
+ canTargetNPC?: boolean;
372
+ }
373
+ export interface IEquippableStaffBlueprint extends IEquippableWeaponBlueprint {
374
+ projectileAnimationKey: AnimationEffectKeys;
375
+ maxRange: RangeTypes;
376
+ }
377
+ export {};
378
378
  //# sourceMappingURL=item.types.d.ts.map