逍遥 红点提交
parent
46500fd5f9
commit
876fddb02b
|
|
@ -79,17 +79,11 @@ function this.StartXiaoYao()
|
|||
NetManager.JourneyDoResponse(this.curMapId,function (msg)
|
||||
--0、普通节点 1、奖励节点 2、双倍节点 3、额外骰子节点 4、招募英雄节点 5、怪物节点 6,转盘
|
||||
if msg.pathType == 5 then
|
||||
this.InitMonsterData(msg.monster,2)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(3)),1)
|
||||
this.CheckRedPoint2()
|
||||
this.InitMonsterData(msg.monster,2)
|
||||
elseif msg.pathType == 6 then
|
||||
this.InitLuckyTurnTables(msg)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(2)),1)
|
||||
this.CheckRedPoint2()
|
||||
elseif msg.pathType == 4 then
|
||||
this.InitHeroData(msg.goodsInfo,2)
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(this.curMapId),tostring(1)),1)
|
||||
this.CheckRedPoint2()
|
||||
elseif msg.pathType == 0 then
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.XiaoYao.StartXiaoYao, msg)
|
||||
|
|
@ -354,9 +348,8 @@ function this.CheckRedPoint(_mapId,_eventId)
|
|||
if eventId and eventId > 0 and mapId and mapId > 0 then
|
||||
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(eventId))) == 1 then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return false
|
||||
elseif mapId and mapId > 0 then
|
||||
for i = 1 , 3 do
|
||||
if PlayerPrefs.GetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(mapId),tostring(i))) == 1 then
|
||||
|
|
@ -383,6 +376,7 @@ function this.CheckRedPoint(_mapId,_eventId)
|
|||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ function this.EventTrigger(_data)
|
|||
Log("游戏当前时间为:"..PlayerManager.serverTime)
|
||||
Log("触发事件时间为:".._data.overTime)
|
||||
if _data.pathType==0 then --普通节点
|
||||
LogGreen("普通奖励:"..#_data.drop)
|
||||
--LogGreen("普通奖励:"..#_data.drop)
|
||||
elseif _data.pathType==1 then --宝箱
|
||||
Log("获得一个宝箱!")
|
||||
elseif _data.pathType==2 then --双倍节点
|
||||
|
|
@ -306,12 +306,18 @@ function this.EventTrigger(_data)
|
|||
saiNum=2
|
||||
elseif _data.pathType==4 then --东海寻仙节点
|
||||
targetBtn=this.shopBtn
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(1)),1)
|
||||
XiaoYaoManager.CheckRedPoint2()
|
||||
this.SetEventBtn(_data)
|
||||
elseif _data.pathType==5 then --怪物节点
|
||||
targetBtn=this.bossBtn
|
||||
targetBtn=this.bossBtn
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(3)),1)
|
||||
XiaoYaoManager.CheckRedPoint2()
|
||||
this.SetEventBtn(_data)
|
||||
elseif _data.pathType==6 then --转盘
|
||||
targetBtn=this.rouleBtn
|
||||
PlayerPrefs.SetInt(string.format("%s#%s#%s",PlayerManager.uid,tostring(XiaoYaoManager.curMapId),tostring(2)),1)
|
||||
XiaoYaoManager.CheckRedPoint2()
|
||||
this.SetEventBtn(_data)
|
||||
elseif _data.pathType==7 then --终极大奖
|
||||
UIManager.OpenPanel(UIName.XiaoYaoEventPanel,0,_data.drop)
|
||||
|
|
@ -478,8 +484,11 @@ end
|
|||
--刷新界面事件入口按钮显示隐藏
|
||||
function this.RefreshEventBtn()
|
||||
this.bossRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,3))
|
||||
this.rouleRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2))
|
||||
--LogGreen("3:"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,3)))
|
||||
this.rouleRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2))
|
||||
--LogGreen("2:"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,2)))
|
||||
this.shopRedPoint:SetActive(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,1))
|
||||
--LogGreen("1"..tostring(XiaoYaoManager.CheckRedPoint(XiaoYaoManager.curMapId,1)))
|
||||
if XiaoYaoManager.luckyluckyTurnTableTimes > 0 and (XiaoYaoManager.luckyluckyTurnTableRemainTime - PlayerManager.serverTime > 0) then
|
||||
this.rouleBtn:SetActive(true)
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue