【功能】======寻仙招募优化
parent
e9219317e2
commit
9a2f342ef7
|
|
@ -87,7 +87,7 @@ function TimeLimitUpHero:BindEvent()
|
||||||
local str=upConfig.UpList
|
local str=upConfig.UpList
|
||||||
local heros={}
|
local heros={}
|
||||||
for i = 1, #str do
|
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
|
end
|
||||||
-- 打开选择界面
|
-- 打开选择界面
|
||||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ChooseUpHero,heros, curHeroId, function(chooseId)
|
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ChooseUpHero,heros, curHeroId, function(chooseId)
|
||||||
|
|
|
||||||
|
|
@ -68,15 +68,16 @@ function this:OnShow(_parent,_Data)
|
||||||
heroConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig,heroID)
|
heroConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig,heroID)
|
||||||
end
|
end
|
||||||
local wishUpConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",activityId)
|
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
|
for i = 1, #wishUpConfig.UpList do
|
||||||
if wishUpConfig.UpList[i][1]==heroID then
|
if wishUpConfig.UpList[i][1]==heroID then
|
||||||
num = wishUpConfig.UpList[i][3]
|
num = wishUpConfig.UpList[i][3]
|
||||||
pro = wishUpConfig.UpList[i][5]
|
pro = wishUpConfig.UpList[i][5]
|
||||||
|
len = wishUpConfig.UpList[i][2]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
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
|
for k, v in ConfigPairs(pool) do
|
||||||
if v.Camp == pro or v.Camp == 0 then
|
if v.Camp == pro or v.Camp == 0 then
|
||||||
local data = {Reward = v.ItemId,Weight = v.GetRate,sort = v.Sort}
|
local data = {Reward = v.ItemId,Weight = v.GetRate,sort = v.Sort}
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ function this:Refresh(_page)
|
||||||
end
|
end
|
||||||
-- 特殊物品 或者 加入了版本的神将
|
-- 特殊物品 或者 加入了版本的神将
|
||||||
if heros[i][2] == 6 or HeroManager.InVersion(heros[i][1]) then
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -122,6 +122,7 @@ end
|
||||||
function this.SingleHeroDataShow(go,_heroData,_index)
|
function this.SingleHeroDataShow(go,_heroData,_index)
|
||||||
local heroData = _heroData[1]
|
local heroData = _heroData[1]
|
||||||
local itemType = _heroData[2]
|
local itemType = _heroData[2]
|
||||||
|
LogError("herodata id=="..heroData.Id)
|
||||||
local _go = go
|
local _go = go
|
||||||
_go.gameObject:SetActive(true)
|
_go.gameObject:SetActive(true)
|
||||||
local frame = Util.GetGameObject(_go.transform, "frame"):GetComponent("Image")
|
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")
|
local proIcon = Util.GetGameObject(_go.transform, "proIcon"):GetComponent("Image")
|
||||||
proIcon.gameObject:SetActive(true)
|
proIcon.gameObject:SetActive(true)
|
||||||
local starGrid = Util.GetGameObject(_go.transform, "star")
|
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)
|
starGrid:SetActive(true)
|
||||||
local choosed = Util.GetGameObject(_go.transform, "choosed")
|
local choosed = Util.GetGameObject(_go.transform, "choosed")
|
||||||
local cardclickBtn = Util.GetGameObject(_go.transform, "icon")
|
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))
|
proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
|
||||||
SetHeroStars(this.spLoader, starGrid, heroData.Star,1,nil,-15)
|
SetHeroStars(this.spLoader, starGrid, heroData.Star,1,nil,-15)
|
||||||
frame.sprite = this.spLoader:LoadSprite("t_tongyong_topkaung")
|
frame.sprite = this.spLoader:LoadSprite("t_tongyong_topkaung")
|
||||||
|
numText.gameObject:SetActive(false)
|
||||||
else
|
else
|
||||||
name.text = SubString2(GetLanguageStrById(heroData.Name),8)
|
name.text = SubString2(GetLanguageStrById(heroData.Name),8)
|
||||||
icon.sprite = this.spLoader:LoadSprite(artResourcesConfig[heroData.ResourceID].Name)
|
icon.sprite = this.spLoader:LoadSprite(artResourcesConfig[heroData.ResourceID].Name)
|
||||||
proIcon.gameObject:SetActive(false)
|
proIcon.gameObject:SetActive(false)
|
||||||
starGrid:SetActive(false)
|
starGrid:SetActive(false)
|
||||||
|
numText.gameObject:SetActive(true)
|
||||||
|
numText.text=_heroData[3]
|
||||||
frame.sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.Quantity,heroData.Star))
|
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
|
end
|
||||||
this.choosedList[go] = choosed
|
this.choosedList[go] = choosed
|
||||||
this.choosedList[go]:SetActive( heroData.Id==currHeroId)
|
this.choosedList[go]:SetActive( heroData.Id==currHeroId)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue