|
|
@@ -684,23 +684,39 @@ function getTaskItems(human, id)
|
|
|
local cf = AbsActExcel.heroGrowUpTask[id]
|
|
|
if not cf then return end
|
|
|
|
|
|
+ local nType = cf.mainType
|
|
|
+
|
|
|
checkDB(human, actStartTime,groupID)
|
|
|
- local state = getTaskState(human, id, cf)
|
|
|
- if state == TASK_STATE_NONE then
|
|
|
- return Broadcast.sendErr(human, Lang.YUNYING_GET_ERR_CONDITION)
|
|
|
- end
|
|
|
- if state == TASK_STATE_HAD then
|
|
|
- return Broadcast.sendErr(human, Lang.YUNYING_GET_ERR_HADGET)
|
|
|
+ -- local state = getTaskState(human, id, cf)
|
|
|
+ -- if state == TASK_STATE_NONE then
|
|
|
+ -- return Broadcast.sendErr(human, Lang.YUNYING_GET_ERR_CONDITION)
|
|
|
+ -- end
|
|
|
+ -- if state == TASK_STATE_HAD then
|
|
|
+ -- return Broadcast.sendErr(human, Lang.YUNYING_GET_ERR_HADGET)
|
|
|
+ -- end
|
|
|
+
|
|
|
+ local tItem = {}
|
|
|
+ for nID, v in pairs(AbsActExcel.heroGrowUpTask) do
|
|
|
+ if v.mainType == nType then
|
|
|
+ local state = getTaskState(human, nID, v)
|
|
|
+ if state == TASK_STATE_CAN then
|
|
|
+ setGetTask(human, actStartTime, nID, v)
|
|
|
+ for _, item in ipairs(v.items) do
|
|
|
+ local nGoodsID, nGoodsNum = item[1], item[2]
|
|
|
+ if not tItem[nGoodsID] then
|
|
|
+ tItem[nGoodsID] = 0
|
|
|
+ end
|
|
|
+ tItem[nGoodsID] = tItem[nGoodsID] + nGoodsNum
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
- setGetTask(human, actStartTime, id, cf)
|
|
|
- for _, item in ipairs(cf.items) do
|
|
|
- local itemID = item[1]
|
|
|
- local itemCnt = item[2]
|
|
|
- BagLogic.addItem(human, itemID, itemCnt, "hero_growup_task")
|
|
|
+ if nil ~= _G.next(tItem) then
|
|
|
+ BagLogic.addItemList(human, tItem, "hero_growup_task")
|
|
|
+ -- BagLogic.sendItemGetList(human, tItem)
|
|
|
end
|
|
|
- BagLogic.sendItemGetList1(human, cf.items)
|
|
|
-
|
|
|
+
|
|
|
sendTaskQuery(human, cf.mainType)
|
|
|
YunYingLogic.updateIcon(YYInfo[DG_ABS_ACT_ID], human)
|
|
|
end
|