Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
8cc59343b7
@ -23,7 +23,7 @@ EventManager.CUSTOM_EVENT = {
|
|||||||
SHOW_ELIMINATION_TUTORAIL = "SHOW_ELIMINATION_TUTORAIL",
|
SHOW_ELIMINATION_TUTORAIL = "SHOW_ELIMINATION_TUTORAIL",
|
||||||
BOARD_FILL_OVER = "BOARD_FILL_OVER",
|
BOARD_FILL_OVER = "BOARD_FILL_OVER",
|
||||||
LOGIN_REQ_SUCCESS = "LOGIN_REQ_SUCCESS",
|
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",
|
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",
|
SKILL_REFRESH_SUCC = "SKILL_REFRESH_SUCC",
|
||||||
|
|||||||
@ -278,11 +278,11 @@ function BattleTeam:addBuff(buffEffect)
|
|||||||
else
|
else
|
||||||
table.insert(self.buffList, buffEffect)
|
table.insert(self.buffList, buffEffect)
|
||||||
self:updateBuffState(buffEffect.buff, 1)
|
self:updateBuffState(buffEffect.buff, 1)
|
||||||
if buffEffect.buff:getIcon() then
|
needRecycle = buffEffect
|
||||||
self.battleController:refreshBuff(self.side, self.buffList)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
needRecycle = buffEffect
|
if buffEffect.buff:getIcon() then
|
||||||
|
self.battleController:refreshBuff(self.side, self.buffList)
|
||||||
end
|
end
|
||||||
|
|
||||||
return needRecycle
|
return needRecycle
|
||||||
|
|||||||
@ -2,8 +2,10 @@ local TaskManager = class("TaskManager", BaseModule)
|
|||||||
local BATTLE_TASK_FIELD = GConst.BattleConst.BATTLE_TASK_FIELD
|
local BATTLE_TASK_FIELD = GConst.BattleConst.BATTLE_TASK_FIELD
|
||||||
|
|
||||||
function TaskManager:init()
|
function TaskManager:init()
|
||||||
self:addEventListener(EventManager.CUSTOM_EVENT.DAILY_TASK_ADD_PROGRESS, function(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)
|
ModuleManager.TaskToastManager:showToast(id, taskId, from, to)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
self:addEventListener(EventManager.CUSTOM_EVENT.UI_SHOW_COMPLETE, function()
|
self:addEventListener(EventManager.CUSTOM_EVENT.UI_SHOW_COMPLETE, function()
|
||||||
ModuleManager.TaskToastManager:checkOnOpenUI()
|
ModuleManager.TaskToastManager:checkOnOpenUI()
|
||||||
|
|||||||
@ -1920,7 +1920,10 @@ function BattleUI:showTutorialFinger(posIdList)
|
|||||||
end
|
end
|
||||||
self.showTutorialFingerSeq:AppendCallback(function()
|
self.showTutorialFingerSeq:AppendCallback(function()
|
||||||
self.battleController:clearGridSequence()
|
self.battleController:clearGridSequence()
|
||||||
|
self.tutorialFinger:setAnchoredPositionX(DEFAULT_X)
|
||||||
|
self:showBoardMask(nil)
|
||||||
end)
|
end)
|
||||||
|
self.showTutorialFingerSeq:AppendInterval(1)
|
||||||
self.showTutorialFingerSeq:SetLoops(-1)
|
self.showTutorialFingerSeq:SetLoops(-1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,10 @@ function DailyTaskCell:init()
|
|||||||
self.lockBg = uiMap["task_cell.lock_bg"]
|
self.lockBg = uiMap["task_cell.lock_bg"]
|
||||||
local lockBtn = uiMap["task_cell.lock_node.lock_btn.btn"]
|
local lockBtn = uiMap["task_cell.lock_node.lock_btn.btn"]
|
||||||
lockBtn:addClickListener(function()
|
lockBtn:addClickListener(function()
|
||||||
|
if DataManager.BountyData:getIsOpen() then
|
||||||
|
DataManager.BountyData:clearPopBought()
|
||||||
|
ModuleManager.BountyManager:showBountyMainUI()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
local lockBtnTx = uiMap["task_cell.lock_node.lock_btn.btn.text"]
|
local lockBtnTx = uiMap["task_cell.lock_node.lock_btn.btn.text"]
|
||||||
lockBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_UNLOCK))
|
lockBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_UNLOCK))
|
||||||
|
|||||||
@ -17,10 +17,10 @@ local function sortTask(taskList)
|
|||||||
if completeA then
|
if completeA then
|
||||||
return a.id < b.id
|
return a.id < b.id
|
||||||
else -- 没有完成的优先显示战令解锁
|
else -- 没有完成的优先显示战令解锁
|
||||||
if a.bountyLock == b.bountyLock then
|
if a.lock == b.lock then
|
||||||
return a.id < b.id
|
return a.id < b.id
|
||||||
else
|
else
|
||||||
return a.bountyLock
|
return b.lock
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
@ -115,15 +115,13 @@ function BattleSkillEntity:addSkillEffectParams(effect)
|
|||||||
for _, entity in ipairs(self.effectList) do
|
for _, entity in ipairs(self.effectList) do
|
||||||
if entity:getName() == effect.type then
|
if entity:getName() == effect.type then
|
||||||
buffEntity = entity
|
buffEntity = entity
|
||||||
break
|
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
buffEntity:init(effect, self.owner, self)
|
buffEntity:init(effect, self.owner, self)
|
||||||
table.insert(self.effectList, buffEntity)
|
table.insert(self.effectList, buffEntity)
|
||||||
else
|
|
||||||
buffEntity:setEffectNum(buffEntity:getEffectNum() + effect.num)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -132,15 +130,13 @@ function BattleSkillEntity:addSkillEffectRound(effect)
|
|||||||
for _, entity in ipairs(self.effectList) do
|
for _, entity in ipairs(self.effectList) do
|
||||||
if entity:getName() == effect.type then
|
if entity:getName() == effect.type then
|
||||||
buffEntity = entity
|
buffEntity = entity
|
||||||
break
|
buffEntity:setRound(buffEntity:getRound() + effect.round)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not buffEntity then
|
if not buffEntity then
|
||||||
buffEntity = BattleBuffEntity:create()
|
buffEntity = BattleBuffEntity:create()
|
||||||
buffEntity:init(effect, self.owner, self)
|
buffEntity:init(effect, self.owner, self)
|
||||||
table.insert(self.effectList, buffEntity)
|
table.insert(self.effectList, buffEntity)
|
||||||
else
|
|
||||||
buffEntity:setRound(buffEntity:getRound() + effect.round)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -335,6 +335,10 @@ function BountyData:markPopBought()
|
|||||||
LocalData:setBountyPopTime(self.popBoughtTime)
|
LocalData:setBountyPopTime(self.popBoughtTime)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BountyData:clearPopBought()
|
||||||
|
self.popBoughtTime = 0
|
||||||
|
end
|
||||||
|
|
||||||
function BountyData:getRechargeId(advanced)
|
function BountyData:getRechargeId(advanced)
|
||||||
local cfg = ConfigManager:getConfig("act_gift")
|
local cfg = ConfigManager:getConfig("act_gift")
|
||||||
local id = self:getGiftId(advanced)
|
local id = self:getGiftId(advanced)
|
||||||
|
|||||||
@ -46,6 +46,18 @@ function DailyTaskData:init(data)
|
|||||||
type = v.type,
|
type = v.type,
|
||||||
reset = v.reset
|
reset = v.reset
|
||||||
}
|
}
|
||||||
|
if v.bounty then
|
||||||
|
if self.isUnlockBountyDailyTask then
|
||||||
|
dailyTaskObj.lock = false
|
||||||
|
else
|
||||||
|
dailyTaskObj.lock = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
dailyTaskObj.lock = false
|
||||||
|
end
|
||||||
|
if dailyTaskObj.lock then
|
||||||
|
dailyTaskObj.redPoint = false
|
||||||
|
else
|
||||||
if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then
|
if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then
|
||||||
dailyTaskObj.redPoint = true
|
dailyTaskObj.redPoint = true
|
||||||
if dailyTaskObj.type == 1 then
|
if dailyTaskObj.type == 1 then
|
||||||
@ -56,14 +68,6 @@ function DailyTaskData:init(data)
|
|||||||
else
|
else
|
||||||
dailyTaskObj.redPoint = false
|
dailyTaskObj.redPoint = false
|
||||||
end
|
end
|
||||||
if v.bounty then
|
|
||||||
if self.isUnlockBountyDailyTask then
|
|
||||||
dailyTaskObj.lock = false
|
|
||||||
else
|
|
||||||
dailyTaskObj.lock = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not dailyTaskObj.lock then -- 只有解锁的任务才注册监听任务进度
|
|
||||||
local list = self.taskTypeMap[taskInfo.type]
|
local list = self.taskTypeMap[taskInfo.type]
|
||||||
if list == nil then
|
if list == nil then
|
||||||
list = {}
|
list = {}
|
||||||
@ -130,11 +134,11 @@ function DailyTaskData:refreshDailyTask(task)
|
|||||||
dailyTaskObj.type = dailyTaskInfo.type
|
dailyTaskObj.type = dailyTaskInfo.type
|
||||||
dailyTaskObj.reset = dailyTaskInfo.reset
|
dailyTaskObj.reset = dailyTaskInfo.reset
|
||||||
local redPoint = false
|
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
|
redPoint = true
|
||||||
end
|
end
|
||||||
local originTaskType = originTaskInfo.type
|
local originTaskType = originTaskInfo.type
|
||||||
if originTaskType ~= taskInfo.type then -- 任务类型变了
|
if not dailyTaskObj.lock and originTaskType ~= taskInfo.type then -- 任务类型变了
|
||||||
self:unregisterTask(id, originTaskType)
|
self:unregisterTask(id, originTaskType)
|
||||||
self:registerTask(dailyTaskObj, taskInfo.type)
|
self:registerTask(dailyTaskObj, taskInfo.type)
|
||||||
end
|
end
|
||||||
@ -307,6 +311,9 @@ function DailyTaskData:getIfCanClaimTask(task)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:addTaskProgress(task, taskType, count)
|
function DailyTaskData:addTaskProgress(task, taskType, count)
|
||||||
|
if task.lock then
|
||||||
|
return
|
||||||
|
end
|
||||||
local currProgress = task.progress
|
local currProgress = task.progress
|
||||||
if currProgress >= task.needProgress then
|
if currProgress >= task.needProgress then
|
||||||
return
|
return
|
||||||
@ -314,7 +321,7 @@ function DailyTaskData:addTaskProgress(task, taskType, count)
|
|||||||
local can = self:getIfCanClaimTask(task)
|
local can = self:getIfCanClaimTask(task)
|
||||||
task.progress = task.progress + count
|
task.progress = task.progress + count
|
||||||
if not can and self:getIfCanClaimTask(task) then
|
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
|
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)
|
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.COMPLETED_DALY_TASK)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user