灵兽羁绊,御兽斋红点提交

jiaoyangna 2020-10-29 16:17:09 +08:00
parent d3b53a0eba
commit 87b9c2dd0d
2 changed files with 39 additions and 27 deletions

View File

@ -229,28 +229,7 @@ function this.GetPokemonRefreshFetter(_sid)
return
end
pokemonGet[_sid] = _sid
local allActivityFetterIds = {}
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
CheckRedPointStatus(RedPointType.Pokemon_Fetter)
end
--获取所有的灵兽种类
@ -518,11 +497,43 @@ end
--可激活的羁绊
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
--免费抽卡次数
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
return this

View File

@ -49,6 +49,7 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum)
CheckRedPointStatus(RedPointType.Recruit_Normal)
CheckRedPointStatus(RedPointType.TimeLimited)
CheckRedPointStatus(RedPointType.QianKunBox)
CheckRedPointStatus(RedPointType.Pokemon_Recruit)
end
end
if func then