灵兽羁绊,御兽斋红点提交
parent
d3b53a0eba
commit
87b9c2dd0d
|
|
@ -229,28 +229,7 @@ function this.GetPokemonRefreshFetter(_sid)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
pokemonGet[_sid] = _sid
|
pokemonGet[_sid] = _sid
|
||||||
local allActivityFetterIds = {}
|
CheckRedPointStatus(RedPointType.Pokemon_Fetter)
|
||||||
for key, configInfo in ConfigPairs(ConfigManager.GetConfig(ConfigName.SpiritAnimalBook)) do
|
|
||||||
if pokemonFetter[key] then--已有的羁绊去掉
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local stateNum = 0
|
|
||||||
for i = 1, #configInfo.Teamers do
|
|
||||||
if configInfo.Teamers[i] == _sid then
|
|
||||||
stateNum = stateNum + 1
|
|
||||||
else
|
|
||||||
if pokemonGet[configInfo.Teamers[i]] then
|
|
||||||
stateNum = stateNum + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if stateNum >= #configInfo.Teamers then
|
|
||||||
table.insert(allActivityFetterIds,configInfo)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if #allActivityFetterIds > 0 then
|
|
||||||
--CheckRedPointStatus()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--获取所有的灵兽种类
|
--获取所有的灵兽种类
|
||||||
|
|
@ -518,11 +497,43 @@ end
|
||||||
|
|
||||||
--可激活的羁绊
|
--可激活的羁绊
|
||||||
function this.RefreshPokemonFetterRedPoint()
|
function this.RefreshPokemonFetterRedPoint()
|
||||||
|
local curGetAllPokemonFetter = this.GetAllPokemonFetterDatas()
|
||||||
|
local curPokemonSidList = this.GetAllPokemonGetDatas()
|
||||||
|
for k,v in ipairs(curGetAllPokemonFetter) do
|
||||||
|
local config = spiritAnimalBook[v.id]
|
||||||
|
local isCompound = this:IsCompound(config.Teamers,curPokemonSidList)
|
||||||
|
if v.enabled == 0 and isCompound then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
function this.IsCompound(Teamers,curPokemonSidList)
|
||||||
|
local isCompound = true
|
||||||
|
for k,v in ipairs(Teamers) do
|
||||||
|
if curPokemonSidList[v] == nil then
|
||||||
|
if isCompound then
|
||||||
|
isCompound = false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return isCompound
|
||||||
end
|
end
|
||||||
|
|
||||||
--免费抽卡次数
|
--免费抽卡次数
|
||||||
function this.RefreshPokemonRecruitRedPoint()
|
function this.RefreshPokemonRecruitRedPoint()
|
||||||
|
--获取免费次数
|
||||||
|
local currLottery= ConfigManager.GetConfigData(ConfigName.LotterySetting,RecruitType.LingShowSingle)
|
||||||
|
local freeTimesId=currLottery.FreeTimes
|
||||||
|
local freeTime = 0
|
||||||
|
if freeTimesId>0 then
|
||||||
|
freeTime= PrivilegeManager.GetPrivilegeRemainValue(freeTimesId)
|
||||||
|
end
|
||||||
|
local isFree = freeTime and freeTime >= 1
|
||||||
|
if isFree then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return this
|
return this
|
||||||
|
|
@ -49,6 +49,7 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum)
|
||||||
CheckRedPointStatus(RedPointType.Recruit_Normal)
|
CheckRedPointStatus(RedPointType.Recruit_Normal)
|
||||||
CheckRedPointStatus(RedPointType.TimeLimited)
|
CheckRedPointStatus(RedPointType.TimeLimited)
|
||||||
CheckRedPointStatus(RedPointType.QianKunBox)
|
CheckRedPointStatus(RedPointType.QianKunBox)
|
||||||
|
CheckRedPointStatus(RedPointType.Pokemon_Recruit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if func then
|
if func then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue