From 0ad39133817d067e115de83359c7dd6f5f652e04 Mon Sep 17 00:00:00 2001 From: "DESKTOP-98AVA47\\Administrator" Date: Wed, 26 May 2021 18:15:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E7=82=B9=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Common/GlobalDefine.lua | 31 ++++++------- .../ActivityGift/ActivityGiftManager.lua | 34 ++++++++------ .../NiuQiChongTian/NiuQiChongTianManager.lua | 44 +++++++++++-------- .../~Lua/Modules/Player/RedpotManager.lua | 10 ++--- 4 files changed, 67 insertions(+), 52 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 72fed707ea..87e64d443f 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -806,26 +806,27 @@ RedPointType = { HeadChange_Frame = 23111, HeadChange_Head = 23112, --- 限时达人红点 ---- - Expert_FastExplore=3110,--极速达人 - Expert_AreaExper = 3111,--竞技达人 + + Expert_FastExplore=3116,--极速达人 + Expert_AreaExper = 3117,--竞技达人 Expert_LimitExchange = 3108,--限时兑换 LimitExchange_GoExchange = 31081,-- 限时兑换活动 - Expert_UpStarExper = 3109,--进阶达人 - Expert_EquipExper = 3112,--装备达人 - Expert_GoldExper = 3113,--点金达人 - Expert_FightExper = 3114,--副本达人 - Expert_EnergyExper = 3115,--体力达人 - Expert_Talisman= 3116,--法宝达人 - Expert_SoulPrint= 3117,--魂印达人 - Expert_AccumulativeRecharge= 3107,--累计充值 - Expert_FindTreasure= 3119,--寻宝达人 - Expert_LuckyTurn= 3120,--探宝达人 - Expert_Recruit= 3121,--征募达人 - Expert_SecretBox= 3122,--秘宝达人 + Expert_UpStarExper = 3118,--进阶达人 + Expert_EquipExper = 3119,--装备达人 + Expert_GoldExper = 3120,--点金达人 + Expert_FightExper = 3121,--副本达人 + Expert_EnergyExper = -1,--体力达人 + Expert_Talisman= 3137,--法宝达人 + Expert_SoulPrint= 3138,--魂印达人 + Expert_AccumulativeRecharge= -1,--累计充值 + Expert_FindTreasure= 3146,--寻宝达人 + Expert_LuckyTurn= 3147,--探宝达人 + Expert_Recruit= 3148,--征募达人 + Expert_SecretBox= 3149,--秘宝达人 Expert_UpLv= 3123,--充值限量礼包 --Expert_LuckyTurn= 1118,--秘宝达人 Expert_Expedition= 3126,--天宫达人 - Expert_Slhj= 3127,--森罗幻境达人 + Expert_Slhj= 3170,--森罗幻境达人 Expert_WeekCard= 3150,--周卡 Expert_YunYouMan = 3128,--云游商人 --战力排行 达标战力 diff --git a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua index 332b23815f..9c3ca2e58b 100644 --- a/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.lua @@ -147,7 +147,7 @@ function this.InitActivityServerData(msg, isUpdate) this.onlineGetRewardState[m.missionId] = m.state this.haveOnlineTime = m.progress this.onlineTime= m.progress - --LogError("------------------------------------后端刷新在线时长2 "..m.progress.." "..TimeToHMS(m.progress)) + ------LogGreen("------------------------------------后端刷新在线时长2 "..m.progress.." "..TimeToHMS(m.progress)) this.cuOnLineTimestamp = GetTimeStamp() - m.progress --this.StartOnlineUpdate() elseif (v.activityId == ActivityTypeDef.EightDayGift) then @@ -254,7 +254,7 @@ function this.GetActivityIdByType(type) local missionData = nil table.walk(globalActConfigs, function(actConfigInfo) if this.mission[actConfigInfo.Id] then - --LogError("actConfigInfo.Id "..actConfigInfo.Id) + ------LogGreen("actConfigInfo.Id "..actConfigInfo.Id) id = actConfigInfo.Id end end) @@ -589,6 +589,7 @@ function this.GetContinuityRechargeRedPoint() redPoint = redPoint or (rechargeInfo.progress == 1 and rechargeInfo.state == 0) end end + LogGreen("积天豪礼红点:"..tostring(redPoint)) return redPoint end @@ -612,10 +613,10 @@ end --检测限时活动红点 function this.ExpterActivityIsShowRedPoint(activeIndex) local activeType = 0 - -- Log("activeIndex "..activeIndex) + ----LogGreen("activeIndex "..activeIndex) --注意 红点枚举id %100 就是按钮顺序 - activeType = numExChange[math.floor(activeIndex % 100)] - -- Log("activeType "..activeType) + activeType = math.floor(activeIndex % 100) + ----LogGreen("activeType "..activeType) local expertRewardTabs = this.GetActivityTypeInfo(activeType) if expertRewardTabs then for i = 1, #expertRewardTabs.mission do @@ -634,15 +635,17 @@ function this.ExpterActivityIsShowRedPoint(activeIndex) --进阶因为每个都不一样 特殊判断 if expertRewardTabs.mission[i].progress >= value then --Log("expertRewardTabs.mission[i].progress " .. expertRewardTabs.mission[i].progress) - --Log("限时红点 --------------- true") + ----LogGreen("限时红点 --------------- true") return true end elseif activeType == ActivityTypeDef.UpLvAct then if expertRewardTabs.value >= value and expertRewardTabs.mission[i].progress >= 0 then + ----LogGreen("限时红点 --------------- true") return true end elseif activeType == ActivityTypeDef.FastExplore then if expertRewardTabs.value >= value then + ----LogGreen("限时红点 --------------- true") return true end elseif activeType == ActivityTypeDef.AccumulativeRechargeExper then @@ -651,20 +654,21 @@ function this.ExpterActivityIsShowRedPoint(activeIndex) local curActiveConfig = ConfigManager.TryGetConfigData(ConfigName.GlobalActivity,id) if curActiveConfig and curActiveConfig.ShowArt == 1 then--1类型的活动是限时活动里的累计充值 if expertRewardTabs.value >= value then + ----LogGreen("限时红点 --------------- true") return true end end end else if expertRewardTabs.value >= value then - --Log("限时红点 --------------- true") + ----LogGreen("限时红点 --------------- true") return true end end end end end - --Log("限时红点 --------------- false") + ----LogGreen("限时红点 --------------- false") return false end --检测升级限时礼包活动红点 @@ -674,23 +678,25 @@ function this.ExperyUpLvActivityIsShowRedPoint() for i = 1, #activeData.mission do local curConfigData = ConfigManager.GetConfigData(ConfigName.ActivityRewardConfig,activeData.mission[i].missionId) if curConfigData and activeData.mission[i].state == 0 and activeData.value >= curConfigData.Values[2][1] and activeData.mission[i].progress>0 then + ----LogGreen("升级豪礼: true ") return true end end end + ----LogGreen("升级豪礼: false ") return false end --检测周卡活动红点 function this.WeedCardActivityIsShowRedPoint() local weekCardData = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.WeekCard, 12) if weekCardData then - --Log("weekCardData.buyTimes "..weekCardData.buyTimes.." "..PatFaceManager.isFirstLog.." "..tostring(this.isOpenWeekCard)) + ----LogGreen("weekCardData.buyTimes "..weekCardData.buyTimes.." "..PatFaceManager.isFirstLog.." "..tostring(this.isOpenWeekCard)) if weekCardData.buyTimes <= 0 and PatFaceManager.isFirstLog == 0 and this.isOpenWeekCard == false then - --Log("检测周卡活动红点 --------------- true") + ----LogGreen("检测周卡活动红点 --------------- true") return true end end - --Log("检测周卡活动红点 --------------- false") + ----LogGreen("检测周卡活动红点 --------------- false") return false end --检测战力排行活动红点 @@ -1074,7 +1080,7 @@ function this.RefreshAcitvityData(acitvityIds,fun) if missionInfo.missionId == msg.activityInfo[i].mission[j].missionId then missionInfo.state = msg.activityInfo[i].mission[j].state missionInfo.progress = msg.activityInfo[i].mission[j].progress - --LogError("msg.activityInfo[i].mission[j] "..msg.activityInfo[i].mission[j].missionId.." "..msg.activityInfo[i].mission[j].progress) + ------LogGreen("msg.activityInfo[i].mission[j] "..msg.activityInfo[i].mission[j].missionId.." "..msg.activityInfo[i].mission[j].progress) end end end @@ -1193,10 +1199,10 @@ function this.CheckYunYouManRedPoint() if id and id > 0 then local str = PlayerPrefs.GetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen) if str == 1 then - Log("云游商人红点返回:false") + LogGreen("云游商人红点返回:false") return false else - Log("云游商人红点返回:true") + LogGreen("云游商人红点返回:true") return true end end diff --git a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua index 57487c1e76..3e3898ea9a 100644 --- a/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/NiuQiChongTian/NiuQiChongTianManager.lua @@ -131,30 +131,38 @@ function this.GetNeedRewardData(sort) return needData end -function this.NiuQiCheckRedPoint1() +function this.CheckNiuQiChongTianRedPoint(index) + local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.NiuQi) + if not id or id < 1 then + return false + end + + local isShow = false + if index == RedPointType.NiuQiChongTian_4 then + isShow = this.NiuQiCheckRedPoint4() + else + local n = 0 + if index == RedPointType.NiuQiChongTian_1 then + n = 1 + elseif index == RedPointType.NiuQiChongTian_2 then + n = 2 + elseif index == RedPointType.NiuQiChongTian_3 then + n = 3 + end + isShow = this.NiuQiCheckRedPoint1(n) + end + return isShow +end + +function this.NiuQiCheckRedPoint1(index) for k,v in pairs(this.rewardData) do - if v.state == 1 and v.Sort == 1 then - return true - end - end - return false -end -function this.NiuQiCheckRedPoint2() - for k,v in pairs(this.rewardData) do - if v.state == 1 and v.Sort == 2 then - return true - end - end - return false -end -function this.NiuQiCheckRedPoint3() - for k,v in pairs(this.rewardData) do - if v.state == 1 and v.Sort == 3 then + if v.state == 1 and (not index or v.Sort == index) then return true end end return false end + function this.NiuQiCheckRedPoint4() this.GetScore() for key, value in pairs(this.configData) do diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index f4836e7e5a..ef7c3bd6f5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -225,12 +225,12 @@ function this.InitRedPointAllRelate() -- 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_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.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) @@ -408,8 +408,8 @@ function this.RegisterRedCheckFunc() RPData:AddCheckFunc(RedPointType.Expert_EquipExper,ActivityGiftManager.ExpterActivityIsShowRedPoint) RPData:AddCheckFunc(RedPointType.Expert_GoldExper, ActivityGiftManager.ExpterActivityIsShowRedPoint) RPData:AddCheckFunc(RedPointType.Expert_FightExper, ActivityGiftManager.ExpterActivityIsShowRedPoint) - RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint) - RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge, ActivityGiftManager.ExpterActivityIsShowRedPoint) + --RPData:AddCheckFunc(RedPointType.Expert_EnergyExper, ActivityGiftManager.ExpterActivityIsShowRedPoint) + --RPData:AddCheckFunc(RedPointType.Expert_AccumulativeRecharge, ActivityGiftManager.ExpterActivityIsShowRedPoint) RPData:AddCheckFunc(RedPointType.Expert_FindTreasure, ActivityGiftManager.ExpterActivityIsShowRedPoint) RPData:AddCheckFunc(RedPointType.Expert_LuckyTurn, ActivityGiftManager.ExpterActivityIsShowRedPoint) RPData:AddCheckFunc(RedPointType.Expert_Recruit, ActivityGiftManager.ExpterActivityIsShowRedPoint)