我是gm 红点提交

wangzhenxing 2022-12-30 15:08:22 +08:00
parent 3acd9919ab
commit 286e8c0839
6 changed files with 34 additions and 30 deletions

View File

@ -1020,7 +1020,7 @@ RedPointType = {
jijin328 = 79,
chaozhijijin = 80,
haoHuaBuJi = 81, --豪华补给
ImGM = 82, --我是gm/刷冲特权
linglongBaojing = 671,
TaiChuMiJuan = 670,
--玉虚论道

View File

@ -252,6 +252,20 @@ function this.CheckHHBJRedPoint()
end
return false
end
--检测豪华补给红点
function this.CheckImGMRedPoint()
local activityData=ActivityGiftManager.GetActivityInfoByType(10301)
if activityData and activityData.mission then
for i = 1, #activityData.mission do
if activityData.mission[i].state==1 then
return true
end
end
end
return false
end
-------针对首充和累充,成长礼金-----------
function this.GetActivityTypeInfo(type)
local globalActConfigs = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type)

View File

@ -144,10 +144,9 @@ function this:InitComponent()
this.shenzunEffect=Util.GetGameObject(self.gameObject,"RightDown/btnShenzun/UI_Effect_jinkuang_Yuan")
--gm修改器
this.btnGMChange=Util.GetGameObject(self.gameObject,"RightDown/btnGMChange")
Util.GetGameObject(this.btnGMChange,"redPoint"):SetActive(false)
this.gmEffect=Util.GetGameObject(self.gameObject,"RightDown/btnGMChange/UI_Effect_jinkuang_Yuan")
Util.GetGameObject(this.btnGMChange,"Image"):GetComponent("Image").sprite=this.spLoader:LoadSprite("gm_change_maincity_btn_zh")
this.gmRedPoint = Util.GetGameObject(this.btnGMChange,"redPoint")
this.gmRedPoint:SetActive(false)
this.btnHotRank=Util.GetGameObject(self.gameObject,"RightDown/btnHotRank")
this.hrRedPoint = Util.GetGameObject(this.btnHotRank,"redPoint")
--this.btnHotRank:SetActive(false)
@ -812,6 +811,7 @@ function this.BindRedPoint()
BindRedPointObject(RedPointType.FestevalRed, this.FestevaBtnRed)
BindRedPointObject(RedPointType.EightLoginReward, this.sgRedPoint)
BindRedPointObject(RedPointType.MingWangPri,this.mwRedPoint)
BindRedPointObject(RedPointType.ImGM,this.gmRedPoint)
end
-- 绑定红点
function this.ClearRedPoint()
@ -841,6 +841,7 @@ function this.ClearRedPoint()
ClearRedPointObject(RedPointType.FestevalRed, this.FestevaBtnRed)
ClearRedPointObject(RedPointType.EightLoginReward, this.sgRedPoint)
ClearRedPointObject(RedPointType.MingWangPri,this.mwRedPoint)
ClearRedPointObject(RedPointType.ImGM,this.gmRedPoint)
end
--添加事件监听(用于子类重写)
@ -1344,6 +1345,7 @@ function this:OnShow()
CheckRedPointStatus(RedPointType.FightLevelTrial)
CheckRedPointStatus(RedPointType.MingWangPri)
CheckRedPointStatus(RedPointType.song10Wan)
CheckRedPointStatus(RedPointType.ImGM)
if addUpDateNum <= 0 then
FixedUpdateBeat:Add(this.OnUpdate, self)--长按方法注册
addUpDateNum = addUpDateNum + 1

View File

@ -23,6 +23,7 @@ local SwitchView=nil
local infoList={}
local rewardList={}
local dayList={}
local redList={}
--初始化组件(用于子类重写)
function GMShuaChongTeQuan:InitComponent()
self.spLoader = SpriteLoader.New()
@ -53,6 +54,9 @@ function GMShuaChongTeQuan:InitComponent()
local tabLab = Util.GetGameObject(tab, "Text")
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(_TabData[index][status])
tabLab:GetComponent("Text").text = _TabData[index].name
local red=Util.GetGameObject(tab,"Redpot")
red:SetActive(ActivityGiftManager.GetActivityInfo(ActivityTypeDef.shuaChongTeQuan,_TabData[index].id).state==1)
redList[_TabData[index].id]=red
end
--切换视图
SwitchView=function(_index)
@ -116,12 +120,14 @@ function GMShuaChongTeQuan:InitComponent()
self.scaleTxt.gameObject:SetActive(false)
self.scaleImg:SetActive(false)
self.oldPriceTxt.gameObject:SetActive(false)
redList[activityId]:SetActive(true)
state=1
end)
elseif state==1 then
NetManager.GetActivityRewardRequest(activityId,ActivityTypeDef.shuaChongTeQuan, function(_drop)
UIManager.OpenPanel(UIName.RewardItemPopup, _drop, 1)
self.payTxt.text="已领取"
redList[activityId]:SetActive(false)
state=2
end)
end
@ -237,11 +243,13 @@ local activityData={}
--界面关闭时调用(用于子类重写)
function GMShuaChongTeQuan:OnClose()
-- self.gameObject:SetActive(false)
CheckRedPointStatus(RedPointType.ImGM)
end
--界面销毁时调用(用于子类重写)
function GMShuaChongTeQuan:OnDestroy()
self.spLoader:Destroy()
SubUIManager.Close(self.ScrollView)
rewardList={}
dayList={}
end

