```
feat(fight): 优化擂台战斗逻辑与状态管理 - 修改了擂台主人设置逻辑,引入 `Set` 方法统一处理玩家信息更新 - 增加对擂主是否可战斗的判断,防止无效挑战 - 调整连胜计算和广播机制,确保数据一致性 - 修复擂台挑战失败时的状态回滚问题 - 引入错误码替代硬编码返回值,提高代码可读性与维护性 - 统一访问擂台玩家的方式,移除冗余字段
This commit is contained in:
@@ -254,7 +254,7 @@ func (f *FightC) handleItemAction(a *action.UseItemAction) {
|
||||
CatchTime: uint32(f.Opp.CurrentPet.Info.CatchTime),
|
||||
PetId: uint32(f.Opp.CurrentPet.ID),
|
||||
}))
|
||||
//f.Reason = info.BattleOverReason.PlayerCatch
|
||||
//f.Reason = info.BattleOverReason.PlayerCaptureSuccess
|
||||
//f.WinnerId = 0 //捕捉成功不算胜利
|
||||
|
||||
f.closefight = true
|
||||
|
||||
Reference in New Issue
Block a user