@rpg-engine/shared 0.4.22 → 0.4.23

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 (115) 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 +41 -41
  13. package/dist/index.js +57 -57
  14. package/dist/libs/GridHelper.d.ts +11 -11
  15. package/dist/libs/GridHelper.js +37 -37
  16. package/dist/libs/MathHelper.d.ts +16 -16
  17. package/dist/libs/MathHelper.js +14 -14
  18. package/dist/libs/SocketHelper.d.ts +2 -2
  19. package/dist/libs/SocketHelper.js +14 -14
  20. package/dist/libs/TextHelper.d.ts +7 -7
  21. package/dist/libs/TextHelper.js +21 -21
  22. package/dist/libs/TypeHelper.d.ts +3 -3
  23. package/dist/libs/TypeHelper.js +16 -16
  24. package/dist/translations/app-rate.lang.json +38 -38
  25. package/dist/translations/assets.lang.json +82 -82
  26. package/dist/translations/auth.lang.json +182 -182
  27. package/dist/translations/email.lang.json +70 -70
  28. package/dist/translations/error.lang.json +18 -18
  29. package/dist/translations/form.lang.json +94 -94
  30. package/dist/translations/global.lang.json +90 -90
  31. package/dist/translations/logs.lang.json +6 -6
  32. package/dist/translations/onboarding.lang.d.ts +10 -10
  33. package/dist/translations/onboarding.lang.js +21 -21
  34. package/dist/translations/onboarding.lang.json +50 -50
  35. package/dist/translations/order.lang.json +90 -90
  36. package/dist/translations/search.lang.json +50 -50
  37. package/dist/translations/settings.lang.json +14 -14
  38. package/dist/translations/tabs.lang.json +22 -22
  39. package/dist/translations/users.lang.json +22 -22
  40. package/dist/translations/validation.lang.json +86 -86
  41. package/dist/types/animation.types.d.ts +16 -16
  42. package/dist/types/animation.types.js +2 -2
  43. package/dist/types/api.types.d.ts +21 -21
  44. package/dist/types/api.types.js +20 -20
  45. package/dist/types/asset.types.d.ts +6 -6
  46. package/dist/types/asset.types.js +2 -2
  47. package/dist/types/auth.types.d.ts +7 -7
  48. package/dist/types/auth.types.js +2 -2
  49. package/dist/types/battle.types.d.ts +38 -38
  50. package/dist/types/battle.types.js +18 -18
  51. package/dist/types/character.types.d.ts +151 -151
  52. package/dist/types/character.types.js +30 -30
  53. package/dist/types/chat.types.d.ts +30 -30
  54. package/dist/types/chat.types.js +14 -14
  55. package/dist/types/device.types.d.ts +24 -24
  56. package/dist/types/device.types.js +7 -7
  57. package/dist/types/entity.types.d.ts +21 -21
  58. package/dist/types/entity.types.js +15 -15
  59. package/dist/types/env.types.d.ts +5 -5
  60. package/dist/types/env.types.js +9 -9
  61. package/dist/types/equipment.types.d.ts +35 -35
  62. package/dist/types/equipment.types.js +18 -18
  63. package/dist/types/googleOAuth.types.d.ts +47 -47
  64. package/dist/types/googleOAuth.types.js +2 -2
  65. package/dist/types/inventory.types.d.ts +7 -7
  66. package/dist/types/inventory.types.js +2 -2
  67. package/dist/types/item.types.d.ts +186 -186
  68. package/dist/types/item.types.js +107 -107
  69. package/dist/types/itemContainer.types.d.ts +67 -67
  70. package/dist/types/itemContainer.types.js +10 -10
  71. package/dist/types/maps.types.d.ts +44 -43
  72. package/dist/types/maps.types.d.ts.map +1 -1
  73. package/dist/types/maps.types.js +47 -46
  74. package/dist/types/maps.types.js.map +1 -1
  75. package/dist/types/notification.types.d.ts +14 -14
  76. package/dist/types/notification.types.js +2 -2
  77. package/dist/types/npc.types.d.ts +117 -117
  78. package/dist/types/npc.types.js +35 -35
  79. package/dist/types/pagination.types.d.ts +13 -13
  80. package/dist/types/pagination.types.js +2 -2
  81. package/dist/types/places.types.d.ts +16 -16
  82. package/dist/types/places.types.js +9 -9
  83. package/dist/types/preloadScene.types.d.ts +4 -4
  84. package/dist/types/preloadScene.types.js +7 -7
  85. package/dist/types/quest.types.d.ts +67 -67
  86. package/dist/types/quest.types.js +21 -21
  87. package/dist/types/resource.types.d.ts +5 -5
  88. package/dist/types/resource.types.js +2 -2
  89. package/dist/types/scene.types.d.ts +8 -8
  90. package/dist/types/scene.types.js +8 -8
  91. package/dist/types/skills.types.d.ts +58 -58
  92. package/dist/types/skills.types.js +23 -23
  93. package/dist/types/socket.types.d.ts +17 -17
  94. package/dist/types/socket.types.js +8 -8
  95. package/dist/types/tiled.types.d.ts +119 -119
  96. package/dist/types/tiled.types.js +7 -7
  97. package/dist/types/translation.types.d.ts +5 -5
  98. package/dist/types/translation.types.js +8 -8
  99. package/dist/types/ui.types.d.ts +8 -8
  100. package/dist/types/ui.types.js +7 -7
  101. package/dist/types/user.types.d.ts +101 -101
  102. package/dist/types/user.types.js +38 -38
  103. package/dist/types/validation.types.d.ts +9 -9
  104. package/dist/types/validation.types.js +2 -2
  105. package/dist/types/view.types.d.ts +14 -14
  106. package/dist/types/view.types.js +7 -7
  107. package/package.json +41 -41
  108. package/dist/libs/MapZipHelper.d.ts +0 -2
  109. package/dist/libs/MapZipHelper.d.ts.map +0 -1
  110. package/dist/libs/MapZipHelper.js +0 -24
  111. package/dist/libs/MapZipHelper.js.map +0 -1
  112. package/dist/types/container.types.d.ts +0 -9
  113. package/dist/types/container.types.d.ts.map +0 -1
  114. package/dist/types/container.types.js +0 -3
  115. package/dist/types/container.types.js.map +0 -1
