refactor(fight): 优化战斗逻辑代码结构,清理冗余代码

This commit is contained in:
1
2025-11-05 17:06:08 +00:00
parent ed08006786
commit 4d7064e59f
3 changed files with 11 additions and 15 deletions

View File

@@ -88,7 +88,7 @@ func (lw *Player) AgreeBattle(userid, flag uint32, mode info.EnumBattleMode) (bo
return false, nil
}
if v.Info.UserID == userid && v.PVPinfo.Mode == mode { //成功找到,同意对战
if lw.CanFight() {
if lw.CanFight() &&v.CanFight(){
ret.Result = 1
v.SendPack(t1.Pack(ret))