@rpg-engine/shared 0.7.83 → 0.7.85

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 (129) 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 +52 -52
  19. package/dist/index.js +68 -68
  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 +68 -68
  48. package/dist/types/animation.types.js +45 -45
  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 +40 -40
  56. package/dist/types/battle.types.js +18 -18
  57. package/dist/types/buff.types.d.ts +37 -37
  58. package/dist/types/buff.types.js +13 -13
  59. package/dist/types/character.types.d.ts +206 -206
  60. package/dist/types/character.types.js +53 -53
  61. package/dist/types/chat.types.d.ts +30 -30
  62. package/dist/types/chat.types.js +14 -14
  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/entity.types.d.ts +30 -30
  68. package/dist/types/entity.types.js +20 -20
  69. package/dist/types/env.types.d.ts +5 -5
  70. package/dist/types/env.types.js +9 -9
  71. package/dist/types/equipment.types.d.ts +35 -35
  72. package/dist/types/equipment.types.js +18 -18
  73. package/dist/types/googleOAuth.types.d.ts +47 -47
  74. package/dist/types/googleOAuth.types.js +2 -2
  75. package/dist/types/inventory.types.d.ts +7 -7
  76. package/dist/types/inventory.types.js +2 -2
  77. package/dist/types/item.types.d.ts +366 -367
  78. package/dist/types/item.types.d.ts.map +1 -1
  79. package/dist/types/item.types.js +154 -155
  80. package/dist/types/item.types.js.map +1 -1
  81. package/dist/types/itemContainer.types.d.ts +83 -83
  82. package/dist/types/itemContainer.types.js +11 -11
  83. package/dist/types/macro.types.d.ts +8 -8
  84. package/dist/types/macro.types.js +12 -12
  85. package/dist/types/maps.types.d.ts +82 -82
  86. package/dist/types/maps.types.js +81 -81
  87. package/dist/types/notification.types.d.ts +14 -14
  88. package/dist/types/notification.types.js +2 -2
  89. package/dist/types/npc.types.d.ts +152 -152
  90. package/dist/types/npc.types.js +48 -48
  91. package/dist/types/pagination.types.d.ts +13 -13
  92. package/dist/types/pagination.types.js +2 -2
  93. package/dist/types/places.types.d.ts +16 -16
  94. package/dist/types/places.types.js +9 -9
  95. package/dist/types/preloadScene.types.d.ts +4 -4
  96. package/dist/types/preloadScene.types.js +7 -7
  97. package/dist/types/quest.types.d.ts +74 -74
  98. package/dist/types/quest.types.js +21 -21
  99. package/dist/types/resource.types.d.ts +5 -5
  100. package/dist/types/resource.types.js +2 -2
  101. package/dist/types/scene.types.d.ts +8 -8
  102. package/dist/types/scene.types.js +8 -8
  103. package/dist/types/shortcut.types.d.ts +11 -11
  104. package/dist/types/shortcut.types.js +9 -9
  105. package/dist/types/skills.types.d.ts +143 -143
  106. package/dist/types/skills.types.js +106 -106
  107. package/dist/types/socket.types.d.ts +17 -17
  108. package/dist/types/socket.types.js +8 -8
  109. package/dist/types/spell.types.d.ts +25 -25
  110. package/dist/types/spell.types.js +10 -10
  111. package/dist/types/tiled.types.d.ts +119 -119
  112. package/dist/types/tiled.types.js +7 -7
  113. package/dist/types/trade.types.d.ts +65 -65
  114. package/dist/types/trade.types.js +15 -15
  115. package/dist/types/translation.types.d.ts +5 -5
  116. package/dist/types/translation.types.js +8 -8
  117. package/dist/types/ui.types.d.ts +8 -8
  118. package/dist/types/ui.types.js +7 -7
  119. package/dist/types/useWith.types.d.ts +25 -25
  120. package/dist/types/useWith.types.js +9 -9
  121. package/dist/types/user.types.d.ts +101 -101
  122. package/dist/types/user.types.js +38 -38
  123. package/dist/types/validation.types.d.ts +9 -9
  124. package/dist/types/validation.types.js +2 -2
  125. package/dist/types/view.types.d.ts +15 -14
  126. package/dist/types/view.types.d.ts.map +1 -1
  127. package/dist/types/view.types.js +7 -7
  128. package/dist/types/view.types.js.map +1 -1
  129. package/package.json +43 -43