@@ -1,22 +1,22 @@
1
- export interface IAPIError {
2
- statusCode: number;
3
- message: string[] | string;
4
- error: string;
5
- }
6
- export declare enum HttpStatus {
7
- OK = 200,
8
- Created = 201,
9
- NoContent = 204,
10
- PermanentRedirect = 301,
11
- TemporaryRedirect = 302,
12
- BadRequest = 400,
13
- Unauthorized = 401,
14
- Forbidden = 403,
15
- NotFound = 404,
16
- MethodNotAllowed = 405,
17
- Conflict = 409,
18
- UnprocessableEntity = 422,
19
- InternalServerError = 500,
20
- ServiceUnavailable = 503
21
- }
1
+ export interface IAPIError {
2
+ statusCode: number;
3
+ message: string[] | string;
4
+ error: string;
5
+ }
6
+ export declare enum HttpStatus {
7
+ OK = 200,
8
+ Created = 201,
9
+ NoContent = 204,
10
+ PermanentRedirect = 301,
11
+ TemporaryRedirect = 302,
12
+ BadRequest = 400,
13
+ Unauthorized = 401,
14
+ Forbidden = 403,
15
+ NotFound = 404,
16
+ MethodNotAllowed = 405,
17
+ Conflict = 409,
18
+ UnprocessableEntity = 422,
19
+ InternalServerError = 500,
20
+ ServiceUnavailable = 503
21
+ }
22
22
  //# sourceMappingURL=api.types.d.ts.map
