Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
jiaoyangna 2021-10-08 11:55:25 +08:00
commit 14008964fc
1 changed files with 17 additions and 9 deletions

View File

@ -28,18 +28,26 @@ end
function QiJieSingleTreasure:BindEvent()
Util.AddClick(self.activeBtn,function()
if BagManager.GetTotalItemNum(self.data.Cost[1])>=self.data.Cost[2] then
local state = self.data.state
local state = self.data.state
if state == 2 then
if BagManager.GetTotalItemNum(self.data.Cost[1])>=self.data.Cost[2] then
NetManager.SevenWorldRelicRequest(self.data.Id,function ()
Game.GlobalEvent:DispatchEvent(GameEvent.QiJieShiLian.BuySingleTreasure)
self.parent:ClosePanel()
PopupTipPanel.ShowTip("<color=red>成功解锁遗物并将其激活!</color>")
end)
end
elseif state == 0 then
NetManager.SevenWorldRelicRequest(self.data.Id,function ()
Game.GlobalEvent:DispatchEvent(GameEvent.QiJieShiLian.BuySingleTreasure)
self.parent:ClosePanel()
if state == 0 then
PopupTipPanel.ShowTip("<color=red>已激活遗物!</color>")
elseif state == 1 then
PopupTipPanel.ShowTip("<color=red>已取消遗物激活状态!</color>")
elseif state == 2 then
PopupTipPanel.ShowTip("<color=red>成功解锁遗物并将其激活!</color>")
end
PopupTipPanel.ShowTip("<color=red>已激活遗物!</color>")
end)
elseif state == 1 then
NetManager.SevenWorldRelicRequest(self.data.Id,function ()
Game.GlobalEvent:DispatchEvent(GameEvent.QiJieShiLian.BuySingleTreasure)
self.parent:ClosePanel()
PopupTipPanel.ShowTip("<color=red>已取消遗物激活状态!</color>")
end)
end
end)