@rpg-engine/shared 0.3.65 → 0.3.68

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 (127) 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/skillHelpers.d.ts +4 -4
  11. package/dist/helpers/skillHelpers.js +25 -25
  12. package/dist/index.d.ts +40 -40
  13. package/dist/index.js +56 -56
  14. package/dist/libs/GridHelper.d.ts +11 -11
  15. package/dist/libs/GridHelper.js +37 -37
  16. package/dist/libs/MapZipHelper.d.ts +2 -0
  17. package/dist/libs/MapZipHelper.d.ts.map +1 -0
  18. package/dist/libs/MapZipHelper.js +27 -0
  19. package/dist/libs/MapZipHelper.js.map +1 -0
  20. package/dist/libs/MathHelper.d.ts +16 -16
  21. package/dist/libs/MathHelper.js +14 -14
  22. package/dist/libs/SocketHelper.d.ts +2 -2
  23. package/dist/libs/SocketHelper.js +14 -14
  24. package/dist/libs/TextHelper.d.ts +7 -7
  25. package/dist/libs/TextHelper.js +21 -21
  26. package/dist/libs/TypeHelper.d.ts +3 -3
  27. package/dist/libs/TypeHelper.js +16 -16
  28. package/dist/translations/app-rate.lang.json +38 -38
  29. package/dist/translations/assets.lang.json +82 -82
  30. package/dist/translations/auth.lang.json +182 -182
  31. package/dist/translations/email.lang.json +70 -70
  32. package/dist/translations/error.lang.json +18 -18
  33. package/dist/translations/form.lang.json +94 -94
  34. package/dist/translations/global.lang.json +90 -90
  35. package/dist/translations/logs.lang.json +6 -6
  36. package/dist/translations/onboarding.lang.d.ts +10 -10
  37. package/dist/translations/onboarding.lang.js +21 -21
  38. package/dist/translations/onboarding.lang.json +50 -50
  39. package/dist/translations/order.lang.json +90 -90
  40. package/dist/translations/search.lang.json +50 -50
  41. package/dist/translations/settings.lang.json +14 -14
  42. package/dist/translations/tabs.lang.json +22 -22
  43. package/dist/translations/users.lang.json +22 -22
  44. package/dist/translations/validation.lang.json +86 -86
  45. package/dist/types/animation.types.d.ts +16 -16
  46. package/dist/types/animation.types.js +2 -2
  47. package/dist/types/api.types.d.ts +21 -21
  48. package/dist/types/api.types.js +20 -20
  49. package/dist/types/asset.types.d.ts +6 -6
  50. package/dist/types/asset.types.js +2 -2
  51. package/dist/types/auth.types.d.ts +7 -7
  52. package/dist/types/auth.types.js +2 -2
  53. package/dist/types/battle.types.d.ts +35 -35
  54. package/dist/types/battle.types.js +17 -17
  55. package/dist/types/character.types.d.ts +147 -146
  56. package/dist/types/character.types.d.ts.map +1 -1
  57. package/dist/types/character.types.js +29 -29
  58. package/dist/types/character.types.js.map +1 -1
  59. package/dist/types/chat.types.d.ts +30 -30
  60. package/dist/types/chat.types.js +14 -14
  61. package/dist/types/container.types.d.ts +9 -0
  62. package/dist/types/container.types.d.ts.map +1 -0
  63. package/dist/types/container.types.js +3 -0
  64. package/dist/types/container.types.js.map +1 -0
  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 +20 -20
  68. package/dist/types/entity.types.js +14 -14
  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 -32
  72. package/dist/types/equipment.types.d.ts.map +1 -1
  73. package/dist/types/equipment.types.js +19 -19
  74. package/dist/types/equipment.types.js.map +1 -1
  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 +157 -157
  80. package/dist/types/item.types.d.ts.map +1 -1
  81. package/dist/types/item.types.js +99 -99
  82. package/dist/types/itemContainer.types.d.ts +58 -53
  83. package/dist/types/itemContainer.types.d.ts.map +1 -1
  84. package/dist/types/itemContainer.types.js +2 -2
  85. package/dist/types/maps.types.d.ts +25 -24
  86. package/dist/types/maps.types.d.ts.map +1 -1
  87. package/dist/types/maps.types.js +17 -16
  88. package/dist/types/maps.types.js.map +1 -1
  89. package/dist/types/notification.types.d.ts +14 -14
  90. package/dist/types/notification.types.js +2 -2
  91. package/dist/types/npc.types.d.ts +115 -115
  92. package/dist/types/npc.types.js +35 -35
  93. package/dist/types/npcMetadata.types.d.ts +7 -0
  94. package/dist/types/npcMetadata.types.d.ts.map +1 -0
  95. package/dist/types/npcMetadata.types.js +20 -0
  96. package/dist/types/npcMetadata.types.js.map +1 -0
  97. package/dist/types/pagination.types.d.ts +13 -13
  98. package/dist/types/pagination.types.js +2 -2
  99. package/dist/types/places.types.d.ts +16 -16
  100. package/dist/types/places.types.js +9 -9
  101. package/dist/types/player.types.d.ts +49 -0
  102. package/dist/types/player.types.d.ts.map +1 -0
  103. package/dist/types/player.types.js +14 -0
  104. package/dist/types/player.types.js.map +1 -0
  105. package/dist/types/preloadScene.types.d.ts +4 -4
  106. package/dist/types/preloadScene.types.js +7 -7
  107. package/dist/types/resource.types.d.ts +5 -5
  108. package/dist/types/resource.types.js +2 -2
  109. package/dist/types/scene.types.d.ts +8 -8
  110. package/dist/types/scene.types.js +8 -8
  111. package/dist/types/skills.types.d.ts +58 -58
  112. package/dist/types/skills.types.js +23 -23
  113. package/dist/types/socket.types.d.ts +17 -17
  114. package/dist/types/socket.types.js +8 -8
  115. package/dist/types/tiled.types.d.ts +126 -126
  116. package/dist/types/tiled.types.js +14 -14
  117. package/dist/types/translation.types.d.ts +5 -5
  118. package/dist/types/translation.types.js +8 -8
  119. package/dist/types/ui.types.d.ts +8 -8
  120. package/dist/types/ui.types.js +7 -7
  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 +14 -14
  126. package/dist/types/view.types.js +7 -7
  127. package/package.json +41 -41
