gm购买提示修改
parent
8533fb9a4d
commit
d6ada9958a
|
@ -115,7 +115,7 @@ end
|
||||||
function this.upStarBtnOnClick()
|
function this.upStarBtnOnClick()
|
||||||
NetManager.SendTransformationUpGradeRequest(type,curCardId,curSelectMat,this.UpdateWin)
|
NetManager.SendTransformationUpGradeRequest(type,curCardId,curSelectMat,this.UpdateWin)
|
||||||
end
|
end
|
||||||
|
local cardConfig
|
||||||
function this.UpdateWin()
|
function this.UpdateWin()
|
||||||
curSelectMat={}
|
curSelectMat={}
|
||||||
cardData=IncarnationManager.itemDataList[curCardId]
|
cardData=IncarnationManager.itemDataList[curCardId]
|
||||||
|
@ -164,9 +164,14 @@ function this.UpdateWin()
|
||||||
Util.GetGameObject(this.nextLvText.gameObject, "starImg"):SetActive(true)
|
Util.GetGameObject(this.nextLvText.gameObject, "starImg"):SetActive(true)
|
||||||
this.curLvText.text=curStar
|
this.curLvText.text=curStar
|
||||||
LogError("curStar==="..curStar)
|
LogError("curStar==="..curStar)
|
||||||
local curStarConfig= ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",this.cardConfig.Star,"Level",curStar)
|
|
||||||
--this.curDrop.text=curStar>0 and curStarConfig.StarUpExp[2] or 0
|
--this.curDrop.text=curStar>0 and curStarConfig.StarUpExp[2] or 0
|
||||||
this.curDrop.text=curStarConfig.StarUpExp[2]
|
if curStar==0 then
|
||||||
|
this.curDrop.text=0
|
||||||
|
else
|
||||||
|
local curStarConfig= ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",this.cardConfig.Star,"Level",curStar-1)
|
||||||
|
this.curDrop.text=curStarConfig.StarUpExp[2]
|
||||||
|
end
|
||||||
this.upLvBtn.gameObject:SetActive(false)
|
this.upLvBtn.gameObject:SetActive(false)
|
||||||
this.upStarBtn.gameObject:SetActive(true)
|
this.upStarBtn.gameObject:SetActive(true)
|
||||||
this.skillLayout.gameObject:SetActive(true)
|
this.skillLayout.gameObject:SetActive(true)
|
||||||
|
@ -196,7 +201,12 @@ function this.UpdateWin()
|
||||||
this.SetPropInfo(this.nextProp,nextPropData)
|
this.SetPropInfo(this.nextProp,nextPropData)
|
||||||
starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",this.cardConfig.Star,"Level",curStar)
|
starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",this.cardConfig.Star,"Level",curStar)
|
||||||
this.SetCostItem(starConfig.PropList[1])
|
this.SetCostItem(starConfig.PropList[1])
|
||||||
this.nextDrop.text="+"..starConfig.StarUpExp[2]
|
if curStar==this.cardConfig.StarMax then
|
||||||
|
this.nextDrop.text="+"..0
|
||||||
|
else
|
||||||
|
this.nextDrop.text="+"..starConfig.StarUpExp[2]
|
||||||
|
end
|
||||||
|
|
||||||
this.upStarText.text="升 星"
|
this.upStarText.text="升 星"
|
||||||
if starConfig.PropList[2] then
|
if starConfig.PropList[2] then
|
||||||
this.costImg.gameObject:SetActive(true)
|
this.costImg.gameObject:SetActive(true)
|
||||||
|
@ -269,7 +279,7 @@ end
|
||||||
|
|
||||||
--检测当前化身卡星级是否已升满
|
--检测当前化身卡星级是否已升满
|
||||||
function this.CheckStarLimit()
|
function this.CheckStarLimit()
|
||||||
local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,curCardId)
|
cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,curCardId)
|
||||||
if curStar>=cardConfig.StarMax then
|
if curStar>=cardConfig.StarMax then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -149,7 +149,7 @@ function this:InitComponent()
|
||||||
|
|
||||||
--gm礼包
|
--gm礼包
|
||||||
this.btnGMGift=Util.GetGameObject(self.gameObject,"RightDown/btnGMGift")
|
this.btnGMGift=Util.GetGameObject(self.gameObject,"RightDown/btnGMGift")
|
||||||
Util.GetGameObject(this.btnGMGift,"Image"):GetComponent("Image").sprite=this.spLoader:LoadSprite("gm_change_maincity_btn_zh")
|
--Util.GetGameObject(this.btnGMGift,"Image"):GetComponent("Image").sprite=this.spLoader:LoadSprite("gm_change_maincity_btn_zh")
|
||||||
this.gmRedPoint = Util.GetGameObject(this.btnGMGift,"redPoint")
|
this.gmRedPoint = Util.GetGameObject(this.btnGMGift,"redPoint")
|
||||||
this.gmRedPoint:SetActive(false)
|
this.gmRedPoint:SetActive(false)
|
||||||
--名望系统
|
--名望系统
|
||||||
|
|
|
@ -6900,12 +6900,23 @@ function NetManager.SendGmBuyGoodRequest(_id,func)
|
||||||
local data = PlayerInfoProto_pb.GmBuyGoodRequest()
|
local data = PlayerInfoProto_pb.GmBuyGoodRequest()
|
||||||
data.goodsId=_id
|
data.goodsId=_id
|
||||||
LogError("id========================".._id)
|
LogError("id========================".._id)
|
||||||
|
local gmConfig=ConfigManager.GetConfigDataByKey(ConfigName.GMMaster,"PackID",_id)
|
||||||
|
local isCan=CheckGMIsOpen(gmConfig.Unlock[1][1],gmConfig.Unlock[1][2])
|
||||||
|
if isCan ==false then
|
||||||
|
PopupTipPanel.ShowTip(gmConfig.UnlockTips)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
|
||||||
|
if gmConfig.Price[1][1]==1367 and BagManager.GetItemCountById(1367)<gmConfig.Price[1][2] then
|
||||||
|
PopupTipPanel.ShowTip("GM余额不足")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
local msg = data:SerializeToString()
|
local msg = data:SerializeToString()
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.GmBuyGoodRequest,MessageTypeProto_pb.TEST_BUY_GIGT_GOODS_RESPONSE,msg,function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.GmBuyGoodRequest,MessageTypeProto_pb.TEST_BUY_GIGT_GOODS_RESPONSE,msg,function(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = PlayerInfoProto_pb.BuyGoodsDropIndication()
|
local msg = PlayerInfoProto_pb.BuyGoodsDropIndication()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
LogError("11111111111111111111111")
|
|
||||||
if func then
|
if func then
|
||||||
func(msg)
|
func(msg)
|
||||||
end
|
end
|
||||||
|
|
|
@ -75,8 +75,7 @@ function this.Pay(id, func)
|
||||||
NetManager.SendGmBuyGoodRequest(id)
|
NetManager.SendGmBuyGoodRequest(id)
|
||||||
elseif rechargeConfig.BuyType==3 then --rmb/gm余额购买
|
elseif rechargeConfig.BuyType==3 then --rmb/gm余额购买
|
||||||
local sureFunc=function()
|
local sureFunc=function()
|
||||||
NetManager.SendGmBuyGoodRequest(id,function()
|
NetManager.SendGmBuyGoodRequest(id)
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
local cancelFunc=function()
|
local cancelFunc=function()
|
||||||
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then
|
||||||
|
|
Loading…
Reference in New Issue