diff --git a/server/matchserver/player/player.go b/server/matchserver/player/player.go index be056ef9..66298cc3 100644 --- a/server/matchserver/player/player.go +++ b/server/matchserver/player/player.go @@ -544,9 +544,41 @@ func (this *player) CMChooseBattleItem(hdr *f5.MsgHdr, msg *cs.CMChooseBattleIte if this.GetTeam().IsLock() { rspMsg.Errcode = proto.Int32(1) rspMsg.Errmsg = proto.String("team already started") - } else { + this.SendMsg(rspMsg) + return } - this.SendMsg(rspMsg) + 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() }