@@ -1,83 +1,83 @@
1
- export declare enum MapLayers {
2
- Ground = 0,
3
- OverGround = 1,
4
- Decoration = 2,
5
- Character = 3,
6
- OverCharacter = 4,
7
- OverCharacterDecoration = 5,
8
- Roof = 6
9
- }
10
- export declare const TiledLayerNames: {
11
- 0: string;
12
- 1: string;
13
- 2: string;
14
- 3: string;
15
- 4: string;
16
- 5: string;
17
- 6: string;
18
- };
19
- export declare const MAP_OBJECT_LAYERS: string[];
20
- export declare const MAP_LAYERS: string[];
21
- export declare const MAP_LAYERS_TO_ID: {
22
- ground: number;
23
- "over-ground": number;
24
- decoration: number;
25
- character: number;
26
- "over-character": number;
27
- "over-character-decoration": number;
28
- roof: number;
29
- };
30
- export declare const MAP_REQUIRED_LAYERS: string[];
31
- export interface IMapMetadataTileset {
32
- name: string;
33
- }
34
- export declare enum MapLighteningType {
35
- Static = "Static",
36
- Dynamic = "Dynamic"
37
- }
38
- export interface IMapMetaData {
39
- key: string;
40
- name: string;
41
- version: number;
42
- layers: string[];
43
- tileWidth: number;
44
- tileHeight: number;
45
- tilesets: IMapMetadataTileset[];
46
- width: number;
47
- height: number;
48
- lightening?: {
49
- type: MapLighteningType;
50
- value?: number;
51
- };
52
- weather?: AvailableWeather;
53
- }
54
- export declare enum MapSocketEvents {
55
- ChangeMap = "ChangeMap",
56
- NonPVPZone = "NonPVPZone",
57
- SameMapTeleport = "SameMapTeleport"
58
- }
59
- export interface IMapDestination {
60
- map: string;
61
- gridX: number;
62
- gridY: number;
63
- }
64
- export declare enum PeriodOfDay {
65
- Morning = "Morning",
66
- Afternoon = "Afternoon",
67
- Night = "Night"
68
- }
69
- export declare enum AvailableWeather {
70
- Standard = "Standard",
71
- SoftRain = "SoftRain",
72
- HeavyRain = "HeavyRain",
73
- Snowing = "Snowing"
74
- }
75
- export interface IControlTime {
76
- time: string;
77
- period: PeriodOfDay;
78
- weather: AvailableWeather;
79
- }
80
- export declare enum WeatherSocketEvents {
81
- TimeWeatherControl = "TimeWeatherControl"
82
- }
1
+ export declare enum MapLayers {
2
+ Ground = 0,
3
+ OverGround = 1,
4
+ Decoration = 2,
5
+ Character = 3,
6
+ OverCharacter = 4,
7
+ OverCharacterDecoration = 5,
8
+ Roof = 6
9
+ }
10
+ export declare const TiledLayerNames: {
11
+ 0: string;
12
+ 1: string;
13
+ 2: string;
14
+ 3: string;
15
+ 4: string;
16
+ 5: string;
17
+ 6: string;
18
+ };
19
+ export declare const MAP_OBJECT_LAYERS: string[];
20
+ export declare const MAP_LAYERS: string[];
21
+ export declare const MAP_LAYERS_TO_ID: {
22
+ ground: number;
23
+ "over-ground": number;
24
+ decoration: number;
25
+ character: number;
26
+ "over-character": number;
27
+ "over-character-decoration": number;
28
+ roof: number;
29
+ };
30
+ export declare const MAP_REQUIRED_LAYERS: string[];
31
+ export interface IMapMetadataTileset {
32
+ name: string;
33
+ }
34
+ export declare enum MapLighteningType {
35
+ Static = "Static",
36
+ Dynamic = "Dynamic"
37
+ }
38
+ export interface IMapMetaData {
39
+ key: string;
40
+ name: string;
41
+ version: number;
42
+ layers: string[];
43
+ tileWidth: number;
44
+ tileHeight: number;
45
+ tilesets: IMapMetadataTileset[];
46
+ width: number;
47
+ height: number;
48
+ lightening?: {
49
+ type: MapLighteningType;
50
+ value?: number;
51
+ };
52
+ weather?: AvailableWeather;
53
+ }
54
+ export declare enum MapSocketEvents {
55
+ ChangeMap = "ChangeMap",
56
+ NonPVPZone = "NonPVPZone",
57
+ SameMapTeleport = "SameMapTeleport"
58
+ }
59
+ export interface IMapDestination {
60
+ map: string;
61
+ gridX: number;
62
+ gridY: number;
63
+ }
64
+ export declare enum PeriodOfDay {
65
+ Morning = "Morning",
66
+ Afternoon = "Afternoon",
67
+ Night = "Night"
68
+ }
69
+ export declare enum AvailableWeather {
70
+ Standard = "Standard",
71
+ SoftRain = "SoftRain",
72
+ HeavyRain = "HeavyRain",
73
+ Snowing = "Snowing"
74
+ }
75
+ export interface IControlTime {
76
+ time: string;
77
+ period: PeriodOfDay;
78
+ weather: AvailableWeather;
79
+ }
80
+ export declare enum WeatherSocketEvents {
81
+ TimeWeatherControl = "TimeWeatherControl"
82
+ }
83
83
  //# sourceMappingURL=maps.types.d.ts.map
