From 13041f4f417c0a44530167b6101c54745556f5a9 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 4 Dec 2020 16:54:45 +0800 Subject: [PATCH] bug fix --- src/rooms/schema/Player.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;