From ad820a2f2bffb1f58427702a18217faf64563c99 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 18 Apr 2024 21:07:46 +0800 Subject: [PATCH] 1 --- server/matchserver/common/types.go | 5 +++++ server/matchserver/player/player.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/server/matchserver/common/types.go b/server/matchserver/common/types.go index 2ed46600..1a945b14 100644 --- a/server/matchserver/common/types.go +++ b/server/matchserver/common/types.go @@ -68,6 +68,7 @@ type MapInfoRsp struct { MapId int32 `json:"map_id"` IsMoba int32 `json:"is_moba"` IsOpen int32 `json:"is_open"` + //NeedTicket int32 `json:"need_ticket"` } type UpdateBattleInfoRsp struct { @@ -83,12 +84,16 @@ type UpdateBattleInfoRsp struct { HeroId string `json:"hero_id"` HeadFrame string `json:"head_frame"` SpecSkill string `json:"spec_skill"` + TotalLucky interface{} `json:"total_lucky"` + AdmissionItemNum interface{} `json:"admission_item_num"` } `json:"user_info"` HeroInfo struct { HeroUniId string `json:"hero_uniid"` HeroId string `json:"hero_id"` Quality string `json:"quality"` SpecSkill string `json:"spec_skill"` + Wealth interface{} `json:"wealth"` + ValidLefttime interface{} `json:"valid_lefttime"` } `json:"hero_info"` } `json:"info"` } diff --git a/server/matchserver/player/player.go b/server/matchserver/player/player.go index d8d26517..5ce5ad23 100644 --- a/server/matchserver/player/player.go +++ b/server/matchserver/player/player.go @@ -464,11 +464,15 @@ func (this *player) updateChoose(skillId int32, heroUniId string, this.name = rspObj.Info.UserInfo.Name this.avatarUrl = rspObj.Info.UserInfo.HeadId this.headFrame = rspObj.Info.UserInfo.HeadFrame + q5.DuckToSimple(rspObj.Info.UserInfo.AdmissionItemNum, &this.admissionItemNum) + q5.DuckToSimple(rspObj.Info.UserInfo.TotalLucky, &this.totalLucky) { 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) this.hero.specSkill = q5.ToInt32(rspObj.Info.HeroInfo.SpecSkill) + q5.DuckToSimple(rspObj.Info.HeroInfo.Wealth, &this.hero.wealth) + q5.DuckToSimple(rspObj.Info.HeroInfo.ValidLefttime, &this.hero.validLeftTime) } cb(0, "")