diff --git a/server/hallserver/common/types.go b/server/hallserver/common/types.go index beeb7457..e69efd90 100644 --- a/server/hallserver/common/types.go +++ b/server/hallserver/common/types.go @@ -26,7 +26,7 @@ type Player interface { GetSessionId() string GetName() string GetAvatarUrl() string - GetHeroId() int32 + GetHeroId() string GetPing() int32 GetTeamUuid() string GetZoneId() int32 diff --git a/server/hallserver/player/player.go b/server/hallserver/player/player.go index b3f1a451..9ee32aac 100644 --- a/server/hallserver/player/player.go +++ b/server/hallserver/player/player.go @@ -15,7 +15,7 @@ type player struct { sessionId string name string avatarUrl string - heroId int32 + heroId string ping int32 room common.Room } @@ -38,7 +38,7 @@ func (this *player) SetRoom(room common.Room) { this.room = room } -func (this *player) init(req *pendingLoginRequest, name string, avatarUrl string, heroId int32){ +func (this *player) init(req *pendingLoginRequest, name string, avatarUrl string, heroId string){ this.socket = req.hdr.GetSocket() this.accountId = req.msg.GetAccountId() this.sessionId = req.msg.GetSessionId() @@ -70,7 +70,7 @@ func (this *player) GetAvatarUrl() string { return this.avatarUrl } -func (this *player) GetHeroId() int32 { +func (this *player) GetHeroId() string { return this.heroId } diff --git a/server/hallserver/player/playermgr.go b/server/hallserver/player/playermgr.go index 5702a862..bb13e92d 100644 --- a/server/hallserver/player/playermgr.go +++ b/server/hallserver/player/playermgr.go @@ -134,8 +134,8 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli RenameCount string `json:"rename_count"` AccountID string `json:"account_id"` Name string `json:"name"` - HeadId int32 `json:"head_id"` - HeroId int32 `json:"hero"` + HeadId string `json:"head_id"` + HeroId string `json:"hero_id"` } `json:"info"` }{} { @@ -157,7 +157,7 @@ func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCli } hum := new(player) - hum.init(pendingReq, rspObj.Info.Name, q5.ToString(rspObj.Info.HeadId), rspObj.Info.HeroId) + hum.init(pendingReq, rspObj.Info.Name, rspObj.Info.HeadId, rspObj.Info.HeroId) this.accountIdHash[hum.GetAccountId()] = hum this.socketHash[pendingReq.hdr.GetSocket()] = hum diff --git a/tools/robot/testcase.js b/tools/robot/testcase.js index 0229e6b7..656ca4de 100644 --- a/tools/robot/testcase.js +++ b/tools/robot/testcase.js @@ -96,7 +96,7 @@ class TestCase { }); this.userData = response; const endTick = getTickCount(); - //console.log('login auth@User', endTick - startTick, String(err), response); + console.log('login auth@User', endTick - startTick, String(err), response); } async step3() {