添加名望特权红点
parent
0ed8fcf2f4
commit
3c1e1c389d
|
@ -1034,7 +1034,7 @@ RedPointType = {
|
|||
TreasureStoreSeason2 = 880,--主城
|
||||
--新三界降魔
|
||||
DemonSlayerNew = 890,--新三界降魔
|
||||
|
||||
MingWangPri =891,--名望特权
|
||||
|
||||
tailsmanSoul = 43601,-- 法宝之魂
|
||||
tailsmanSoul_gold = 43602,--
|
||||
|
|
|
@ -169,6 +169,7 @@ function this.GetMingWangLv(index)
|
|||
return 0
|
||||
end
|
||||
|
||||
|
||||
function this.ChangeMingWangLv()
|
||||
local growData = this.GetGiftDataByType({{2,95}})
|
||||
local rechargeNum = BagManager.GetItemCountById(1351) --VipManager.GetChargedNum()--已经充值的金额
|
||||
|
@ -192,6 +193,22 @@ function this.ChangeMingWangLv()
|
|||
end
|
||||
end
|
||||
|
||||
--检测名望红点
|
||||
function this.CheckMingWangRed()
|
||||
local growData = DynamicActivityManager.GetGiftDataByType({{2,95}})
|
||||
if growData then
|
||||
for i = 1, 20 do
|
||||
local curData = growData[i]
|
||||
if curData.data.limitNum - curData.data.boughtNum > 0 and
|
||||
BagManager.GetTotalItemNum(curData.data.costId) >= curData.data.price and
|
||||
BagManager.GetItemCountById(1351) >=DynamicActivityManager.GetMingWangLv(curData.data.shopItemData.BuyRule[2]-1) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function this.SheJiCheckRedPoint()
|
||||
local ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Celebration)--活动数据
|
||||
|
|
|
@ -791,6 +791,7 @@ function this.BindRedPoint()
|
|||
BindRedPointObject(RedPointType.ExploreFunc, this.btnExploreRed)
|
||||
BindRedPointObject(RedPointType.FestevalRed, this.FestevaBtnRed)
|
||||
BindRedPointObject(RedPointType.EightLoginReward, this.sgRedPoint)
|
||||
BindRedPointObject(RedPointType.MingWangPri,this.mwRedPoint)
|
||||
end
|
||||
-- 绑定红点
|
||||
function this.ClearRedPoint()
|
||||
|
@ -819,6 +820,7 @@ function this.ClearRedPoint()
|
|||
ClearRedPointObject(RedPointType.ExploreFunc, this.btnExploreRed)
|
||||
ClearRedPointObject(RedPointType.FestevalRed, this.FestevaBtnRed)
|
||||
ClearRedPointObject(RedPointType.EightLoginReward, this.sgRedPoint)
|
||||
ClearRedPointObject(RedPointType.MingWangPri,this.mwRedPoint)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -1313,6 +1315,7 @@ function this:OnShow()
|
|||
HarmonyManager.CheckRedPoinStatusUpTowerMainCityRed()
|
||||
--山河试炼红点
|
||||
CheckRedPointStatus(RedPointType.FightLevelTrial)
|
||||
CheckRedPointStatus(RedPointType.MingWangPri)
|
||||
if addUpDateNum <= 0 then
|
||||
FixedUpdateBeat:Add(this.OnUpdate, self)--长按方法注册
|
||||
addUpDateNum = addUpDateNum + 1
|
||||
|
|
|
@ -227,7 +227,7 @@ function this.RefreshReward(Data)
|
|||
this.cost:SetActive(true)
|
||||
this.btnGet:GetComponent("Button").interactable = true
|
||||
Util.SetGray(this.btnGet, false)
|
||||
LogError("rechargenum=="..rechargeNum.." neednum=="..needNum)
|
||||
--LogError("rechargenum=="..rechargeNum.." neednum=="..needNum)
|
||||
if rechargeNum >= needNum then
|
||||
this.btnGet:GetComponent("Image").sprite = this.spLoader:LoadSprite("s_slbz_1anniuongse")
|
||||
if BagManager.GetTotalItemNum(Data.data.costId) >= Data.data.price then
|
||||
|
@ -315,7 +315,7 @@ end
|
|||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function this:OnClose()
|
||||
|
||||
CheckRedPointStatus(RedPointType.MingWangPri)
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
|
|
|
@ -855,6 +855,10 @@ function this.CheckTimeLimitHeroStoreRedPoint()
|
|||
end
|
||||
end
|
||||
end
|
||||
local red=DynamicActivityManager.CheckMingWangRed()
|
||||
if red then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
|
||||
|
||||
|
|
|
@ -689,6 +689,7 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.eastSeaFindGod4,CommonActPageManager.GetRedPointEastSeaFindGodnew)
|
||||
--数字游戏
|
||||
RPData:AddCheckFunc(RedPointType.numberGame,RatioNumberManager.CheckRedPoint)
|
||||
RPData:AddCheckFunc(RedPointType.MingWangPri,DynamicActivityManager.CheckMingWangRed)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
Loading…
Reference in New Issue