1
This commit is contained in:
parent
b291fbaa85
commit
01c1aedee4
@ -22,12 +22,16 @@ type LoginRsp struct {
|
|||||||
HeadId string `json:"head_id"`
|
HeadId string `json:"head_id"`
|
||||||
HeroId string `json:"hero_id"`
|
HeroId string `json:"hero_id"`
|
||||||
HeadFrame string `json:"head_frame"`
|
HeadFrame string `json:"head_frame"`
|
||||||
|
TotalLucky interface{} `json:"total_lucky"`
|
||||||
|
AdmissionItemNum interface{} `json:"admission_item_num"`
|
||||||
} `json:"user_info"`
|
} `json:"user_info"`
|
||||||
HeroInfo struct {
|
HeroInfo struct {
|
||||||
HeroUniId string `json:"hero_uniid"`
|
HeroUniId string `json:"hero_uniid"`
|
||||||
HeroId string `json:"hero_id"`
|
HeroId string `json:"hero_id"`
|
||||||
Quality string `json:"quality"`
|
Quality string `json:"quality"`
|
||||||
SpecSkill string `json:"spec_skill"`
|
SpecSkill string `json:"spec_skill"`
|
||||||
|
Wealth interface{} `json:"wealth"`
|
||||||
|
ValidLefttime interface{} `json:"valid_lefttime"`
|
||||||
} `json:"hero_info"`
|
} `json:"hero_info"`
|
||||||
MapInfo MapInfoRsp `json:"map_info"`
|
MapInfo MapInfoRsp `json:"map_info"`
|
||||||
} `json:"info"`
|
} `json:"info"`
|
||||||
|
@ -29,6 +29,7 @@ func (this *HandlerMgr) Init() {
|
|||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseHero), constant.PLAYER_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseHero), constant.PLAYER_HANDLER_ID)
|
||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseMap), constant.PLAYER_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMChooseMap), constant.PLAYER_HANDLER_ID)
|
||||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMGrantInvitePermission), constant.PLAYER_HANDLER_ID)
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMGrantInvitePermission), constant.PLAYER_HANDLER_ID)
|
||||||
|
cs.RegHandlerId(int(cs.CMMessageIdE__CMRefreshUser), constant.PLAYER_HANDLER_ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *HandlerMgr) UnInit() {
|
func (this *HandlerMgr) UnInit() {
|
||||||
|
@ -17,6 +17,8 @@ type hero struct {
|
|||||||
heroId int32
|
heroId int32
|
||||||
quality int32
|
quality int32
|
||||||
specSkill int32
|
specSkill int32
|
||||||
|
wealth int32
|
||||||
|
validLeftTime int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type player struct {
|
type player struct {
|
||||||
@ -32,6 +34,8 @@ type player struct {
|
|||||||
state int32
|
state int32
|
||||||
isReady int32
|
isReady int32
|
||||||
permission int32
|
permission int32
|
||||||
|
admissionItemNum int32
|
||||||
|
totalLucky int64
|
||||||
hero hero
|
hero hero
|
||||||
team common.Team
|
team common.Team
|
||||||
sortIdx int32
|
sortIdx int32
|
||||||
@ -52,11 +56,15 @@ func (this *player) init(req *pendingLoginRequest, rsp *common.LoginRsp){
|
|||||||
this.name = rsp.Info.UserInfo.Name
|
this.name = rsp.Info.UserInfo.Name
|
||||||
this.avatarUrl = rsp.Info.UserInfo.HeadId
|
this.avatarUrl = rsp.Info.UserInfo.HeadId
|
||||||
this.headFrame = rsp.Info.UserInfo.HeadFrame
|
this.headFrame = rsp.Info.UserInfo.HeadFrame
|
||||||
|
q5.DuckToSimple(rsp.Info.UserInfo.AdmissionItemNum, &this.admissionItemNum)
|
||||||
|
q5.DuckToSimple(rsp.Info.UserInfo.TotalLucky, &this.totalLucky)
|
||||||
{
|
{
|
||||||
this.hero.heroUniId = rsp.Info.HeroInfo.HeroUniId
|
this.hero.heroUniId = rsp.Info.HeroInfo.HeroUniId
|
||||||
this.hero.heroId = q5.ToInt32(rsp.Info.HeroInfo.HeroId)
|
this.hero.heroId = q5.ToInt32(rsp.Info.HeroInfo.HeroId)
|
||||||
this.hero.quality = q5.ToInt32(rsp.Info.HeroInfo.Quality)
|
this.hero.quality = q5.ToInt32(rsp.Info.HeroInfo.Quality)
|
||||||
this.hero.specSkill = q5.ToInt32(rsp.Info.HeroInfo.SpecSkill)
|
this.hero.specSkill = q5.ToInt32(rsp.Info.HeroInfo.SpecSkill)
|
||||||
|
q5.DuckToSimple(rsp.Info.HeroInfo.Wealth, &this.hero.wealth)
|
||||||
|
q5.DuckToSimple(rsp.Info.HeroInfo.ValidLefttime, &this.hero.validLeftTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,6 +386,11 @@ func (this *player) CMChooseMap(hdr *f5.MsgHdr, msg *cs.CMChooseMap) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *player) CMRefreshUser(hdr *f5.MsgHdr, msg *cs.CMRefreshUser) {
|
||||||
|
rspMsg := new(cs.SMRefreshUser)
|
||||||
|
this.SendMsg(rspMsg)
|
||||||
|
}
|
||||||
|
|
||||||
func (this *player) updateChoose(skillId int32, heroUniId string,
|
func (this *player) updateChoose(skillId int32, heroUniId string,
|
||||||
cb func (int32, string)) {
|
cb func (int32, string)) {
|
||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user