diff --git a/server/matchserver/player/player.go b/server/matchserver/player/player.go index fa098f99..b0c530a9 100644 --- a/server/matchserver/player/player.go +++ b/server/matchserver/player/player.go @@ -8,6 +8,7 @@ import ( "main/common" . "main/global" "fmt" + "encoding/json" "mt" ) @@ -342,6 +343,27 @@ func (this *player) updateChoose(skillId int32, heroUniId string, return } } + rspObj := common.UpdateBattleInfoRsp{} + { + f5.GetSysLog().Info("updateBattleinfo:%s", rsp.GetRawData()) + err := json.Unmarshal([]byte(rsp.GetRawData()), &rspObj) + if err != nil { + cb(500, "server internal error") + return + } + { + this.name = rspObj.Info.UserInfo.Name + this.avatarUrl = rspObj.Info.UserInfo.HeadId + this.headFrame = rspObj.Info.UserInfo.HeadFrame + this.specSkill = q5.ToInt32(rspObj.Info.UserInfo.SpecSkill) + { + this.hero.heroUniId = rspObj.Info.HeroInfo.HeroUniId + this.hero.heroId = q5.ToInt32(rspObj.Info.HeroInfo.HeroId) + this.hero.quality = q5.ToInt32(rspObj.Info.HeroInfo.Quality) + } + + } + } }) }