[gm]=======转盘置灰修改
parent
ac078416dd
commit
ead905fecb
|
@ -102,6 +102,8 @@ function GMTurnTablePanel:InitComponent(gameObject)
|
|||
this.costItemNumText=Util.GetGameObject(this.detail,"CostItemNumText"):GetComponent("Text")
|
||||
this.freeRefreshTime=Util.GetGameObject(this.luckyTurnPanel,"FreeRefreshTime/Text"):GetComponent("Text")
|
||||
this.leftTimeTxt=Util.GetGameObject(this.luckyTurnPanel,"leftTimeTxt/Text1"):GetComponent("Text")
|
||||
this.infoTxt=Util.GetGameObject(this.luckyTurnPanel,"Content/Text"):GetComponent("Text")
|
||||
this.progressTxt=Util.GetGameObject(this.luckyTurnPanel,"Content/progress"):GetComponent("Text")
|
||||
-- 奖励预览
|
||||
this.btnPreview = Util.GetGameObject(self.gameObject, "Panel/btnPreview")
|
||||
this.maxTimes = Util.GetGameObject(self.gameObject, "Panel/maxTimes"):GetComponent("Text")
|
||||
|
@ -244,9 +246,13 @@ function this.SwitchTreasureType(treasureType)
|
|||
this.bg1.sprite=this.spLoader:LoadSprite(BgName[1])
|
||||
this.bg2.sprite=this.spLoader:LoadSprite(BgName[2])
|
||||
this.RrFreshInfo()
|
||||
|
||||
local rewardConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.DialRewardConfig,"ActivityId",treasureType,"Rank",1)
|
||||
local aaa="保底"..rewardConfig.MaxGoalCount.."次中超级大奖"
|
||||
this.infoTxt.text= aaa
|
||||
this.progressTxt.text=leftTime.."/"..rewardConfig.MaxGoalCount
|
||||
--请求跑马灯物品数据
|
||||
NetManager.GetLuckyWheelRequest(treasureType,function(msg)
|
||||
LuckyTurnTableManager.luckyData=msg.dialInfo[1].rewardInfo
|
||||
this.SetItemViewShow(msg.dialInfo[1].rewardInfo,function()
|
||||
this.SetItemViewGray(msg.dialInfo[1].rewardInfo)
|
||||
end)
|
||||
|
@ -436,7 +442,9 @@ end
|
|||
---设置跑马灯物品置灰
|
||||
function this.SetItemViewGray(data)
|
||||
for i = 1, #data do
|
||||
--LogError("data[i].luckId=="..data[i].luckId)
|
||||
if LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum~=0 then
|
||||
--LogError("data[i].luckTimes=="..data[i].luckTimes)
|
||||
local isGray = data[i].luckTimes >= LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum
|
||||
Util.SetGray(this.itemViewList[i].gameObject, isGray)
|
||||
this.itemViewList[i]:SetEffectShow(not isGray)
|
||||
|
|
|
@ -149,16 +149,16 @@ function this.GetLuckyTurnRankRequest(activityId,repeated,priId,func)
|
|||
NetManager.GetLuckyTurnRankRequest(activityId,repeated, priId,function(msg)
|
||||
--if activityId==TreasureType.Lucky then
|
||||
this.luckyTempData=msg --存储临时数据 主要包括Drop
|
||||
this.luckyData=msg.dialInfo.rewardInfo
|
||||
--this.luckyData=msg.dialInfo.rewardInfo
|
||||
--在登陆时 服务器会把所有物品数据推给我posInfos 包括已抽取次数 我可以把数据先保存下来 在每次请求数据时 通过回调的数据来动态改变现有数据的属性
|
||||
-- for i = 1, #this.luckyData do
|
||||
-- --Log("原数据 位置"..this.luckyData[i].pos.." luckId"..this.luckyData[i].luckId.." 已抽次数"..this.luckyData[i].luckTimes)
|
||||
-- for j = 1, #msg.posInfos do
|
||||
-- if this.luckyData[i].luckId==msg.posInfos[j].luckId then
|
||||
-- this.luckyData[i].luckTimes=msg.posInfos[j].luckTimes
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
for i = 1, #this.luckyData do
|
||||
--Log("原数据 位置"..this.luckyData[i].pos.." luckId"..this.luckyData[i].luckId.." 已抽次数"..this.luckyData[i].luckTimes)
|
||||
for j = 1, #msg.dialInfo.rewardInfo do
|
||||
if this.luckyData[i].luckId==msg.dialInfo.rewardInfo[j].luckId then
|
||||
this.luckyData[i].luckTimes=msg.dialInfo.rewardInfo[j].luckTimes
|
||||
end
|
||||
end
|
||||
end
|
||||
--for i = 1, #this.luckyData do
|
||||
-- Log("现数据 位置"..this.luckyData[i].pos.." luckId"..this.luckyData[i].luckId.." 已抽次数"..this.luckyData[i].luckTimes)
|
||||
--end
|
||||
|
|
Loading…
Reference in New Issue