Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
8cc59343b7
@ -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",
|
||||
GO_SHOP = "GO_SHOP", -- 跳转商店
|
||||
-- BORAD_TOUCH_BEGIN = "BORAD_TOUCH_BEGIN",
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
@ -314,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user