侧边栏增加前往优惠商城的按钮,修改战斗内技能链接显示bug
This commit is contained in:
parent
2b0d5b7596
commit
99a26d953d
@ -130,7 +130,6 @@ function BattleBoardTouchHelper:onLinkEnter(entity, posId, isVirtual)
|
|||||||
skillPosId = posId
|
skillPosId = posId
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self.battleUI:showBoardMask(maskElementType, skillPosId)
|
|
||||||
|
|
||||||
self.battleData:insertGridSequence(posId, self.battleController:snapshotBoard(), isVirtual)
|
self.battleData:insertGridSequence(posId, self.battleController:snapshotBoard(), isVirtual)
|
||||||
if lastEntity:getNeedChangePos() and not entity:getNeedChangePos() then -- 需要移动到队列末尾
|
if lastEntity:getNeedChangePos() and not entity:getNeedChangePos() then -- 需要移动到队列末尾
|
||||||
@ -138,6 +137,7 @@ function BattleBoardTouchHelper:onLinkEnter(entity, posId, isVirtual)
|
|||||||
local skillId = entity:getSkillId()
|
local skillId = entity:getSkillId()
|
||||||
self.battleController:setGridSkillId(lastPosId, skillId)
|
self.battleController:setGridSkillId(lastPosId, skillId)
|
||||||
self.battleController:setGridSkillId(posId, lastSkillId)
|
self.battleController:setGridSkillId(posId, lastSkillId)
|
||||||
|
skillPosId = posId
|
||||||
end
|
end
|
||||||
|
|
||||||
local newElementType = elementType or lastElementType
|
local newElementType = elementType or lastElementType
|
||||||
@ -145,6 +145,7 @@ function BattleBoardTouchHelper:onLinkEnter(entity, posId, isVirtual)
|
|||||||
entity:setElementType(newElementType)
|
entity:setElementType(newElementType)
|
||||||
lastEntity:setElementType(newElementType)
|
lastEntity:setElementType(newElementType)
|
||||||
end
|
end
|
||||||
|
self.battleUI:showBoardMask(maskElementType, skillPosId)
|
||||||
|
|
||||||
entity:addLinkSkillCount()
|
entity:addLinkSkillCount()
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,8 @@ BattleFormula.calculateFormula = {
|
|||||||
local matchType = unitComp.unitEntity:getMatchType()
|
local matchType = unitComp.unitEntity:getMatchType()
|
||||||
local result = unitComp.unitEntity:getAtk() * buff:getEffectNum() // DEFAULT_FACTOR *
|
local result = unitComp.unitEntity:getAtk() * buff:getEffectNum() // DEFAULT_FACTOR *
|
||||||
(DEFAULT_FACTOR + unitComp.unitEntity:getDmgAddition() - unitComp.unitEntity:getDmgDec() + targetUnit.unitEntity:getWeakness(matchType) - targetUnit.unitEntity:getDecDmg(matchType)) // DEFAULT_FACTOR
|
(DEFAULT_FACTOR + unitComp.unitEntity:getDmgAddition() - unitComp.unitEntity:getDmgDec() + targetUnit.unitEntity:getWeakness(matchType) - targetUnit.unitEntity:getDecDmg(matchType)) // DEFAULT_FACTOR
|
||||||
|
-- 最终伤害
|
||||||
|
result = result * (DEFAULT_FACTOR - unitComp.unitEntity:getEndDmgDecAll() + unitComp.unitEntity:getEndDmgAddtionAll()) // DEFAULT_FACTOR
|
||||||
return result, 0
|
return result, 0
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@ MainCityConst.RIGHT_SIDE_BARS = {
|
|||||||
-- "app/ui/main_city/cell/side_bar_first_recharge_cell", 已作废
|
-- "app/ui/main_city/cell/side_bar_first_recharge_cell", 已作废
|
||||||
"app/ui/main_city/cell/side_bar_introduct_gift_cell",
|
"app/ui/main_city/cell/side_bar_introduct_gift_cell",
|
||||||
"app/ui/main_city/cell/side_bar_beginner_gift_cell",
|
"app/ui/main_city/cell/side_bar_beginner_gift_cell",
|
||||||
|
"app/ui/main_city/cell/side_bar_discount_cell",
|
||||||
"app/ui/main_city/cell/side_bar_grow_up_gift_cell",
|
"app/ui/main_city/cell/side_bar_grow_up_gift_cell",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
63
lua/app/ui/main_city/cell/side_bar_discount_cell.lua
Normal file
63
lua/app/ui/main_city/cell/side_bar_discount_cell.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
|
||||||
|
local SideBarDiscountCell = class("SideBarDiscountCell", SideBarBaseCellComp)
|
||||||
|
|
||||||
|
function SideBarDiscountCell:getModuleKey()
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarDiscountCell:getHasPurchase()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarDiscountCell:getIsOpen()
|
||||||
|
-- 同ShopComp:refreshDiscountPage() 一起修改
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, false) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 章节礼包
|
||||||
|
if #DataManager.ShopData:getActChapterStoreCanBuyActIds() > 0 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 新手礼包
|
||||||
|
if not DataManager.ShopData:getBeginnerGiftHasBuy() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 竞技场
|
||||||
|
if DataManager.ArenaData:getGiftId() ~= nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 助力礼包
|
||||||
|
if #DataManager.ShopData:getLevelUpGiftActIds() > 0 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 成长礼包
|
||||||
|
if DataManager.ShopData:hasGrowUpGift() then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 金币
|
||||||
|
if DataManager.ShopData:getValidCoinGiftId() ~= nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarDiscountCell:getSpineName()
|
||||||
|
return "ui_main_btn_hang"
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarDiscountCell:onClick()
|
||||||
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_SHOP, {page = GConst.ShopConst.PAGE_TYPE.DISCOUNT})
|
||||||
|
end
|
||||||
|
|
||||||
|
function SideBarDiscountCell:getIsShowRedPoint()
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return SideBarDiscountCell
|
||||||
10
lua/app/ui/main_city/cell/side_bar_discount_cell.lua.meta
Normal file
10
lua/app/ui/main_city/cell/side_bar_discount_cell.lua.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 61356e1192048c44aaa97e5f210a046e
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||||
@ -277,6 +277,7 @@ function ShopComp:refreshTime()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ShopComp:refreshDiscountPage()
|
function ShopComp:refreshDiscountPage()
|
||||||
|
-- 同SideBarDiscountCell:getIsOpen()一起修改
|
||||||
local y = 0
|
local y = 0
|
||||||
local cellHeight = 0
|
local cellHeight = 0
|
||||||
-- 章节
|
-- 章节
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user