Przeglądaj źródła

idRed 判断更新

249435196@qq.com 1 rok temu
rodzic
commit
34d98fa59d
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      script/module/shop/WarOrder.lua

+ 7 - 0
script/module/shop/WarOrder.lua

@@ -75,6 +75,13 @@ local function checkRed(human,orderType)
             maxFinishIdx = lv
         end
     end
+    local maxUpgradeFinishIdx = 0
+    for lv in ipairs(orderData.upgradeFinish) do 
+        if maxUpgradeFinishIdx <= lv then 
+            maxUpgradeFinishIdx = lv
+        end
+    end
+    local maxFinishIdx =  (maxFinishIdx > maxUpgradeFinishIdx) and maxUpgradeFinishIdx or maxFinishIdx
     local maxExpIdx = 0
     for _,cfg in pairs(cfg) do 
         if cfg.process <= exp and maxExpIdx <= cfg.idx then