refactor(fight): 优化战斗逻辑代码结构,清理冗余代码
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user