1
This commit is contained in:
parent
c36ab3105a
commit
2ccf8fab2c
@ -26,7 +26,7 @@ type Player interface {
|
||||
GetSessionId() string
|
||||
GetName() string
|
||||
GetAvatarUrl() string
|
||||
GetHeroId() int32
|
||||
GetHeroId() string
|
||||
GetPing() int32
|
||||
GetTeamUuid() string
|
||||
GetZoneId() int32
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user