@rpg-engine/shared 0.3.41 → 0.3.42
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.
- package/README.md +29 -29
- package/dist/constants/date.constants.d.ts +2 -2
- package/dist/constants/date.constants.js +5 -5
- package/dist/constants/npc.constants.d.ts +1 -1
- package/dist/constants/npc.constants.js +4 -4
- package/dist/constants/socket.constants.d.ts +2 -2
- package/dist/constants/socket.constants.js +6 -6
- package/dist/constants/world.constants.d.ts +10 -10
- package/dist/constants/world.constants.js +13 -13
- package/dist/helpers/skillHelpers.d.ts +4 -4
- package/dist/helpers/skillHelpers.js +25 -25
- package/dist/index.d.ts +39 -39
- package/dist/index.js +55 -55
- package/dist/libs/GridHelper.d.ts +11 -11
- package/dist/libs/GridHelper.js +37 -37
- package/dist/libs/MathHelper.d.ts +16 -16
- package/dist/libs/MathHelper.js +14 -14
- package/dist/libs/SocketHelper.d.ts +2 -2
- package/dist/libs/SocketHelper.js +14 -14
- package/dist/libs/TextHelper.d.ts +7 -7
- package/dist/libs/TextHelper.js +21 -21
- package/dist/libs/TypeHelper.d.ts +3 -3
- package/dist/libs/TypeHelper.js +16 -16
- package/dist/translations/app-rate.lang.json +38 -38
- package/dist/translations/assets.lang.json +82 -82
- package/dist/translations/auth.lang.json +182 -182
- package/dist/translations/email.lang.json +70 -70
- package/dist/translations/error.lang.json +18 -18
- package/dist/translations/form.lang.json +94 -94
- package/dist/translations/global.lang.json +90 -90
- package/dist/translations/logs.lang.json +6 -6
- package/dist/translations/onboarding.lang.d.ts +10 -10
- package/dist/translations/onboarding.lang.js +21 -21
- package/dist/translations/onboarding.lang.json +50 -50
- package/dist/translations/order.lang.json +90 -90
- package/dist/translations/search.lang.json +50 -50
- package/dist/translations/settings.lang.json +14 -14
- package/dist/translations/tabs.lang.json +22 -22
- package/dist/translations/users.lang.json +22 -22
- package/dist/translations/validation.lang.json +86 -86
- package/dist/types/animation.types.d.ts +16 -16
- package/dist/types/animation.types.js +2 -2
- package/dist/types/api.types.d.ts +21 -21
- package/dist/types/api.types.js +20 -20
- package/dist/types/asset.types.d.ts +6 -6
- package/dist/types/asset.types.js +2 -2
- package/dist/types/auth.types.d.ts +7 -7
- package/dist/types/auth.types.js +2 -2
- package/dist/types/battle.types.d.ts +35 -35
- package/dist/types/battle.types.js +17 -17
- package/dist/types/character.types.d.ts +134 -134
- package/dist/types/character.types.js +29 -29
- package/dist/types/chat.types.d.ts +30 -30
- package/dist/types/chat.types.js +14 -14
- package/dist/types/device.types.d.ts +24 -24
- package/dist/types/device.types.js +7 -7
- package/dist/types/entity.types.d.ts +20 -20
- package/dist/types/entity.types.js +14 -14
- package/dist/types/env.types.d.ts +5 -5
- package/dist/types/env.types.js +9 -9
- package/dist/types/equipment.types.d.ts +32 -16
- package/dist/types/equipment.types.d.ts.map +1 -1
- package/dist/types/equipment.types.js +19 -2
- package/dist/types/equipment.types.js.map +1 -1
- package/dist/types/googleOAuth.types.d.ts +47 -47
- package/dist/types/googleOAuth.types.js +2 -2
- package/dist/types/item.types.d.ts +157 -157
- package/dist/types/item.types.js +99 -99
- package/dist/types/itemContainer.types.d.ts +52 -52
- package/dist/types/itemContainer.types.js +2 -2
- package/dist/types/maps.types.d.ts +19 -19
- package/dist/types/maps.types.js +11 -11
- package/dist/types/notification.types.d.ts +14 -14
- package/dist/types/notification.types.js +2 -2
- package/dist/types/npc.types.d.ts +114 -114
- package/dist/types/npc.types.js +35 -35
- package/dist/types/pagination.types.d.ts +13 -13
- package/dist/types/pagination.types.js +2 -2
- package/dist/types/places.types.d.ts +16 -16
- package/dist/types/places.types.js +9 -9
- package/dist/types/preloadScene.types.d.ts +4 -4
- package/dist/types/preloadScene.types.js +7 -7
- package/dist/types/resource.types.d.ts +5 -5
- package/dist/types/resource.types.js +2 -2
- package/dist/types/scene.types.d.ts +8 -8
- package/dist/types/scene.types.js +8 -8
- package/dist/types/skills.types.d.ts +57 -57
- package/dist/types/skills.types.js +22 -22
- package/dist/types/socket.types.d.ts +17 -17
- package/dist/types/socket.types.js +8 -8
- package/dist/types/tiled.types.d.ts +107 -107
- package/dist/types/tiled.types.js +13 -13
- package/dist/types/translation.types.d.ts +5 -5
- package/dist/types/translation.types.js +8 -8
- package/dist/types/ui.types.d.ts +8 -8
- package/dist/types/ui.types.js +7 -7
- package/dist/types/user.types.d.ts +101 -101
- package/dist/types/user.types.js +38 -38
- package/dist/types/validation.types.d.ts +9 -9
- package/dist/types/validation.types.js +2 -2
- package/dist/types/view.types.d.ts +14 -14
- package/dist/types/view.types.js +7 -7
- package/package.json +41 -41
|
@@ -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
|
package/dist/types/api.types.js
CHANGED
|
@@ -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
|
package/dist/types/auth.types.js
CHANGED
|
@@ -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,36 +1,36 @@
|
|
|
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
|
-
}
|
|
9
|
-
export declare enum BattleEventType {
|
|
10
|
-
Miss = "Miss",
|
|
11
|
-
Block = "Block",
|
|
12
|
-
Hit = "Hit"
|
|
13
|
-
}
|
|
14
|
-
export interface IBattleEventFromServer {
|
|
15
|
-
targetId: string;
|
|
16
|
-
targetType: "Character" | "NPC";
|
|
17
|
-
eventType: BattleEventType;
|
|
18
|
-
totalDamage?: number;
|
|
19
|
-
postDamageTargetHP?: number;
|
|
20
|
-
level?: number;
|
|
21
|
-
skill?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface IBattleDeath {
|
|
24
|
-
id: string;
|
|
25
|
-
type: "Character" | "NPC";
|
|
26
|
-
}
|
|
27
|
-
export interface IBattleInitTargeting {
|
|
28
|
-
targetId: string;
|
|
29
|
-
type: EntityType;
|
|
30
|
-
}
|
|
31
|
-
export interface IBattleCancelTargeting {
|
|
32
|
-
targetId: string;
|
|
33
|
-
type: EntityType;
|
|
34
|
-
reason?: string;
|
|
35
|
-
}
|
|
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
|
+
}
|
|
9
|
+
export declare enum BattleEventType {
|
|
10
|
+
Miss = "Miss",
|
|
11
|
+
Block = "Block",
|
|
12
|
+
Hit = "Hit"
|
|
13
|
+
}
|
|
14
|
+
export interface IBattleEventFromServer {
|
|
15
|
+
targetId: string;
|
|
16
|
+
targetType: "Character" | "NPC";
|
|
17
|
+
eventType: BattleEventType;
|
|
18
|
+
totalDamage?: number;
|
|
19
|
+
postDamageTargetHP?: number;
|
|
20
|
+
level?: number;
|
|
21
|
+
skill?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IBattleDeath {
|
|
24
|
+
id: string;
|
|
25
|
+
type: "Character" | "NPC";
|
|
26
|
+
}
|
|
27
|
+
export interface IBattleInitTargeting {
|
|
28
|
+
targetId: string;
|
|
29
|
+
type: EntityType;
|
|
30
|
+
}
|
|
31
|
+
export interface IBattleCancelTargeting {
|
|
32
|
+
targetId: string;
|
|
33
|
+
type: EntityType;
|
|
34
|
+
reason?: string;
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=battle.types.d.ts.map
|
|
@@ -1,18 +1,18 @@
|
|
|
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 = exports.BattleSocketEvents || (exports.BattleSocketEvents = {}));
|
|
12
|
-
var BattleEventType;
|
|
13
|
-
(function (BattleEventType) {
|
|
14
|
-
BattleEventType["Miss"] = "Miss";
|
|
15
|
-
BattleEventType["Block"] = "Block";
|
|
16
|
-
BattleEventType["Hit"] = "Hit";
|
|
17
|
-
})(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 = exports.BattleSocketEvents || (exports.BattleSocketEvents = {}));
|
|
12
|
+
var BattleEventType;
|
|
13
|
+
(function (BattleEventType) {
|
|
14
|
+
BattleEventType["Miss"] = "Miss";
|
|
15
|
+
BattleEventType["Block"] = "Block";
|
|
16
|
+
BattleEventType["Hit"] = "Hit";
|
|
17
|
+
})(BattleEventType = exports.BattleEventType || (exports.BattleEventType = {}));
|
|
18
18
|
//# sourceMappingURL=battle.types.js.map
|
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
import { AnimationDirection } from "./animation.types";
|
|
2
|
-
import { EntityAttackType, EntityType } from "./entity.types";
|
|
3
|
-
import { MapLayers } from "./maps.types";
|
|
4
|
-
import { IResource } from "./resource.types";
|
|
5
|
-
import { ISkill } from "./skills.types";
|
|
6
|
-
import { IUser } from "./user.types";
|
|
7
|
-
import { IViewElement } from "./view.types";
|
|
8
|
-
export interface ICharacter extends IResource {
|
|
9
|
-
name: string;
|
|
10
|
-
owner: IUser;
|
|
11
|
-
health: number;
|
|
12
|
-
maxHealth: number;
|
|
13
|
-
mana: number;
|
|
14
|
-
maxMana: number;
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
direction: AnimationDirection;
|
|
18
|
-
class: CharacterClass;
|
|
19
|
-
gender: CharacterGender;
|
|
20
|
-
totalWeightCapacity: number;
|
|
21
|
-
isOnline: boolean;
|
|
22
|
-
layer: MapLayers;
|
|
23
|
-
scene: string;
|
|
24
|
-
initialScene: string;
|
|
25
|
-
channelId: string;
|
|
26
|
-
speed: number;
|
|
27
|
-
movementIntervalMs: number;
|
|
28
|
-
lastMovement: Date;
|
|
29
|
-
isBanned: boolean;
|
|
30
|
-
penalty: number;
|
|
31
|
-
banRemovalDate: Date;
|
|
32
|
-
hasPermanentBan: Date;
|
|
33
|
-
skills: ISkill;
|
|
34
|
-
target?: {
|
|
35
|
-
id: string;
|
|
36
|
-
type: EntityType;
|
|
37
|
-
} | null;
|
|
38
|
-
attackType: EntityAttackType;
|
|
39
|
-
attackIntervalSpeed: number;
|
|
40
|
-
view: {
|
|
41
|
-
characters: IViewElement;
|
|
42
|
-
npcs: IViewElement;
|
|
43
|
-
items: IViewElement;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export declare enum CharacterClass {
|
|
47
|
-
None = "None",
|
|
48
|
-
Warrior = "Warrior",
|
|
49
|
-
Berserker = "Berserker",
|
|
50
|
-
Cleric = "Cleric",
|
|
51
|
-
Sorcerer = "Sorcerer",
|
|
52
|
-
Rogue = "Rogue",
|
|
53
|
-
Hunter = "Hunter",
|
|
54
|
-
Assassin = "Assassin"
|
|
55
|
-
}
|
|
56
|
-
export declare enum CharacterGender {
|
|
57
|
-
Male = "Male",
|
|
58
|
-
Female = "Female"
|
|
59
|
-
}
|
|
60
|
-
export declare enum CharacterSocketEvents {
|
|
61
|
-
CharacterCreate = "CharacterCreate",
|
|
62
|
-
CharacterPositionUpdate = "CharacterPositionUpdate",
|
|
63
|
-
CharacterPositionUpdateConfirm = "CharacterPositionUpdateConfirm",
|
|
64
|
-
CharacterLogout = "CharacterLogout",
|
|
65
|
-
CharacterPrivateMessage = "CharacterPrivateMessage",
|
|
66
|
-
CharacterPing = "CharacterPing",
|
|
67
|
-
CharacterForceDisconnect = "CharacterForceDisconnect"
|
|
68
|
-
}
|
|
69
|
-
export interface ICharacterPing {
|
|
70
|
-
id: string;
|
|
71
|
-
}
|
|
72
|
-
export interface ICharacterPositionUpdateConfirm {
|
|
73
|
-
id: string;
|
|
74
|
-
direction: string;
|
|
75
|
-
isValid: boolean;
|
|
76
|
-
}
|
|
77
|
-
export declare type Events = CharacterSocketEvents;
|
|
78
|
-
export interface ICharacterCreateFromClient {
|
|
79
|
-
id: string;
|
|
80
|
-
channelId: string;
|
|
81
|
-
}
|
|
82
|
-
export interface ICharacterCreateFromServer {
|
|
83
|
-
id: string;
|
|
84
|
-
channelId: string;
|
|
85
|
-
name: string;
|
|
86
|
-
x: number;
|
|
87
|
-
y: number;
|
|
88
|
-
direction: AnimationDirection;
|
|
89
|
-
layer: MapLayers;
|
|
90
|
-
speed: number;
|
|
91
|
-
movementIntervalMs: number;
|
|
92
|
-
health: number;
|
|
93
|
-
maxHealth: number;
|
|
94
|
-
mana: number;
|
|
95
|
-
maxMana: number;
|
|
96
|
-
}
|
|
97
|
-
export interface ICharacterPositionUpdateFromClient {
|
|
98
|
-
id: string;
|
|
99
|
-
x: number;
|
|
100
|
-
y: number;
|
|
101
|
-
newX: number;
|
|
102
|
-
newY: number;
|
|
103
|
-
direction: AnimationDirection;
|
|
104
|
-
}
|
|
105
|
-
export interface ICharacterPositionUpdateFromServer {
|
|
106
|
-
id: string;
|
|
107
|
-
x: number;
|
|
108
|
-
y: number;
|
|
109
|
-
newX: number;
|
|
110
|
-
newY: number;
|
|
111
|
-
name: string;
|
|
112
|
-
direction: AnimationDirection;
|
|
113
|
-
isMoving: boolean;
|
|
114
|
-
layer: MapLayers;
|
|
115
|
-
channelId: string;
|
|
116
|
-
speed: number;
|
|
117
|
-
movementIntervalMs: number;
|
|
118
|
-
health: number;
|
|
119
|
-
maxHealth: number;
|
|
120
|
-
mana: number;
|
|
121
|
-
maxMana: number;
|
|
122
|
-
}
|
|
123
|
-
export interface ICharacterLogout {
|
|
124
|
-
id: string;
|
|
125
|
-
}
|
|
126
|
-
export interface ICameraCoordinates {
|
|
127
|
-
x: number;
|
|
128
|
-
y: number;
|
|
129
|
-
width: number;
|
|
130
|
-
height: number;
|
|
131
|
-
}
|
|
132
|
-
export interface ICharacterForceDisconnect {
|
|
133
|
-
reason: string;
|
|
134
|
-
}
|
|
1
|
+
import { AnimationDirection } from "./animation.types";
|
|
2
|
+
import { EntityAttackType, EntityType } from "./entity.types";
|
|
3
|
+
import { MapLayers } from "./maps.types";
|
|
4
|
+
import { IResource } from "./resource.types";
|
|
5
|
+
import { ISkill } from "./skills.types";
|
|
6
|
+
import { IUser } from "./user.types";
|
|
7
|
+
import { IViewElement } from "./view.types";
|
|
8
|
+
export interface ICharacter extends IResource {
|
|
9
|
+
name: string;
|
|
10
|
+
owner: IUser;
|
|
11
|
+
health: number;
|
|
12
|
+
maxHealth: number;
|
|
13
|
+
mana: number;
|
|
14
|
+
maxMana: number;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
direction: AnimationDirection;
|
|
18
|
+
class: CharacterClass;
|
|
19
|
+
gender: CharacterGender;
|
|
20
|
+
totalWeightCapacity: number;
|
|
21
|
+
isOnline: boolean;
|
|
22
|
+
layer: MapLayers;
|
|
23
|
+
scene: string;
|
|
24
|
+
initialScene: string;
|
|
25
|
+
channelId: string;
|
|
26
|
+
speed: number;
|
|
27
|
+
movementIntervalMs: number;
|
|
28
|
+
lastMovement: Date;
|
|
29
|
+
isBanned: boolean;
|
|
30
|
+
penalty: number;
|
|
31
|
+
banRemovalDate: Date;
|
|
32
|
+
hasPermanentBan: Date;
|
|
33
|
+
skills: ISkill;
|
|
34
|
+
target?: {
|
|
35
|
+
id: string;
|
|
36
|
+
type: EntityType;
|
|
37
|
+
} | null;
|
|
38
|
+
attackType: EntityAttackType;
|
|
39
|
+
attackIntervalSpeed: number;
|
|
40
|
+
view: {
|
|
41
|
+
characters: IViewElement;
|
|
42
|
+
npcs: IViewElement;
|
|
43
|
+
items: IViewElement;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export declare enum CharacterClass {
|
|
47
|
+
None = "None",
|
|
48
|
+
Warrior = "Warrior",
|
|
49
|
+
Berserker = "Berserker",
|
|
50
|
+
Cleric = "Cleric",
|
|
51
|
+
Sorcerer = "Sorcerer",
|
|
52
|
+
Rogue = "Rogue",
|
|
53
|
+
Hunter = "Hunter",
|
|
54
|
+
Assassin = "Assassin"
|
|
55
|
+
}
|
|
56
|
+
export declare enum CharacterGender {
|
|
57
|
+
Male = "Male",
|
|
58
|
+
Female = "Female"
|
|
59
|
+
}
|
|
60
|
+
export declare enum CharacterSocketEvents {
|
|
61
|
+
CharacterCreate = "CharacterCreate",
|
|
62
|
+
CharacterPositionUpdate = "CharacterPositionUpdate",
|
|
63
|
+
CharacterPositionUpdateConfirm = "CharacterPositionUpdateConfirm",
|
|
64
|
+
CharacterLogout = "CharacterLogout",
|
|
65
|
+
CharacterPrivateMessage = "CharacterPrivateMessage",
|
|
66
|
+
CharacterPing = "CharacterPing",
|
|
67
|
+
CharacterForceDisconnect = "CharacterForceDisconnect"
|
|
68
|
+
}
|
|
69
|
+
export interface ICharacterPing {
|
|
70
|
+
id: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ICharacterPositionUpdateConfirm {
|
|
73
|
+
id: string;
|
|
74
|
+
direction: string;
|
|
75
|
+
isValid: boolean;
|
|
76
|
+
}
|
|
77
|
+
export declare type Events = CharacterSocketEvents;
|
|
78
|
+
export interface ICharacterCreateFromClient {
|
|
79
|
+
id: string;
|
|
80
|
+
channelId: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ICharacterCreateFromServer {
|
|
83
|
+
id: string;
|
|
84
|
+
channelId: string;
|
|
85
|
+
name: string;
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
direction: AnimationDirection;
|
|
89
|
+
layer: MapLayers;
|
|
90
|
+
speed: number;
|
|
91
|
+
movementIntervalMs: number;
|
|
92
|
+
health: number;
|
|
93
|
+
maxHealth: number;
|
|
94
|
+
mana: number;
|
|
95
|
+
maxMana: number;
|
|
96
|
+
}
|
|
97
|
+
export interface ICharacterPositionUpdateFromClient {
|
|
98
|
+
id: string;
|
|
99
|
+
x: number;
|
|
100
|
+
y: number;
|
|
101
|
+
newX: number;
|
|
102
|
+
newY: number;
|
|
103
|
+
direction: AnimationDirection;
|
|
104
|
+
}
|
|
105
|
+
export interface ICharacterPositionUpdateFromServer {
|
|
106
|
+
id: string;
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
newX: number;
|
|
110
|
+
newY: number;
|
|
111
|
+
name: string;
|
|
112
|
+
direction: AnimationDirection;
|
|
113
|
+
isMoving: boolean;
|
|
114
|
+
layer: MapLayers;
|
|
115
|
+
channelId: string;
|
|
116
|
+
speed: number;
|
|
117
|
+
movementIntervalMs: number;
|
|
118
|
+
health: number;
|
|
119
|
+
maxHealth: number;
|
|
120
|
+
mana: number;
|
|
121
|
+
maxMana: number;
|
|
122
|
+
}
|
|
123
|
+
export interface ICharacterLogout {
|
|
124
|
+
id: string;
|
|
125
|
+
}
|
|
126
|
+
export interface ICameraCoordinates {
|
|
127
|
+
x: number;
|
|
128
|
+
y: number;
|
|
129
|
+
width: number;
|
|
130
|
+
height: number;
|
|
131
|
+
}
|
|
132
|
+
export interface ICharacterForceDisconnect {
|
|
133
|
+
reason: string;
|
|
134
|
+
}
|
|
135
135
|
//# sourceMappingURL=character.types.d.ts.map
|
|
@@ -1,30 +1,30 @@
|
|
|
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 = 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 = exports.CharacterSocketEvents || (exports.CharacterSocketEvents = {}));
|
|
30
30
|
//# sourceMappingURL=character.types.js.map
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { IResource } from "./resource.types";
|
|
2
|
-
export declare enum ChatMessageType {
|
|
3
|
-
Global = "Global",
|
|
4
|
-
Private = "Private"
|
|
5
|
-
}
|
|
6
|
-
export declare enum ChatSocketEvents {
|
|
7
|
-
GlobalChatMessageCreate = "GlobalChatMessageCreate",
|
|
8
|
-
GlobalChatMessageRead = "GlobalChatMessageRead",
|
|
9
|
-
PrivateChatMessage = "PrivateChatMessage"
|
|
10
|
-
}
|
|
11
|
-
export interface IChatMessage extends IResource {
|
|
12
|
-
emitter: {
|
|
13
|
-
_id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
};
|
|
16
|
-
message: string;
|
|
17
|
-
type: ChatMessageType;
|
|
18
|
-
}
|
|
19
|
-
export interface IChatMessageCreatePayload {
|
|
20
|
-
emitter: {
|
|
21
|
-
_id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
};
|
|
24
|
-
message: string;
|
|
25
|
-
type: ChatMessageType;
|
|
26
|
-
limit: number;
|
|
27
|
-
}
|
|
28
|
-
export interface IChatMessageReadPayload {
|
|
29
|
-
messages: IChatMessage[];
|
|
30
|
-
}
|
|
1
|
+
import { IResource } from "./resource.types";
|
|
2
|
+
export declare enum ChatMessageType {
|
|
3
|
+
Global = "Global",
|
|
4
|
+
Private = "Private"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ChatSocketEvents {
|
|
7
|
+
GlobalChatMessageCreate = "GlobalChatMessageCreate",
|
|
8
|
+
GlobalChatMessageRead = "GlobalChatMessageRead",
|
|
9
|
+
PrivateChatMessage = "PrivateChatMessage"
|
|
10
|
+
}
|
|
11
|
+
export interface IChatMessage extends IResource {
|
|
12
|
+
emitter: {
|
|
13
|
+
_id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
message: string;
|
|
17
|
+
type: ChatMessageType;
|
|
18
|
+
}
|
|
19
|
+
export interface IChatMessageCreatePayload {
|
|
20
|
+
emitter: {
|
|
21
|
+
_id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
message: string;
|
|
25
|
+
type: ChatMessageType;
|
|
26
|
+
limit: number;
|
|
27
|
+
}
|
|
28
|
+
export interface IChatMessageReadPayload {
|
|
29
|
+
messages: IChatMessage[];
|
|
30
|
+
}
|
|
31
31
|
//# sourceMappingURL=chat.types.d.ts.map
|