From 2d51debf5af00d8ae2cc2fcd71ccddee840e9f59 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 29 May 2023 11:06:24 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=98=BE=E7=A4=BAi=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/team/battle_team.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/app/module/battle/team/battle_team.lua b/lua/app/module/battle/team/battle_team.lua index 9682aa24..c6d052f1 100644 --- a/lua/app/module/battle/team/battle_team.lua +++ b/lua/app/module/battle/team/battle_team.lua @@ -278,13 +278,13 @@ function BattleTeam:addBuff(buffEffect) else table.insert(self.buffList, buffEffect) self:updateBuffState(buffEffect.buff, 1) - if buffEffect.buff:getIcon() then - self.battleController:refreshBuff(self.side, self.buffList) - end - needRecycle = buffEffect end + if buffEffect.buff:getIcon() then + self.battleController:refreshBuff(self.side, self.buffList) + end + return needRecycle end From e99af16f39a857853f1918db56a702686a299f1a Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 29 May 2023 11:15:30 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BB=8E=E4=BB=BB=E5=8A=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8E=BB=E6=88=98=E4=BB=A4=EF=BC=8C=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E8=B4=AD=E4=B9=B0=E4=B8=80=E5=AE=9A=E8=A6=81?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E8=B4=AD=E4=B9=B0=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/task/cell/daily_task_cell.lua | 4 ++++ lua/app/userdata/bounty/bounty_data.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lua/app/ui/task/cell/daily_task_cell.lua b/lua/app/ui/task/cell/daily_task_cell.lua index 3bd8ac4f..349c3726 100644 --- a/lua/app/ui/task/cell/daily_task_cell.lua +++ b/lua/app/ui/task/cell/daily_task_cell.lua @@ -37,6 +37,10 @@ function DailyTaskCell:init() self.lockBg = uiMap["task_cell.lock_bg"] local lockBtn = uiMap["task_cell.lock_node.lock_btn.btn"] lockBtn:addClickListener(function() + if DataManager.BountyData:getIsOpen() then + DataManager.BountyData:clearPopBought() + ModuleManager.BountyManager:showBountyMainUI() + end end) local lockBtnTx = uiMap["task_cell.lock_node.lock_btn.btn.text"] lockBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_UNLOCK)) diff --git a/lua/app/userdata/bounty/bounty_data.lua b/lua/app/userdata/bounty/bounty_data.lua index 5b4dfbfd..2b39c96e 100644 --- a/lua/app/userdata/bounty/bounty_data.lua +++ b/lua/app/userdata/bounty/bounty_data.lua @@ -335,6 +335,10 @@ function BountyData:markPopBought() LocalData:setBountyPopTime(self.popBoughtTime) end +function BountyData:clearPopBought() + self.popBoughtTime = 0 +end + function BountyData:getRechargeId(advanced) local cfg = ConfigManager:getConfig("act_gift") local id = self:getGiftId(advanced) From 28cebc3702a764c808252cb74fc5df7522246f5b Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 29 May 2023 11:20:00 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=BC=95=E5=AF=BC=E8=A1=A8=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/battle/battle_ui.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index ff40fb45..85dc3ea6 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -1920,7 +1920,10 @@ function BattleUI:showTutorialFinger(posIdList) end self.showTutorialFingerSeq:AppendCallback(function() self.battleController:clearGridSequence() + self.tutorialFinger:setAnchoredPositionX(DEFAULT_X) + self:showBoardMask(nil) end) + self.showTutorialFingerSeq:AppendInterval(1) self.showTutorialFingerSeq:SetLoops(-1) end From b00c0eb831def40b05cddbca71958fbfc772f60a Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 29 May 2023 11:26:25 +0800 Subject: [PATCH 4/6] =?UTF-8?q?buff=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/userdata/battle/skill/battle_skill_entity.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/app/userdata/battle/skill/battle_skill_entity.lua b/lua/app/userdata/battle/skill/battle_skill_entity.lua index feb962b4..9142ebde 100644 --- a/lua/app/userdata/battle/skill/battle_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_skill_entity.lua @@ -115,15 +115,13 @@ function BattleSkillEntity:addSkillEffectParams(effect) for _, entity in ipairs(self.effectList) do if entity:getName() == effect.type then buffEntity = entity - break + buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num) end end if not buffEntity then buffEntity = BattleBuffEntity:create() buffEntity:init(effect, self.owner, self) table.insert(self.effectList, buffEntity) - else - buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num) end end @@ -132,15 +130,13 @@ function BattleSkillEntity:addSkillEffectRound(effect) for _, entity in ipairs(self.effectList) do if entity:getName() == effect.type then buffEntity = entity - break + buffEntity:setRound(buffEntity:getRound() + effect.round) end end if not buffEntity then buffEntity = BattleBuffEntity:create() buffEntity:init(effect, self.owner, self) table.insert(self.effectList, buffEntity) - else - buffEntity:setRound(buffEntity:getRound() + effect.round) end end From a68579db48eb3d9ae15e372a2323f1274faaecf6 Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 29 May 2023 12:01:46 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/task/task_main_ui.lua | 4 +-- lua/app/userdata/task/daily_task_data.lua | 43 +++++++++++++---------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lua/app/ui/task/task_main_ui.lua b/lua/app/ui/task/task_main_ui.lua index 09bff2d7..fe5a7bb3 100644 --- a/lua/app/ui/task/task_main_ui.lua +++ b/lua/app/ui/task/task_main_ui.lua @@ -17,10 +17,10 @@ local function sortTask(taskList) if completeA then return a.id < b.id else -- 没有完成的优先显示战令解锁 - if a.bountyLock == b.bountyLock then + if a.lock == b.lock then return a.id < b.id else - return a.bountyLock + return b.lock end end else diff --git a/lua/app/userdata/task/daily_task_data.lua b/lua/app/userdata/task/daily_task_data.lua index e66ffa3e..601a17f2 100644 --- a/lua/app/userdata/task/daily_task_data.lua +++ b/lua/app/userdata/task/daily_task_data.lua @@ -46,24 +46,28 @@ function DailyTaskData:init(data) type = v.type, reset = v.reset } - if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then - dailyTaskObj.redPoint = true - if dailyTaskObj.type == 1 then - dailyRedPoint = dailyRedPoint + 1 - else - challengeRedPoint = challengeRedPoint + 1 - end - else - dailyTaskObj.redPoint = false - end if v.bounty then - if self.isUnlockBountyDailyTask then - dailyTaskObj.lock = false - else - dailyTaskObj.lock = true - end + if self.isUnlockBountyDailyTask then + dailyTaskObj.lock = false + else + dailyTaskObj.lock = true + end + else + dailyTaskObj.lock = false end - if not dailyTaskObj.lock then -- 只有解锁的任务才注册监听任务进度 + if dailyTaskObj.lock then + dailyTaskObj.redPoint = false + else + if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then + dailyTaskObj.redPoint = true + if dailyTaskObj.type == 1 then + dailyRedPoint = dailyRedPoint + 1 + else + challengeRedPoint = challengeRedPoint + 1 + end + else + dailyTaskObj.redPoint = false + end local list = self.taskTypeMap[taskInfo.type] if list == nil then list = {} @@ -130,11 +134,11 @@ function DailyTaskData:refreshDailyTask(task) dailyTaskObj.type = dailyTaskInfo.type dailyTaskObj.reset = dailyTaskInfo.reset local redPoint = false - if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then + if not dailyTaskObj.lock and not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then redPoint = true end local originTaskType = originTaskInfo.type - if originTaskType ~= taskInfo.type then -- 任务类型变了 + if not dailyTaskObj.lock and originTaskType ~= taskInfo.type then -- 任务类型变了 self:unregisterTask(id, originTaskType) self:registerTask(dailyTaskObj, taskInfo.type) end @@ -307,6 +311,9 @@ function DailyTaskData:getIfCanClaimTask(task) end function DailyTaskData:addTaskProgress(task, taskType, count) + if task.lock then + return + end local currProgress = task.progress if currProgress >= task.needProgress then return From 85cdf222c6e929dd5735b3aba62ea8032562d41b Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 29 May 2023 12:05:26 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=B2=A1=E5=BC=80=E5=90=AF=E5=89=8D=E4=BC=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=AE=8C=E6=88=90=E5=BE=97toast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/event_manager.lua | 4 ++-- lua/app/module/task/task_manager.lua | 6 ++++-- lua/app/userdata/task/daily_task_data.lua | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/app/common/event_manager.lua b/lua/app/common/event_manager.lua index 20e2c3ce..d03ded0a 100644 --- a/lua/app/common/event_manager.lua +++ b/lua/app/common/event_manager.lua @@ -23,9 +23,9 @@ EventManager.CUSTOM_EVENT = { SHOW_ELIMINATION_TUTORAIL = "SHOW_ELIMINATION_TUTORAIL", BOARD_FILL_OVER = "BOARD_FILL_OVER", LOGIN_REQ_SUCCESS = "LOGIN_REQ_SUCCESS", - DAILY_TASK_ADD_PROGRESS = "DAILY_TASK_ADD_PROGRESS", + DAILY_TASK_COMPLETE = "DAILY_TASK_COMPLETE", -- 每日任务完成 BOSS_ENTER_ANI_OVER = "BOSS_ENTER_ANI_OVER", - TIME_TRIGGERED_NEW_EMAIL = "TIME_TRIGGERED_NEW_EMAIL", -- 邮件到时间请求是否有新邮件 + TIME_TRIGGERED_NEW_EMAIL = "TIME_TRIGGERED_NEW_EMAIL", -- 邮件到时间请求是否有新邮件 SKILL_REFRESH_SUCC = "SKILL_REFRESH_SUCC", -- BORAD_TOUCH_BEGIN = "BORAD_TOUCH_BEGIN", -- BORAD_TOUCH_OVER = "BORAD_TOUCH_OVER" diff --git a/lua/app/module/task/task_manager.lua b/lua/app/module/task/task_manager.lua index ad54959e..9621afcd 100644 --- a/lua/app/module/task/task_manager.lua +++ b/lua/app/module/task/task_manager.lua @@ -2,8 +2,10 @@ local TaskManager = class("TaskManager", BaseModule) local BATTLE_TASK_FIELD = GConst.BattleConst.BATTLE_TASK_FIELD function TaskManager:init() - self:addEventListener(EventManager.CUSTOM_EVENT.DAILY_TASK_ADD_PROGRESS, function(id, taskId, from, to) - ModuleManager.TaskToastManager:showToast(id, taskId, from, to) + self:addEventListener(EventManager.CUSTOM_EVENT.DAILY_TASK_COMPLETE, function(id, taskId, from, to) + if DataManager.DailyTaskData:getIsOpen() then + ModuleManager.TaskToastManager:showToast(id, taskId, from, to) + end end) self:addEventListener(EventManager.CUSTOM_EVENT.UI_SHOW_COMPLETE, function() ModuleManager.TaskToastManager:checkOnOpenUI() diff --git a/lua/app/userdata/task/daily_task_data.lua b/lua/app/userdata/task/daily_task_data.lua index 601a17f2..ca3dffe7 100644 --- a/lua/app/userdata/task/daily_task_data.lua +++ b/lua/app/userdata/task/daily_task_data.lua @@ -321,7 +321,7 @@ function DailyTaskData:addTaskProgress(task, taskType, count) local can = self:getIfCanClaimTask(task) task.progress = task.progress + count if not can and self:getIfCanClaimTask(task) then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.DAILY_TASK_ADD_PROGRESS, task.id, task.taskId, currProgress, task.needProgress) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.DAILY_TASK_COMPLETE, task.id, task.taskId, currProgress, task.needProgress) if task.type == 1 and task.reset == 1 and taskType ~= GConst.TaskConst.TASK_TYPE.COMPLETED_DALY_TASK then ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.COMPLETED_DALY_TASK) end