抽卡提示修改提交

dev_chengFeng
jiaoyangna 2021-11-27 15:29:46 +08:00
parent f6c0b80512
commit e9862a7046
5 changed files with 70 additions and 13 deletions

View File

@ -38,6 +38,7 @@ function QianKunBoxBuyOnePanel:InitComponent()
this.content3=Util.GetGameObject(self.gameObject,"bottom/openOneAgainButton/Content3") this.content3=Util.GetGameObject(self.gameObject,"bottom/openOneAgainButton/Content3")
this.detailImage3=Util.GetGameObject(this.content3, "Tip") this.detailImage3=Util.GetGameObject(this.content3, "Tip")
this.detailText2 = Util.GetGameObject(this.detailImage3, "contentDetailText"):GetComponent("Text")
this.itemIcon3=Util.GetGameObject(this.content3, "icon"):GetComponent("Image") this.itemIcon3=Util.GetGameObject(this.content3, "icon"):GetComponent("Image")
this.itemNum3=Util.GetGameObject(this.content3, "num"):GetComponent("Text") this.itemNum3=Util.GetGameObject(this.content3, "num"):GetComponent("Text")
@ -114,6 +115,20 @@ function QianKunBoxBuyOnePanel:OnSortingOrderChange()
end end
end end
function QianKunBoxBuyOnePanel:GetSendStr()
local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
if str == "" then
str = str.."赠送"
else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end
return str
end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function QianKunBoxBuyOnePanel:OnOpen(...) function QianKunBoxBuyOnePanel:OnOpen(...)
SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen) SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen)
@ -151,8 +166,10 @@ function QianKunBoxBuyOnePanel:OnOpen(...)
itemNum=d[2] itemNum=d[2]
this.itemIcon3.sprite=this.spLoader:LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name) this.itemIcon3.sprite=this.spLoader:LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
this.itemNum3.text= tostring(itemNum) this.itemNum3.text= tostring(itemNum)
this.detailText.text = Language[10498] local str = this:GetSendStr()
this.detailText.text = str
this.detailText1.text = str
this.detailText2.text = str
Util.ClearChild(Util.GetTransform(this.content, "itemContent1")) Util.ClearChild(Util.GetTransform(this.content, "itemContent1"))
this.itemDataList={} this.itemDataList={}
this.itemDataList=BagManager.GetTableByBackDropData(this.drop) this.itemDataList=BagManager.GetTableByBackDropData(this.drop)

View File

@ -121,6 +121,19 @@ function QianKunBoxBuyTenPanel:OnSortingOrderChange()
end end
end end
function QianKunBoxBuyTenPanel:GetSendStr()
local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
if str == "" then
str = str.."赠送"
else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end
return str
end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function QianKunBoxBuyTenPanel:OnOpen(...) function QianKunBoxBuyTenPanel:OnOpen(...)
SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen) SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen)
@ -168,9 +181,9 @@ function QianKunBoxBuyTenPanel:OnOpen(...)
itemNum=d[2] itemNum=d[2]
this.itemIcon3.sprite=this.spLoader:LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name) this.itemIcon3.sprite=this.spLoader:LoadSprite(artResourcesConfig[ItemConfig[itemId].ResourceID].Name)
this.itemNum3.text= tostring(itemNum) this.itemNum3.text= tostring(itemNum)
local str = this:GetSendStr()
this.detailText.text = Language[10499] this.detailText.text = str
this.detailText1.text = str
local itemDataList={} local itemDataList={}
itemDataList=BagManager.GetTableByBackDropData(this.drop) itemDataList=BagManager.GetTableByBackDropData(this.drop)
this.openTenAgainButton:GetComponent("Button").enabled=false this.openTenAgainButton:GetComponent("Button").enabled=false

View File

@ -98,7 +98,7 @@ function this:RefreshData()
end end
itemList[i].items[j].go.gameObject:SetActive(true) itemList[i].items[j].go.gameObject:SetActive(true)
itemList[i].items[j].item:OnOpen(false,{self.curData[i].trumpChipList[j],0}, 1.1, true, false, false, sortingOrder + 1) itemList[i].items[j].item:OnOpen(false,{self.curData[i].trumpChipList[j],0}, 1.1, true, false, false, sortingOrder + 1)
itemList[i].items[j].lv.text = TailsManSoulManager.GetTailsmanLvById(self.curData[i].trumpList[j].id) itemList[i].items[j].lv.text = TailsManSoulManager.GetTailsmanLvById(self.curData[i].trumpList[j].id)..""
itemList[i].items[j].select.gameObject:SetActive(this:CheckIsSelect(self.curData[i].trumpChipList[j])) itemList[i].items[j].select.gameObject:SetActive(this:CheckIsSelect(self.curData[i].trumpChipList[j]))
Util.AddOnceClick(itemList[i].items[j].pos,function() Util.AddOnceClick(itemList[i].items[j].pos,function()
if this:CheckIsSelect(self.curData[i].trumpChipList[j]) then if this:CheckIsSelect(self.curData[i].trumpChipList[j]) then

View File

@ -103,6 +103,19 @@ function SecretBoxBuyOnePanel:OnSortingOrderChange()
this.view:OnOpen(true,this.itemDataList[1],1.4,true,false,false,self.sortingOrder) this.view:OnOpen(true,this.itemDataList[1],1.4,true,false,false,self.sortingOrder)
end end
end end
function SecretBoxBuyOnePanel:GetSendStr()
local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
if str == "" then
str = str.."赠送"
else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end
return str
end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function SecretBoxBuyOnePanel:OnOpen(...) function SecretBoxBuyOnePanel:OnOpen(...)
self.bg.gameObject:SetActive(false) self.bg.gameObject:SetActive(false)
@ -121,11 +134,12 @@ function SecretBoxBuyOnePanel:OnOpen(...)
this.content2:SetActive(this.recruitType == drawtType.FindFairySingle) this.content2:SetActive(this.recruitType == drawtType.FindFairySingle)
this.detailText.enabled=this.recruitType~=drawtType.FindFairySingle this.detailText.enabled=this.recruitType~=drawtType.FindFairySingle
this.detailText1.enabled=this.recruitType~=drawtType.FindFairySingle this.detailText1.enabled=this.recruitType~=drawtType.FindFairySingle
local str = this:GetSendStr()
this.detailText.text = str
this.detailText1.text = str
if this.recruitType <= RecruitType.LightDarkSingle then --光暗什么...的抽卡 if this.recruitType <= RecruitType.LightDarkSingle then --光暗什么...的抽卡
this.itemIcon1.sprite=this.spLoader:LoadSprite("r_RareItem_Specail_0002") this.itemIcon1.sprite=this.spLoader:LoadSprite("r_RareItem_Specail_0002")
this.detailText.text = "赠送1个元神玉和20个置换玉"
this.detailText1.text = "赠送1个元神玉和20个置换玉"
elseif this.recruitType == drawtType.FindFairySingle then --东海寻仙 elseif this.recruitType == drawtType.FindFairySingle then --东海寻仙
this.FindFairyCountDown(FindFairyManager.GetActivityTime()) this.FindFairyCountDown(FindFairyManager.GetActivityTime())
FindFairyManager.SetFreeExtract(1) FindFairyManager.SetFreeExtract(1)

View File

@ -112,7 +112,19 @@ function SecretBoxBuyTenPanel:OnSortingOrderChange()
view:OnOpen(true,this.itemDataList[index],1.4,true,false,false,self.sortingOrder) view:OnOpen(true,this.itemDataList[index],1.4,true,false,false,self.sortingOrder)
end end
end end
end
function SecretBoxBuyTenPanel:GetSendStr()
local str = ""
for k,v in ipairs(lotterySetting[this.recruitType].TenTimesMustGetItem) do
if str == "" then
str = str.."赠送"
else
str = str..""
end
str = str..v[2]..""..ItemConfig[v[1]].Name
end
return str
end end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function SecretBoxBuyTenPanel:OnOpen(...) function SecretBoxBuyTenPanel:OnOpen(...)
@ -121,7 +133,7 @@ function SecretBoxBuyTenPanel:OnOpen(...)
local args = { ... } local args = { ... }
this.drop=args[1] this.drop=args[1]
this.recruitType=args[2] this.recruitType=args[2]
if this.recruitType then if this.recruitType then
this.detailImage:SetActive(this.recruitType <= RecruitType.LightDarkSingle) this.detailImage:SetActive(this.recruitType <= RecruitType.LightDarkSingle)
this.content1:SetActive(this.recruitType <= RecruitType.LightDarkSingle) this.content1:SetActive(this.recruitType <= RecruitType.LightDarkSingle)
@ -129,10 +141,11 @@ function SecretBoxBuyTenPanel:OnOpen(...)
this.detailText.enabled=this.recruitType~=drawtType.FindFairySingle this.detailText.enabled=this.recruitType~=drawtType.FindFairySingle
this.detailText1.enabled=this.recruitType~=drawtType.FindFairySingle this.detailText1.enabled=this.recruitType~=drawtType.FindFairySingle
local str = this:GetSendStr()
this.detailText.text = str
this.detailText1.text = str
if this.recruitType <= RecruitType.LightDarkSingle then if this.recruitType <= RecruitType.LightDarkSingle then
this.itemIcon1.sprite=this.spLoader:LoadSprite("r_RareItem_Specail_0002") this.itemIcon1.sprite=this.spLoader:LoadSprite("r_RareItem_Specail_0002")
this.detailText.text = Language[11843]
this.detailText1.text = Language[11843]
elseif this.recruitType == drawtType.FindFairyTen then--东海寻仙 elseif this.recruitType == drawtType.FindFairyTen then--东海寻仙
this.FindFairyCountDown(FindFairyManager.GetActivityTime()) this.FindFairyCountDown(FindFairyManager.GetActivityTime())
FindFairyManager.SetFreeExtract(10) FindFairyManager.SetFreeExtract(10)