123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- ---
- --- Generated by EmmyLua(https://github.com/EmmyLua)
- --- Created by zhangkai.
- --- DateTime: 2024/8/26 下午8:03
- ---
- ActivityTaskGoal = {}
- ---@see 通关副本次数
- function ActivityTaskGoal.FlushFinishDupCount(actor, type, goal_id, goal_count, param)
- local needCount = ConfigDataManager.getTableValue("cfg_task_target", "goalcount", "id", goal_id)
- local goalParam = ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id)
- if needCount == nil or goalParam == nil then
- return goal_count
- end
- if param ~= tonumber(goalParam) or goal_count >= tonumber(needCount) then
- return goal_count
- end
- return goal_count + 1
- end
- ---@see 通关指定副本次数
- function ActivityTaskGoal.FlushFinishGoalDupCount(actor, type, goal_id, goal_count, param)
- local needCount = ConfigDataManager.getTableValue("cfg_task_target", "goalcount", "id", goal_id)
- local goalParam = ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id)
- if needCount == nil or goalParam == nil then
- return goal_count
- end
- if param ~= tonumber(goalParam) or goal_count >= tonumber(needCount) then
- return goal_count
- end
- return goal_count + 1
- end
- ---@see 完成勇士任务
- function ActivityTaskGoal.FlushFinishGoldTaskCount(actor, type, goal_id, goal_count, param)
- local taskCfgList = ConfigDataManager.getTable("cfg_task_gold", "id", param)
- if table.isNullOrEmpty(taskCfgList) then
- return goal_count
- end
- local needCount = ConfigDataManager.getTableValue("cfg_task_target", "goalcount", "id", goal_id)
- if needCount == nil or goal_count >= tonumber(needCount) then
- return goal_count
- end
- return goal_count + 1
- end
- ---@see 通关秘境副本
- function ActivityTaskGoal.FlushSecretRealmFinishTimes(_, _, goal_id, goal_count, param)
- local target = ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id)
- if target and target ~= "" then
- if tonumber(target) ~= tonumber(param) then
- return goal_count
- end
- end
- return goal_count + 1
- end
- ---@see 完成一次BOSS悬赏
- function ActivityTaskGoal.FlushBossRewardBounty(_, _, goal_id, goal_count, param)
- local group = string.tonumber(param)
- if group < 1 then
- return goal_count
- end
- local target = ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id)
- local target_group = string.tonumber(target)
- if target_group < 1 then
- return goal_count + 1
- end
- if target_group ~= group then
- return goal_count
- end
- return goal_count + 1
- end
- ---@see 完成第X章首饰任务
- function ActivityTaskGoal.JewelryTaskChapter(actor, _, goal_id, goal_count, param)
- local finishChapter = KingRoad.GetFinishChapter(actor)
- local needChapter = tonumber(ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id))
- if finishChapter < needChapter then
- return goal_count
- end
- return goal_count + 1;
- end
- ---@see 完成勇气试炼X层
- function ActivityTaskGoal.FlushBraveTestLv(actor, _, goal_id, goal_count, param)
- local needLv = tonumber(ConfigDataManager.getTableValue("cfg_task_target", "taskgoalparam", "id", goal_id))
- if needLv == nil then
- needLv = 1
- end
- local finishLv = tonumber(BraveTest.getBraveTestLv(actor))
- if finishLv == nil then
- finishLv = 0
- end
- if finishLv < needLv then
- return goal_count
- end
- return goal_count + 1
- end
|