diff --git a/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingManager.lua b/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingManager.lua index 2ec70ed923..9f30dd21d8 100644 --- a/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingManager.lua @@ -90,8 +90,8 @@ function this.IsAllGet() return index < 1 end -function this.QiMenDunJiaDrawRequest(id,func) - NetManager.QiMenDunJiaDrawRequest(id,function(msg) +function this.QiMenDunJiaDrawRequest(id,num,func) + NetManager.QiMenDunJiaDrawRequest(id,num,function(msg) -- for i = 1,#msg.idList do -- LogGreen("msg.idList:"..msg.idList[i]) -- end diff --git a/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingPanel.lua b/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingPanel.lua index 19218e4992..0528fb345c 100644 --- a/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/linglongbaojing/LingLongBaoJingPanel.lua @@ -111,7 +111,7 @@ function LingLongBaoJingPanel:InitComponent(gameObject) self.skip = Util.GetGameObject(self.gameObject,"button/skip") self.check = Util.GetGameObject(self.skip,"Go") - + self.checkText = Util.GetGameObject(self.skip,"Text"):GetComponent("Text")--幸运值 if not PlayerPrefs.HasKey("Linglongbaojing_SkipAnim"..PlayerManager.uid) then PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,0) end @@ -147,6 +147,7 @@ function LingLongBaoJingPanel:BindEvent() skip = skip == 0 and 1 or 0 PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,skip) self.check.gameObject:SetActive(skip ~= 0) + self:SetPropShow() end) Util.AddClick(self.propBtn, function() @@ -154,7 +155,13 @@ function LingLongBaoJingPanel:BindEvent() PopupTipPanel.ShowTip("道具不足") return end - LingLongBaoJingManager.QiMenDunJiaDrawRequest(self.actId,function(idList,_drop) + local count = BagManager.GetItemCountById(self.costId) + local TenCount = (a * 10^3 + b * 10^2 + c * 10 ^1 + d * 10^0) + local num = 1 + if count >= TenCount and skip == 1 then + num = 10 + end + LingLongBaoJingManager.QiMenDunJiaDrawRequest(self.actId,num,function(idList,_drop) if not idList[1] then PopupTipPanel.ShowTip("转盘奖励出错了") return @@ -513,6 +520,7 @@ end function LingLongBaoJingPanel:SetPropShow() self.propImage.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(self.costId)) local count = BagManager.GetItemCountById(self.costId) + local tenCount = (a * 10^3 + b * 10^2 + c * 10^1 + d * 10^0) local singleCount = (a * 1^3 + b * 1^2 + c * 1 ^1 + d * 1^0) local color if singleCount <= count then @@ -522,7 +530,16 @@ function LingLongBaoJingPanel:SetPropShow() self.enough = false color = "FF0000" end - self.propText.text = string.format("×%s",color,singleCount) + local tempCount = singleCount + if tenCount <= count then + self.checkText.text = "十连跳过动画" + if skip == 1 then + tempCount = tenCount + end + else + self.checkText.text = "跳过动画" + end + self.propText.text = string.format("×%s",color,tempCount) end function LingLongBaoJingPanel:CreatBox()