【ID1009604】

【优化】限时心愿招募抽取的普通神将调整为同系卡
dev_chengFeng
jiaoyangna 2021-06-30 19:28:43 +08:00
parent 2cbb0b0a59
commit 349404d50e
5 changed files with 44 additions and 2076 deletions

View File

@ -45,14 +45,14 @@ Material:
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Scale: {x: 0.5, y: 1}
m_Offset: {x: 0, y: 0}
- _Main_Tex:
m_Texture: {fileID: 2800000, guid: c27c3fa5087c54a4daede54cdcd766a9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Mask:
m_Texture: {fileID: 2800000, guid: 579d7a890dd5d9346994e0f97c6a56bf, type: 3}
m_Texture: {fileID: 2800000, guid: 7e7488a1bb12eca4d8f87d654c43c1f5, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
@ -92,12 +92,12 @@ Material:
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _U_Speed: 0.5
- _U_Speed: -2
- _V_Speed: 0
- _ZWrite: 1
m_Colors:
- _Center: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 16, g: 16, b: 1.4431373, a: 1}
- _Color: {r: 0, g: 85.445015, b: 2.4686809, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Grain_Color: {r: 1, g: 1, b: 1, a: 1}
- _Main_Color: {r: 1, g: 1, b: 1, a: 1}

View File

@ -2244,6 +2244,8 @@ PRE_REWARD_POOL_TYPE = {
LING_SHOU= 12,--灵兽
LING_SHOU_UP= 13,--灵兽抽取UP
XIANG_YAO_UP= 14,--降妖夺宝UP
TIME_LIMITED_NEW=15,--限时招募
TIME_LIMITED_NEW_UP=16,--限时招募UP
}
DirectBuyType = {
XSHL = 11,--限时豪礼

View File

@ -91,7 +91,7 @@ function TimeLimitUpHero:BindEvent()
end)
Util.AddOnceClick(self.btnActivity, function()
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.RecrutDetail,Setting.QAId,20003,PRE_REWARD_POOL_TYPE.TIME_LIMITED_UP,PRE_REWARD_POOL_TYPE.TIME_LIMITED,curHeroId,self.actId)
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.RecrutDetail,Setting.QAId,ActivityTypeDef.LimitUpHero,PRE_REWARD_POOL_TYPE.TIME_LIMITED_NEW,PRE_REWARD_POOL_TYPE.TIME_LIMITED_NEW_UP,curHeroId,self.actId)
end)
end

View File

