【七界试炼】修复无法取消激活
parent
b6a9cbc1c1
commit
eb816dcc89
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue