【心魔试炼】点击快速战斗偶先报错卡死

dev_chengFeng
zhangqiang 2021-07-08 18:08:16 +08:00
parent c723fa04af
commit 21ec904da5
1 changed files with 9 additions and 0 deletions

View File

@ -143,7 +143,12 @@ function MonsterCampNewPanel:BindEvent()
end
--快速战斗
local isClick = false
function this.QuickStartMonsterFightRequest()
if isClick then
return
end
isClick = true
-- 请求战斗结果
NetManager.GetMonsterFightResult(MonsterCampManager.monsterWave, FormationTypeDef.MONSTER_CAMP_ATTACK, function (msg)
local result = {}
@ -160,12 +165,16 @@ function this.QuickStartMonsterFightRequest()
BattleManager.SetLastBattleResult(this.lastBattleResult,BATTLE_TYPE.MONSTER_CAMP)
if msg.result == 0 then
UIManager.OpenPanel(UIName.BattleFailPopup, nil, true, UIName.MonsterCampNewPanel)
isClick = false
else
MonsterCampManager.monsterWave = MonsterCampManager.monsterWave + 1
UIManager.OpenPanel(UIName.BattleWinPopup, nil, false, BATTLE_TYPE.MONSTER_CAMP, result, true, true,function()
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
this.OnShowPanel()--刷新界面
Timer.New(function ()
isClick = false
end,0.5):Start()
-- end)
end)
end