View File

@ -43,33 +43,7 @@ end
--绑定事件(用于子类重写)
function HHBJPage:BindEvent()
-- for i = 1, #self.cardPres do
-- Util.AddOnceClick(self.cardPres[i].month,function()
-- local cardType=cardData[i].cardType
-- if cardData[i].curState==0 then
-- local curMonthCardConfig=monthCardConFig[cardType]
-- PayManager.Pay(curMonthCardConfig.Price, function()
-- cardData[i].curState=1
-- MonthCardManager.SetMonthCardGetStateData(cardType,1)
-- self.curAllMonthCardData = MonthCardManager.GetMonthCardData()
-- Util.SetGray(self.cardPres[i].month,false)
-- self.cardPres[i].month:GetComponent("Button").enabled = true
-- self.cardPres[i].btnText.text = "领取"
-- self.cardPres[i].monthRedPot:SetActive(true)
-- end)
-- else
-- NetManager.MonthCardTakeDailyRequest(cardData[i].cardType, function(drop)
-- MonthCardManager.SetMonthCardGetStateData(cardData[i].cardType,2)
-- self.curAllMonthCardData = MonthCardManager.GetMonthCardData()
-- Util.SetGray(self.cardPres[i].month,true)
-- self.cardPres[i].month:GetComponent("Button").enabled = false
-- self.cardPres[i].btnText.text = "已领取"
-- self.cardPres[i].monthRedPot:SetActive(false)
-- UIManager.OpenPanel(UIName.RewardItemPopup,drop,1)
-- end)
-- end
-- end)
-- end
end
--添加事件监听(用于子类重写)
@ -145,6 +119,7 @@ function HHBJPage:SetCardShow(i)
--self.cardPres[i].monthRedPot:SetActive(MonthCardManager.RefreshMonthCardRedPoint(cardType))
---设置按钮显示
LogError("state=="..state)
self.cardPres[i].monthRedPot:SetActive(state==1)
if state == 0 then
Util.SetGray(self.cardPres[i].month,false)
self.cardPres[i].month:GetComponent("Button").enabled = true
@ -166,6 +141,8 @@ function HHBJPage:SetCardShow(i)
self.cardPres[i].month:GetComponent("Button").enabled = true
self.cardPres[i].btnText.text = "领取"
--self.cardPres[i].monthRedPot:SetActive(true)
CheckRedPointStatus(RedPointType.haoHuaBuJi)
self.cardPres[i].monthRedPot:SetActive(true)
state=1
-- self:RefreshStoneShow()
end)
@ -175,6 +152,8 @@ function HHBJPage:SetCardShow(i)
Util.SetGray(self.cardPres[i].month,true)
self.cardPres[i].month:GetComponent("Button").enabled = false
self.cardPres[i].btnText.text = Language[10101]
CheckRedPointStatus(RedPointType.haoHuaBuJi)
self.cardPres[i].monthRedPot:SetActive(false)
state=2
end)
end

View File

@ -655,6 +655,7 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.WeekCardReward, WeekCardManager.CheckRedReward)
RPData:AddCheckFunc(RedPointType.ZhongShenKa, ActivityGiftManager.CheckZhongShenKaRedPoint)
RPData:AddCheckFunc(RedPointType.haoHuaBuJi, ActivityGiftManager.CheckHHBJRedPoint)
RPData:AddCheckFunc(RedPointType.ImGM, ActivityGiftManager.CheckImGMRedPoint)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_gold,TailsManSoulManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_red,TailsManSoulManager.CheckRedData)
RPData:AddCheckFunc(RedPointType.tailsmanSoul_whiteGold,TailsManSoulManager.CheckRedData)