diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 60ea7170e7..d0b1a379c8 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1035,7 +1035,7 @@ RedPointType = { --玉虚论道 WorldArena_reward = 672, --玉虚论道奖励 playerSkill = 673, --主角技能 - + playerGift = 674, --英雄礼物 LikeabilityRed = 680, --七界试炼 QiJieShiLian = 860,--入口 diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua b/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua index 09525798e1..d6b08eb2e7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/GiftManager.lua @@ -120,6 +120,47 @@ function this.GetHeroGiftAddPro(_id) return data end +--检测英雄红点 +function this.CheckRoleRedPointById(_id) + local isOpen=CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift) + if isOpen==false then + return false + end + local lv,cur,max=this.GetCollectLvAndNum() + if this.allHeroGifts[_id] then + local list=this.allHeroGifts[_id] + if #list>=cur then + return false + end + local allEquip = BagManager.GetBagItemDataByItemType(ItemBaseType.HeroGift) + for i=1,#allEquip do + if CheckListIsContainValue1(list,allEquip[i].id)==false then + return true + end + end + else + return false + end + return false +end + + +--检测主角红点 +function this.CheckPlayerRedPoint() + local isOpen=CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift) + if isOpen==false then + return false + end + local allEquip = BagManager.GetBagItemDataByItemType(ItemBaseType.PlayerGift) + for i=1,#allEquip do + if CheckListIsContainValue1(this.playerGifts,allEquip[i].id)==false then + return true + end + end + return false +end + + --获取主角礼物增加的属性 function this.GetPlayerGiftAddPro() diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 3c53d6161f..dade33f4c3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -3375,6 +3375,7 @@ function this.GetFormationHeroRedPoint() (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0) or HeroManager.CheckIsUpTreasure(curHeroData.jewels[1],0) or HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) or + GiftManager.CheckRoleRedPointById(curHeroData.dynamicId) or GodSoulManager.CheckRedPointGodSoul(curHeroData) then return true @@ -3427,6 +3428,7 @@ function this.GetCurHeroIsShowRedPoint(curHeroData) HeroManager.CheckIsUpTreasure(curHeroData.jewels[1],0) or HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) or GodSoulManager.CheckRedPointGodSoul(curHeroData) or + GiftManager.CheckRoleRedPointById(curHeroData.dynamicId) or HeroManager.IsShowFlyUpRedPoint(curHeroData) end --获取当前英雄的下一突破 和 升星 静态数据 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua index 283e06de6f..0943005a18 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/NetManager.lua @@ -7338,6 +7338,7 @@ function NetManager.GiftEquipWearRequest(_type,_roleId,_ids,_func) HeroPropManager.SetDirtyByType(_roleId, Hero_Prop_Type.Gift) --获取新战力 NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL) + CheckRedPointStatus(RedPointType.playerGift) local tempPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) if oldWarPower ~= tempPower then UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPower,newValue = tempPower}) diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 49b405f383..a0bc7c66fb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -354,6 +354,7 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.Gem,RedPointType.Practice_main) RPData:SetParent(RedPointType.Gem_1,RedPointType.Gem) RPData:SetParent(RedPointType.Gem_2,RedPointType.Gem) + RPData:SetParent(RedPointType.playerGift,RedPointType.Practice_main) RPData:SetParent(RedPointType.TimeLimitWish,RedPointType.Recruit) -- RPData:SetParent(RedPointType.TimeLimitWishStore,RedPointType.TimeLimitWish)--奇珍宝阁相关红点屏蔽 --战力冲刺 @@ -684,7 +685,7 @@ function this.RegisterRedCheckFunc() RPData:AddCheckFunc(RedPointType.Gem_1,GemNewManager.CheckGemRed) RPData:AddCheckFunc(RedPointType.Gem_2,GemNewManager.CheckSuperGemRed) RPData:AddCheckFunc(RedPointType.ExploreFunc,ExploreManager.CheckRedPoint) - + RPData:AddCheckFunc(RedPointType.playerGift,GiftManager.CheckPlayerRedPoint) RPData:AddCheckFunc(RedPointType.chaozhifanli,DynamicActivityManager.CheckRedPointPremium) RPData:AddCheckFunc(RedPointType.chaozhifanli6,DynamicActivityManager.CheckRedPointPremiumSingle) RPData:AddCheckFunc(RedPointType.chaozhifanli30,DynamicActivityManager.CheckRedPointPremiumSingle) diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua index 62854aac75..3a14d03adf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua @@ -208,6 +208,7 @@ function Practice:BindEvent() BindRedPointObject(RedPointType.incarnation,self.incarnationBtnRed) BindRedPointObject(RedPointType.Practice,self.practice_tab) BindRedPointObject(RedPointType.Gem,self.gemRedPoint) + BindRedPointObject(RedPointType.playerGift,self.giftRedPoint) end function Practice:BtnClickEvent() NetManager.UpPracticeLevelRequest(function () @@ -349,6 +350,7 @@ function Practice:OnShow() CheckRedPointStatus(RedPointType.Gem) CheckRedPointStatus(RedPointType.Gem_1) CheckRedPointStatus(RedPointType.Gem_2) + CheckRedPointStatus(RedPointType.playerGift) FormationManager.RefreshMainFormationPower() self.curLevelConfig = PracticeManager.GetCurConfigData() oldPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) @@ -546,6 +548,7 @@ function Practice:OnDestroy() ClearRedPointObject(RedPointType.incarnation,self.incarnationBtnRed) ClearRedPointObject(RedPointType.Practice,self.practice_tab) ClearRedPointObject(RedPointType.Gem,self.gemRedPoint) + ClearRedPointObject(RedPointType.playerGift,self.giftRedPoint) for i = 1, 4 do ClearRedPointObject(500+i*100,Util.GetGameObject(self.Practice, "SkillObj/skill"..i.."/red")) end diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua index c6b10136b4..94afb60a1b 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua @@ -307,7 +307,8 @@ function this.SingleItemDataShow(_go, _itemData) this.equipPreList[_go] = SubUIManager.Open(SubUIConfig.ItemView,_go.transform) end local redPoint = Util.GetGameObject(_go.transform, "redPoint") - redPoint:SetActive(false) + local isHave=CheckListIsContainValue1(allUpIds,_itemData.id) + redPoint:SetActive(isHave==false) this.equipPreList[_go].gameObject:SetActive(true) this.equipPreList[_go].transform:SetAsFirstSibling() if itemConfig[_itemData.id].ItemType == ItemType.Equip then @@ -316,7 +317,7 @@ function this.SingleItemDataShow(_go, _itemData) --宝物界面 Util.AddOnceClick(Util.GetGameObject(_go.transform, "mask"),function() BagManager.isBagPanel=true - if CheckListIsContainValue1(allUpIds,_itemData.id) then + if isHave then UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,_itemData,0,false,nil,curHeroData,4) else UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,_itemData,3,false,nil,curHeroData,4) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua index d38f4a9e00..bde88a7b31 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGiftPanel.lua @@ -351,7 +351,6 @@ function this:SetItemData(_itemDatas) end function this.SingleItemDataShow(_go, _itemData) - if not itemConfig[_itemData.id] then return end @@ -359,7 +358,8 @@ function this.SingleItemDataShow(_go, _itemData) this.equipPreList[_go] = SubUIManager.Open(SubUIConfig.ItemView,_go.transform) end local redPoint = Util.GetGameObject(_go.transform, "redPoint") - redPoint:SetActive(false) + local isHave=CheckListIsContainValue1(allUpIds,_itemData.id) + redPoint:SetActive(isHave==false and curNum>#allUpIds) this.equipPreList[_go].gameObject:SetActive(true) this.equipPreList[_go].transform:SetAsFirstSibling() if itemConfig[_itemData.id].ItemType == ItemType.Equip then @@ -368,7 +368,7 @@ function this.SingleItemDataShow(_go, _itemData) --宝物界面 Util.AddOnceClick(Util.GetGameObject(_go.transform, "mask"),function() BagManager.isBagPanel=true - if CheckListIsContainValue1(allUpIds,_itemData.id) then + if isHave then UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,_itemData,0,false,nil,curHeroData,4) else UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,_itemData,3,false,nil,curHeroData,4) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index 821d3caff5..1d0e993c48 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -770,6 +770,7 @@ function this:UpdateHeroInfoData() FaXiangManager.CheckIsShowRed(curHeroData.faxiang[1],0) or FaXiangManager.CheckIsShowRed(curHeroData.faxiang[2],0) ) this.talismanBtnRedPoint:SetActive(HeroManager.GetIsShowTalismanRedPoint(curHeroData)) + this.giftRedPoint:SetActive(GiftManager.CheckRoleRedPointById(curHeroData.dynamicId)) this.soulPrintBtnRedPoint:SetActive(HeroManager.GetIsShowSoulPrintRedPoint(curHeroData)) this.godPrintBtnRedPoint:SetActive(HeroManager.GetIsShowGodPrintRedPoint(curHeroData)) else @@ -778,6 +779,7 @@ function this:UpdateHeroInfoData() this.talismanBtnRedPoint:SetActive(false) this.soulPrintBtnRedPoint:SetActive(false) this.godPrintBtnRedPoint:SetActive(false) + this.this.giftRedPoint:SetActive(false) end --法宝按钮逻辑