|
|
@@ -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
|