From dea1136538bcc3baee2cc600d8dfcb024885ffe5 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 5 Jul 2023 19:05:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E6=8A=80=E5=9C=BAad=E5=AE=9D=E7=AE=B1?= =?UTF-8?q?=E6=9D=83=E9=87=8D=E5=A5=96=E5=8A=B1=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/config/item.lua | 146 ++----------------------- lua/app/config/tutorial.lua | 4 +- lua/app/ui/shop/box_hero_ui.lua | 3 +- lua/app/ui/tips/hero_fragment_tips.lua | 13 ++- 4 files changed, 23 insertions(+), 143 deletions(-) diff --git a/lua/app/config/item.lua b/lua/app/config/item.lua index c72175ed..e334fa94 100644 --- a/lua/app/config/item.lua +++ b/lua/app/config/item.lua @@ -407,159 +407,27 @@ local item = { ["icon"]="25" }, [26]={ - ["type"]=3, + ["type"]=6, ["qlt"]=5, ["icon"]="20", - ["hero_drop"]={ + ["box_drop"]={ { ["type"]=1, - ["id"]=14001, - ["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, + ["id"]=4, ["num"]=1, ["weight"]=50 }, { ["type"]=1, - ["id"]=13002, + ["id"]=5, ["num"]=1, - ["weight"]=50 + ["weight"]=890 }, { ["type"]=1, - ["id"]=23001, + ["id"]=6, ["num"]=1, - ["weight"]=50 - }, - { - ["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 + ["weight"]=60 } } }, diff --git a/lua/app/config/tutorial.lua b/lua/app/config/tutorial.lua index b108ad6d..67ad2da4 100644 --- a/lua/app/config/tutorial.lua +++ b/lua/app/config/tutorial.lua @@ -534,7 +534,7 @@ local tutorial = { ["txt"]="tutorial_txt_8", ["txt_offset"]={ 0, - 180 + 200 }, ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/fight_btn", ["arrow_direction"]=1, @@ -555,7 +555,7 @@ local tutorial = { ["txt"]="tutorial_txt_9", ["txt_offset"]={ 0, - 180 + 90 }, ["target_name"]="arena_match_ui(Clone)/match_result/btn_start", ["arrow_direction"]=1, diff --git a/lua/app/ui/shop/box_hero_ui.lua b/lua/app/ui/shop/box_hero_ui.lua index e9e0166d..6c64e046 100644 --- a/lua/app/ui/shop/box_hero_ui.lua +++ b/lua/app/ui/shop/box_hero_ui.lua @@ -134,7 +134,8 @@ function BoxHeroUI:showRewards(rewards) ModuleManager.TipsManager:showRewardTips(rewards[i].id, GConst.REWARD_TYPE.ITEM, self.itemCellList[i]:getBaseObject()) 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]:addClickListener(function() ModuleManager.TipsManager:showHeroFragmentTips(rewards[i].id) diff --git a/lua/app/ui/tips/hero_fragment_tips.lua b/lua/app/ui/tips/hero_fragment_tips.lua index 79f39b6b..0a4469ee 100644 --- a/lua/app/ui/tips/hero_fragment_tips.lua +++ b/lua/app/ui/tips/hero_fragment_tips.lua @@ -21,7 +21,18 @@ function HeroFragmentTips:onLoadRootComplete() if cfg == nil then return self:closeUI() 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 return self:closeUI() end