gm购买提示修改

wangzhenxing 2022-11-10 13:45:03 +08:00
parent 8533fb9a4d
commit d6ada9958a
4 changed files with 29 additions and 9 deletions

View File

@ -115,7 +115,7 @@ end
function this.upStarBtnOnClick()
NetManager.SendTransformationUpGradeRequest(type,curCardId,curSelectMat,this.UpdateWin)
end
local cardConfig
function this.UpdateWin()
curSelectMat={}
cardData=IncarnationManager.itemDataList[curCardId]
@ -164,9 +164,14 @@ function this.UpdateWin()
Util.GetGameObject(this.nextLvText.gameObject, "starImg"):SetActive(true)
this.curLvText.text=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=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.upStarBtn.gameObject:SetActive(true)
this.skillLayout.gameObject:SetActive(true)
@ -196,7 +201,12 @@ function this.UpdateWin()
this.SetPropInfo(this.nextProp,nextPropData)
starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",this.cardConfig.Star,"Level",curStar)
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="升 星"
if starConfig.PropList[2] then
this.costImg.gameObject:SetActive(true)
@ -269,7 +279,7 @@ end
--检测当前化身卡星级是否已升满
function this.CheckStarLimit()
local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,curCardId)
cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,curCardId)
if curStar>=cardConfig.StarMax then
return true
end

View File

@ -149,7 +149,7 @@ function this:InitComponent()
--gm礼包
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:SetActive(false)
--名望系统

View File

@ -6900,12 +6900,23 @@ function NetManager.SendGmBuyGoodRequest(_id,func)
local data = PlayerInfoProto_pb.GmBuyGoodRequest()
data.goodsId=_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()
Network:SendMessageWithCallBack(MessageTypeProto_pb.GmBuyGoodRequest,MessageTypeProto_pb.TEST_BUY_GIGT_GOODS_RESPONSE,msg,function(buffer)
local data = buffer:DataByte()
local msg = PlayerInfoProto_pb.BuyGoodsDropIndication()
msg:ParseFromString(data)
LogError("11111111111111111111111")
if func then
func(msg)
end

View File

@ -75,8 +75,7 @@ function this.Pay(id, func)
NetManager.SendGmBuyGoodRequest(id)
elseif rechargeConfig.BuyType==3 then --rmb/gm余额购买
local sureFunc=function()
NetManager.SendGmBuyGoodRequest(id,function()
end)
NetManager.SendGmBuyGoodRequest(id)
end
local cancelFunc=function()
if AppConst.isSDKLogin and rechargeConfig.Price > 0 then