@@ -1,82 +1,82 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WeatherSocketEvents = exports.AvailableWeather = exports.PeriodOfDay = exports.MapSocketEvents = exports.MapLighteningType = exports.MAP_REQUIRED_LAYERS = exports.MAP_LAYERS_TO_ID = exports.MAP_LAYERS = exports.MAP_OBJECT_LAYERS = exports.TiledLayerNames = exports.MapLayers = void 0;
4
- var MapLayers;
5
- (function (MapLayers) {
6
- MapLayers[MapLayers["Ground"] = 0] = "Ground";
7
- MapLayers[MapLayers["OverGround"] = 1] = "OverGround";
8
- MapLayers[MapLayers["Decoration"] = 2] = "Decoration";
9
- MapLayers[MapLayers["Character"] = 3] = "Character";
10
- MapLayers[MapLayers["OverCharacter"] = 4] = "OverCharacter";
11
- MapLayers[MapLayers["OverCharacterDecoration"] = 5] = "OverCharacterDecoration";
12
- MapLayers[MapLayers["Roof"] = 6] = "Roof";
13
- })(MapLayers = exports.MapLayers || (exports.MapLayers = {}));
14
- exports.TiledLayerNames = {
15
- 0: "ground",
16
- 1: "over-ground",
17
- 2: "decoration",
18
- 3: "character",
19
- 4: "over-character",
20
- 5: "over-character-decoration",
21
- 6: "roof",
22
- };
23
- exports.MAP_OBJECT_LAYERS = ["NPCs", "Transitions", "Items", "Roofs"];
24
- exports.MAP_LAYERS = [
25
- "ground",
26
- "over-ground",
27
- "decoration",
28
- "character",
29
- "over-character",
30
- "over-character-decoration",
31
- "roof",
32
- ];
33
- exports.MAP_LAYERS_TO_ID = {
34
- ground: 0,
35
- "over-ground": 1,
36
- decoration: 2,
37
- character: 3,
38
- "over-character": 4,
39
- "over-character-decoration": 5,
40
- roof: 6,
41
- };
42
- exports.MAP_REQUIRED_LAYERS = [
43
- "Roofs",
44
- "roof",
45
- "over-character",
46
- "NPCs",
47
- "Transitions",
48
- "character",
49
- "Items",
50
- "decoration",
51
- "over-ground",
52
- "ground",
53
- ];
54
- var MapLighteningType;
55
- (function (MapLighteningType) {
56
- MapLighteningType["Static"] = "Static";
57
- MapLighteningType["Dynamic"] = "Dynamic";
58
- })(MapLighteningType = exports.MapLighteningType || (exports.MapLighteningType = {}));
59
- var MapSocketEvents;
60
- (function (MapSocketEvents) {
61
- MapSocketEvents["ChangeMap"] = "ChangeMap";
62
- MapSocketEvents["NonPVPZone"] = "NonPVPZone";
63
- MapSocketEvents["SameMapTeleport"] = "SameMapTeleport";
64
- })(MapSocketEvents = exports.MapSocketEvents || (exports.MapSocketEvents = {}));
65
- var PeriodOfDay;
66
- (function (PeriodOfDay) {
67
- PeriodOfDay["Morning"] = "Morning";
68
- PeriodOfDay["Afternoon"] = "Afternoon";
69
- PeriodOfDay["Night"] = "Night";
70
- })(PeriodOfDay = exports.PeriodOfDay || (exports.PeriodOfDay = {}));
71
- var AvailableWeather;
72
- (function (AvailableWeather) {
73
- AvailableWeather["Standard"] = "Standard";
74
- AvailableWeather["SoftRain"] = "SoftRain";
75
- AvailableWeather["HeavyRain"] = "HeavyRain";
76
- AvailableWeather["Snowing"] = "Snowing";
77
- })(AvailableWeather = exports.AvailableWeather || (exports.AvailableWeather = {}));
78
- var WeatherSocketEvents;
79
- (function (WeatherSocketEvents) {
80
- WeatherSocketEvents["TimeWeatherControl"] = "TimeWeatherControl";
81
- })(WeatherSocketEvents = exports.WeatherSocketEvents || (exports.WeatherSocketEvents = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WeatherSocketEvents = exports.AvailableWeather = exports.PeriodOfDay = exports.MapSocketEvents = exports.MapLighteningType = exports.MAP_REQUIRED_LAYERS = exports.MAP_LAYERS_TO_ID = exports.MAP_LAYERS = exports.MAP_OBJECT_LAYERS = exports.TiledLayerNames = exports.MapLayers = void 0;
4
+ var MapLayers;
5
+ (function (MapLayers) {
6
+ MapLayers[MapLayers["Ground"] = 0] = "Ground";
7
+ MapLayers[MapLayers["OverGround"] = 1] = "OverGround";
8
+ MapLayers[MapLayers["Decoration"] = 2] = "Decoration";
9
+ MapLayers[MapLayers["Character"] = 3] = "Character";
10
+ MapLayers[MapLayers["OverCharacter"] = 4] = "OverCharacter";
11
+ MapLayers[MapLayers["OverCharacterDecoration"] = 5] = "OverCharacterDecoration";
12
+ MapLayers[MapLayers["Roof"] = 6] = "Roof";
13
+ })(MapLayers = exports.MapLayers || (exports.MapLayers = {}));
14
+ exports.TiledLayerNames = {
15
+ 0: "ground",
16
+ 1: "over-ground",
17
+ 2: "decoration",
18
+ 3: "character",
19
+ 4: "over-character",
20
+ 5: "over-character-decoration",
21
+ 6: "roof",
22
+ };
23
+ exports.MAP_OBJECT_LAYERS = ["NPCs", "Transitions", "Items", "Roofs"];
24
+ exports.MAP_LAYERS = [
25
+ "ground",
26
+ "over-ground",
27
+ "decoration",
28
+ "character",
29
+ "over-character",
30
+ "over-character-decoration",
31
+ "roof",
32
+ ];
33
+ exports.MAP_LAYERS_TO_ID = {
34
+ ground: 0,
35
+ "over-ground": 1,
36
+ decoration: 2,
37
+ character: 3,
38
+ "over-character": 4,
39
+ "over-character-decoration": 5,
40
+ roof: 6,
41
+ };
42
+ exports.MAP_REQUIRED_LAYERS = [
43
+ "Roofs",
44
+ "roof",
45
+ "over-character",
46
+ "NPCs",
47
+ "Transitions",
48
+ "character",
49
+ "Items",
50
+ "decoration",
51
+ "over-ground",
52
+ "ground",
53
+ ];
54
+ var MapLighteningType;
55
+ (function (MapLighteningType) {
56
+ MapLighteningType["Static"] = "Static";
57
+ MapLighteningType["Dynamic"] = "Dynamic";
58
+ })(MapLighteningType = exports.MapLighteningType || (exports.MapLighteningType = {}));
59
+ var MapSocketEvents;
60
+ (function (MapSocketEvents) {
61
+ MapSocketEvents["ChangeMap"] = "ChangeMap";
62
+ MapSocketEvents["NonPVPZone"] = "NonPVPZone";
63
+ MapSocketEvents["SameMapTeleport"] = "SameMapTeleport";
64
+ })(MapSocketEvents = exports.MapSocketEvents || (exports.MapSocketEvents = {}));
65
+ var PeriodOfDay;
66
+ (function (PeriodOfDay) {
67
+ PeriodOfDay["Morning"] = "Morning";
68
+ PeriodOfDay["Afternoon"] = "Afternoon";
69
+ PeriodOfDay["Night"] = "Night";
70
+ })(PeriodOfDay = exports.PeriodOfDay || (exports.PeriodOfDay = {}));
71
+ var AvailableWeather;
72
+ (function (AvailableWeather) {
73
+ AvailableWeather["Standard"] = "Standard";
74
+ AvailableWeather["SoftRain"] = "SoftRain";
75
+ AvailableWeather["HeavyRain"] = "HeavyRain";
76
+ AvailableWeather["Snowing"] = "Snowing";
77
+ })(AvailableWeather = exports.AvailableWeather || (exports.AvailableWeather = {}));
78
+ var WeatherSocketEvents;
79
+ (function (WeatherSocketEvents) {
80
+ WeatherSocketEvents["TimeWeatherControl"] = "TimeWeatherControl";
81
+ })(WeatherSocketEvents = exports.WeatherSocketEvents || (exports.WeatherSocketEvents = {}));
82
82
  //# sourceMappingURL=maps.types.js.map
@@ -1,15 +1,15 @@
1
- export interface IShowPromptOption {
2
- label: string;
3
- color?: string;
4
- action: (label: string) => void;
5
- }
6
- export interface IShowPrompt {
7
- question: string;
8
- options: IShowPromptOption[];
9
- addDefaultCancelOption?: boolean;
10
- }
11
- export interface INotification {
12
- variant: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark";
13
- message: string;
14
- }
1
+ export interface IShowPromptOption {
2
+ label: string;
3
+ color?: string;
4
+ action: (label: string) => void;
5
+ }
6
+ export interface IShowPrompt {
7
+ question: string;
8
+ options: IShowPromptOption[];
9
+ addDefaultCancelOption?: boolean;
10
+ }
11
+ export interface INotification {
12
+ variant: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "light" | "dark";
13
+ message: string;
14
+ }
15
15
  //# sourceMappingURL=notification.types.d.ts.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=notification.types.js.map
@@ -1,153 +1,153 @@
1
- import { AnimationDirection } from "./animation.types";
2
- import { CharacterClass, CharacterGender, ICharacter } from "./character.types";
3
- import { EntityAttackType } from "./entity.types";
4
- import { MapLayers } from "./maps.types";
5
- import { IResource } from "./resource.types";
6
- import { ISkill } from "./skills.types";
7
- import { ITraderItem } from "./trade.types";
8
- export interface INPC extends IResource {
9
- tiledId?: number;
10
- key: string;
11
- textureKey: string;
12
- name: string;
13
- health: number;
14
- maxHealth: number;
15
- mana: number;
16
- maxMana: number;
17
- alignment: NPCAlignment;
18
- targetType: NPCTargetType;
19
- targetCharacter?: ICharacter | null;
20
- x: number;
21
- y: number;
22
- initialX: number;
23
- initialY: number;
24
- direction: AnimationDirection;
25
- scene: string;
26
- class: CharacterClass;
27
- gender: CharacterGender;
28
- layer: MapLayers;
29
- attackType: EntityAttackType;
30
- originalMovementType: NPCMovementType;
31
- currentMovementType: NPCMovementType;
32
- maxRangeInGridCells?: number;
33
- maxRangedDistanceInGridCells?: number;
34
- pathOrientation?: NPCPathOrientation;
35
- fixedPath?: {
36
- endGridX: number;
37
- endGridY: number;
38
- };
39
- pm2InstanceManager: number;
40
- speed: number;
41
- dialogText: string;
42
- skills: ISkill | string;
43
- spawnIntervalMin: number;
44
- nextSpawnTime: Date;
45
- fleeOnLowHealth: boolean;
46
- experience?: number;
47
- xpToRelease?: {
48
- charId: number;
49
- xp: number;
50
- }[];
51
- loots?: INPCLoot[];
52
- hasQuest?: boolean;
53
- hasDepot?: boolean;
54
- baseHealth?: number;
55
- healthRandomizerDice?: number;
56
- skillRandomizerDice?: number;
57
- skillsToBeRandomized?: string[];
58
- isTrader?: boolean;
59
- traderItem?: ITraderItem;
60
- }
61
- export declare enum NPCTargetType {
62
- Default = "Default",
63
- Talking = "Talking"
64
- }
65
- export declare enum NPCAlignment {
66
- Friendly = "Friendly",
67
- Neutral = "Neutral",
68
- Hostile = "Hostile"
69
- }
70
- export declare enum NPCPathOrientation {
71
- Forward = "Forward",
72
- Backward = "Backward"
73
- }
74
- export declare enum NPCMovementType {
75
- Random = "Random",
76
- FixedPath = "FixedPath",
77
- Stopped = "Stopped",
78
- MoveAway = "MoveAway",
79
- MoveTowards = "MoveTowards"
80
- }
81
- export declare enum NPCSocketEvents {
82
- NPCDataUpdate = "NPCDataUpdate",
83
- NPCPositionCreate = "NPCPositionCreate",
84
- NPCPositionUpdate = "NPCPositionUpdate",
85
- NPCPositionRequest = "NPCPositionRequest",
86
- NPCTalkToNPC = "NPCTalkToNPC",
87
- NPCStartDialogNPC = "NPCStartDialogNPC",
88
- NPCStopDialogNPC = "NPCStopDialogNPC"
89
- }
90
- export interface INPCPositionRequestPayload {
91
- type: "create" | "update";
92
- id: string;
93
- }
94
- export interface INPCPositionCreatePayload {
95
- id: string;
96
- name: string;
97
- x: number;
98
- y: number;
99
- direction: string;
100
- key: string;
101
- layer: MapLayers;
102
- textureKey: string;
103
- scene: string;
104
- speed: number;
105
- alignment: NPCAlignment;
106
- health: number;
107
- maxHealth: number;
108
- mana: number;
109
- maxMana: number;
110
- hasQuest: boolean;
111
- hasDepot?: boolean;
112
- isTrader?: boolean;
113
- traderItems?: ITraderItem[];
114
- isGiantForm?: boolean;
115
- }
116
- export interface INPCPositionUpdatePayload {
117
- id: string;
118
- x: number;
119
- y: number;
120
- direction: string;
121
- alignment: NPCAlignment;
122
- }
123
- export declare enum NPCSubtype {
124
- Animal = "Animal",
125
- Bird = "Bird",
126
- Insect = "Insect",
127
- Undead = "Undead",
128
- Magical = "Magical",
129
- Humanoid = "Humanoid",
130
- Dragon = "Dragon",
131
- Elemental = "Elemental"
132
- }
133
- export interface INPCDataUpdatePayload {
134
- [key: string]: any;
135
- }
136
- export interface INPCGetInfoEmitterClient {
137
- npcId: string;
138
- }
139
- export interface INPCGetInfoEmitterServer extends INPC {
140
- }
141
- export interface INPCStartDialog {
142
- npcId: string;
143
- dialogText: string;
144
- }
145
- export interface INPCStopDialog {
146
- npcId: string;
147
- }
148
- export interface INPCLoot {
149
- itemBlueprintKey: string;
150
- chance: number;
151
- quantityRange?: number[];
152
- }
1
+ import { AnimationDirection } from "./animation.types";
2
+ import { CharacterClass, CharacterGender, ICharacter } from "./character.types";
3
+ import { EntityAttackType } from "./entity.types";
4
+ import { MapLayers } from "./maps.types";
5
+ import { IResource } from "./resource.types";
6
+ import { ISkill } from "./skills.types";
7
+ import { ITraderItem } from "./trade.types";
8
+ export interface INPC extends IResource {
9
+ tiledId?: number;
10
+ key: string;
11
+ textureKey: string;
12
+ name: string;
13
+ health: number;
14
+ maxHealth: number;
15
+ mana: number;
16
+ maxMana: number;
17
+ alignment: NPCAlignment;
18
+ targetType: NPCTargetType;
19
+ targetCharacter?: ICharacter | null;
20
+ x: number;
21
+ y: number;
22
+ initialX: number;
23
+ initialY: number;
24
+ direction: AnimationDirection;
25
+ scene: string;
26
+ class: CharacterClass;
27
+ gender: CharacterGender;
28
+ layer: MapLayers;
29
+ attackType: EntityAttackType;
30
+ originalMovementType: NPCMovementType;
31
+ currentMovementType: NPCMovementType;
32
+ maxRangeInGridCells?: number;
33
+ maxRangedDistanceInGridCells?: number;
34
+ pathOrientation?: NPCPathOrientation;
35
+ fixedPath?: {
36
+ endGridX: number;
37
+ endGridY: number;
38
+ };
39
+ pm2InstanceManager: number;
40
+ speed: number;
41
+ dialogText: string;
42
+ skills: ISkill | string;
43
+ spawnIntervalMin: number;
44
+ nextSpawnTime: Date;
45
+ fleeOnLowHealth: boolean;
46
+ experience?: number;
47
+ xpToRelease?: {
48
+ charId: number;
49
+ xp: number;
50
+ }[];
51
+ loots?: INPCLoot[];
52
+ hasQuest?: boolean;
53
+ hasDepot?: boolean;
54
+ baseHealth?: number;
55
+ healthRandomizerDice?: number;
56
+ skillRandomizerDice?: number;
57
+ skillsToBeRandomized?: string[];
58
+ isTrader?: boolean;
59
+ traderItem?: ITraderItem;
60
+ }
61
+ export declare enum NPCTargetType {
62
+ Default = "Default",
63
+ Talking = "Talking"
64
+ }
65
+ export declare enum NPCAlignment {
66
+ Friendly = "Friendly",
67
+ Neutral = "Neutral",
68
+ Hostile = "Hostile"
69
+ }
70
+ export declare enum NPCPathOrientation {
71
+ Forward = "Forward",
72
+ Backward = "Backward"
73
+ }
74
+ export declare enum NPCMovementType {
75
+ Random = "Random",
76
+ FixedPath = "FixedPath",
77
+ Stopped = "Stopped",
78
+ MoveAway = "MoveAway",
79
+ MoveTowards = "MoveTowards"
80
+ }
81
+ export declare enum NPCSocketEvents {
82
+ NPCDataUpdate = "NPCDataUpdate",
83
+ NPCPositionCreate = "NPCPositionCreate",
84
+ NPCPositionUpdate = "NPCPositionUpdate",
85
+ NPCPositionRequest = "NPCPositionRequest",
86
+ NPCTalkToNPC = "NPCTalkToNPC",
87
+ NPCStartDialogNPC = "NPCStartDialogNPC",
88
+ NPCStopDialogNPC = "NPCStopDialogNPC"
89
+ }
90
+ export interface INPCPositionRequestPayload {
91
+ type: "create" | "update";
92
+ id: string;
93
+ }
94
+ export interface INPCPositionCreatePayload {
95
+ id: string;
96
+ name: string;
97
+ x: number;
98
+ y: number;
99
+ direction: string;
100
+ key: string;
101
+ layer: MapLayers;
102
+ textureKey: string;
103
+ scene: string;
104
+ speed: number;
105
+ alignment: NPCAlignment;
106
+ health: number;
107
+ maxHealth: number;
108
+ mana: number;
109
+ maxMana: number;
110
+ hasQuest: boolean;
111
+ hasDepot?: boolean;
112
+ isTrader?: boolean;
113
+ traderItems?: ITraderItem[];
114
+ isGiantForm?: boolean;
115
+ }
116
+ export interface INPCPositionUpdatePayload {
117
+ id: string;
118
+ x: number;
119
+ y: number;
120
+ direction: string;
121
+ alignment: NPCAlignment;
122
+ }
123
+ export declare enum NPCSubtype {
124
+ Animal = "Animal",
125
+ Bird = "Bird",
126
+ Insect = "Insect",
127
+ Undead = "Undead",
128
+ Magical = "Magical",
129
+ Humanoid = "Humanoid",
130
+ Dragon = "Dragon",
131
+ Elemental = "Elemental"
132
+ }
133
+ export interface INPCDataUpdatePayload {
134
+ [key: string]: any;
135
+ }
136
+ export interface INPCGetInfoEmitterClient {
137
+ npcId: string;
138
+ }
139
+ export interface INPCGetInfoEmitterServer extends INPC {
140
+ }
141
+ export interface INPCStartDialog {
142
+ npcId: string;
143
+ dialogText: string;
144
+ }
145
+ export interface INPCStopDialog {
146
+ npcId: string;
147
+ }
148
+ export interface INPCLoot {
149
+ itemBlueprintKey: string;
150
+ chance: number;
151
+ quantityRange?: number[];
152
+ }
153
153
  //# sourceMappingURL=npc.types.d.ts.map