diff --git a/server/matchserver/common/types.go b/server/matchserver/common/types.go index 44f9fb93..b7658cf3 100644 --- a/server/matchserver/common/types.go +++ b/server/matchserver/common/types.go @@ -15,36 +15,40 @@ type BattleItem struct { ItemNum int32 `json:"item_num"` } +type UserInfo struct { + Activated string `json:"activated"` + RenameCount string `json:"rename_count"` + AccountId string `json:"account_id"` + Name string `json:"name"` + HeadId string `json:"head_id"` + HeroId string `json:"hero_id"` + HeadFrame string `json:"head_frame"` + TotalLucky interface{} `json:"total_lucky"` + AdmissionItemNum interface{} `json:"admission_item_num"` + CircuitScore interface{} `json:"circuit_score"` + VipLv interface{} `json:"vip_lv"` + VipExp interface{} `json:"vip_exp"` + HasVipLucky interface{} `json:"has_vip_lucky"` +} + +type 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"` + CurrentTimes interface{} `json:"current_times"` + TotalTimes interface{} `json:"total_times"` + SkinId interface{} `json:"skin_id"` +} + type LoginRsp struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` Info struct { - UserInfo struct { - Activated string `json:"activated"` - RenameCount string `json:"rename_count"` - AccountId string `json:"account_id"` - Name string `json:"name"` - HeadId string `json:"head_id"` - HeroId string `json:"hero_id"` - HeadFrame string `json:"head_frame"` - TotalLucky interface{} `json:"total_lucky"` - AdmissionItemNum interface{} `json:"admission_item_num"` - CircuitScore interface{} `json:"circuit_score"` - VipLv interface{} `json:"vip_lv"` - VipExp interface{} `json:"vip_exp"` - HasVipLucky interface{} `json:"has_vip_lucky"` - } `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"` - CurrentTimes interface{} `json:"current_times"` - TotalTimes interface{} `json:"total_times"` - SkinId interface{} `json:"skin_id"` - } `json:"hero_info"` + UserInfo UserInfo `json:"user_info"` + HeroInfo HeroInfo `json:"hero_info"` MapInfo *MapInfoRsp `json:"map_info"` } `json:"info"` } @@ -53,32 +57,8 @@ type UserRsp struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` Info struct { - UserInfo struct { - Activated string `json:"activated"` - RenameCount string `json:"rename_count"` - AccountId string `json:"account_id"` - Name string `json:"name"` - HeadId string `json:"head_id"` - HeroId string `json:"hero_id"` - HeadFrame string `json:"head_frame"` - TotalLucky interface{} `json:"total_lucky"` - AdmissionItemNum interface{} `json:"admission_item_num"` - CircuitScore interface{} `json:"circuit_score"` - VipLv interface{} `json:"vip_lv"` - VipExp interface{} `json:"vip_exp"` - HasVipLucky interface{} `json:"has_vip_lucky"` - } `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"` - CurrentTimes interface{} `json:"current_times"` - TotalTimes interface{} `json:"total_times"` - SkinId interface{} `json:"skin_id"` - } `json:"hero_info"` + UserInfo UserInfo `json:"user_info"` + HeroInfo HeroInfo `json:"hero_info"` } `json:"info"` } @@ -104,33 +84,8 @@ type UpdateBattleInfoRsp struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` Info struct { - UserInfo struct { - Activated string `json:"activated"` - RenameCount string `json:"rename_count"` - AccountId string `json:"account_id"` - Name string `json:"name"` - HeadId string `json:"head_id"` - 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"` - CircuitScore interface{} `json:"circuit_score"` - VipLv interface{} `json:"vip_lv"` - VipExp interface{} `json:"vip_exp"` - HasVipLucky interface{} `json:"has_vip_lucky"` - } `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"` - CurrentTimes interface{} `json:"current_times"` - TotalTimes interface{} `json:"total_times"` - SkinId interface{} `json:"skin_id"` - } `json:"hero_info"` + UserInfo UserInfo `json:"user_info"` + HeroInfo HeroInfo `json:"hero_info"` } `json:"info"` }