【灵兽系统】 修改预设加载
parent
37259287a4
commit
35f64de903
|
|
@ -1693,11 +1693,10 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
|||
-- end
|
||||
-- end
|
||||
--end
|
||||
|
||||
--灵兽
|
||||
-- local pokemonAddPro = PokemonManager.GetAllPokemonFetterAddPros()
|
||||
--if pokemonAddPro and LengthOfTable(pokemonAddPro) > 0 then
|
||||
-- for i, v in pairs(pokemonAddPro) do
|
||||
--灵兽 现在只在编队战力中计算 因为单个英雄可以上多个编队
|
||||
-- local pokemonFormationAllHeroProVal = PokemonManager.GetPokemonFormationTeamAddPro(heroAllNum)
|
||||
--if pokemonFormationAllHeroProVal and LengthOfTable(pokemonFormationAllHeroProVal) > 0 then
|
||||
-- for i, v in pairs(pokemonFormationAllHeroProVal) do
|
||||
-- if v > 0 then
|
||||
-- LogError("灵兽加成 "..i.." "..v)
|
||||
-- end
|
||||
|
|
@ -1737,6 +1736,7 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
|||
this.DoubleTableCompound(allHeroProVal, heroSkillAllHeroProVal)
|
||||
this.DoubleTableCompound(allHeroProVal, teamAddPro)
|
||||
this.DoubleTableCompound(allHeroProVal, pokemonFetterAddPro)
|
||||
-- this.DoubleTableCompound(allHeroProVal, pokemonFormationAllHeroProVal)
|
||||
end
|
||||
-- for index, value in pairs(allHeroProVal) do
|
||||
-- if value > 0 then
|
||||
|
|
|
|||
|
|
@ -195,7 +195,23 @@ function PokemonInfoPanel:OnOpen(_curPokemonData, _pokemonDatas)
|
|||
curPokemonData, pokemonDatas = _curPokemonData, _pokemonDatas
|
||||
curIndex = 1
|
||||
end
|
||||
|
||||
function this.RefreshShow(_curPokemonData, _pokemonDatas)
|
||||
if this.leftLiveObj and leftPokemonData then
|
||||
poolManager:UnLoadLive(leftPokemonData.live, this.leftLiveObj)
|
||||
this.leftLiveObj = nil
|
||||
end
|
||||
if this.rightLiveObj and rightPokemonData then
|
||||
poolManager:UnLoadLive(rightPokemonData.live, this.rightLiveObj)
|
||||
this.rightLiveObj = nil
|
||||
end
|
||||
if this.curLiveObj and curPokemonData then
|
||||
poolManager:UnLoadLive(curPokemonData.live, this.curLiveObj)
|
||||
this.curLiveObj = nil
|
||||
end
|
||||
curPokemonData, pokemonDatas = _curPokemonData, _pokemonDatas
|
||||
this.OnShowData()
|
||||
this.OnShowRedPoint()
|
||||
end
|
||||
function PokemonInfoPanel:OnSortingOrderChange()
|
||||
for i = 1, #this.contents do
|
||||
this.contents[i].view:OnSortingOrderChange(self.sortingOrder)
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ function PokemonMainPanel:OnDestroy()
|
|||
for key, value in pairs(live2dList) do
|
||||
poolManager:UnLoadLive(live2dList[key].name, live2dList[key].go, PoolManager.AssetType.GameObject)
|
||||
live2dList[key] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return PokemonMainPanel
|
||||
|
|
@ -403,7 +403,6 @@ end
|
|||
function this.RefreshPokemonUpLvRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
if not isOpen then
|
||||
LogPink("灵兽升级红点 false")
|
||||
return false
|
||||
end
|
||||
for i = 1, #pokemonFormation do
|
||||
|
|
@ -412,13 +411,11 @@ function this.RefreshPokemonUpLvRedPoint()
|
|||
if curPokemonData then
|
||||
local singlePokemonPoint = this.GetSinglePokemonUpLvRedPoint(curPokemonData)
|
||||
if singlePokemonPoint then
|
||||
LogPink("灵兽升级红点 true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
LogPink("灵兽升级红点 false")
|
||||
return false
|
||||
end
|
||||
--上阵灵兽升级红点2
|
||||
|
|
@ -434,7 +431,6 @@ function this.GetSinglePokemonUpLvRedPoint(curPokemonData)
|
|||
end
|
||||
end
|
||||
if canUpLv then
|
||||
LogPink("灵兽升级红点 true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
@ -444,7 +440,6 @@ end
|
|||
function this.RefreshPokemonUpStarRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
if not isOpen then
|
||||
LogPink("灵兽升星红点 false")
|
||||
return false
|
||||
end
|
||||
for i = 1, #pokemonFormation do
|
||||
|
|
@ -452,12 +447,10 @@ function this.RefreshPokemonUpStarRedPoint()
|
|||
local curPokemonData = pokemons[pokemonFormation[i].pokemonId]
|
||||
local singlePokemonPoint = this.GetSinglePokemonUpStarRedPoint(curPokemonData)
|
||||
if singlePokemonPoint then
|
||||
LogPink("灵兽升星红点 true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
LogPink("灵兽升星红点 false")
|
||||
return false
|
||||
end
|
||||
--上阵灵兽升星红点2
|
||||
|
|
@ -487,7 +480,6 @@ function this.GetSinglePokemonUpStarRedPoint(curPokemonData)
|
|||
end
|
||||
end
|
||||
if isCanUpStar then
|
||||
LogPink("灵兽升星红点 true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
|
@ -498,12 +490,10 @@ end
|
|||
function this.RefreshPokemonCanUpZhenRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
if not isOpen then
|
||||
LogPink("上阵灵兽红点 false")
|
||||
return false
|
||||
end
|
||||
local canPokemonList = this.GetCanUpZhenPokemonDatas()
|
||||
if #canPokemonList <= 0 then
|
||||
LogPink("灵兽上阵灵兽红点 false")
|
||||
return false
|
||||
end
|
||||
local pokemonPosLocks = ConfigManager.GetConfigData(ConfigName.SpiritAnimalSetting,1).BlockUnlockLevel
|
||||
|
|
@ -518,16 +508,18 @@ function this.RefreshPokemonCanUpZhenRedPoint()
|
|||
state = 2
|
||||
end
|
||||
if state == 3 and #canPokemonList > 0 then
|
||||
LogPink("灵兽上阵灵兽红点 true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
LogPink("灵兽上阵灵兽红点 false")
|
||||
return false
|
||||
end
|
||||
|
||||
--可激活的羁绊
|
||||
function this.RefreshPokemonFetterRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
if not isOpen then
|
||||
return false
|
||||
end
|
||||
local curGetAllPokemonFetter = this.GetAllPokemonFetterDatas()
|
||||
local curPokemonSidList = this.GetAllPokemonGetDatas()
|
||||
for k,v in ipairs(curGetAllPokemonFetter) do
|
||||
|
|
@ -553,6 +545,10 @@ function this.IsCompound(Teamers,curPokemonSidList)
|
|||
end
|
||||
--免费抽卡次数
|
||||
function this.RefreshPokemonRecruitRedPoint()
|
||||
local isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.POKEMON)
|
||||
if not isOpen then
|
||||
return false
|
||||
end
|
||||
--获取免费次数
|
||||
local currLottery= ConfigManager.GetConfigData(ConfigName.LotterySetting,RecruitType.LingShowSingle)
|
||||
local freeTimesId=currLottery.FreeTimes
|
||||
|
|
|
|||
|
|
@ -92,10 +92,13 @@ function this.SingleItemDataShow(_go,_itemData)
|
|||
PokemonManager.RefreshPokemonFormation(allPokemonFormation)
|
||||
local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower)
|
||||
parent:ClosePanel()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonUpZhenRefresh)
|
||||
FormationManager.CheckHeroIdExist()
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
|
||||
local pokemonInfoPanem = UIManager.GetOpenPanel(UIName.PokemonInfoPanel)
|
||||
if pokemonInfoPanem then
|
||||
pokemonInfoPanem.RefreshShow(_itemData,PokemonManager.GetPokemonDatas())
|
||||
end
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue