|
|
@@ -441,13 +441,21 @@ function unionHurtGet(human, id)
|
|
|
end
|
|
|
|
|
|
if not human.db.mozhu then return end
|
|
|
- local oldId = human.db.mozhu.unionGet or 0
|
|
|
- if id ~= oldId + 1 then return end
|
|
|
+ -- local oldId = human.db.mozhu.unionGet or 0
|
|
|
+ -- if id ~= oldId + 1 then return end
|
|
|
|
|
|
+ -- local msgInner = {} -- InnerMsg.lw.LW_MOZHU_UNION_GET
|
|
|
+ -- msgInner.uuid = human.db._id
|
|
|
+ -- msgInner.unionUuid = human.db.unionUuid
|
|
|
+ -- msgInner.id = id
|
|
|
+ -- --InnerMsg.sendMsg(0, msgInner)
|
|
|
+ -- MozhuMiddleLogic.LW_MOZHU_UNION_GET(0,msgInner)
|
|
|
+
|
|
|
+ -- 新修改:一键领取所有可领取奖励
|
|
|
local msgInner = {} -- InnerMsg.lw.LW_MOZHU_UNION_GET
|
|
|
msgInner.uuid = human.db._id
|
|
|
msgInner.unionUuid = human.db.unionUuid
|
|
|
- msgInner.id = id
|
|
|
+ -- msgInner.id = id
|
|
|
--InnerMsg.sendMsg(0, msgInner)
|
|
|
MozhuMiddleLogic.LW_MOZHU_UNION_GET(0,msgInner)
|
|
|
end
|
|
|
@@ -459,15 +467,33 @@ function unionGetWL(human, msg)
|
|
|
return
|
|
|
end
|
|
|
|
|
|
- local config = MoZhuExcel.hurt[msg.id]
|
|
|
- if not config then return end
|
|
|
+ -- local config = MoZhuExcel.hurt[msg.id]
|
|
|
+ -- if not config then return end
|
|
|
+
|
|
|
+ -- BagLogic.addItemList(human, config.reward, "ciYuanMozhu")
|
|
|
+
|
|
|
+ -- human.db.mozhu.unionGet = msg.id
|
|
|
+
|
|
|
+ local len = 0
|
|
|
+ local itemVec = {}
|
|
|
+
|
|
|
+ for _, idx in ipairs(msg.rewardIdxList) do
|
|
|
+ local config = MoZhuExcel.hurt[idx]
|
|
|
+ if config then
|
|
|
+ for _, item in ipairs(config.reward) do
|
|
|
+ len = len + 1
|
|
|
+ itemVec[len] = item
|
|
|
|
|
|
- BagLogic.addItemList(human, config.reward, "ciYuanMozhu")
|
|
|
+ human.db.mozhu.unionGet = idx
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
|
|
|
- human.db.mozhu.unionGet = msg.id
|
|
|
+ BagLogic.addItemList(human, itemVec, "ciYuanMozhu")
|
|
|
|
|
|
local msgRet = Msg.gc.GC_MOZHU_REWARD_GET
|
|
|
- msgRet.id = msg.id
|
|
|
+ -- msgRet.id = msg.id
|
|
|
+ msgRet.id = human.db.mozhu.unionGet
|
|
|
Msg.send(msgRet, human.fd)
|
|
|
end
|
|
|
|