magicrealmsshared 0.4.2 → 0.4.4

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.
@@ -1,4 +1,5 @@
1
- import { Auth_Token, Player, Well } from "../types/types";
1
+ import { GameCharacter } from "../types/charcter";
2
+ import { Auth_Token, PlayerClientData, Well } from "../types/types";
2
3
  export declare const AUTH = "AUTH";
3
4
  export declare const AUTH_ACK = "AUTH_ACK";
4
5
  export declare const AUTH_INVALID = "AI";
@@ -10,7 +11,8 @@ export type LOGIN_DATA = {
10
11
  export declare const LOGIN_RESPONSE_COMMAND = "NIGOL";
11
12
  export type LOGIN_RESPONSE_DATA<T> = {
12
13
  code: number;
13
- playerData?: Player<T>;
14
+ characterData?: GameCharacter<string, number>;
15
+ playerData?: PlayerClientData;
14
16
  authToken?: Auth_Token<number, T>;
15
17
  };
16
18
  export declare const LOGIN_RESPONSE_CODE_SUCCESS = 0;
@@ -26,17 +26,18 @@ export type Auth_Token<DateFormat extends Date | number, T> = {
26
26
  e: DateFormat;
27
27
  playerId: T;
28
28
  };
29
- export type Player<T> = ObjectWithId<T> & {
29
+ export type Player<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
30
30
  email: string;
31
31
  passwordHash: string;
32
32
  passwordSalt: string;
33
- registerTime: Date;
34
- loginTime: Date;
35
- interactTime: Date;
33
+ registerTime: DateFormat;
34
+ loginTime: DateFormat;
35
+ interactTime: DateFormat;
36
36
  privileges?: Privileges;
37
37
  displayname: string;
38
38
  color: number;
39
39
  };
40
+ export type PlayerClientData = Omit<Player<string, number>, "passwordHash" | "passwordSalt">;
40
41
  export type Well<T> = WorldObject<T> & {
41
42
  name: string;
42
43
  color: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magicrealmsshared",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {