1
This commit is contained in:
parent
3f32e28de4
commit
829f535c8f
@ -544,9 +544,41 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte
|
|||||||
if this.GetTeam().IsLock() {
|
if this.GetTeam().IsLock() {
|
||||||
rspMsg.Errcode = proto.Int32(1)
|
rspMsg.Errcode = proto.Int32(1)
|
||||||
rspMsg.Errmsg = proto.String("team already started")
|
rspMsg.Errmsg = proto.String("team already started")
|
||||||
} else {
|
|
||||||
}
|
|
||||||
this.SendMsg(rspMsg)
|
this.SendMsg(rspMsg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
params := map[string]string{
|
||||||
|
"c": "User",
|
||||||
|
"a": "getBattleItem",
|
||||||
|
"account_id": this.accountId,
|
||||||
|
"session_id": this.sessionId,
|
||||||
|
"item_id": q5.ToString(*msg.ItemId),
|
||||||
|
}
|
||||||
|
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Config.GetById(0).GetGameapiUrl())
|
||||||
|
f5.GetHttpCliMgr().SendJsStyleRequest(
|
||||||
|
url,
|
||||||
|
params,
|
||||||
|
func(rsp f5.HttpCliResponse) {
|
||||||
|
if this.GetTeam() != nil && !this.GetTeam().IsLock() {
|
||||||
|
if rsp.GetErr() != nil {
|
||||||
|
rspMsg.Errcode = proto.Int32(1)
|
||||||
|
rspMsg.Errmsg = proto.String("team already started")
|
||||||
|
this.SendMsg(rspMsg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rspObj := common.MapInfoRsp{}
|
||||||
|
{
|
||||||
|
f5.GetSysLog().Info("updateMap:%s", rsp.GetRawData())
|
||||||
|
err := json.Unmarshal([]byte(rsp.GetRawData()), &rspObj)
|
||||||
|
if err != nil {
|
||||||
|
//cb(500, "server internal error")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
this.GetTeam().SendUpdateNotify()
|
this.GetTeam().SendUpdateNotify()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user