@@ -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=itemContainer.types.js.map
@@ -1,25 +1,26 @@
1
- export declare enum MapLayers {
2
- Ground = 0,
3
- OverGround = 1,
4
- Character = 2,
5
- OverCharacter = 3,
6
- Roof = 4
7
- }
8
- export interface IMapMetadataTileset {
9
- name: string;
10
- }
11
- export interface IMapMetaData {
12
- name: string;
13
- hash: string;
14
- layers: string[];
15
- tileWidth: number;
16
- tileHeight: number;
17
- tilesets: IMapMetadataTileset[];
18
- width: number;
19
- height: number;
20
- }
21
- export declare const MAP_LAYERS: string[];
22
- export declare enum MapSocketEvents {
23
- ChangeMap = "ChangeMap"
24
- }
1
+ export declare enum MapLayers {
2
+ Ground = 0,
3
+ OverGround = 1,
4
+ Decoration = 2,
5
+ Character = 3,
6
+ OverCharacter = 4,
7
+ Roof = 5
8
+ }
9
+ export interface IMapMetadataTileset {
10
+ name: string;
11
+ }
12
+ export interface IMapMetaData {
13
+ name: string;
14
+ hash: string;
15
+ layers: string[];
16
+ tileWidth: number;
17
+ tileHeight: number;
18
+ tilesets: IMapMetadataTileset[];
19
+ width: number;
20
+ height: number;
21
+ }
22
+ export declare const MAP_LAYERS: string[];
23
+ export declare enum MapSocketEvents {
24
+ ChangeMap = "ChangeMap"
25
+ }
25
26
  //# sourceMappingURL=maps.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"maps.types.d.ts","sourceRoot":"","sources":["../../src/types/maps.types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,MAAM,IAAI;IACV,UAAU,IAAI;IACd,SAAS,IAAI;IACb,aAAa,IAAI;IACjB,IAAI,IAAI;CACT;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,UAAmE,CAAC;AAE3F,oBAAY,eAAe;IACzB,SAAS,cAAc;CACxB"}
