【御剑行】提价
parent
67026aa355
commit
4b6079d4e8
|
|
@ -76,7 +76,11 @@ function this:Refresh(func)
|
|||
end
|
||||
Util.AddOnceClick(btnBet,function ()
|
||||
if BagManager.GetTotalItemNum(configData.JoinCost[1]) < configData.JoinCost[2] then
|
||||
PopupTipPanel.ShowTip("御剑令不足,无法开示竞猜!")
|
||||
PopupTipPanel.ShowTip("御剑令不足,无法开始竞猜!")
|
||||
return
|
||||
end
|
||||
if configData.JoinCount - YuJianXingManager.joinCount <= 0 then
|
||||
PopupTipPanel.ShowTip("竞猜次数不足,无法开始竞猜!")
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.YuJianXingBetSelectNum,i)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
----- --御剑行上轮排名 -----
|
||||
local this = {}
|
||||
local rankImg = {
|
||||
[1] = "d_dianfrngsai_guanjun_zh",
|
||||
[2] = "d_dianfrngsai_yajun_zh",
|
||||
[3] = "d_dianfrngsai_ji_zh",
|
||||
[1] = "r_Dungeon_001",
|
||||
[2] = "r_Dungeon_002",
|
||||
[3] = "r_Dungeon_003",
|
||||
[4] = "y_yujianxing_paimingsi",
|
||||
}
|
||||
local SwordImg = {
|
||||
|
|
|
|||
|
|
@ -5935,9 +5935,6 @@ function this.RidingSwardRewardRequest(_time,_swardId,func)
|
|||
local data = buffer:DataByte()
|
||||
local msg = ActivityProto_pb.RidingSwardRewardResponse()
|
||||
msg:ParseFromString(data)
|
||||
for i = 1, #msg.drop.itemlist do
|
||||
LogPink(tostring(msg.drop.itemlist[i].itemId).." "..tostring(msg.drop.itemlist[i].itemNum))
|
||||
end
|
||||
if func then
|
||||
func(msg)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -305,9 +305,6 @@ function this.InitRedPointAllRelate()
|
|||
RPData:SetParent(RedPointType.DailyRecharge,RedPointType.RightUp2)
|
||||
--七界试炼
|
||||
RPData:SetParent(RedPointType.QiJieShiLian, RedPointType.JumpServer_MainCity)
|
||||
--御剑行
|
||||
RPData:SetParent(RedPointType.YuJianXingRecord, RedPointType.YuJianXingMian)
|
||||
RPData:SetParent(RedPointType.YuJianXingTime, RedPointType.YuJianXingMian)
|
||||
|
||||
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityGroups)) do
|
||||
if v.RpType > 0 and v.RpTypeParent > 0 then
|
||||
|
|
@ -577,8 +574,7 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.QiJieShiLian,QiJieShiLianManager.CheckQiJieRedPoint,FUNCTION_OPEN_TYPE.QIJIESHILIAN)
|
||||
RPData:AddCheckFunc(RedPointType.LikeabilityRed,LikabilityManager.CheckRedPot)
|
||||
--御剑行
|
||||
RPData:AddCheckFunc(RedPointType.YuJianXingRecord,YuJianXingManager.CheckBetRecord)
|
||||
RPData:AddCheckFunc(RedPointType.YuJianXingTime,YuJianXingManager.CheckBetTime)
|
||||
RPData:AddCheckFunc(RedPointType.YuJianXingMian,YuJianXingManager.CheckRedPoint)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
|
|||
|
|
@ -86,8 +86,9 @@ function this:SingleDataShow(go,data)
|
|||
-- LogPink("时间:"..tostring(TimeStampToDateStr4(data.time/1000)).." 结果:"..tostring(data.result).." 状态:"..tostring(data.state))
|
||||
Util.AddOnceClick(btnGet,function ()
|
||||
NetManager.RidingSwardRewardRequest(data.time,data.betSwardId,function (msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1)
|
||||
self:Refresh(false,false)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1,function ()
|
||||
self:Refresh(false,false)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -128,12 +128,18 @@ function this.ResetPlayerPosVertical()
|
|||
this.riceCtrl:ResetPlayerPosVertical()
|
||||
end
|
||||
|
||||
function this.CheckBetTime()
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YuJianXing)
|
||||
NetManager.RidingSwardActivityRequest(id,function ()
|
||||
LogGreen("御剑行:"..tostring(configData.JoinCount - this.joinCount ))
|
||||
return configData.JoinCount - this.joinCount > 0
|
||||
end)
|
||||
function this.CheckRedPoint()
|
||||
local state1 = false
|
||||
local state2 = false
|
||||
if configData.JoinCount - this.joinCount > 0 then
|
||||
state1 = true
|
||||
end
|
||||
for i = 1, #this.curRecordList do
|
||||
if this.curRecordList[i].state == 0 then
|
||||
state2 = true
|
||||
end
|
||||
end
|
||||
return state1 or state2
|
||||
end
|
||||
function this.CheckBetRecord()
|
||||
NetManager.RidingSwardInfoRequest(function ()
|
||||
|
|
@ -148,4 +154,13 @@ function this.CheckBetRecord()
|
|||
end)
|
||||
end
|
||||
|
||||
function this.CheckRecordList()
|
||||
for i = 1, #this.curRecordList do
|
||||
if this.curRecordList[i].state == 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return YuJianXingManager
|
||||
|
|
@ -57,6 +57,10 @@ function YuJianXingPanel:BindEvent()
|
|||
end)
|
||||
|
||||
Util.AddOnceClick(self.btnRecord,function ()
|
||||
if #YuJianXingManager.curRecordList <= 0 then
|
||||
PopupTipPanel.ShowTip("暂无竞猜纪录!")
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.YuJianXingRecord)
|
||||
end)
|
||||
|
||||
|
|
@ -71,7 +75,6 @@ function YuJianXingPanel:BindEvent()
|
|||
end
|
||||
JumpManager.GoJump(20003)
|
||||
end)
|
||||
BindRedPointObject(RedPointType.YuJianXingRecord,self.redPoint)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
@ -91,6 +94,7 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function YuJianXingPanel:OnOpen()
|
||||
NetManager.RidingSwardInfoRequest()
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
|
|
@ -107,7 +111,6 @@ end
|
|||
function YuJianXingPanel:Refresh()
|
||||
YuJianXingManager.HideAllPlayers(not YuJianXingManager.InWaiting)
|
||||
self.waiting:SetActive(YuJianXingManager.InWaiting)
|
||||
CheckRedPointStatus(RedPointType.YuJianXingRecord)
|
||||
--为小人在地图上下移动做处理
|
||||
self.count = 0
|
||||
self:SetTime()
|
||||
|
|
@ -166,7 +169,9 @@ function YuJianXingPanel:SetTime()
|
|||
elseif YuJianXingManager.curState == 2 then
|
||||
self.nextRoundTime.text = string.format("比赛进行中···")
|
||||
end
|
||||
self.redPoint:SetActive(YuJianXingManager.CheckRecordList())
|
||||
self.timer = Timer.New(function ()
|
||||
self.redPoint:SetActive(YuJianXingManager.CheckRecordList())
|
||||
--设置人物上下飘动2s重置一次
|
||||
if self.count % 2 == 0 then
|
||||
YuJianXingManager.ResetPlayerPosVertical()
|
||||
|
|
@ -218,7 +223,6 @@ end
|
|||
--界面销毁时调用(用于子类重写)
|
||||
function YuJianXingPanel:OnDestroy()
|
||||
SubUIManager.Close(self.UpView)
|
||||
ClearRedPointObject(RedPointType.YuJianXingRecord,self.redPoint)
|
||||
end
|
||||
|
||||
return YuJianXingPanel
|
||||
Loading…
Reference in New Issue