diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 83d36660dd..f1c2cde93d 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -774,6 +774,8 @@ RedPointType = { ----- upview------------ UpView_Gold = 301, + GodWeapon=302,---神兵红点 + --- 竞技场类型红点 Arena_Type_Normal = 1070, --Arena_Type_TopMatch = 1071, diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua index adae1867e9..05547111e6 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponInfoPanel.lua @@ -41,6 +41,7 @@ function this:BindEvent() local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) --飘战力 PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) + CheckRedPointStatus(RedPointType.GodWeapon) end) end) Util.AddClick(this.changeBtn, function() diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua index a4be9bdbf9..0ffae03787 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponListPanel_UpWar.lua @@ -89,6 +89,7 @@ function this.SingleItemDataShow(_go,_itemData) PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) FormationManager.CheckHeroIdExist() Game.GlobalEvent:DispatchEvent(GameEvent.GodWeapon.RefreshGodWeaponInfoPanel,godWeaponData) + CheckRedPointStatus(RedPointType.GodWeapon) parent:ClosePanel() end) end) @@ -123,6 +124,7 @@ function this.SingleItemDataShow(_go,_itemData) --飘战力 PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) FormationManager.CheckHeroIdExist() + CheckRedPointStatus(RedPointType.GodWeapon) parent:ClosePanel() end) end diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua index fbaf62c6f2..3614137a4b 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponManager.lua @@ -339,4 +339,15 @@ function this.CheckUpStarRedPoint(_curData) local costList=this.GetUpStarCost(_curData) return #costList>starConfig.ConsumeItemNum end +--检测主城神兵红点 +function this.CheckGodWeaponRedPoint() + for key, value in pairs(godWeaponTeamInfo) do + if value then + if this.CheckUpLvRedPoint(value) or this.CheckUpStarRedPoint(value) then + return true + end + end + end + return false +end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua index 3f44fabe66..f2602d0398 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodWeapon/GodWeaponUpPanel.lua @@ -72,6 +72,7 @@ function this:BindEvent() local newWarPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) --飘战力 PokemonManager.PiaoWarPowerChange(oldWarPower,newWarPower) + Game.GlobalEvent:DispatchEvent(GameEvent.GodWeapon.RefreshGodWeaponInfoPanel,godWeaponData) end) else PopupTipPanel.ShowTip("道具不足") @@ -205,6 +206,7 @@ function this:OnShow() end function this.UpdateWinInfo() + CheckRedPointStatus(RedPointType.GodWeapon) local upLvRed = GodWeaponManager.CheckUpLvRedPoint(godWeaponData) this.upLvTabRedPoint:SetActive(upLvRed) local upStarRed = GodWeaponManager.CheckUpStarRedPoint(godWeaponData) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 3b10dd5279..31e9214cf5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -823,6 +823,7 @@ function this.BindRedPoint() BindRedPointObject(RedPointType.MingWangPri,this.mwRedPoint) BindRedPointObject(RedPointType.ImGM,this.gmRedPoint) BindRedPointObject(RedPointType.HotRank,this.hrRedPoint) + BindRedPointObject(RedPointType.GodWeapon,this.weaponRed) end -- 绑定红点 function this.ClearRedPoint() @@ -854,6 +855,7 @@ function this.ClearRedPoint() ClearRedPointObject(RedPointType.MingWangPri,this.mwRedPoint) ClearRedPointObject(RedPointType.ImGM,this.gmRedPoint) ClearRedPointObject(RedPointType.HotRank,this.hrRedPoint) + ClearRedPointObject(RedPointType.GodWeapon,this.weaponRed) end --添加事件监听(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 5dff35ba91..4b55314b10 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -496,6 +496,8 @@ function this.RegisterRedCheckFunc() -- upView RPData:AddCheckFunc(RedPointType.UpView_Gold, ShopManager.CheckGoldIsFree) + RPData:AddCheckFunc(RedPointType.GodWeapon, GodWeaponManager.CheckGodWeaponRedPoint) + -- chatview RPData:AddCheckFunc(RedPointType.Chat_Friend, FriendChatManager.CheckRedPotShow)