1
This commit is contained in:
parent
829f535c8f
commit
a9cac80248
@ -10,11 +10,6 @@ import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
type BattleItem struct {
|
||||
ItemId int32 `json:"item_id"`
|
||||
ItemNum int32 `json:"item_num"`
|
||||
}
|
||||
|
||||
type UserInfo struct {
|
||||
//Activated string `json:"activated"`
|
||||
//RenameCount string `json:"rename_count"`
|
||||
|
@ -567,19 +567,31 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte
|
||||
return
|
||||
}
|
||||
}
|
||||
rspObj := common.MapInfoRsp{}
|
||||
{
|
||||
f5.GetSysLog().Info("updateMap:%s", rsp.GetRawData())
|
||||
rspObj := struct {
|
||||
Errcode int `json:"errcode"`
|
||||
Errmsg string `json:"errmsg"`
|
||||
ItemId interface{} `json:"item_id"`
|
||||
ItemNum interface{} `json:"item_num"`
|
||||
ItemType interface{} `json:"item_type"`
|
||||
ItemSubType interface{} `json:"item_sub_type"`
|
||||
}{}
|
||||
err := json.Unmarshal([]byte(rsp.GetRawData()), &rspObj)
|
||||
if err != nil {
|
||||
//cb(500, "server internal error")
|
||||
if err != nil || rspObj.Errcode != 0 {
|
||||
rspMsg.Errcode = proto.Int32(500)
|
||||
rspMsg.Errmsg = proto.String("server internal error")
|
||||
this.SendMsg(rspMsg)
|
||||
return
|
||||
}
|
||||
{
|
||||
}
|
||||
}
|
||||
})
|
||||
var itemId int32
|
||||
var itemNum int32
|
||||
var itemType int32
|
||||
var itemSubType int32
|
||||
q5.DuckToSimple(rspObj.ItemId, &itemId)
|
||||
q5.DuckToSimple(rspObj.ItemNum, &itemNum)
|
||||
q5.DuckToSimple(rspObj.ItemType, &itemType)
|
||||
q5.DuckToSimple(rspObj.ItemSubType, &itemSubType)
|
||||
this.GetTeam().SendUpdateNotify()
|
||||
})
|
||||
}
|
||||
|
||||
func (this *player) IsBattling() bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user