1
+ {"version":3,"file":"maps.types.d.ts","sourceRoot":"","sources":["../../src/types/maps.types.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,MAAM,IAAI;IACV,UAAU,IAAI;IACd,UAAU,IAAI;IACd,SAAS,IAAI;IACb,aAAa,IAAI;IACjB,IAAI,IAAI;CACT;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,UAAiF,CAAC;AAEzG,oBAAY,eAAe;IACzB,SAAS,cAAc;CACxB"}
@@ -1,17 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MapSocketEvents = exports.MAP_LAYERS = 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["Character"] = 2] = "Character";
9
- MapLayers[MapLayers["OverCharacter"] = 3] = "OverCharacter";
10
- MapLayers[MapLayers["Roof"] = 4] = "Roof";
11
- })(MapLayers = exports.MapLayers || (exports.MapLayers = {}));
12
- exports.MAP_LAYERS = ["ground", "over-ground", "character", "over-character", "roof"];
13
- var MapSocketEvents;
14
- (function (MapSocketEvents) {
15
- MapSocketEvents["ChangeMap"] = "ChangeMap";
16
- })(MapSocketEvents = exports.MapSocketEvents || (exports.MapSocketEvents = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MapSocketEvents = exports.MAP_LAYERS = 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["Roof"] = 5] = "Roof";
12
+ })(MapLayers = exports.MapLayers || (exports.MapLayers = {}));
13
+ exports.MAP_LAYERS = ["ground", "over-ground", "decoration", "character", "over-character", "roof"];
14
+ var MapSocketEvents;
15
+ (function (MapSocketEvents) {
16
+ MapSocketEvents["ChangeMap"] = "ChangeMap";
17
+ })(MapSocketEvents = exports.MapSocketEvents || (exports.MapSocketEvents = {}));
17
18
  //# sourceMappingURL=maps.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"maps.types.js","sourceRoot":"","sources":["../../src/types/maps.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,6CAAU,CAAA;IACV,qDAAc,CAAA;IACd,mDAAa,CAAA;IACb,2DAAiB,CAAA;IACjB,yCAAQ,CAAA;AACV,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAiBY,QAAA,UAAU,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAE3F,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,0CAAuB,CAAA;AACzB,CAAC,EAFW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE1B"}
