Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
e02584c648
@ -1643,7 +1643,7 @@ function BattleUnitComp:takeDamageOrCure(atker, num, effectType, effectStatus, d
|
||||
self:onAttackOver()
|
||||
end
|
||||
|
||||
self.battleController:resetTimeSpeed()
|
||||
self.battleController:resetTimeSpeed(true)
|
||||
|
||||
self:changeState(UNIT_STATE.DEAD)
|
||||
elseif damage < 0 then
|
||||
|
||||
@ -456,7 +456,13 @@ function BattleController:addTimeSpeed()
|
||||
DataManager.BattleData:addTimeSpeed()
|
||||
end
|
||||
|
||||
function BattleController:resetTimeSpeed()
|
||||
function BattleController:resetTimeSpeed(isDeadReset)
|
||||
if isDeadReset then
|
||||
if self.skillSlowDownDuration then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
DataManager.BattleData:resetTimeSpeed()
|
||||
if self.skillSlowDownDuration then
|
||||
self.skillSlowDownDuration = nil
|
||||
|
||||
@ -91,6 +91,13 @@ arg4:buff生效对象,1己方,2敌方
|
||||
Example: add_buff atkp_add 5000 2 1]],
|
||||
type = "add_buff"
|
||||
},
|
||||
{
|
||||
title = "设置当前不可掉落元素",
|
||||
desc = [[设置当前不可掉落元素type:set_seal_element
|
||||
args:不掉落的元素类型
|
||||
Example: set_seal_element 1 2 3]],
|
||||
type = "set_seal_element"
|
||||
},
|
||||
}
|
||||
|
||||
return GMConst
|
||||
@ -95,6 +95,12 @@ function GMToolUI:sendMsg(gmCommand)
|
||||
return
|
||||
end
|
||||
self:dealAddBuffGm(args)
|
||||
elseif args.args[1] == "set_seal_element" then -- 特殊处理
|
||||
if not ModuleManager.BattleManager:isInBattle() then
|
||||
Logger.logHighlight("不在战斗中")
|
||||
return
|
||||
end
|
||||
self:dealSetSealElementGm(args.args)
|
||||
elseif args.args[1] == "time" then -- 特殊处理
|
||||
local args1 = {}
|
||||
args1.args = {}
|
||||
@ -133,4 +139,22 @@ function GMToolUI:dealAddBuffGm(args)
|
||||
self:closeUI()
|
||||
end
|
||||
|
||||
function GMToolUI:dealSetSealElementGm(args)
|
||||
local battleController = ModuleManager.BattleManager.battleController
|
||||
battleController.sealElementType = {}
|
||||
local index = 2
|
||||
while true do
|
||||
if not args[index] then
|
||||
break
|
||||
end
|
||||
local elementType = tonumber(args[index])
|
||||
if not elementType then
|
||||
break
|
||||
end
|
||||
battleController.sealElementType[elementType] = true
|
||||
index = index + 1
|
||||
end
|
||||
self:closeUI()
|
||||
end
|
||||
|
||||
return GMToolUI
|
||||
|
||||
@ -1,30 +1,10 @@
|
||||
local BoxOpenUI = class("BoxOpenUI", BaseUI)
|
||||
|
||||
local SUMMON_ICON_NAME = {
|
||||
[GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1",
|
||||
[GConst.SummonConst.SUMMON_TYPE.LV_2] = "shop_chest_2",
|
||||
[GConst.SummonConst.SUMMON_TYPE.LV_3] = "shop_chest_3"
|
||||
}
|
||||
local BOUNTY_ICON_NAME = {
|
||||
[GConst.ItemConst.ITEM_ID_BOX_LV_1] = "bounty_chest_1",
|
||||
[GConst.ItemConst.ITEM_ID_BOX_LV_2] = "bounty_chest_2",
|
||||
[GConst.ItemConst.ITEM_ID_BOX_LV_3] = "bounty_chest_5",
|
||||
[GConst.ItemConst.ITEM_ID_BOX_LV_4] = "bounty_chest_3",
|
||||
[GConst.ItemConst.ITEM_ID_BOX_LV_5] = "bounty_chest_4",
|
||||
}
|
||||
local SPINE_OPEN_TIME = 1.4
|
||||
|
||||
function BoxOpenUI:ctor(params)
|
||||
self.params = params or {} -- 将信息传递给下一个界面
|
||||
self.type = self.params and self.params.type
|
||||
self.iconName = "shop_chest_1" -- 默认图标
|
||||
self.iconAtlas = GConst.ATLAS_PATH.SHOP
|
||||
if self.type == GConst.ShopConst.BOX_REWARD_TYPE.SUMMON then
|
||||
self.iconAtlas = GConst.ATLAS_PATH.SHOP
|
||||
self.iconName = SUMMON_ICON_NAME[self.params.params or GConst.SummonConst.SUMMON_TYPE.LV_1]
|
||||
elseif self.type == GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY then
|
||||
self.iconAtlas = GConst.ATLAS_PATH.BOUNTY
|
||||
self.iconName = BOUNTY_ICON_NAME[self.params.params or GConst.ItemConst.ITEM_ID_BOX_KEY_LV_1]
|
||||
end
|
||||
self.index = self.params.params
|
||||
end
|
||||
|
||||
function BoxOpenUI:isFullScreen()
|
||||
@ -37,25 +17,32 @@ end
|
||||
|
||||
function BoxOpenUI:onLoadRootComplete()
|
||||
self.uiMap = self.root:genAllChildren()
|
||||
|
||||
self.bg = self.uiMap["box_open_ui.bg"]
|
||||
self.boxImg = self.uiMap["box_open_ui.box"]
|
||||
self.openBtn = self.uiMap["box_open_ui.open_btn"]
|
||||
self.btnText = self.uiMap["box_open_ui.open_btn.text"]
|
||||
|
||||
self.boxImg:setSprite(self.iconAtlas, self.iconName)
|
||||
self.btnText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_7)) -- 立即打开
|
||||
|
||||
self.openBtn:addClickListener(function()
|
||||
ModuleManager.ShopManager:showBoxRewardUI(self.params)
|
||||
end)
|
||||
|
||||
self.summonSpineList = {}
|
||||
for i = 1, 3 do
|
||||
table.insert(self.summonSpineList, self.uiMap["box_open_ui.ui_spine_obj_" .. i])
|
||||
self.summonSpineList[i]:setVisible(false)
|
||||
end
|
||||
-- 奖励界面打开时 关闭此界面
|
||||
self:addEventListener(EventManager.CUSTOM_EVENT.CLOSE_BOX_OPEN_UI, function()
|
||||
self:closeUI()
|
||||
end)
|
||||
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CLOSE_BOX_HERO_UI)
|
||||
-- 播放spine表现 播放完毕后打开奖励UI
|
||||
local spineObj
|
||||
if self.type == GConst.ShopConst.BOX_REWARD_TYPE.SUMMON then
|
||||
spineObj = self.summonSpineList[self.index]
|
||||
elseif self.type == GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY then
|
||||
-- TODOJ
|
||||
end
|
||||
if not spineObj then
|
||||
spineObj = self.summonSpineList[1]
|
||||
end
|
||||
spineObj:setVisible(true)
|
||||
spineObj:playAnim("born", false, true)
|
||||
self:performWithDelayGlobal(function()
|
||||
ModuleManager.ShopManager:showBoxRewardUI(self.params)
|
||||
end, SPINE_OPEN_TIME)
|
||||
end
|
||||
|
||||
return BoxOpenUI
|
||||
Loading…
x
Reference in New Issue
Block a user