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