1
+ {"version":3,"file":"maps.types.js","sourceRoot":"","sources":["../../src/types/maps.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,6CAAU,CAAA;IACV,qDAAc,CAAA;IACd,qDAAc,CAAA;IACd,mDAAa,CAAA;IACb,2DAAiB,CAAA;IACjB,yCAAQ,CAAA;AACV,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB;AAiBY,QAAA,UAAU,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAEzG,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,0CAAuB,CAAA;AACzB,CAAC,EAFW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAE1B"}
@@ -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,116 +1,116 @@
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
- export interface INPC extends IResource {
8
- tiledId?: number;
9
- key: string;
10
- textureKey: string;
11
- name: string;
12
- health: number;
13
- maxHealth: number;
14
- mana: number;
15
- maxMana: number;
16
- alignment: NPCAlignment;
17
- targetType: NPCTargetType;
18
- targetCharacter?: ICharacter | null;
19
- x: number;
20
- y: number;
21
- initialX: number;
22
- initialY: number;
23
- direction: AnimationDirection;
24
- scene: string;
25
- class: CharacterClass;
26
- gender: CharacterGender;
27
- layer: MapLayers;
28
- attackType: EntityAttackType;
29
- originalMovementType: NPCMovementType;
30
- currentMovementType: NPCMovementType;
31
- maxRangeInGridCells?: number;
32
- maxRangedDistanceInGridCells?: number;
33
- pathOrientation?: NPCPathOrientation;
34
- fixedPath?: {
35
- endGridX: number;
36
- endGridY: number;
37
- };
38
- pm2InstanceManager: number;
39
- speed: number;
40
- dialogText: string;
41
- skills: ISkill | string;
42
- spawnIntervalMin: number;
43
- nextSpawnTime: Date;
44
- fleeOnLowHealth: boolean;
45
- experience?: number;
46
- xpToRelease?: {
47
- charId: number;
48
- xp: number;
49
- }[];
50
- loots?: INPCLoot[];
51
- }
52
- export declare enum NPCTargetType {
53
- Default = "Default",
54
- Talking = "Talking"
55
- }
56
- export declare enum NPCAlignment {
57
- Friendly = "Friendly",
58
- Neutral = "Neutral",
59
- Hostile = "Hostile"
60
- }
61
- export declare enum NPCPathOrientation {
62
- Forward = "Forward",
63
- Backward = "Backward"
64
- }
65
- export declare enum NPCMovementType {
66
- Random = "Random",
67
- FixedPath = "FixedPath",
68
- Stopped = "Stopped",
69
- MoveAway = "MoveAway",
70
- MoveTowards = "MoveTowards"
71
- }
72
- export declare enum NPCSocketEvents {
73
- NPCDataUpdate = "NPCDataUpdate",
74
- NPCPositionUpdate = "NPCPositionUpdate",
75
- NPCTalkToNPC = "NPCTalkToNPC",
76
- NPCStartDialogNPC = "NPCStartDialogNPC",
77
- NPCStopDialogNPC = "NPCStopDialogNPC"
78
- }
79
- export interface INPCPositionUpdatePayload {
80
- id: string;
81
- name: string;
82
- x: number;
83
- y: number;
84
- direction: string;
85
- key: string;
86
- layer: MapLayers;
87
- textureKey: string;
88
- scene: string;
89
- speed: number;
90
- alignment: NPCAlignment;
91
- health: number;
92
- maxHealth: number;
93
- mana: number;
94
- maxMana: number;
95
- }
96
- export interface INPCDataUpdatePayload {
97
- [key: string]: any;
98
- }
99
- export interface INPCGetInfoEmitterClient {
100
- npcId: string;
101
- }
102
- export interface INPCGetInfoEmitterServer extends INPC {
103
- }
104
- export interface INPCStartDialog {
105
- npcId: string;
106
- dialogText: string;
107
- }
108
- export interface INPCStopDialog {
109
- npcId: string;
110
- }
111
- export interface INPCLoot {
112
- itemBlueprintKey: string;
113
- chance: number;
114
- quantityRange?: number[];
115
- }
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
+ export interface INPC extends IResource {
8
+ tiledId?: number;
9
+ key: string;
10
+ textureKey: string;
11
+ name: string;
12
+ health: number;
13
+ maxHealth: number;
14
+ mana: number;
15
+ maxMana: number;
16
+ alignment: NPCAlignment;
17
+ targetType: NPCTargetType;
18
+ targetCharacter?: ICharacter | null;
19
+ x: number;
20
+ y: number;
21
+ initialX: number;
22
+ initialY: number;
23
+ direction: AnimationDirection;
24
+ scene: string;
25
+ class: CharacterClass;
26
+ gender: CharacterGender;
27
+ layer: MapLayers;
28
+ attackType: EntityAttackType;
29
+ originalMovementType: NPCMovementType;
30
+ currentMovementType: NPCMovementType;
31
+ maxRangeInGridCells?: number;
32
+ maxRangedDistanceInGridCells?: number;
33
+ pathOrientation?: NPCPathOrientation;
34
+ fixedPath?: {
35
+ endGridX: number;
36
+ endGridY: number;
37
+ };
38
+ pm2InstanceManager: number;
39
+ speed: number;
40
+ dialogText: string;
41
+ skills: ISkill | string;
42
+ spawnIntervalMin: number;
43
+ nextSpawnTime: Date;
44
+ fleeOnLowHealth: boolean;
45
+ experience?: number;
46
+ xpToRelease?: {
47
+ charId: number;
48
+ xp: number;
49
+ }[];
50
+ loots?: INPCLoot[];
51
+ }
52
+ export declare enum NPCTargetType {
53
+ Default = "Default",
54
+ Talking = "Talking"
55
+ }
56
+ export declare enum NPCAlignment {
57
+ Friendly = "Friendly",
58
+ Neutral = "Neutral",
59
+ Hostile = "Hostile"
60
+ }
61
+ export declare enum NPCPathOrientation {
62
+ Forward = "Forward",
63
+ Backward = "Backward"
64
+ }
65
+ export declare enum NPCMovementType {
66
+ Random = "Random",
67
+ FixedPath = "FixedPath",
68
+ Stopped = "Stopped",
69
+ MoveAway = "MoveAway",
70
+ MoveTowards = "MoveTowards"
71
+ }
72
+ export declare enum NPCSocketEvents {
73
+ NPCDataUpdate = "NPCDataUpdate",
74
+ NPCPositionUpdate = "NPCPositionUpdate",
75
+ NPCTalkToNPC = "NPCTalkToNPC",
76
+ NPCStartDialogNPC = "NPCStartDialogNPC",
77
+ NPCStopDialogNPC = "NPCStopDialogNPC"
78
+ }
79
+ export interface INPCPositionUpdatePayload {
80
+ id: string;
81
+ name: string;
82
+ x: number;
83
+ y: number;
84
+ direction: string;
85
+ key: string;
86
+ layer: MapLayers;
87
+ textureKey: string;
88
+ scene: string;
89
+ speed: number;
90
+ alignment: NPCAlignment;
91
+ health: number;
92
+ maxHealth: number;
93
+ mana: number;
94
+ maxMana: number;
95
+ }
96
+ export interface INPCDataUpdatePayload {
97
+ [key: string]: any;
98
+ }
99
+ export interface INPCGetInfoEmitterClient {
100
+ npcId: string;
101
+ }
102
+ export interface INPCGetInfoEmitterServer extends INPC {
103
+ }
104
+ export interface INPCStartDialog {
105
+ npcId: string;
106
+ dialogText: string;
107
+ }
108
+ export interface INPCStopDialog {
109
+ npcId: string;
110
+ }
111
+ export interface INPCLoot {
112
+ itemBlueprintKey: string;
113
+ chance: number;
114
+ quantityRange?: number[];
115
+ }
116
116
  //# sourceMappingURL=npc.types.d.ts.map
@@ -1,36 +1,36 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NPCSocketEvents = exports.NPCMovementType = exports.NPCPathOrientation = exports.NPCAlignment = exports.NPCTargetType = void 0;
4
- var NPCTargetType;
5
- (function (NPCTargetType) {
6
- NPCTargetType["Default"] = "Default";
7
- NPCTargetType["Talking"] = "Talking";
8
- })(NPCTargetType = exports.NPCTargetType || (exports.NPCTargetType = {}));
9
- var NPCAlignment;
10
- (function (NPCAlignment) {
11
- NPCAlignment["Friendly"] = "Friendly";
12
- NPCAlignment["Neutral"] = "Neutral";
13
- NPCAlignment["Hostile"] = "Hostile";
14
- })(NPCAlignment = exports.NPCAlignment || (exports.NPCAlignment = {}));
15
- var NPCPathOrientation;
16
- (function (NPCPathOrientation) {
17
- NPCPathOrientation["Forward"] = "Forward";
18
- NPCPathOrientation["Backward"] = "Backward";
19
- })(NPCPathOrientation = exports.NPCPathOrientation || (exports.NPCPathOrientation = {}));
20
- var NPCMovementType;
21
- (function (NPCMovementType) {
22
- NPCMovementType["Random"] = "Random";
23
- NPCMovementType["FixedPath"] = "FixedPath";
24
- NPCMovementType["Stopped"] = "Stopped";
25
- NPCMovementType["MoveAway"] = "MoveAway";
26
- NPCMovementType["MoveTowards"] = "MoveTowards";
27
- })(NPCMovementType = exports.NPCMovementType || (exports.NPCMovementType = {}));
28
- var NPCSocketEvents;
29
- (function (NPCSocketEvents) {
30
- NPCSocketEvents["NPCDataUpdate"] = "NPCDataUpdate";
31
- NPCSocketEvents["NPCPositionUpdate"] = "NPCPositionUpdate";
32
- NPCSocketEvents["NPCTalkToNPC"] = "NPCTalkToNPC";
33
- NPCSocketEvents["NPCStartDialogNPC"] = "NPCStartDialogNPC";
34
- NPCSocketEvents["NPCStopDialogNPC"] = "NPCStopDialogNPC";
35
- })(NPCSocketEvents = exports.NPCSocketEvents || (exports.NPCSocketEvents = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NPCSocketEvents = exports.NPCMovementType = exports.NPCPathOrientation = exports.NPCAlignment = exports.NPCTargetType = void 0;
4
+ var NPCTargetType;
5
+ (function (NPCTargetType) {
6
+ NPCTargetType["Default"] = "Default";
7
+ NPCTargetType["Talking"] = "Talking";
8
+ })(NPCTargetType = exports.NPCTargetType || (exports.NPCTargetType = {}));
9
+ var NPCAlignment;
10
+ (function (NPCAlignment) {
11
+ NPCAlignment["Friendly"] = "Friendly";
12
+ NPCAlignment["Neutral"] = "Neutral";
13
+ NPCAlignment["Hostile"] = "Hostile";
14
+ })(NPCAlignment = exports.NPCAlignment || (exports.NPCAlignment = {}));
15
+ var NPCPathOrientation;
16
+ (function (NPCPathOrientation) {
17
+ NPCPathOrientation["Forward"] = "Forward";
18
+ NPCPathOrientation["Backward"] = "Backward";
19
+ })(NPCPathOrientation = exports.NPCPathOrientation || (exports.NPCPathOrientation = {}));
20
+ var NPCMovementType;
21
+ (function (NPCMovementType) {
22
+ NPCMovementType["Random"] = "Random";
23
+ NPCMovementType["FixedPath"] = "FixedPath";
24
+ NPCMovementType["Stopped"] = "Stopped";
25
+ NPCMovementType["MoveAway"] = "MoveAway";
26
+ NPCMovementType["MoveTowards"] = "MoveTowards";
27
+ })(NPCMovementType = exports.NPCMovementType || (exports.NPCMovementType = {}));
28
+ var NPCSocketEvents;
29
+ (function (NPCSocketEvents) {
30
+ NPCSocketEvents["NPCDataUpdate"] = "NPCDataUpdate";
31
+ NPCSocketEvents["NPCPositionUpdate"] = "NPCPositionUpdate";
32
+ NPCSocketEvents["NPCTalkToNPC"] = "NPCTalkToNPC";
33
+ NPCSocketEvents["NPCStartDialogNPC"] = "NPCStartDialogNPC";
34
+ NPCSocketEvents["NPCStopDialogNPC"] = "NPCStopDialogNPC";
35
+ })(NPCSocketEvents = exports.NPCSocketEvents || (exports.NPCSocketEvents = {}));
36
36
  //# sourceMappingURL=npc.types.js.map
@@ -0,0 +1,7 @@
1
+ import { INPC } from "./npc.types";
2
+ interface INPCMetaData extends Omit<INPC, "_id"> {
3
+ key: string;
4
+ }
5
+ export declare const NPCMetaData: INPCMetaData[];
6
+ export {};
7
+ //# sourceMappingURL=npcMetadata.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npcMetadata.types.d.ts","sourceRoot":"","sources":["../../src/types/npcMetadata.types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,UAAU,YAAa,SAAQ,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,WAAW,EAAE,YAAY,EAYrC,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NPCMetaData = void 0;
4
+ const GridHelper_1 = require("../libs/GridHelper");
5
+ const character_types_1 = require("./character.types");
6
+ const maps_types_1 = require("./maps.types");
7
+ exports.NPCMetaData = [
8
+ {
9
+ key: "alice",
10
+ name: "Alice",
11
+ x: (0, GridHelper_1.FromGridX)(22),
12
+ y: (0, GridHelper_1.FromGridY)(12),
13
+ direction: "down",
14
+ scene: "MainScene",
15
+ class: character_types_1.CharacterClass.Cleric,
16
+ gender: character_types_1.CharacterGender.Female,
17
+ layer: maps_types_1.MapLayers.Player,
18
+ },
19
+ ];
20
+ //# sourceMappingURL=npcMetadata.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npcMetadata.types.js","sourceRoot":"","sources":["../../src/types/npcMetadata.types.ts"],"names":[],"mappings":";;;AAAA,mDAA0D;AAC1D,uDAAoE;AACpE,6CAAyC;AAO5B,QAAA,WAAW,GAAmB;IACzC;QACE,GAAG,EAAE,OAAO;QACZ,IAAI,EAAE,OAAO;QACb,CAAC,EAAE,IAAA,sBAAS,EAAC,EAAE,CAAC;QAChB,CAAC,EAAE,IAAA,sBAAS,EAAC,EAAE,CAAC;QAChB,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,gCAAc,CAAC,MAAM;QAC5B,MAAM,EAAE,iCAAe,CAAC,MAAM;QAC9B,KAAK,EAAE,sBAAS,CAAC,MAAM;KACxB;CACF,CAAC"}
@@ -1,14 +1,14 @@
1
- export interface IPaginationResponse<T> {
2
- docs: T[];
3
- totalDocs: number;
4
- offset: number;
5
- limit: number;
6
- totalPages: number;
7
- page: number;
8
- pagingCounter: number;
9
- hasPrevPage: boolean;
10
- hasNextPage: boolean;
11
- prevPage: number | null;
12
- nextPage: number | null;
13
- }
1
+ export interface IPaginationResponse<T> {
2
+ docs: T[];
3
+ totalDocs: number;
4
+ offset: number;
5
+ limit: number;
6
+ totalPages: number;
7
+ page: number;
8
+ pagingCounter: number;
9
+ hasPrevPage: boolean;
10
+ hasNextPage: boolean;
11
+ prevPage: number | null;
12
+ nextPage: number | null;
13
+ }
14
14
  //# sourceMappingURL=pagination.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=pagination.types.js.map
@@ -1,17 +1,17 @@
1
- export declare enum Countries {
2
- US = "US",
3
- Brazil = "Brazil",
4
- Global = "Global"
5
- }
6
- export interface ICountry {
7
- name: string;
8
- code: string;
9
- }
10
- export interface ICountryCity {
11
- country: {
12
- name: string;
13
- code: string;
14
- };
15
- cities: string[];
16
- }
1
+ export declare enum Countries {
2
+ US = "US",
3
+ Brazil = "Brazil",
4
+ Global = "Global"
5
+ }
6
+ export interface ICountry {
7
+ name: string;
8
+ code: string;
9
+ }
10
+ export interface ICountryCity {
11
+ country: {
12
+ name: string;
13
+ code: string;
14
+ };
15
+ cities: string[];
16
+ }
17
17
  //# sourceMappingURL=places.types.d.ts.map
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Countries = void 0;
4
- var Countries;
5
- (function (Countries) {
6
- Countries["US"] = "US";
7
- Countries["Brazil"] = "Brazil";
8
- Countries["Global"] = "Global";
9
- })(Countries = exports.Countries || (exports.Countries = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Countries = void 0;
4
+ var Countries;
5
+ (function (Countries) {
6
+ Countries["US"] = "US";
7
+ Countries["Brazil"] = "Brazil";
8
+ Countries["Global"] = "Global";
9
+ })(Countries = exports.Countries || (exports.Countries = {}));
10
10
  //# sourceMappingURL=places.types.js.map
@@ -0,0 +1,49 @@
1
+ import { IEntityBasicInfo } from "./entity.types";
2
+ export declare enum PlayerSocketEvents {
3
+ PlayerCreate = "PlayerCreate",
4
+ PlayerPositionUpdate = "PlayerPositionUpdate",
5
+ PlayerPositionUpdateConfirm = "PlayerPositionUpdateConfirm",
6
+ PlayerLogout = "PlayerLogout",
7
+ PlayerPrivateMessage = "PlayerPrivateMessage",
8
+ PlayerPing = "PlayerPing",
9
+ PlayerForceDisconnect = "PlayerForceDisconnect"
10
+ }
11
+ export interface IPlayerPing {
12
+ id: string;
13
+ }
14
+ export interface IPlayerPositionUpdateConfirm {
15
+ id: string;
16
+ direction: string;
17
+ isValid: boolean;
18
+ }
19
+ export declare type Events = PlayerSocketEvents;
20
+ export interface IConnectedPlayer {
21
+ id: string;
22
+ name: string;
23
+ x: number;
24
+ y: number;
25
+ channelId: string;
26
+ direction?: string;
27
+ isMoving?: boolean;
28
+ cameraCoordinates: ICameraCoordinates;
29
+ otherEntitiesInView: IEntitiesInView;
30
+ }
31
+ export interface IEntitiesInView {
32
+ [id: string]: IEntityBasicInfo;
33
+ }
34
+ export interface IConnectedPlayers {
35
+ [id: string]: IConnectedPlayer;
36
+ }
37
+ export interface PlayerLogoutPayload {
38
+ id: string;
39
+ }
40
+ export interface ICameraCoordinates {
41
+ x: number;
42
+ y: number;
43
+ width: number;
44
+ height: number;
45
+ }
46
+ export interface IPlayerForceDisconnect {
47
+ reason: string;
48
+ }
49
+ //# sourceMappingURL=player.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player.types.d.ts","sourceRoot":"","sources":["../../src/types/player.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,oBAAY,kBAAkB;IAC5B,YAAY,iBAAiB;IAC7B,oBAAoB,yBAAyB;IAC7C,2BAA2B,gCAAgC;IAC3D,YAAY,iBAAiB;IAC7B,oBAAoB,yBAAyB;IAC7C,UAAU,eAAe;IACzB,qBAAqB,0BAA0B;CAChD;AAED,MAAM,WAAW,WAAW;IAE1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,oBAAY,MAAM,GAAG,kBAAkB,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,mBAAmB,EAAE,eAAe,CAAC;CACtC;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlayerSocketEvents = void 0;
4
+ var PlayerSocketEvents;
5
+ (function (PlayerSocketEvents) {
6
+ PlayerSocketEvents["PlayerCreate"] = "PlayerCreate";
7
+ PlayerSocketEvents["PlayerPositionUpdate"] = "PlayerPositionUpdate";
8
+ PlayerSocketEvents["PlayerPositionUpdateConfirm"] = "PlayerPositionUpdateConfirm";
9
+ PlayerSocketEvents["PlayerLogout"] = "PlayerLogout";
10
+ PlayerSocketEvents["PlayerPrivateMessage"] = "PlayerPrivateMessage";
11
+ PlayerSocketEvents["PlayerPing"] = "PlayerPing";
12
+ PlayerSocketEvents["PlayerForceDisconnect"] = "PlayerForceDisconnect";
13
+ })(PlayerSocketEvents = exports.PlayerSocketEvents || (exports.PlayerSocketEvents = {}));
14
+ //# sourceMappingURL=player.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"player.types.js","sourceRoot":"","sources":["../../src/types/player.types.ts"],"names":[],"mappings":";;;AAGA,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC5B,mDAA6B,CAAA;IAC7B,mEAA6C,CAAA;IAC7C,iFAA2D,CAAA;IAC3D,mDAA6B,CAAA;IAC7B,mEAA6C,CAAA;IAC7C,+CAAyB,CAAA;IACzB,qEAA+C,CAAA;AACjD,CAAC,EARW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAQ7B"}