@ -71,19 +71,32 @@ function this:OnShow(_parent,...)
local poolType = args[4] or 0
heroID = args[5]
local activityId = args[6]
LogGreen("poolUpType:"..poolUpType.." poolType:"..poolType)
if activityType == ActivityTypeDef.LimitUpHero and heroID then
local heroConfig=ConfigManager.TryGetConfigData(ConfigName.HeroConfig,heroID)
if heroConfig then
this:ShowUpItem(heroConfig,activityId)
end
else
local UpItemList=RecruitManager.GetRewardPreviewData(poolUpType)
local itemList = RecruitManager.GetRewardPreviewData(poolType)
local UpItemList = {}
local itemList = {}
if activityType == ActivityTypeDef.LimitUpHero then
local heroConfig=ConfigManager.TryGetConfigData(ConfigName.HeroConfig,heroID)
local wishUpConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",activityId)
local num = 0
for i = 1, #wishUpConfig.UpList do
if wishUpConfig.UpList[i][1]==heroID then
num = wishUpConfig.UpList[i][3]
break
end
end
UpItemList = {Reward = {heroConfig.Id,1},Weight = num}
for k, v in ConfigPairs(pool) do
local data = {Reward = v.ItemId,Weight = v.GetRate,sort = v.Sort}
table.insert(itemList,data)
end
table.sort(itemList,function(a,b)
return a.sort < b.sort
end)
else
UpItemList = RecruitManager.GetRewardPreviewData(poolUpType)
itemList = RecruitManager.GetRewardPreviewData(poolType)
end
local _upRateList,rateList = this:BuildRateData(activityType,itemList,UpItemList)
this:ReFreshUpItem(UpItemList,_upRateList)
end
this:ReFreshUpItem(UpItemList,_upRateList)
end
function this:ReFreshUpItem(UpItem,rateList)
@ -110,68 +123,6 @@ function this:ReFreshUpItem(UpItem,rateList)
end
local hero
--限时up英雄
function this:ShowUpItem(config,actId)
if not hero then
hero=SubUIManager.Open(SubUIConfig.ItemView,this.itemGrid.transform)
end
local wishUpConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",actId)
local num=0
for i = 1, #wishUpConfig.UpList do
if wishUpConfig.UpList[i][1]==heroID then
num=wishUpConfig.UpList[i][3]
end
end
hero:OnOpen(false,{config.Id,1},1.1,true)
hero.name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", 1 ).."%</color>"
hero.gameObject:SetActive(true)
for k,v in ipairs(this.ratePreList) do
v.go.gameObject:SetActive(false)
end
-- table.sort(pool,function(a,b)
-- return a.GetRate>b.GetRate
-- end)
local rateList={}
local hero={tag="5星神将UP",name=config.ReadingName,value=0.01,Color=1}
for key, value in ConfigPairs(pool) do
local id=value.ItemId[1]
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig,id)
local data={tag=itemConfig.Name,name=value.ItemId[2],value=value.FakeRate,Color=0,sort=value.Sort}
table.insert(rateList,data)
end
table.sort(rateList,function(a,b)
return a.sort<b.sort
end)
table.insert(rateList,1,hero)
for n,m in ipairs(rateList) do
if not this.ratePreList[n] then
this.ratePreList[n] = {}
this.ratePreList[n].go = newObjToParent(this.pre,this.grid)
this.ratePreList[n].star = Util.GetGameObject(this.ratePreList[n].go,"star"):GetComponent("Text")
this.ratePreList[n].name = Util.GetGameObject(this.ratePreList[n].go,"name"):GetComponent("Text")
this.ratePreList[n].rate = Util.GetGameObject(this.ratePreList[n].go,"rate"):GetComponent("Text")
end
this.ratePreList[n].go.gameObject:SetActive(true)
this.ratePreList[n].star.text=m.tag
if m.Color==1 then
this.ratePreList[n].star.color=Color.New(0.67, 0.25,0.32, 1)
this.ratePreList[n].name.color=Color.New(0.67, 0.25,0.32, 1)
this.ratePreList[n].rate.color=Color.New(0.67, 0.25,0.32, 1)
else
this.ratePreList[n].star.color=Color.New(0.66, 0.62,0.54, 1)
this.ratePreList[n].name.color=Color.New(0.66, 0.62,0.54, 1)
this.ratePreList[n].rate.color=Color.New(0.66, 0.62,0.54, 1)
end
this.ratePreList[n].name.text=m.name
this.ratePreList[n].rate.text=(m.value*100).."%"
end
end
function this:BuildRateData(actType,UpItem,upItemList)
local rateList = {}
@ -204,6 +155,16 @@ function this:BuildRateData(actType,UpItem,upItemList)
end
end
rateList = this:RefreshNewHeroRate(upItemList,_upRateList,"5星UP!",ConfigName.HeroConfig)
elseif actType == ActivityTypeDef.LimitUpHero then
for n,m in ipairs(upItemList) do
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig, m.Reward[1])
table.insert(rateList,{id = m.Reward[1],tag = itemConfig.Name,m.Reward[2],value = m.Weight})
table.insert(_upRateList,{id = m.Reward[1],tag = itemConfig.Name,m.Reward[2],value = m.Weight})
end
for n,m in ipairs(UpItem) do
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig, m.Reward[1])
table.insert(rateList,{id = m.Reward[1],tag=itemConfig.Name,m.Reward[2],value = m.Weight})
end
end
for k,v in ipairs(this.ratePreList) do
@ -367,10 +328,10 @@ function this:RefreshNewHeroRate(UpMonster,_rateList)
return _rateList
end
function this:OnClose()
end
function this:OnDestroy()
Util.ClearChild(this.grid.transform)
this.ratePreList = {}
this.listUpPre = {}
hero=nil