debug日志
This commit is contained in:
parent
27588b2b74
commit
155a9a06c3
@ -67,13 +67,20 @@ func (p *PlayerChessData) UpdatePlayerChessData(player *Player, buf []byte) erro
|
||||
Code: msg.RES_CODE_SUCCESS,
|
||||
})
|
||||
p.Data.MChessData = update.MChessData
|
||||
|
||||
LastMap := player.PlayMod.getChessMod().ChessMap
|
||||
if !p.checkChessEqual(player) {
|
||||
res := &msg.ResUpdatePlayerChessData{
|
||||
Code: msg.RES_CODE_FAIL,
|
||||
Msg: "棋子数据不一致",
|
||||
}
|
||||
log.Debug("棋子数据不一致, %v---%v", p.Data.MChessData, player.PlayMod.getChessMod().GetChessList())
|
||||
HandleStr := ""
|
||||
sort.Slice(update.MChessHandle, func(i, j int) bool {
|
||||
return update.MChessHandle[i].Id < update.MChessHandle[j].Id
|
||||
})
|
||||
for _, v := range update.MChessHandle {
|
||||
HandleStr += fmt.Sprintf("%v-%v-%v,", v.Id, v.ChessId, v.Type)
|
||||
}
|
||||
log.Debug("棋子数据不一致, %v===%v===%v===%v", update.MChessHandle, LastMap, p.Data.MChessData, player.PlayMod.getChessMod().GetChessList())
|
||||
player.SendErrClienRes(res)
|
||||
return fmt.Errorf("棋子数据不一致")
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user