diff --git a/src/rooms/schema/Player.ts b/src/rooms/schema/Player.ts index 71273b1..a20d790 100644 --- a/src/rooms/schema/Player.ts +++ b/src/rooms/schema/Player.ts @@ -7,7 +7,7 @@ import {GameEnv} from "../../cfg/GameEnv"; export class Player extends Schema { @type("string") - id: number; + id: string; @type("number") heroId: number; @@ -54,6 +54,7 @@ export class Player extends Schema { //TODO: set hp, ap from cfg constructor(id: string, heroId: number, team: number) { super(); + this.id = id; this.state = 0; this.hp = 200; this.ap = 30;