gitxsm 9 месяцев назад
Родитель
Сommit
b77f4be2f1
1 измененных файлов с 10 добавлено и 2 удалено
  1. 10 2
      script/module/mozhu/MoZhuLogic.lua

+ 10 - 2
script/module/mozhu/MoZhuLogic.lua

@@ -476,19 +476,27 @@ function unionGetWL(human, msg)
 
     local len = 0
     local itemVec = {}
+    local getIdx = human.db.mozhu.unionGet or 0
 
     for _, idx in ipairs(msg.rewardIdxList) do
         local config = MoZhuExcel.hurt[idx]
-        if config then
+        if config and idx > getIdx then
             for _, item in ipairs(config.reward) do
                 len = len + 1
                 itemVec[len] = item
 
-                human.db.mozhu.unionGet = idx
+                getIdx = idx
+                -- human.db.mozhu.unionGet = idx
             end
         end
     end
 
+    if len == 0 then
+        return
+    end
+
+    human.db.mozhu.unionGet = getIdx
+
     BagLogic.addItemList(human, itemVec,  "ciYuanMozhu")
 
     local msgRet = Msg.gc.GC_MOZHU_REWARD_GET