@@ -1,21 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpStatus = void 0;
4
- var HttpStatus;
5
- (function (HttpStatus) {
6
- HttpStatus[HttpStatus["OK"] = 200] = "OK";
7
- HttpStatus[HttpStatus["Created"] = 201] = "Created";
8
- HttpStatus[HttpStatus["NoContent"] = 204] = "NoContent";
9
- HttpStatus[HttpStatus["PermanentRedirect"] = 301] = "PermanentRedirect";
10
- HttpStatus[HttpStatus["TemporaryRedirect"] = 302] = "TemporaryRedirect";
11
- HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
12
- HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
13
- HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
14
- HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
15
- HttpStatus[HttpStatus["MethodNotAllowed"] = 405] = "MethodNotAllowed";
16
- HttpStatus[HttpStatus["Conflict"] = 409] = "Conflict";
17
- HttpStatus[HttpStatus["UnprocessableEntity"] = 422] = "UnprocessableEntity";
18
- HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
19
- HttpStatus[HttpStatus["ServiceUnavailable"] = 503] = "ServiceUnavailable";
20
- })(HttpStatus = exports.HttpStatus || (exports.HttpStatus = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpStatus = void 0;
4
+ var HttpStatus;
5
+ (function (HttpStatus) {
6
+ HttpStatus[HttpStatus["OK"] = 200] = "OK";
7
+ HttpStatus[HttpStatus["Created"] = 201] = "Created";
8
+ HttpStatus[HttpStatus["NoContent"] = 204] = "NoContent";
9
+ HttpStatus[HttpStatus["PermanentRedirect"] = 301] = "PermanentRedirect";
10
+ HttpStatus[HttpStatus["TemporaryRedirect"] = 302] = "TemporaryRedirect";
11
+ HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
12
+ HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
13
+ HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
14
+ HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
15
+ HttpStatus[HttpStatus["MethodNotAllowed"] = 405] = "MethodNotAllowed";
16
+ HttpStatus[HttpStatus["Conflict"] = 409] = "Conflict";
17
+ HttpStatus[HttpStatus["UnprocessableEntity"] = 422] = "UnprocessableEntity";
18
+ HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
19
+ HttpStatus[HttpStatus["ServiceUnavailable"] = 503] = "ServiceUnavailable";
20
+ })(HttpStatus = exports.HttpStatus || (exports.HttpStatus = {}));
21
21
  //# sourceMappingURL=api.types.js.map
@@ -1,7 +1,7 @@
1
- import { IEntityMovementAnimation } from "./animation.types";
2
- export interface IAssetData {
3
- textureKey: string;
4
- path: string;
5
- animations: IEntityMovementAnimation;
6
- }
1
+ import { IEntityMovementAnimation } from "./animation.types";
2
+ export interface IAssetData {
3
+ textureKey: string;
4
+ path: string;
5
+ animations: IEntityMovementAnimation;
6
+ }
7
7
  //# sourceMappingURL=asset.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=asset.types.js.map
@@ -1,8 +1,8 @@
1
- export interface IAuthResponse {
2
- accessToken: string;
3
- refreshToken: string;
4
- }
5
- export interface IAuthRefreshTokenResponse {
6
- accessToken: string;
7
- }
1
+ export interface IAuthResponse {
2
+ accessToken: string;
3
+ refreshToken: string;
4
+ }
5
+ export interface IAuthRefreshTokenResponse {
6
+ accessToken: string;
7
+ }
8
8
  //# sourceMappingURL=auth.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=auth.types.js.map
@@ -1,39 +1,39 @@
1
- import { EntityType } from "./entity.types";
2
- export declare enum BattleSocketEvents {
3
- InitTargeting = "InitTargeting",
4
- StopTargeting = "StopTargeting",
5
- CancelTargeting = "CancelTargeting",
6
- BattleEvent = "BattleEvent",
7
- BattleDeath = "BattleDeath",
8
- RangedAttackFailure = "RangedAttackFailure"
9
- }
10
- export declare enum BattleEventType {
11
- Miss = "Miss",
12
- Block = "Block",
13
- Hit = "Hit"
14
- }
15
- export interface IBattleEventFromServer {
16
- targetId: string;
17
- targetType: "Character" | "NPC";
18
- eventType: BattleEventType;
19
- totalDamage?: number;
20
- postDamageTargetHP?: number;
21
- level?: number;
22
- skill?: string;
23
- }
24
- export interface IBattleDeath {
25
- id: string;
26
- type: "Character" | "NPC";
27
- }
28
- export interface IBattleInitTargeting {
29
- targetId: string;
30
- type: EntityType;
31
- }
32
- export interface IBattleCancelTargeting {
33
- targetId: string;
34
- type: EntityType;
35
- reason?: string;
36
- }
37
- export interface IBattleRangedAttackFailed extends IBattleCancelTargeting {
38
- }
1
+ import { EntityType } from "./entity.types";
2
+ export declare enum BattleSocketEvents {
3
+ InitTargeting = "InitTargeting",
4
+ StopTargeting = "StopTargeting",
5
+ CancelTargeting = "CancelTargeting",
6
+ BattleEvent = "BattleEvent",
7
+ BattleDeath = "BattleDeath",
8
+ RangedAttackFailure = "RangedAttackFailure"
9
+ }
10
+ export declare enum BattleEventType {
11
+ Miss = "Miss",
12
+ Block = "Block",
13
+ Hit = "Hit"
14
+ }
15
+ export interface IBattleEventFromServer {
16
+ targetId: string;
17
+ targetType: "Character" | "NPC";
18
+ eventType: BattleEventType;
19
+ totalDamage?: number;
20
+ postDamageTargetHP?: number;
21
+ level?: number;
22
+ skill?: string;
23
+ }
24
+ export interface IBattleDeath {
25
+ id: string;
26
+ type: "Character" | "NPC";
27
+ }
28
+ export interface IBattleInitTargeting {
29
+ targetId: string;
30
+ type: EntityType;
31
+ }
32
+ export interface IBattleCancelTargeting {
33
+ targetId: string;
34
+ type: EntityType;
35
+ reason?: string;
36
+ }
37
+ export interface IBattleRangedAttackFailed extends IBattleCancelTargeting {
38
+ }
39
39
  //# sourceMappingURL=battle.types.d.ts.map
@@ -1,19 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BattleEventType = exports.BattleSocketEvents = void 0;
4
- var BattleSocketEvents;
5
- (function (BattleSocketEvents) {
6
- BattleSocketEvents["InitTargeting"] = "InitTargeting";
7
- BattleSocketEvents["StopTargeting"] = "StopTargeting";
8
- BattleSocketEvents["CancelTargeting"] = "CancelTargeting";
9
- BattleSocketEvents["BattleEvent"] = "BattleEvent";
10
- BattleSocketEvents["BattleDeath"] = "BattleDeath";
11
- BattleSocketEvents["RangedAttackFailure"] = "RangedAttackFailure";
12
- })(BattleSocketEvents = exports.BattleSocketEvents || (exports.BattleSocketEvents = {}));
13
- var BattleEventType;
14
- (function (BattleEventType) {
15
- BattleEventType["Miss"] = "Miss";
16
- BattleEventType["Block"] = "Block";
17
- BattleEventType["Hit"] = "Hit";
18
- })(BattleEventType = exports.BattleEventType || (exports.BattleEventType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BattleEventType = exports.BattleSocketEvents = void 0;
4
+ var BattleSocketEvents;
5
+ (function (BattleSocketEvents) {
6
+ BattleSocketEvents["InitTargeting"] = "InitTargeting";
7
+ BattleSocketEvents["StopTargeting"] = "StopTargeting";
8
+ BattleSocketEvents["CancelTargeting"] = "CancelTargeting";
9
+ BattleSocketEvents["BattleEvent"] = "BattleEvent";
10
+ BattleSocketEvents["BattleDeath"] = "BattleDeath";
11
+ BattleSocketEvents["RangedAttackFailure"] = "RangedAttackFailure";
12
+ })(BattleSocketEvents = exports.BattleSocketEvents || (exports.BattleSocketEvents = {}));
13
+ var BattleEventType;
14
+ (function (BattleEventType) {
15
+ BattleEventType["Miss"] = "Miss";
16
+ BattleEventType["Block"] = "Block";
17
+ BattleEventType["Hit"] = "Hit";
18
+ })(BattleEventType = exports.BattleEventType || (exports.BattleEventType = {}));
19
19
  //# sourceMappingURL=battle.types.js.map
@@ -1,152 +1,152 @@
1
- import { AnimationDirection } from "./animation.types";
2
- import { EntityAttackType, EntityType } from "./entity.types";
3
- import { IEquipmentSet } from "./equipment.types";
4
- import { IItem } from "./item.types";
5
- import { MapLayers } from "./maps.types";
6
- import { IResource } from "./resource.types";
7
- import { ISkill } from "./skills.types";
8
- import { IUser } from "./user.types";
9
- import { IViewElement } from "./view.types";
10
- export interface ICharacter extends IResource {
11
- name: string;
12
- owner: IUser;
13
- health: number;
14
- maxHealth: number;
15
- mana: number;
16
- maxMana: number;
17
- x: number;
18
- y: number;
19
- initialX: number;
20
- initialY: number;
21
- direction: AnimationDirection;
22
- class: CharacterClass;
23
- gender: CharacterGender;
24
- totalWeightCapacity: number;
25
- isOnline: boolean;
26
- layer: MapLayers;
27
- scene: string;
28
- initialScene: string;
29
- channelId: string;
30
- otherEntitiesInView: any;
31
- speed: number;
32
- baseSpeed: number;
33
- weight: number;
34
- maxWeight: number;
35
- movementIntervalMs: number;
36
- baseMovementIntervalMs: number;
37
- lastMovement: Date;
38
- isBanned: boolean;
39
- penalty: number;
40
- banRemovalDate: Date;
41
- hasPermanentBan: Date;
42
- skills: ISkill;
43
- target?: {
44
- id: string;
45
- type: EntityType;
46
- } | null;
47
- attackType: EntityAttackType;
48
- attackIntervalSpeed: number;
49
- view: {
50
- characters: IViewElement;
51
- npcs: IViewElement;
52
- items: IViewElement;
53
- };
54
- equipment?: IEquipmentSet | string;
55
- inventory: Promise<IItem | string>;
56
- type: string;
57
- isAlive: boolean;
58
- hasQuest: boolean;
59
- }
60
- export declare enum CharacterClass {
61
- None = "None",
62
- Warrior = "Warrior",
63
- Berserker = "Berserker",
64
- Cleric = "Cleric",
65
- Sorcerer = "Sorcerer",
66
- Rogue = "Rogue",
67
- Hunter = "Hunter",
68
- Assassin = "Assassin"
69
- }
70
- export declare enum CharacterGender {
71
- Male = "Male",
72
- Female = "Female"
73
- }
74
- export declare enum CharacterSocketEvents {
75
- CharacterCreate = "CharacterCreate",
76
- CharacterPositionUpdate = "CharacterPositionUpdate",
77
- CharacterPositionUpdateConfirm = "CharacterPositionUpdateConfirm",
78
- CharacterLogout = "CharacterLogout",
79
- CharacterPrivateMessage = "CharacterPrivateMessage",
80
- CharacterPing = "CharacterPing",
81
- CharacterForceDisconnect = "CharacterForceDisconnect",
82
- Login = "Login"
83
- }
84
- export interface ICharacterPing {
85
- id: string;
86
- }
87
- export interface ICharacterPositionUpdateConfirm {
88
- id: string;
89
- direction: string;
90
- isValid: boolean;
91
- }
92
- export declare type Events = CharacterSocketEvents;
93
- export interface ICharacterCreateFromClient {
94
- id: string;
95
- channelId: string;
96
- }
97
- export interface ICharacterCreateFromServer {
98
- id: string;
99
- channelId: string;
100
- name: string;
101
- x: number;
102
- y: number;
103
- direction: AnimationDirection;
104
- layer: MapLayers;
105
- speed: number;
106
- movementIntervalMs: number;
107
- health: number;
108
- maxHealth: number;
109
- mana: number;
110
- maxMana: number;
111
- hasQuest: boolean;
112
- }
113
- export interface ICharacterPositionUpdateFromClient {
114
- id: string;
115
- x: number;
116
- y: number;
117
- newX: number;
118
- newY: number;
119
- direction: AnimationDirection;
120
- }
121
- export interface ICharacterPositionUpdateFromServer {
122
- id: string;
123
- x: number;
124
- y: number;
125
- newX: number;
126
- newY: number;
127
- name: string;
128
- direction: AnimationDirection;
129
- isMoving: boolean;
130
- layer: MapLayers;
131
- channelId: string;
132
- speed: number;
133
- movementIntervalMs: number;
134
- health: number;
135
- maxHealth: number;
136
- mana: number;
137
- maxMana: number;
138
- hasQuest: boolean;
139
- }
140
- export interface ICharacterLogout {
141
- id: string;
142
- }
143
- export interface ICameraCoordinates {
144
- x: number;
145
- y: number;
146
- width: number;
147
- height: number;
148
- }
149
- export interface ICharacterForceDisconnect {
150
- reason: string;
151
- }
1
+ import { AnimationDirection } from "./animation.types";
2
+ import { EntityAttackType, EntityType } from "./entity.types";
3
+ import { IEquipmentSet } from "./equipment.types";
4
+ import { IItem } from "./item.types";
5
+ import { MapLayers } from "./maps.types";
6
+ import { IResource } from "./resource.types";
7
+ import { ISkill } from "./skills.types";
8
+ import { IUser } from "./user.types";
9
+ import { IViewElement } from "./view.types";
10
+ export interface ICharacter extends IResource {
11
+ name: string;
12
+ owner: IUser;
13
+ health: number;
14
+ maxHealth: number;
15
+ mana: number;
16
+ maxMana: number;
17
+ x: number;
18
+ y: number;
19
+ initialX: number;
20
+ initialY: number;
21
+ direction: AnimationDirection;
22
+ class: CharacterClass;
23
+ gender: CharacterGender;
24
+ totalWeightCapacity: number;
25
+ isOnline: boolean;
26
+ layer: MapLayers;
27
+ scene: string;
28
+ initialScene: string;
29
+ channelId: string;
30
+ otherEntitiesInView: any;
31
+ speed: number;
32
+ baseSpeed: number;
33
+ weight: number;
34
+ maxWeight: number;
35
+ movementIntervalMs: number;
36
+ baseMovementIntervalMs: number;
37
+ lastMovement: Date;
38
+ isBanned: boolean;
39
+ penalty: number;
40
+ banRemovalDate: Date;
41
+ hasPermanentBan: Date;
42
+ skills: ISkill;
43
+ target?: {
44
+ id: string;
45
+ type: EntityType;
46
+ } | null;
47
+ attackType: EntityAttackType;
48
+ attackIntervalSpeed: number;
49
+ view: {
50
+ characters: IViewElement;
51
+ npcs: IViewElement;
52
+ items: IViewElement;
53
+ };
54
+ equipment?: IEquipmentSet | string;
55
+ inventory: Promise<IItem | string>;
56
+ type: string;
57
+ isAlive: boolean;
58
+ hasQuest: boolean;
59
+ }
60
+ export declare enum CharacterClass {
61
+ None = "None",
62
+ Warrior = "Warrior",
63
+ Berserker = "Berserker",
64
+ Cleric = "Cleric",
65
+ Sorcerer = "Sorcerer",
66
+ Rogue = "Rogue",
67
+ Hunter = "Hunter",
68
+ Assassin = "Assassin"
69
+ }
70
+ export declare enum CharacterGender {
71
+ Male = "Male",
72
+ Female = "Female"
73
+ }
74
+ export declare enum CharacterSocketEvents {
75
+ CharacterCreate = "CharacterCreate",
76
+ CharacterPositionUpdate = "CharacterPositionUpdate",
77
+ CharacterPositionUpdateConfirm = "CharacterPositionUpdateConfirm",
78
+ CharacterLogout = "CharacterLogout",
79
+ CharacterPrivateMessage = "CharacterPrivateMessage",
80
+ CharacterPing = "CharacterPing",
81
+ CharacterForceDisconnect = "CharacterForceDisconnect",
82
+ Login = "Login"
83
+ }
84
+ export interface ICharacterPing {
85
+ id: string;
86
+ }
87
+ export interface ICharacterPositionUpdateConfirm {
88
+ id: string;
89
+ direction: string;
90
+ isValid: boolean;
91
+ }
92
+ export declare type Events = CharacterSocketEvents;
93
+ export interface ICharacterCreateFromClient {
94
+ id: string;
95
+ channelId: string;
96
+ }
97
+ export interface ICharacterCreateFromServer {
98
+ id: string;
99
+ channelId: string;
100
+ name: string;
101
+ x: number;
102
+ y: number;
103
+ direction: AnimationDirection;
104
+ layer: MapLayers;
105
+ speed: number;
106
+ movementIntervalMs: number;
107
+ health: number;
108
+ maxHealth: number;
109
+ mana: number;
110
+ maxMana: number;
111
+ hasQuest: boolean;
112
+ }
113
+ export interface ICharacterPositionUpdateFromClient {
114
+ id: string;
115
+ x: number;
116
+ y: number;
117
+ newX: number;
118
+ newY: number;
119
+ direction: AnimationDirection;
120
+ }
121
+ export interface ICharacterPositionUpdateFromServer {
122
+ id: string;
123
+ x: number;
124
+ y: number;
125
+ newX: number;
126
+ newY: number;
127
+ name: string;
128
+ direction: AnimationDirection;
129
+ isMoving: boolean;
130
+ layer: MapLayers;
131
+ channelId: string;
132
+ speed: number;
133
+ movementIntervalMs: number;
134
+ health: number;
135
+ maxHealth: number;
136
+ mana: number;
137
+ maxMana: number;
138
+ hasQuest: boolean;
139
+ }
140
+ export interface ICharacterLogout {
141
+ id: string;
142
+ }
143
+ export interface ICameraCoordinates {
144
+ x: number;
145
+ y: number;
146
+ width: number;
147
+ height: number;
148
+ }
149
+ export interface ICharacterForceDisconnect {
150
+ reason: string;
151
+ }
152
152
  //# sourceMappingURL=character.types.d.ts.map
@@ -1,31 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CharacterSocketEvents = exports.CharacterGender = exports.CharacterClass = void 0;
4
- var CharacterClass;
5
- (function (CharacterClass) {
6
- CharacterClass["None"] = "None";
7
- CharacterClass["Warrior"] = "Warrior";
8
- CharacterClass["Berserker"] = "Berserker";
9
- CharacterClass["Cleric"] = "Cleric";
10
- CharacterClass["Sorcerer"] = "Sorcerer";
11
- CharacterClass["Rogue"] = "Rogue";
12
- CharacterClass["Hunter"] = "Hunter";
13
- CharacterClass["Assassin"] = "Assassin";
14
- })(CharacterClass = exports.CharacterClass || (exports.CharacterClass = {}));
15
- var CharacterGender;
16
- (function (CharacterGender) {
17
- CharacterGender["Male"] = "Male";
18
- CharacterGender["Female"] = "Female";
19
- })(CharacterGender = exports.CharacterGender || (exports.CharacterGender = {}));
20
- var CharacterSocketEvents;
21
- (function (CharacterSocketEvents) {
22
- CharacterSocketEvents["CharacterCreate"] = "CharacterCreate";
23
- CharacterSocketEvents["CharacterPositionUpdate"] = "CharacterPositionUpdate";
24
- CharacterSocketEvents["CharacterPositionUpdateConfirm"] = "CharacterPositionUpdateConfirm";
25
- CharacterSocketEvents["CharacterLogout"] = "CharacterLogout";
26
- CharacterSocketEvents["CharacterPrivateMessage"] = "CharacterPrivateMessage";
27
- CharacterSocketEvents["CharacterPing"] = "CharacterPing";
28
- CharacterSocketEvents["CharacterForceDisconnect"] = "CharacterForceDisconnect";
29
- CharacterSocketEvents["Login"] = "Login";
30
- })(CharacterSocketEvents = exports.CharacterSocketEvents || (exports.CharacterSocketEvents = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CharacterSocketEvents = exports.CharacterGender = exports.CharacterClass = void 0;
4
+ var CharacterClass;
5
+ (function (CharacterClass) {
6
+ CharacterClass["None"] = "None";
7
+ CharacterClass["Warrior"] = "Warrior";
8
+ CharacterClass["Berserker"] = "Berserker";
9
+ CharacterClass["Cleric"] = "Cleric";
10
+ CharacterClass["Sorcerer"] = "Sorcerer";
11
+ CharacterClass["Rogue"] = "Rogue";
12
+ CharacterClass["Hunter"] = "Hunter";
13
+ CharacterClass["Assassin"] = "Assassin";
14
+ })(CharacterClass = exports.CharacterClass || (exports.CharacterClass = {}));
15
+ var CharacterGender;
16
+ (function (CharacterGender) {
17
+ CharacterGender["Male"] = "Male";
18
+ CharacterGender["Female"] = "Female";
19
+ })(CharacterGender = exports.CharacterGender || (exports.CharacterGender = {}));
20
+ var CharacterSocketEvents;
21
+ (function (CharacterSocketEvents) {
22
+ CharacterSocketEvents["CharacterCreate"] = "CharacterCreate";
23
+ CharacterSocketEvents["CharacterPositionUpdate"] = "CharacterPositionUpdate";
24
+ CharacterSocketEvents["CharacterPositionUpdateConfirm"] = "CharacterPositionUpdateConfirm";
25
+ CharacterSocketEvents["CharacterLogout"] = "CharacterLogout";
26
+ CharacterSocketEvents["CharacterPrivateMessage"] = "CharacterPrivateMessage";
27
+ CharacterSocketEvents["CharacterPing"] = "CharacterPing";
28
+ CharacterSocketEvents["CharacterForceDisconnect"] = "CharacterForceDisconnect";
29
+ CharacterSocketEvents["Login"] = "Login";
30
+ })(CharacterSocketEvents = exports.CharacterSocketEvents || (exports.CharacterSocketEvents = {}));
31
31
  //# sourceMappingURL=character.types.js.map