miduo_client/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua

856 lines
48 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
--- 红点系统使用方法:
--- 1、注册
--- 在 RedPointType 中注册相应的红点枚举
--- 2、设置红点关系
--- 在 RedPotManager.InitRedPointAllRelate 设置红点的层级关系(树结构)
--- 如: RPData:SetParent(rpType1, rpType2)
--- 参数: rpType1 子红点
--- rpType2 父红点
--- 3、注册红点的检测方法
--- 在 RedPotManager.RegisterRedCheckFunc 注册红点的检测方法,要求方法返回是否显示红点,显示返回 true
--- 如RPData:AddCheckFunc(rpType, func, funcType)
--- 参数: rpType 红点类型
--- func 红点检测方法(返回 true 显示false 不显示)
--- funcType 红点对应的功能解锁类型(用于判断红点对应的功能是否已经解锁, 可为空,空则不判断)
--- *****注:只有没有子红点的红点才能注册红点检测方法,父红点的状态由所有的子红点决定*****
---
--- 4、注册红点对象
--- 使用全局方法 BindRedPointObject 进行红点枚举与红点对象的绑定
--- 使用全局方法 ClearRedPointObject 清楚红点枚举上绑定的所有物体(*******请在界面关闭时务必清理绑定的红点)
---
--- 5、刷新红点状态
--- 使用全局方法 CheckRedPointStatus 主动刷新红点的状态,在红点状态可能改变时调用此方法进行红点状态检测,
--- 参数为无子红点的红点枚举,此方法会自动检测红点状态,并向父级递归设置父级的状态
---
--- *6、强制设置红点状态此方法为预留方法会使红点状态脱离管理谨慎使用
--- 使用全局方法 ChangeRedPointStatus 强制设置红点状态,并向父级递归设置状态
---
--- 7、服务器红点
--- 1> 与服务器约定并按第1、2步注册红点枚举、设置红点关系服务器会在登录和需要时将红点推送到前端并自动设置红点状态。
--- 2> 在下面 ServerRedType 中声明服务器红点枚举。
--- 3> 服务器红点无法注册检测方法(服务器和本地检测都需要的红点,请拆分为两个子红点),但可以注册功能解锁类型
--- 4> 按第4步注册红点绑定的物体
--- 5> 服务器红点无法刷新,在无需显示改红点时,请调用全局方法 ResetServerRedPointStatus 将服务器红点状态重置为隐藏状态。
---
---
require "Message/MessageTypeProto_pb"
require "Message/PlayerInfoProto_pb"
RedpotManager = {}
local this = RedpotManager
local RPData = require("Modules/Player/RedPointData")
local BindObjs = {}
-- 声明服务器红点类型
local ServerRedType = {
RedPointType.Mail_Server,
RedPointType.SecretTer_Boss,
RedPointType.Arena_Record,
RedPointType.Guild_Apply,
}
function this.Initialize()
-- 清除绑定物体
BindObjs = {}
-- 初始化数据
this.SetServerRedPointData()
this.InitRedPointAllRelate()
this.RegisterRedCheckFunc()
-- 监听功能开启,结束事件
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.RefreshRedpotByFunctionOpenType)
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionClose, this.RefreshRedpotByFunctionOpenType)
this.isDirty = false
this.refreshList = {}
this.LateUpdateTime = Time.realtimeSinceStartup
end
-- 红点事件分帧刷新
function this.LateUpdate()
if this.isDirty and Time.realtimeSinceStartup - this.LateUpdateTime > 0.1 then
if this.refreshList[1] then
local rpType = table.remove(this.refreshList, 1)
-- 判断是否需要刷新红点显示
if RPData:CheckRedPoint(rpType) then
this.RefreshRedObjectStatus(rpType)
end
end
-- 没有红点要刷新
if not this.refreshList[1] then
this.isDirty = false
end
end
end
-- 根据功能
function this.RefreshRedpotByFunctionOpenType(openType)
-- 本地红点
local checkList = RPData:GetCheckList()
for rpType, checkData in pairs(checkList) do
if checkData.openType == openType then
this.CheckRedPointStatus(rpType)
end
end
end
-- 初始化红点关系
function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.OrdinaryExplore, RedPointType.ExploreMain)--大闹天宫
RPData:SetParent(RedPointType.HeroExplore, RedPointType.ExploreMain)--日常副本
RPData:SetParent(RedPointType.EpicExplore, RedPointType.ExploreMain)--心魔试炼
RPData:SetParent(RedPointType.FightLevel, RedPointType.ExploreMain)--山河社稷图
RPData:SetParent(RedPointType.challengeCopy, RedPointType.ExploreMain)--挑战副本
RPData:SetParent(RedPointType.LegendExplore, RedPointType.Guild)--车迟斗法
RPData:SetParent(RedPointType.HeartDemon,RedPointType.EpicExplore)
RPData:SetParent(RedPointType.PersonTrail,RedPointType.EpicExplore)
RPData:SetParent(RedPointType.BuddishTrail,RedPointType.EpicExplore)
RPData:SetParent(RedPointType.DemonTrail,RedPointType.EpicExplore)
RPData:SetParent(RedPointType.TaoistTrail,RedPointType.EpicExplore)
RPData:SetParent(RedPointType.People_Mirror, RedPointType.Vientiane)
RPData:SetParent(RedPointType.Trial, RedPointType.Vientiane)
-- RPData:SetParent(RedPointType.TrialReward, RedPointType.Trial)
RPData:SetParent(RedPointType.EndLess, RedPointType.Vientiane)
RPData:SetParent(RedPointType.EndlessPanel, RedPointType.EndLess)
RPData:SetParent(RedPointType.LuckyCat_GetReward, RedPointType.LuckyCat)
-- 充值
--24暂时关闭放开这里就行
-- RPData:SetParent(RedPointType.Shop_Page_Recharge, RedPointType.Recharge)
RPData:SetParent(RedPointType.VIP_SHOP_DETAIL, RedPointType.Shop_Page_Recharge)
-- RPData:SetParent(RedPointType.DailyGift, RedPointType.Recharge)
RPData:SetParent(RedPointType.GrowthPackage, RedPointType.Recharge)--成长礼包
-- 主界面商店
RPData:SetParent(RedPointType.Shop_Page_General, RedPointType.Shop)
RPData:SetParent(RedPointType.Shop_Page_Coin, RedPointType.Shop)
RPData:SetParent(RedPointType.Shop_Page_Play, RedPointType.Shop)
RPData:SetParent(RedPointType.Shop_Page_Roam, RedPointType.Shop)
-- === 商店小页签
RPData:SetParent(RedPointType.Shop_Tab_General, RedPointType.Shop_Page_General)
RPData:SetParent(RedPointType.Shop_Tab_Soul, RedPointType.Shop_Page_Coin)
RPData:SetParent(RedPointType.Shop_Tab_Secret, RedPointType.Shop_Page_Coin)
RPData:SetParent(RedPointType.Shop_Tab_Arena, RedPointType.Shop_Page_Play)
RPData:SetParent(RedPointType.Shop_Tab_Guild, RedPointType.Shop_Page_Play)
RPData:SetParent(RedPointType.Shop_Tab_Roam, RedPointType.Shop_Page_Roam)
RPData:SetParent(RedPointType.Shop_Tab_God, RedPointType.Shop_Page_Coin)
RPData:SetParent(RedPointType.Shop_God_Refresh, RedPointType.Shop_Tab_God)
-- ====== 商店功能
RPData:SetParent(RedPointType.Shop_General_Check, RedPointType.Shop_Tab_General)
RPData:SetParent(RedPointType.Shop_General_Refresh, RedPointType.Shop_Tab_General)
RPData:SetParent(RedPointType.Shop_Soul_Refresh, RedPointType.Shop_Tab_Soul)
RPData:SetParent(RedPointType.Shop_Secret_Check, RedPointType.Shop_Tab_Secret)
RPData:SetParent(RedPointType.Shop_Arena_Check, RedPointType.Shop_Tab_Arena)
RPData:SetParent(RedPointType.Shop_Guild_Check, RedPointType.Shop_Tab_Guild)
RPData:SetParent(RedPointType.Shop_Roam_Check, RedPointType.Shop_Tab_Roam)
--竞技场
RPData:SetParent(RedPointType.Arena_Type_Normal, RedPointType.Arena)
RPData:SetParent(RedPointType.Arena_Record, RedPointType.Arena_Type_Normal)
-- RPData:SetParent(RedPointType.Arena_Shop, RedPointType.Arena_Type_Normal)
RPData:SetParent(RedPointType.Arena_Reward, RedPointType.Arena_Type_Normal)
RPData:SetParent(RedPointType.Arena_Free, RedPointType.Arena_Type_Normal)
--工坊
RPData:SetParent(RedPointType.Refining_Weapon, RedPointType.Refining)
RPData:SetParent(RedPointType.Refining_Armor, RedPointType.Refining)
-- 邮件
RPData:SetParent(RedPointType.Mail_Local, RedPointType.Mail)
RPData:SetParent(RedPointType.Mail_Server, RedPointType.Mail)
-- 秘境
RPData:SetParent(RedPointType.CourtesyDress_Online, RedPointType.SecretTer)
RPData:SetParent(RedPointType.CourtesyDress_Chapter, RedPointType.SecretTer)
RPData:SetParent(RedPointType.SecretTer_FindTreasure, RedPointType.SecretTer)
RPData:SetParent(RedPointType.DailyTask, RedPointType.DailyTaskMain)
RPData:SetParent(RedPointType.QinglongSerectTreasure, RedPointType.DailyTaskMain)
RPData:SetParent(RedPointType.QinglongSerectTreasureTrail, RedPointType.DailyTaskMain)
-- RPData:SetParent(RedPointType.FightLevel, RedPointType.SecretTer)
RPData:SetParent(RedPointType.JourneyWithWind, RedPointType.SecretTer)
-- RPData:SetParent(RedPointType.QinglongSerectTreasure, RedPointType.TreasureOfSl)
-- RPData:SetParent(RedPointType.QinglongSerectTreasureTrail, RedPointType.TreasureOfSl)
RPData:SetParent(RedPointType.SecretTer_MaxBoxReward, RedPointType.SecretTer)
RPData:SetParent(RedPointType.SecretTer_HaveFreeTime, RedPointType.SecretTer)
RPData:SetParent(RedPointType.SecretTer_IsCanFight, RedPointType.SecretTer)
RPData:SetParent(RedPointType.numberGame, RedPointType.SecretTer)
--逍遥游
RPData:SetParent(RedPointType.XiaoYaoYouRedPoint, RedPointType.SecretTer)
-- 外敌
RPData:SetParent(RedPointType.SecretTer_Boss, RedPointType.Alien)
RPData:SetParent(RedPointType.SecretTer_CallAlianInvasionTime, RedPointType.Alien)
-- --剧情副本
-- RPData:SetParent(RedPointType.NormalExplore_OpenMap, RedPointType.OrdinaryExplore)
-- RPData:SetParent(RedPointType.NormalExplore_GetStarReward, RedPointType.OrdinaryExplore)
-- --试炼副本
-- RPData:SetParent(RedPointType.EpicExplore_OpenCarbon, RedPointType.EpicExplore)
-- RPData:SetParent(RedPointType.EpicExplore_GetReward, RedPointType.EpicExplore)
RPData:SetParent(RedPointType.EpicExplore_LevleReward, RedPointType.HeartDemon)
RPData:SetParent(RedPointType.EpicExplore_MoppingUp, RedPointType.HeartDemon)
-- --精英副本
-- RPData:SetParent(RedPointType.HeroExplore_OpenMap, RedPointType.HeroExplore)
-- RPData:SetParent(RedPointType.HeroExplore_Feats, RedPointType.HeroExplore)
--秘盒红点
RPData:SetParent(RedPointType.SecretBox_Red1, RedPointType.SecretBox)
--角色招募红点
-- RPData:SetParent(RedPointType.Recruit_Red, RedPointType.Recruit)
-- --运营红点
RPData:SetParent(RedPointType.GrowthGift, RedPointType.Operating)
-- RPData:SetParent(RedPointType.CumulativeSignIn, RedPointType.Operating)
-- RPData:SetParent(RedPointType.WeekGiftPage, RedPointType.Operating)
-- RPData:SetParent(RedPointType.MonthGiftPage, RedPointType.Operating)
-- --RPData:SetParent(RedPointType.MonthCard, RedPointType.Operating)
-- 好友红点
RPData:SetParent(RedPointType.Friend_GetAllReward, RedPointType.Friend_Reward)
RPData:SetParent(RedPointType.Friend_Reward, RedPointType.Friend)
RPData:SetParent(RedPointType.Friend_Application, RedPointType.Friend)
-- 设置界面红点
RPData:SetParent(RedPointType.Setting_Head, RedPointType.Setting)
RPData:SetParent(RedPointType.Setting_Ride, RedPointType.Setting)
RPData:SetParent(RedPointType.Setting_Title, RedPointType.Setting)
-- 头像界面红点
RPData:SetParent(RedPointType.HeadChange_Frame, RedPointType.Setting_Head)
RPData:SetParent(RedPointType.HeadChange_Head, RedPointType.Setting_Head)
--限时活动(达人)
-- RPData:SetParent(RedPointType.Expert_FastExplore, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_AreaExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_UpStarExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_EquipExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_GoldExper, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_FightExper, RedPointType.Expert)
--RPData:SetParent(RedPointType.Expert_EnergyExper, RedPointType.Expert)
--RPData:SetParent(RedPointType.Expert_AccumulativeRecharge, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_Talisman, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_SoulPrint, RedPointType.Expert)
--RPData:SetParent(RedPointType.LuckyCat, RedPointType.Expert)
--RPData:SetParent(RedPointType.Expert_WeekCard, RedPointType.Expert)
-- RPData:SetParent(RedPointType.HERO_STAR_GIFT, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_FindTreasure, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_LuckyTurn, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_Recruit, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_SecretBox, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_UpLv, RedPointType.Expert)
-- RPData:SetParent(RedPointType.ContinuityRecharge, RedPointType.Expert)
RPData:SetParent(RedPointType.Expert_Expedition, RedPointType.Expert)
RPData:SetParent(RedPointType.DynamicActRecharge, RedPointType.Expert)
-- RPData:SetParent(RedPointType.Expert_Slhj, RedPointType.Expert)
--战力排行
RPData:SetParent(RedPointType.WarPowerSort_Sort, RedPointType.WarPowerSort)
--背包
RPData:SetParent(RedPointType.Bag_HeroDebris, RedPointType.Bag)
RPData:SetParent(RedPointType.Bag_BoxAndBlueprint, RedPointType.Bag)
-- 公会
RPData:SetParent(RedPointType.Guild_House, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_House_Apply, RedPointType.Guild_House)
RPData:SetParent(RedPointType.Guild_Apply, RedPointType.Guild_House_Apply)
RPData:SetParent(RedPointType.Guild_Shop, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_Boss, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_RedPacket, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_Fete, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_Aid, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_AidMy, RedPointType.Guild_Aid)
RPData:SetParent(RedPointType.Guild_AidGuild, RedPointType.Guild_Aid)
RPData:SetParent(RedPointType.Guild_AidBox, RedPointType.Guild_Aid)
RPData:SetParent(RedPointType.Guild_Transcript, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_Skill, RedPointType.Guild)
RPData:SetParent(RedPointType.Guild_DeathPos, RedPointType.Guild)
RPData:SetParent(RedPointType.Guid_SendPackage, RedPointType.Guild_RedPacket)
RPData:SetParent(RedPointType.Guid_GetPackage, RedPointType.Guild_RedPacket)
RPData:SetParent(RedPointType.Chat_Friend, RedPointType.Chat)
-- 东海寻仙
-- RPData:SetParent(RedPointType.FindFairy_OneView, RedPointType.FindFairy)
-- RPData:SetParent(RedPointType.FindFairy_ThreeView, RedPointType.FindFairy)
-- RPData:SetParent(RedPointType.FindFairy_FourView, RedPointType.FindFairy)
-- 成就
RPData:SetParent(RedPointType.Achievement_Main, RedPointType.DailyTaskMain)
--灵兽
-- RPData:SetParent(RedPointType.Pokemon_UpLv, RedPointType.PokemonMainCity)--嫌烦去掉
RPData:SetParent(RedPointType.Pokemon_UpStar, RedPointType.PokemonMainCity)
RPData:SetParent(RedPointType.Pokemon_CanUpZhen, RedPointType.PokemonMainCity)
RPData:SetParent(RedPointType.Pokemon_Fetter, RedPointType.PokemonMainCity)
RPData:SetParent(RedPointType.Pokemon_Recruit, RedPointType.PokemonMainCity)
RPData:SetParent(RedPointType.Pokemon_ChipCompound, RedPointType.PokemonMainCity)
--跨服天梯
RPData:SetParent(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel, RedPointType.JumpServer_HightLadder)
RPData:SetParent(RedPointType. JumpServer_HightLadder_Worship, RedPointType.JumpServer_HightLadder)
RPData:SetParent(RedPointType. JumpServer_HightLadder, RedPointType.JumpServer_MainCity)
--鸿蒙阵
RPData:SetParent(RedPointType.HongMeng_Evory,RedPointType.HongMeng)
RPData:SetParent(RedPointType.HongMeng_OpenBox,RedPointType.HongMeng)
RPData:SetParent(RedPointType.HongMeng_UpTower,RedPointType.HongMeng)
--天枢密卷
RPData:SetParent(RedPointType.Hero_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.SoulPrint_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.TianShuPokemon_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.Equip_Fetter,RedPointType.TianShuMiJuan)
--牛气冲天
RPData:SetParent(RedPointType.NiuQiChongTian_1,RedPointType.NiuQiChongTian)
RPData:SetParent(RedPointType.NiuQiChongTian_2,RedPointType.NiuQiChongTian)
RPData:SetParent(RedPointType.NiuQiChongTian_3,RedPointType.NiuQiChongTian)
RPData:SetParent(RedPointType.NiuQiChongTian_4,RedPointType.NiuQiChongTian)
RPData:SetParent(RedPointType.LimitExchange_GoExchange,RedPointType.Expert_LimitExchange)
--十五日登录
RPData:SetParent(RedPointType.FifteenDayGift_1,RedPointType.FifteenDayGift)
--化虚坛
RPData:SetParent(RedPointType.Huaxutan_CompoundHero,RedPointType.Huaxutan)
--主角修行
RPData:SetParent(RedPointType.Practice,RedPointType.Practice_main)
RPData:SetParent(RedPointType.Practice_upgrade,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_imprint,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_fourQua,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_Cultivation,RedPointType.Practice)
--建木神树
RPData:SetParent(RedPointType.Sacred,RedPointType.Sacred_roleInfo)
RPData:SetParent(RedPointType.Sacred_roleInfo,RedPointType.Practice)
--主界面右上角
RPData:SetParent(RedPointType.FirstRecharge,RedPointType.RightUp2)
RPData:SetParent(RedPointType.DailyRecharge,RedPointType.RightUp2)
RPData:SetParent(RedPointType.ContinuityRecharge,RedPointType.RightUp2)
RPData:SetParent(RedPointType.yunmenghaoli,RedPointType.RightUp2)
--七界试炼
RPData:SetParent(RedPointType.QiJieShiLian, RedPointType.JumpServer_MainCity)
--灵脉秘境
RPData:SetParent(RedPointType.LingMaiMiJing, RedPointType.JumpServer_MainCity)
--玉虚论道
RPData:SetParent(RedPointType.WorldArena_reward, RedPointType.JumpServer_MainCity)
-- 山河社稷图
RPData:SetParent(RedPointType.FightLevelBoxReward, RedPointType.FightLevel)
RPData:SetParent(RedPointType.FightLevelDailyReward, RedPointType.FightLevel)
--主角技能
RPData:SetParent(RedPointType.playerSkill1,RedPointType.Practice)
RPData:SetParent(RedPointType.playerSkill2,RedPointType.Practice)
RPData:SetParent(RedPointType.playerSkill3,RedPointType.Practice)
RPData:SetParent(RedPointType.playerSkill4,RedPointType.Practice)
-- 周卡
RPData:SetParent(RedPointType.WeekCardOpen,RedPointType.WeekCard)
RPData:SetParent(RedPointType.WeekCardReward,RedPointType.WeekCard)
RPData:SetParent(RedPointType.tailsmanSoul_gold,RedPointType.tailsmanSoul)
RPData:SetParent(RedPointType.tailsmanSoul_red,RedPointType.tailsmanSoul)
RPData:SetParent(RedPointType.tailsmanSoul_whiteGold,RedPointType.tailsmanSoul)
--身外化身
RPData:SetParent(RedPointType.incarnation_people,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_buddish,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_demon,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_taoist,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_force,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation,RedPointType.Practice)
--命格
RPData:SetParent(RedPointType.Gem,RedPointType.Practice_main)
--战力冲刺
RPData:SetParent(RedPointType.PowerRiceGool,RedPointType.PowerRice)
RPData:SetParent(RedPointType.eastSeaFindGod1,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.eastSeaFindGod2,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.eastSeaFindGod3,RedPointType.eastSeaFindGod)
RPData:SetParent(RedPointType.eastSeaFindGod4,RedPointType.eastSeaFindGod)
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityGroups)) do
if v.RpType > 0 and v.RpTypeParent > 0 then
RPData:SetParent(v.RpType,v.RpTypeParent)
end
end
end
-- 注册红点检测方法
function this.RegisterRedCheckFunc()
-- 服务器红点注册解锁类型
RPData:AddCheckFunc(RedPointType.Mail_Server, nil, FUNCTION_OPEN_TYPE.EMAIL)
RPData:AddCheckFunc(RedPointType.SecretTer_Boss, nil, FUNCTION_OPEN_TYPE.FIGHT_ALIEN)
RPData:AddCheckFunc(RedPointType.Arena_Record, nil, FUNCTION_OPEN_TYPE.ARENA)
RPData:AddCheckFunc(RedPointType.Guild_Apply, nil, FUNCTION_OPEN_TYPE.GUILD)
-- 普通红点检测方法注册
RPData:AddCheckFunc(RedPointType.CourtesyDress_SevenDay,ActivityGiftManager.CheckSevenDayRed)
RPData:AddCheckFunc(RedPointType.CourtesyDress_Chapter, ActivityGiftManager.CheckChapterRed)
RPData:AddCheckFunc(RedPointType.CourtesyDress_Online, ActivityGiftManager.CheckOnlineRed)
RPData:AddCheckFunc(RedPointType.SecretTer_FindTreasure, FindTreasureManager.RefreshFindTreasureRedPoint)
RPData:AddCheckFunc(RedPointType.DailyTask, RedPointManager.GetRedPointMissionDaily)
RPData:AddCheckFunc(RedPointType.LuckyCat_GetReward,LuckyCatManager.CheckIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.DiffMonster, DiffMonsterManager.GetDiffMonsterRedPointStatus, FUNCTION_OPEN_TYPE.DIFFER_DEMONS)
--RPData:AddCheckFunc(RedPointType.TreasureOfSl, TreasureOfSomebodyManagerV2.GetTreasureRedPointState)
RPData:AddCheckFunc(RedPointType.Mail_Local, MailManager.GetMailRedPointState)
--
RPData:AddCheckFunc(RedPointType.Role, HeroManager.GetFormationHeroRedPoint)
--竞技场部分红点
RPData:AddCheckFunc(RedPointType.Arena_Free, ArenaManager.FreeBattleRedCheck, FUNCTION_OPEN_TYPE.ARENA)
RPData:AddCheckFunc(RedPointType.Arena_Reward, ArenaManager.RewardBoxRedCheck, FUNCTION_OPEN_TYPE.ARENA)
---=== 商店相关红点
-- RPData:AddCheckFunc(RedPointType.Arena_Shop, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_General_Check, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_General_Refresh, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_Soul_Refresh, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_God_Refresh, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_Secret_Check, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_Arena_Check, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_Roam_Check, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Shop_Guild_Check, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Guild_Shop, ShopManager.ShopRedCheck)
RPData:AddCheckFunc(RedPointType.Guild_Transcript, GuildTranscriptManager.GetRedPointState)
RPData:AddCheckFunc(RedPointType.VIP_SHOP_DETAIL, VipManager.CheckRedPoint)
RPData:AddCheckFunc(RedPointType.VipPrivilege, VipManager.CheckNewVipRP)
RPData:AddCheckFunc(RedPointType.GrowthGift, OperatingManager.GetGrowthRedPointState)
RPData:AddCheckFunc(RedPointType.FirstRecharge, FirstRechargeManager.GetFirstRechargeRedPointStatus)
RPData:AddCheckFunc(RedPointType.DailyGift, ShopManager.HaveFreeBaby)
RPData:AddCheckFunc(RedPointType.GrowthPackage, VipManager.CheckGrowthPackagePointStatus)--成长礼包
--工坊
RPData:AddCheckFunc(RedPointType.Refining_Weapon, WorkShopManager.GetWorkShopRedPointState)
RPData:AddCheckFunc(RedPointType.Refining_Armor, WorkShopManager.GetWorkShopRedPointState)
--好友
RPData:AddCheckFunc(RedPointType.Friend_GetAllReward, GoodFriendManager.FriendRewardRedPointShow,FUNCTION_OPEN_TYPE.GOODFRIEND)
RPData:AddCheckFunc(RedPointType.Friend_Application, GoodFriendManager.FriendApplicationRedPointShow,FUNCTION_OPEN_TYPE.GOODFRIEND)
--秘境
RPData:AddCheckFunc(RedPointType.SecretTer_MaxBoxReward, AdventureManager.BoxMaxReward,FUNCTION_OPEN_TYPE.ADVENTURE)
RPData:AddCheckFunc(RedPointType.SecretTer_HaveFreeTime, AdventureManager.HaveFreeTime,FUNCTION_OPEN_TYPE.ADVENTURE)
RPData:AddCheckFunc(RedPointType.SecretTer_IsCanFight, FightPointPassManager.IsShowFightRP)
-- 外敌
RPData:AddCheckFunc(RedPointType.SecretTer_CallAlianInvasionTime, AdventureManager.HaveCallAlianInvasionTime,FUNCTION_OPEN_TYPE.FIGHT_ALIEN)
-- --普通副本
-- RPData:AddCheckFunc(RedPointType.NormalExplore_OpenMap, CarbonManager.CarbonRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON)
-- RPData:AddCheckFunc(RedPointType.NormalExplore_GetStarReward, CarbonManager.CarbonGetRewardRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON)
-- --试炼副本
-- RPData:AddCheckFunc(RedPointType.EpicExplore_OpenCarbon, CarbonManager.CarbonTrialOpen,FUNCTION_OPEN_TYPE.NORMALCARBON)
-- RPData:AddCheckFunc(RedPointType.EpicExplore_GetReward, CarbonManager.CheckTrialRedPoint,FUNCTION_OPEN_TYPE.NORMALCARBON)
-- --精英本
-- RPData:AddCheckFunc(RedPointType.HeroExplore_OpenMap, CarbonManager.CarbonHeroRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON)
-- RPData:AddCheckFunc(RedPointType.HeroExplore_Feats, CarbonManager.CheckHeroRedPoint,FUNCTION_OPEN_TYPE.NORMALCARBON)
--秘盒红点
RPData:AddCheckFunc(RedPointType.SecretBox_Red1, SecretBoxManager.CheckSecretRedPoint,FUNCTION_OPEN_TYPE.SECRETBOX)
--角色招募红点
-- RPData:AddCheckFunc(RedPointType.Recruit_Red, RecruitManager.CheckRecuritRedPoint,FUNCTION_OPEN_TYPE.RECURITY)
--普通召唤红点
RPData:AddCheckFunc(RedPointType.Recruit_Normal, RecruitManager.GetAllRecruitBtnRedpoint)--RecruitManager.CheckRecuritNormalPoint,FUNCTION_OPEN_TYPE.RECURITY)
RPData:AddCheckFunc(RedPointType.Recruit_ShenJiang, RecruitManager.GetAllRecruitBtnRedpoint)
RPData:AddCheckFunc(RedPointType.Recruit_Friend, RecruitManager.GetAllRecruitBtnRedpoint)
--七日狂欢红点
RPData:AddCheckFunc(RedPointType.SevenDayCarnival, SevenDayCarnivalManager.GetSevenDayCarnivalRedPoint)
--每日首充
RPData:AddCheckFunc(RedPointType.DailyRecharge, DailyRechargeManager.CheckRedPoint, FUNCTION_OPEN_TYPE.DailyRecharge)
--每日首充
RPData:AddCheckFunc(RedPointType.yunmenghaoli, DailyRechargeManager.CheckRedPointYunmeng)
--累计签到
RPData:AddCheckFunc(RedPointType.CumulativeSignIn,OperatingManager.GetSignInRedPointStatus)
RPData:AddCheckFunc(RedPointType.Setting_Ride,PlayerManager.GetPlayerRideRedPoint)
RPData:AddCheckFunc(RedPointType.Setting_Title,PlayerManager.GetPlayerTitleRedPoint)
--月卡
--24暂时关闭放开这里就行
RPData:AddCheckFunc(RedPointType.MonthCard,MonthCardManager.AllRefreshMonthCardRedPoint)
--连续充值
RPData:AddCheckFunc(RedPointType.ContinuityRecharge,ActivityGiftManager.GetContinuityRechargeRedPoint)
-- 头像红点
RPData:AddCheckFunc(RedPointType.HeadChange_Frame, HeadManager.CheckHeadRedPot)
RPData:AddCheckFunc(RedPointType.HeadChange_Head, HeadManager.CheckHeadRedPot)
--限时活动
RPData:AddCheckFunc(RedPointType.Expert_FastExplore, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_AreaExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_UpStarExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_EquipExper,ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_GoldExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.zhognzhichengcheng, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_FightExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
--RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge,CommonActPageManager.LeiChongYouLiRedCheck)
RPData:AddCheckFunc(RedPointType.Expert_FindTreasure, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_LuckyTurn, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_Recruit, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_SecretBox, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_UpLv, ActivityGiftManager.ExperyUpLvActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_Talisman, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_SoulPrint, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.LuckyTurn, LuckyTurnTableManager.ReturnRedPointState)
RPData:AddCheckFunc(RedPointType.Expert_WeekCard, ActivityGiftManager.WeedCardActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_Expedition, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_Slhj, ActivityGiftManager.ExpterActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.Expert_YunYouMan, ActivityGiftManager.CheckYunYouManRedPoint)
-- RPData:AddCheckFunc(RedPointType.HERO_STAR_GIFT, OperatingManager.IsHeroStarGiftActive)
--战力排行
RPData:AddCheckFunc(RedPointType.WarPowerSort_Sort, ActivityGiftManager.WarPowerSortActivityIsShowRedPoint)
RPData:AddCheckFunc(RedPointType.RankingSort, RankingManager.RefreshRedPoint)
--背包
RPData:AddCheckFunc(RedPointType.Bag_HeroDebris, BagManager.GetBagRedPointIsCanCompoundDebris)
RPData:AddCheckFunc(RedPointType.Bag_BoxAndBlueprint, BagManager.GetBagRedPointIsCanOpenBoxAndBlueprint)
-- upView
RPData:AddCheckFunc(RedPointType.UpView_Gold, ShopManager.CheckGoldIsFree)
-- chatview
RPData:AddCheckFunc(RedPointType.Chat_Friend, FriendChatManager.CheckRedPotShow)
-- 剑影仙踪
RPData:AddCheckFunc(RedPointType.SupremeHero, ActivityGiftManager.CheckSupremeHeroRedPoint)
-- 东海寻仙
-- RPData:AddCheckFunc(RedPointType.FindFairy_OneView, FindFairyManager.CheckRedPoint)
-- RPData:AddCheckFunc(RedPointType.FindFairy_ThreeView, FindFairyManager.CheckFindFairyUpStarRedPoint)--(不用了)
-- RPData:AddCheckFunc(RedPointType.FindFairy_FourView, FindFairyManager.CheckFindFairyCeremonyRedPoint)
-- 公会boss
RPData:AddCheckFunc(RedPointType.Guild_Boss, GuildBossManager.CheckGuildBossRedPoint, FUNCTION_OPEN_TYPE.GUILD_BOSS)
--公会车迟
RPData:AddCheckFunc(RedPointType.Guild_CarDeleay, GuildCarDelayManager.RefreshAllRedPoint)
--公会援助
RPData:AddCheckFunc(RedPointType.Guild_AidMy, MyGuildManager.GetMyGuildHelpRedPoint)
RPData:AddCheckFunc(RedPointType.Guild_AidGuild, MyGuildManager.GetMyAidOtherGuildHelpRedPoint)
RPData:AddCheckFunc(RedPointType.Guild_AidBox, MyGuildManager.GetGuildHelpBoxRedPoint)
--公会技能
RPData:AddCheckFunc(RedPointType.Guild_Skill, GuildSkillManager.RefreshAllGuildSkillRedPoint)
-- 公会红包
--RPData:AddCheckFunc(RedPointType.Guild_RedPacket,GuildRedPacketManager.CheckGuildRedPacketRedPoint)
RPData:AddCheckFunc(RedPointType.Guid_SendPackage,GuildRedPacketManager.CheckGuildRedPacketRedPoint,FUNCTION_OPEN_TYPE.GUILD)
RPData:AddCheckFunc(RedPointType.Guid_GetPackage,GuildRedPacketManager.CheckIsCanGetPackage)
--公会祭祀
RPData:AddCheckFunc(RedPointType.Guild_Fete,MyGuildManager.CheckGuildFeteRedPoint)
--公会十绝阵
RPData:AddCheckFunc(RedPointType.Guild_DeathPos,DeathPosManager.CheckDeathPosRedPoint)
-- 成就
RPData:AddCheckFunc(RedPointType.Achievement_Main,TaskManager.GetAchievementState)
--天宫秘宝
RPData:AddCheckFunc(RedPointType.Expedition_Treasure,TreasureOfHeavenManger.RedPoint)
--主题活动
-- RPData:AddCheckFunc(RedPointType.TimeLimited,OperatingManager.GetTimeLimitRedPointStatus)
RPData:AddCheckFunc(RedPointType.TimeLimitWish,OperatingManager.GetWishDrawRedPointStatus)
RPData:AddCheckFunc(RedPointType.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus)
-- RPData:AddCheckFunc(RedPointType.DynamicActTask, OperatingManager.CheckDynamicActTaskRed)
RPData:AddCheckFunc(RedPointType.DynamicActTask_MeiRi, OperatingManager.CheckDynamicActTaskRed)
RPData:AddCheckFunc(RedPointType.DynamicActTask_MeiZhou, OperatingManager.CheckDynamicActTaskRed)
RPData:AddCheckFunc(RedPointType.DynamicActRecharge, OperatingManager.CheckLeiJiChongZhiRedData)
RPData:AddCheckFunc(RedPointType.Celebration, DynamicActivityManager.SheJiCheckRedPoint)
RPData:AddCheckFunc(RedPointType.LingShouBaoGe, DynamicActivityManager.LingShouUpCheckRed)
RPData:AddCheckFunc(RedPointType.ShengXingYouLi, DynamicActivityManager.CheckShengXingYouLiRedPoint)
RPData:AddCheckFunc(RedPointType.XiangYaoDuoBao, DynamicActivityManager.CheckXiangYaoDuoBaoRedPoint)
RPData:AddCheckFunc(RedPointType.XinJiangLaiXi, DynamicActivityManager.CheckXinJiangLaiXiRedPoint)
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.challengeCopy, CarbonManager.CarbonRedCheck)
--RPData:AddCheckFunc(RedPointType.HeartDemon, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.EpicExplore_LevleReward, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.EpicExplore_MoppingUp, MonsterCampManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.LegendExplore, CarbonManager.CarbonRedCheck)
--万象境副本
RPData:AddCheckFunc(RedPointType.People_Mirror, XuanYuanMirrorManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.Trial, MapTrialManager.TrialRedCheck)
RPData:AddCheckFunc(RedPointType.TrialReward, MapTrialManager.TrialRewardRedPointCheck)
RPData:AddCheckFunc(RedPointType.QinglongSerectTreasure, QinglongSerectTreasureManager.GetQinglongSerectTreasureRedPot)
RPData:AddCheckFunc(RedPointType.QinglongSerectTreasureTrail, QinglongSerectTreasureManager.GetSerectTreasureTrailRedPot)
-- 山河社稷图相关
RPData:AddCheckFunc(RedPointType.FightLevelBoxReward, FightLevelManager.GetChapterRewardBoxRedPoint, FUNCTION_OPEN_TYPE.FIGHTLEVEL)
RPData:AddCheckFunc(RedPointType.FightLevelDailyReward, FightLevelManager.CheckDailyRewardRed, FUNCTION_OPEN_TYPE.FIGHTLEVEL)
RPData:AddCheckFunc(RedPointType.JourneyWithWind, ActivityGiftManager.JourneyWithWindAllRedPointState)
RPData:AddCheckFunc(RedPointType.WeekGiftPage,OperatingManager.CheckWeekGiftPageRedPoint)
RPData:AddCheckFunc(RedPointType.MonthGiftPage,OperatingManager.CheckMonthGiftPageRedPoint)
RPData:AddCheckFunc(RedPointType.XiaoYaoYouRedPoint, XiaoYaoManager.CheckRedPoint2)
--灵兽
RPData:AddCheckFunc(RedPointType.Pokemon_UpLv,PokemonManager.RefreshPokemonUpLvRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_UpStar,PokemonManager.RefreshPokemonUpStarRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_CanUpZhen,PokemonManager.RefreshPokemonCanUpZhenRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_Fetter,PokemonManager.RefreshPokemonFetterRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_Recruit,PokemonManager.RefreshPokemonRecruitRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_ChipCompound,PokemonManager.PokemonChipCompoundRedPoint)
RPData:AddCheckFunc(RedPointType.Hero_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.SoulPrint_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.TianShuPokemon_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.Equip_Fetter,TianShuMiJuanManger.CheckRedPointType)
--跨服天梯
RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel,JumpServerManager.JumpServerHightLadderMianFeiNumRedPoint)
RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_Worship,JumpServerManager.JumpServerHightLadderWorshipRedPoint)
RPData:AddCheckFunc(RedPointType.HongMeng_Evory,HarmonyManager.RefreshEnvoyPoint)
RPData:AddCheckFunc(RedPointType.HongMeng_OpenBox,HarmonyManager.RefreshOpenBoxPoint)
RPData:AddCheckFunc(RedPointType.HongMeng_UpTower,HarmonyManager.RefreshUpTowerPoint)
--牛气冲天
RPData:AddCheckFunc(RedPointType.NiuQiChongTian_1,NiuQiChongTianManager.CheckNiuQiChongTianRedPoint)
RPData:AddCheckFunc(RedPointType.NiuQiChongTian_2,NiuQiChongTianManager.CheckNiuQiChongTianRedPoint)
RPData:AddCheckFunc(RedPointType.NiuQiChongTian_3,NiuQiChongTianManager.CheckNiuQiChongTianRedPoint)
RPData:AddCheckFunc(RedPointType.NiuQiChongTian_4,NiuQiChongTianManager.CheckNiuQiChongTianRedPoint)
--福星高照
RPData:AddCheckFunc(RedPointType.FuXingGaoZhao,FuXingGaoZhaoManager.CheckRedPoint)
RPData:AddCheckFunc(RedPointType.LimitExchange_GoExchange,ActivityGiftManager.IsExchangeRedShow)
--十五日登陆
RPData:AddCheckFunc(RedPointType.FifteenDayGift_1,FifteenDayGiftManager.CheckRedPoint)
RPData:AddCheckFunc(RedPointType.wujinBianDui,EndLessMapManager.CheckCanUseHeroNew)
RPData:AddCheckFunc(RedPointType.wujinTreasure,EndLessMapManager.CheckoutRedPointTreasure)
RPData:AddCheckFunc(RedPointType.wujinMission,EndLessMapManager.CheckoutRedPointMission)
RPData:AddCheckFunc(RedPointType.EndlessPanel, EndLessMapManager.ChecRedPointEndLess)
--化虚坛英雄合成
RPData:AddCheckFunc(RedPointType.Huaxutan_CompoundHero,HeroManager.GetAllHeroCompoundRedPoint)
--主角修行
RPData:AddCheckFunc(RedPointType.PersonTrail, MonsterCampManager.FourElementRedCheck)
RPData:AddCheckFunc(RedPointType.BuddishTrail, MonsterCampManager.FourElementRedCheck)
RPData:AddCheckFunc(RedPointType.DemonTrail, MonsterCampManager.FourElementRedCheck)
RPData:AddCheckFunc(RedPointType.TaoistTrail, MonsterCampManager.FourElementRedCheck)
RPData:AddCheckFunc(RedPointType.PersonTrailHelp, MonsterCampManager.CheckHelpFightRedPoint)
RPData:AddCheckFunc(RedPointType.BuddishTrailHelp, MonsterCampManager.CheckHelpFightRedPoint)
RPData:AddCheckFunc(RedPointType.DemonTrailHelp, MonsterCampManager.CheckHelpFightRedPoint)
RPData:AddCheckFunc(RedPointType.TaoistTrailHelp, MonsterCampManager.CheckHelpFightRedPoint)
--建木神树
RPData:AddCheckFunc(RedPointType.Sacred, SacredTreeManager.CheckRedPoint)
RPData:AddCheckFunc(RedPointType.Practice_upgrade,PracticeManager.PracticeCheckUpgrade,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.Practice_imprint,PracticeManager.PracticeCheckImprint,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.Practice_fourQua,PracticeManager.CheckFourQuadrantRed,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.Practice_Cultivation,PracticeManager.CheckPlayerCultivetionRed,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.chaofanrushengRed,ActivityGiftManager.CheckRedPointChaofanRuSheng)
RPData:AddCheckFunc(RedPointType.UpStarGift,ActivityGiftManager.CheckRedPointUpStarGift)
--山河试炼
RPData:AddCheckFunc(RedPointType.FightLevelTrial,FightLevelManager.CheckTrialRedPoint)
--寻宝迷踪
RPData:AddCheckFunc(RedPointType.XunBaoMiZong,DynamicActivityManager.XunBaoMiZongRedCheck)
RPData:AddCheckFunc(RedPointType.linglongBaojing,LingLongBaoJingManager.CheckRedPointLingLong)
RPData:AddCheckFunc(RedPointType.TaiChuMiJuan,DynamicActivityManager.CheckRedPointTaiChu)
--七界试炼
RPData:AddCheckFunc(RedPointType.QiJieShiLian,QiJieShiLianManager.CheckQiJieRedPoint,FUNCTION_OPEN_TYPE.QIJIESHILIAN)
--灵脉秘境
RPData:AddCheckFunc(RedPointType.LingMaiMiJing,LingMaiMiJingManager.CheckRedPoint,FUNCTION_OPEN_TYPE.LINGMAIMIJING)
--玉虚论道
RPData:AddCheckFunc(RedPointType.WorldArena_reward,WorldArenaManager.CheckRewardPoint)
RPData:AddCheckFunc(RedPointType.LikeabilityRed,LikabilityManager.CheckRedPot)
--御剑行
RPData:AddCheckFunc(RedPointType.YuJianXingMian,YuJianXingManager.CheckRedPoint)
--新百宝商会
RPData:AddCheckFunc(RedPointType.TreasureStoreSeason2,ActivityGiftManager.TreasureStoreSeason2RedCheck)
--主角技能
RPData:AddCheckFunc(RedPointType.playerSkill1, PracticeManager.CheckPlayerSkillRed,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.playerSkill2, PracticeManager.CheckPlayerSkillRed,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.playerSkill3, PracticeManager.CheckPlayerSkillRed,FUNCTION_OPEN_TYPE.PRACTICE)
RPData:AddCheckFunc(RedPointType.playerSkill4, PracticeManager.CheckPlayerSkillRed,FUNCTION_OPEN_TYPE.PRACTICE)
--三界降魔
RPData:AddCheckFunc(RedPointType.DemonSlayerNew, CommonActPageManager.DemonSlayerNewRedCheck)
-- 周卡
RPData:AddCheckFunc(RedPointType.WeekCardOpen, WeekCardManager.CheckRedOpen)
RPData:AddCheckFunc(RedPointType.WeekCardReward, WeekCardManager.CheckRedReward)
RPData:AddCheckFunc(RedPointType.ZhongShenKa, ActivityGiftManager.CheckZhongShenKaRedPoint)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_gold,TailsManSoulManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_red,TailsManSoulManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_whiteGold,TailsManSoulManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.incarnation_people,IncarnationManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.incarnation_buddish,IncarnationManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.incarnation_demon,IncarnationManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.incarnation_taoist,IncarnationManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.incarnation_force,IncarnationManager.CheckPowerBtnRedData)
RPData:AddCheckFunc(RedPointType.tiandihonglu,OperatingManager.GetTianDiHongLuRedPointStatus)
RPData:AddCheckFunc(RedPointType.recruitTreasure_one,RecruitTreasureManager.GetRedPointStatus)
RPData:AddCheckFunc(RedPointType.recruitTreasure_two,RecruitTreasureManager.GetRedPointStatus)
RPData:AddCheckFunc(RedPointType.recruitTreasure_three,RecruitTreasureManager.GetRedPointStatus)
--命格
RPData:AddCheckFunc(RedPointType.Gem,GemManager.RedPointCheck,FUNCTION_OPEN_TYPE.Gem)
RPData:AddCheckFunc(RedPointType.ExploreFunc,ExploreManager.CheckRedPoint)
RPData:AddCheckFunc(RedPointType.chaozhifanli,DynamicActivityManager.CheckRedPointPremium)
RPData:AddCheckFunc(RedPointType.chaozhifanli6,DynamicActivityManager.CheckRedPointPremiumSingle)
RPData:AddCheckFunc(RedPointType.chaozhifanli30,DynamicActivityManager.CheckRedPointPremiumSingle)
--家园
RPData:AddCheckFunc(RedPointType.HomeLand,HomeLandManager.CheckRedMain,FUNCTION_OPEN_TYPE.HOMELAND)
RPData:AddCheckFunc(RedPointType.FestevalRed,ActivityGiftManager.FestevalRedCheck)
RPData:AddCheckFunc(RedPointType.EightLoginReward,ActivityGiftManager.CheckLoginRewardRedPoint)
--超值基金
RPData:AddCheckFunc(RedPointType.jijin128,CommonActPageManager.ChaoZhiJiJin128Red)
RPData:AddCheckFunc(RedPointType.jijin328,CommonActPageManager.ChaoZhiJiJin328Red)
--战力冲刺
RPData:AddCheckFunc(RedPointType.PowerRiceGool,CommonActPageManager.PowerRiceRedCheck)
RPData:AddCheckFunc(RedPointType.eastSeaFindGod1,CommonActPageManager.GetRedPointEastSeaFindGodnew)
RPData:AddCheckFunc(RedPointType.eastSeaFindGod2,CommonActPageManager.GetRedPointEastSeaFindGodnew)
RPData:AddCheckFunc(RedPointType.eastSeaFindGod3,CommonActPageManager.GetRedPointEastSeaFindGodnew)
RPData:AddCheckFunc(RedPointType.eastSeaFindGod4,CommonActPageManager.GetRedPointEastSeaFindGodnew)
--数字游戏
RPData:AddCheckFunc(RedPointType.numberGame,RatioNumberManager.CheckRedPoint)
end
-- 向红点绑定物体
function this.BindObject(rpType, rpObj)
if not rpObj or not rpType then
LogError("rpObj:"..tostring(rpObj).." rpType:"..tostring(rpType))
return
end
BindObjs[rpType] = BindObjs[rpType] or {}
for index, value in ipairs(BindObjs[rpType]) do
if value == rpObj then
Log("红点类型 = "..rpType..", 重复绑定了物体,取消该次绑定")
return
end
end
table.insert(BindObjs[rpType], rpObj)
--Log("红点类型 = "..rpType..", 绑定了新物体,当前绑定的物体数量为 = "..#BindObjs[rpType])
-- 根据状态设置红点现隐
rpObj:SetActive(this.GetRedPointStatus(rpType) == RedPointStatus.Show)
end
-- 解绑物体
function this.ClearObject(rpType, rpObj)
if rpObj then
local indexToKill = nil
if not BindObjs or not BindObjs[rpType] then
return
end
for index, obj in pairs(BindObjs[rpType]) do
if rpObj == obj then
indexToKill = index
break
end
end
if indexToKill then
table.remove(BindObjs[rpType], indexToKill)
--Log("红点类型 = "..rpType..", 解绑了一个物体,当前绑定的物体数量为 = "..#BindObjs[rpType])
else
LogRed("红点类型 ".. rpType .. ",在该红点绑定物体中没有找到要解除绑定的物体,请检查")
end
else
if BindObjs then
BindObjs[rpType] = {}
end
LogRed("红点类型 = "..rpType..", 解绑了所有物体,当前绑定的物体数量为 = "..#BindObjs[rpType])
end
end
-- 设置服务器红点数据
function this.SetServerRedPointData(list)
local serverList = {}
for _, rpType in ipairs(ServerRedType) do
serverList[rpType] = 0
end
-- list中保存要显示的红点
if list then
for _, rpType in ipairs(list) do
Log("服务器红点数据::::" .. rpType)
serverList[rpType] = 1
end
end
RPData:SetServerRedData(serverList)
end
--- 获取红点状态
function this.GetRedPointStatus(rpType)
local value = RPData:GetRedValue(rpType)
if not value then
return RedPointStatus.Hide
end
if value == 0 then
return RedPointStatus.Hide
end
return RedPointStatus.Show
end
--- 设置红点状态
function this.SetRedPointStatus(rpType, status)
local value = status == RedPointStatus.Show and 1 or 0
local result = RPData:SetRedValue(rpType, value)
-- 判断是否设置成功
if result then
this.RefreshRedObjectStatus(rpType)
end
end
--- 设置服务器红点状态
function this.SetServerRedPointStatus(rpType, status)
local value = status == RedPointStatus.Show and 1 or 0
local result = RPData:SetServerRed(rpType, value)
-- 判断是否设置成功
if result then
this.CheckRedPointStatus(rpType)
end
end
--- 检测红点状态
function this.CheckRedPointStatus(rpType)
if this.isDirty then
if not table.indexof(this.refreshList, rpType) then
table.insert(this.refreshList, rpType)
end
else
--
this.isDirty = true
this.LateUpdateTime = Time.realtimeSinceStartup
--
if not table.indexof(this.refreshList, rpType) then
table.insert(this.refreshList, rpType)
end
end
-- -- 判断是否需要刷新红点显示
-- if RPData:CheckRedPoint(rpType) then
-- this.RefreshRedObjectStatus(rpType)
-- end
end
--- 检测所有红点状态
function this.CheckAllRedPointStatus()
-- 服务器红点
local serverList = RPData:GetServerRedData()
for rpType, _ in pairs(serverList) do
this.CheckRedPointStatus(rpType)
end
-- 本地红点
local checkList = RPData:GetCheckList()
for rpType, _ in pairs(checkList) do
this.CheckRedPointStatus(rpType)
end
end
--- 刷新对应物体的显示
function this.RefreshRedObjectStatus(rpType)
-- 检测红点状态
local state = this.GetRedPointStatus(rpType)
if BindObjs[rpType] then
table.walk(BindObjs[rpType], function(bindObj)
if bindObj and not IsNull(bindObj) and bindObj.gameObject then
bindObj.gameObject:SetActive(state == RedPointStatus.Show)
else
LogError("红点类型 ".. rpType ..", 对应红点对象已销毁,但未清除绑定,请检查代码")
end
end)
end
-- 向父级递归
local parent = RPData:GetRedParent(rpType)
if parent then
this.RefreshRedObjectStatus(parent)
end
end
function this.ClearNullReference()
for _, objs in pairs(BindObjs) do
local indexToKill = {}
for k, obj in pairs(objs) do
if IsNull(obj) then
table.insert(indexToKill, k)
end
end
for _, index in ipairs(indexToKill) do
objs[index] = nil
end
end
end
return this