礼物红点提交

dev_one_discount
wangzhenxing 2023-09-20 11:28:57 +08:00
parent bb1ea1c7f8
commit f0919b9ce8
9 changed files with 58 additions and 7 deletions

View File

@ -1035,7 +1035,7 @@ RedPointType = {
--玉虚论道
WorldArena_reward = 672, --玉虚论道奖励
playerSkill = 673, --主角技能
playerGift = 674, --英雄礼物
LikeabilityRed = 680,
--七界试炼
QiJieShiLian = 860,--入口

View File

@ -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()

View File

@ -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
--获取当前英雄的下一突破 和 升星 静态数据

View File

@ -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})

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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
--法宝按钮逻辑