浏览代码

idRed 判断更新

249435196@qq.com 1 年之前
父节点
当前提交
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