【灵脉秘境】提交
parent
de7a516a87
commit
79d2113bc2
|
|
@ -72,7 +72,8 @@ function this.StartFight()
|
|||
if this.nodeData.uid == PlayerManager.uid then
|
||||
this.root:ClosePanel()
|
||||
else
|
||||
NetManager.LingMaiBattleRequest(this.nodeData.Id,function (msg)
|
||||
NetManager.LingMaiBattleRequest(this.nodeData.Id,2030,function (msg)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2030, 1)--更新特权
|
||||
this.root:ClosePanel()
|
||||
|
||||
|
||||
|
|
@ -81,7 +82,6 @@ function this.StartFight()
|
|||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.LINGMAIMIJING,function ()
|
||||
local arg = {}
|
||||
arg.panelType=2
|
||||
LogRed("msg.result:"..tostring(msg.result))
|
||||
arg.result = msg.result
|
||||
arg.blue = {}
|
||||
arg.blue.uid = PlayerManager.uid
|
||||
|
|
|
|||
|
|
@ -105,4 +105,26 @@ function this.OpenRecord()
|
|||
end)
|
||||
end
|
||||
|
||||
function this.CheckPrivilage(func)
|
||||
-- LogBlue("特权2030:"..tostring(PrivilegeManager.GetPrivilegeRemainValue(2030)).." 特权2031:"..tostring(PrivilegeManager.GetPrivilegeRemainValue(2031)))
|
||||
if PrivilegeManager.GetPrivilegeRemainValue(2030) <= 0 then
|
||||
if PrivilegeManager.GetPrivilegeRemainValue(2031) > 0 then
|
||||
local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FUNCTION_SHOP,10044, 1)
|
||||
local itemName = ConfigManager.GetConfigData(ConfigName.ItemConfig,costId).Name
|
||||
MsgPanel.ShowTwo(string.format( Language[10516],finalNum,itemName), nil, function()
|
||||
--买东西
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,10044,1,function()
|
||||
PopupTipPanel.ShowTip(Language[10517])
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(2031, 1)--更新特权
|
||||
func()
|
||||
end)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip("<color=red>今日已无挑战次数!</color>")
|
||||
end
|
||||
else
|
||||
func()
|
||||
end
|
||||
end
|
||||
|
||||
return LingMaiMiJingManager
|
||||
|
|
@ -123,7 +123,7 @@ function LingMaiMiJingPanel:OnShow()
|
|||
self:SetTime()
|
||||
self:SetMydata()
|
||||
self:SetVeins()
|
||||
self.groupList = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.LodeConfig,"Group",lodeConfig[LingMaiMiJingManager.myPlaceId].Group)
|
||||
self.groupList = ConfigManager.TryGetAllConfigsDataByKey(ConfigName.LodeConfig,"Group",lodeConfig[self.data.lingmaiData[1].Id].Group)
|
||||
self.lastBtn:SetActive(LingMaiMiJingManager.curPage - 1 > 0)
|
||||
self.nextBtn:SetActive(LingMaiMiJingManager.curPage + 1 <= 50)
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -6096,9 +6096,10 @@ function NetManager.GetLingMaiInfoRequest(_page, func)
|
|||
end
|
||||
|
||||
-- 灵脉秘境请求战斗
|
||||
function NetManager.LingMaiBattleRequest(_id, func)
|
||||
function NetManager.LingMaiBattleRequest(_id,_privilageTypeId, func)
|
||||
local data = ArenaInfoProto_pb.CrossLingmaiSecretAreaRequest()
|
||||
data.id = _id
|
||||
data.privilageTypeId = _privilageTypeId
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.CrossLingmaiSecretAreaRequest, MessageTypeProto_pb.CrossLingmaiSecretAreaResponse, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ function this.SpecialBtnShow()
|
|||
this.btnList[1]:SetActive(not bool)
|
||||
this.btnList[2]:SetActive(not bool)
|
||||
this.btnList[3]:SetActive(bool)
|
||||
if LingMaiMiJingManager.myPlaceId < this.data.Id then
|
||||
if LingMaiMiJingManager.myPlaceId ~= 0 and LingMaiMiJingManager.myPlaceId < this.data.Id then
|
||||
this.btnList[2]:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
|
@ -555,9 +555,15 @@ end
|
|||
|
||||
--灵脉秘境
|
||||
function this.LingMaiFormaion()
|
||||
this:ClosePanel()
|
||||
LogRed("data,Id:"..tostring(this.data))
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
|
||||
if this.data.uid == PlayerManager.uid then
|
||||
this:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
|
||||
else
|
||||
LingMaiMiJingManager.CheckPrivilage(function ()
|
||||
this:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.LINGMAIMIJING, this.data)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ function this.RefreshBtnShow()
|
|||
this.infoPopup.btnList[1]:SetActive(false)
|
||||
this.infoPopup.btnList[2]:SetActive(true)
|
||||
this.infoPopup.btnList[3]:SetActive(false)
|
||||
if LingMaiMiJingManager.myPlaceId < this.data.Id then
|
||||
if LingMaiMiJingManager.myPlaceId ~= 0 and LingMaiMiJingManager.myPlaceId < this.data.Id then
|
||||
this.infoPopup.btnBox:SetActive(false)
|
||||
this.infoPopup.btnList[2]:SetActive(false)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue