【功能】======寻仙招募优化

dev_chengFeng
wangzhenxing 2022-04-01 17:10:37 +08:00
parent e9219317e2
commit 9a2f342ef7
3 changed files with 17 additions and 4 deletions

View File

@ -87,7 +87,7 @@ function TimeLimitUpHero:BindEvent()
local str=upConfig.UpList
local heros={}
for i = 1, #str do
table.insert(heros,{str[i][1],str[i][5]})
table.insert(heros,{str[i][1],str[i][5],str[i][2]})
end
-- 打开选择界面
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ChooseUpHero,heros, curHeroId, function(chooseId)

View File

@ -68,15 +68,16 @@ function this:OnShow(_parent,_Data)
heroConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig,heroID)
end
local wishUpConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",activityId)
local num,pro = 0,0
local num,pro,len = 0,0,0
for i = 1, #wishUpConfig.UpList do
if wishUpConfig.UpList[i][1]==heroID then
num = wishUpConfig.UpList[i][3]
pro = wishUpConfig.UpList[i][5]
len = wishUpConfig.UpList[i][2]
break
end
end
UpItemList = {[1] = {Reward = {heroConfig.Id,1},Weight = num}}
UpItemList = {[1] = {Reward = {heroConfig.Id,len},Weight = num}}
for k, v in ConfigPairs(pool) do
if v.Camp == pro or v.Camp == 0 then
local data = {Reward = v.ItemId,Weight = v.GetRate,sort = v.Sort}

View File

@ -102,7 +102,7 @@ function this:Refresh(_page)
end
-- 特殊物品 或者 加入了版本的神将
if heros[i][2] == 6 or HeroManager.InVersion(heros[i][1]) then
table.insert(heroDatas[heros[i][2]],{CONFIG[heros[i][1]],heros[i][2]})
table.insert(heroDatas[heros[i][2]],{CONFIG[heros[i][1]],heros[i][2],heros[i][3],heros[i][1]})
end
end
end
@ -122,6 +122,7 @@ end
function this.SingleHeroDataShow(go,_heroData,_index)
local heroData = _heroData[1]
local itemType = _heroData[2]
LogError("herodata id=="..heroData.Id)
local _go = go
_go.gameObject:SetActive(true)
local frame = Util.GetGameObject(_go.transform, "frame"):GetComponent("Image")
@ -130,6 +131,9 @@ function this.SingleHeroDataShow(go,_heroData,_index)
local proIcon = Util.GetGameObject(_go.transform, "proIcon"):GetComponent("Image")
proIcon.gameObject:SetActive(true)
local starGrid = Util.GetGameObject(_go.transform, "star")
local numText = Util.GetGameObject(_go.transform, "numTxt"):GetComponent("Text")
local chipImg=Util.GetGameObject(_go.transform, "chipFrame"):GetComponent("Image")
chipImg.gameObject:SetActive(false)
starGrid:SetActive(true)
local choosed = Util.GetGameObject(_go.transform, "choosed")
local cardclickBtn = Util.GetGameObject(_go.transform, "icon")
@ -140,12 +144,20 @@ function this.SingleHeroDataShow(go,_heroData,_index)
proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
SetHeroStars(this.spLoader, starGrid, heroData.Star,1,nil,-15)
frame.sprite = this.spLoader:LoadSprite("t_tongyong_topkaung")
numText.gameObject:SetActive(false)
else
name.text = SubString2(GetLanguageStrById(heroData.Name),8)
icon.sprite = this.spLoader:LoadSprite(artResourcesConfig[heroData.ResourceID].Name)
proIcon.gameObject:SetActive(false)
starGrid:SetActive(false)
numText.gameObject:SetActive(true)
numText.text=_heroData[3]
frame.sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.Quantity,heroData.Star))
if heroData.ItemType==2 then
chipImg.gameObject:SetActive(true)
chipImg.sprite=this.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(heroData.Quantity))
-- body
end
end
this.choosedList[go] = choosed
this.choosedList[go]:SetActive( heroData.Id==currHeroId)