神兵红点提交

dev_chengFeng
yuanshuai 2023-04-04 18:21:14 +08:00
parent c3bac10fc9
commit 31f51cca80
7 changed files with 22 additions and 0 deletions

View File

@ -774,6 +774,8 @@ RedPointType = {
----- upview------------
UpView_Gold = 301,
GodWeapon=302,---神兵红点
--- 竞技场类型红点
Arena_Type_Normal = 1070,
--Arena_Type_TopMatch = 1071,

View File

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

View File

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

View File

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

View File

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

View File

@ -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
--添加事件监听(用于子类重写)

View File

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