249435196@qq.com 1 год назад
Родитель
Сommit
34d98fa59d
1 измененных файлов с 7 добавлено и 0 удалено
  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