竞技场ad宝箱权重奖励展示

This commit is contained in:
Fang 2023-07-05 19:05:37 +08:00
parent 0162bce262
commit dea1136538
4 changed files with 23 additions and 143 deletions

View File

@ -407,159 +407,27 @@ local item = {
["icon"]="25" ["icon"]="25"
}, },
[26]={ [26]={
["type"]=3, ["type"]=6,
["qlt"]=5, ["qlt"]=5,
["icon"]="20", ["icon"]="20",
["hero_drop"]={ ["box_drop"]={
{ {
["type"]=1, ["type"]=1,
["id"]=14001, ["id"]=4,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=24001,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=34001,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=44001,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=54001,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=14002,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=24002,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=34002,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=44002,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=54002,
["num"]=1,
["weight"]=10
},
{
["type"]=1,
["id"]=13001,
["num"]=1, ["num"]=1,
["weight"]=50 ["weight"]=50
}, },
{ {
["type"]=1, ["type"]=1,
["id"]=13002, ["id"]=5,
["num"]=1, ["num"]=1,
["weight"]=50 ["weight"]=890
}, },
{ {
["type"]=1, ["type"]=1,
["id"]=23001, ["id"]=6,
["num"]=1, ["num"]=1,
["weight"]=50 ["weight"]=60
},
{
["type"]=1,
["id"]=23002,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=33001,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=33002,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=43001,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=43002,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=53001,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=53002,
["num"]=1,
["weight"]=50
},
{
["type"]=1,
["id"]=12001,
["num"]=1,
["weight"]=100
},
{
["type"]=1,
["id"]=22001,
["num"]=1,
["weight"]=100
},
{
["type"]=1,
["id"]=32001,
["num"]=1,
["weight"]=100
},
{
["type"]=1,
["id"]=42001,
["num"]=1,
["weight"]=100
},
{
["type"]=1,
["id"]=52001,
["num"]=1,
["weight"]=100
} }
} }
}, },

View File

@ -534,7 +534,7 @@ local tutorial = {
["txt"]="tutorial_txt_8", ["txt"]="tutorial_txt_8",
["txt_offset"]={ ["txt_offset"]={
0, 0,
180 200
}, },
["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/fight_btn", ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/fight_btn",
["arrow_direction"]=1, ["arrow_direction"]=1,
@ -555,7 +555,7 @@ local tutorial = {
["txt"]="tutorial_txt_9", ["txt"]="tutorial_txt_9",
["txt_offset"]={ ["txt_offset"]={
0, 0,
180 90
}, },
["target_name"]="arena_match_ui(Clone)/match_result/btn_start", ["target_name"]="arena_match_ui(Clone)/match_result/btn_start",
["arrow_direction"]=1, ["arrow_direction"]=1,

View File

@ -134,7 +134,8 @@ function BoxHeroUI:showRewards(rewards)
ModuleManager.TipsManager:showRewardTips(rewards[i].id, GConst.REWARD_TYPE.ITEM, self.itemCellList[i]:getBaseObject()) ModuleManager.TipsManager:showRewardTips(rewards[i].id, GConst.REWARD_TYPE.ITEM, self.itemCellList[i]:getBaseObject())
end) end)
if ConfigManager:getConfig("item")[rewards[i].id].type == 3 then local type = ConfigManager:getConfig("item")[rewards[i].id].type
if type == 3 or type == 6 then
self.itemHelpList[i]:setVisible(true) self.itemHelpList[i]:setVisible(true)
self.itemHelpList[i]:addClickListener(function() self.itemHelpList[i]:addClickListener(function()
ModuleManager.TipsManager:showHeroFragmentTips(rewards[i].id) ModuleManager.TipsManager:showHeroFragmentTips(rewards[i].id)

View File

@ -21,7 +21,18 @@ function HeroFragmentTips:onLoadRootComplete()
if cfg == nil then if cfg == nil then
return self:closeUI() return self:closeUI()
end end
local drop = cfg.hero_drop local drop = nil
if cfg.hero_drop then
drop = cfg.hero_drop
elseif cfg.box_drop then
drop = {}
for idx, item in ipairs(cfg.box_drop) do
local temp = ConfigManager:getConfig("item")[item.id]
if temp and temp.hero_drop then
table.addArray(drop, temp.hero_drop)
end
end
end
if drop == nil then if drop == nil then
return self:closeUI() return self:closeUI()
end end