Przeglądaj źródła

处理失落神庙玩法未开启时,从其他玩法进入界面后,可以无限一键通关问题

gitxsm 3 tygodni temu
rodzic
commit
d6b7567e9c
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10 0
      script/module/lostTemple/lostTempleLogic.lua

+ 10 - 0
script/module/lostTemple/lostTempleLogic.lua

@@ -1349,6 +1349,10 @@ end
 
 -- 查询一键扫荡状态
 function LostTemple_OneClickSweep_Query(human)
+    if not isOpen(human) then
+        return Broadcast.sendErr(human, Lang.COMMOM_NOT_ENABLED)
+    end
+
     local msgRet = Msg.gc.GC_LOGT_TEMPLE_ONECLICK_SWEEP_QUERY
     msgRet.state = 0
 
@@ -1366,6 +1370,9 @@ end
 
 -- 查询一键扫荡奖励
 function LostTemple_OneClickSweep_Award(human)
+    if not isOpen(human) then
+        return Broadcast.sendErr(human, Lang.COMMOM_NOT_ENABLED)
+    end
     local msgRet = Msg.gc.GC_LOGT_TEMPLE_ONECLICK_SWEEP_AWARD
     msgRet.awardArr[0] = 0
 
@@ -1381,6 +1388,9 @@ end
 
 -- 进行一键扫荡
 function LostTemple_OneClickSweep_Do(human)
+    if not isOpen(human) then
+        return Broadcast.sendErr(human, Lang.COMMOM_NOT_ENABLED)
+    end
     local isBuyKing = HeroGrowUp.isBuyKing(human)
     if not isBuyKing or isBuyKing ~= 1 then
         return Broadcast.sendErr(human, Lang.LOST_NO_BUY)