diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 4e2251d1..e5b1cae7 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -206,6 +206,9 @@ local LocalizationGlobalConst = BIND_ACCOUNT_FAILED = "BIND_ACCOUNT_FAILED", CHANGE_ACCOUNT_FAILED = "CHANGE_ACCOUNT_FAILED", SUMMON_SKIP = "SUMMON_SKIP", + CHANGE_ACCOUNT_FAILED_2 = "CHANGE_ACCOUNT_FAILED_2", + MAIL_COUNTDOWN = "MAIL_COUNTDOWN", + SHOP_DESC_37 = "SHOP_DESC_37", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/mall_gold.lua b/lua/app/config/mall_gold.lua index f3aa28f1..230169a6 100644 --- a/lua/app/config/mall_gold.lua +++ b/lua/app/config/mall_gold.lua @@ -1,6 +1,13 @@ local mall_gold = { [1]={ - ["idel_time"]=24000, + ["gold"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + }, ["cost"]={ ["type"]=1, ["type_for_nothing"]="Vw==", @@ -12,7 +19,14 @@ local mall_gold = { ["daily"]=2 }, [2]={ - ["idel_time"]=180000, + ["gold"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=4000, + ["num_for_nothing"]="UghcAw==" + }, ["cost"]={ ["type"]=1, ["type_for_nothing"]="Vw==", @@ -23,14 +37,21 @@ local mall_gold = { } }, [3]={ - ["idel_time"]=1800000, + ["gold"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=40000, + ["num_for_nothing"]="UghcA2U=" + }, ["cost"]={ ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=450, - ["num_for_nothing"]="Ug1c" + ["num"]=500, + ["num_for_nothing"]="Uwhc" } } } diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 198cb4f4..24afdc41 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -1258,7 +1258,7 @@ local skill = { ["name_act"]="skill01", ["fx_self"]=300009, ["bullet_time"]={ - 933, + 800, 3000, 400 } @@ -1347,7 +1347,7 @@ local skill = { ["name_act"]="skill01", ["fx_self"]=300009, ["bullet_time"]={ - 933, + 800, 3000, 400 } @@ -2663,25 +2663,19 @@ local skill = { ["effect"]={ { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, - ["ratio"]=10000, - ["round"]=0 - }, - { - ["type"]="hurt_green", - ["num"]=9400, + ["num"]=13400, ["ratio"]=10000, ["round"]=0 } @@ -2699,8 +2693,7 @@ local skill = { ["effect_block"]={ 1, 2, - 3, - 4 + 3 }, ["skill_position"]=1, ["shake_time"]=200, @@ -2760,25 +2753,19 @@ local skill = { ["effect"]={ { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, - ["ratio"]=10000, - ["round"]=0 - }, - { - ["type"]="hurt_green", - ["num"]=9400, + ["num"]=13400, ["ratio"]=10000, ["round"]=0 }, @@ -2802,8 +2789,7 @@ local skill = { ["effect_block"]={ 1, 2, - 3, - 5 + 4 }, ["skill_position"]=1, ["shake_time"]=200, @@ -2850,25 +2836,19 @@ local skill = { ["effect"]={ { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, + ["num"]=10000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt_green", - ["num"]=8000, - ["ratio"]=10000, - ["round"]=0 - }, - { - ["type"]="hurt_green", - ["num"]=9400, + ["num"]=13400, ["ratio"]=10000, ["round"]=0 }, @@ -2892,8 +2872,7 @@ local skill = { ["effect_block"]={ 1, 2, - 3, - 5 + 4 }, ["skill_position"]=1, ["shake_time"]=200, @@ -7123,19 +7102,13 @@ local skill = { ["effect"]={ { ["type"]="hurt", - ["num"]=4000, + ["num"]=6000, ["ratio"]=10000, ["round"]=0 }, { ["type"]="hurt", - ["num"]=4000, - ["ratio"]=10000, - ["round"]=0 - }, - { - ["type"]="hurt", - ["num"]=4000, + ["num"]=6000, ["ratio"]=10000, ["round"]=0 }, @@ -7162,8 +7135,7 @@ local skill = { ["effect_block"]={ 1, 2, - 3, - 6 + 5 }, ["skill_position"]=1, ["cd"]=3, @@ -7173,8 +7145,7 @@ local skill = { ["sound_hit"]={ 2200120, 1200114, - 1200113, - 1200114 + 1200113 }, ["name_act"]="skill01", ["fx_self"]=400039, diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index e3fc9f23..3aabd077 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -206,6 +206,9 @@ local localization_global = ["BIND_ACCOUNT_FAILED"] = "账号绑定失败,请重试", ["CHANGE_ACCOUNT_FAILED"] = "账号切换失败,请重试", ["SUMMON_SKIP"] = "跳过", + ["CHANGE_ACCOUNT_FAILED_2"] = "当前账号已是目标账号,无需切换", + ["MAIL_COUNTDOWN"] = "{0}小时到期", + ["SHOP_DESC_37"] = "宝箱奖励", } return localization_global \ No newline at end of file diff --git a/lua/app/config/strings/en/item.lua b/lua/app/config/strings/en/item.lua index d0f8c844..2942589b 100644 --- a/lua/app/config/strings/en/item.lua +++ b/lua/app/config/strings/en/item.lua @@ -12,7 +12,7 @@ local item = { ["desc"]="It takes stamina to complete stages" }, [4]={ - ["name"]="Outstanding Hero", + ["name"]="Uncommon Hero", ["desc"]="Can obtain Uncommon Hero" }, [5]={ @@ -24,110 +24,135 @@ local item = { ["desc"]="Can obtain Epic Hero" }, [7]={ + ["name"]="Pass Point", ["desc"]="Accumulated points can level up Pass." }, [8]={ + ["name"]="Wooden Box", ["desc"]="Can obtain heroes of the above qualities." }, [9]={ + ["name"]="Wooden Chest", ["desc"]="Can obtain heroes of the above qualities." }, [10]={ + ["name"]="Gold Chest", ["desc"]="Hero chests adorned with gold." }, [11]={ + ["name"]="Platinum Chest", ["desc"]="Powerful heroes are inside." }, [12]={ + ["name"]="EXP", ["desc"]="Accumulate to a certain quantity for an upgrade." }, [13]={ + ["name"]="Common Key", ["desc"]="Used to open Normal Chest in the shop." }, [14]={ + ["name"]="Exquisite Key", ["desc"]="Used to open Exquisite Chest in the shop." }, [15]={ + ["name"]="Precious Key", ["desc"]="Used to open Precious Chest in the shop." }, [16]={ + ["name"]="Quest Chest", ["desc"]="Obtained by completing 5 daily quests." }, [17]={ + ["name"]="Ad Chest", ["desc"]="You can watch ads anywhere in the game to earn rewards." }, [18]={ + ["name"]="Platinum Large Chest", ["desc"]="A huge Platinum Chest!" }, [19]={ + ["name"]="Random Shard", ["desc"]="AFK rewards include random shards. The quantity and quality will increase with the progress of the stages." }, [12001]={ - ["name"]="Roxy Shard", + ["name"]="Dancer Shard", ["desc"]="Dancer Shard, collect the shards to activate or upgrade." }, [13001]={ - ["name"]="Carla Shard", + ["name"]="Claude Shard", ["desc"]="Claude Shard, collect the shards to activate or upgrade." }, [13002]={ - ["name"]="Great Sword Robert Shard", + ["name"]="Flare Shard", ["desc"]="Flare Shard, collect the shards to activate or upgrade." }, [14001]={ - ["name"]="Aske Shard", + ["name"]="Alexander Shard", ["desc"]="Alexander Shard, collect the shards to activate or upgrade." }, [22001]={ - ["name"]="Evelyn Shard", + ["name"]="Blade Maid Shard", ["desc"]="Blade Maid Shard, collect the shards to activate or upgrade." }, [23001]={ - ["name"]="Lilith Shard", + ["name"]="Barbarian Shard", ["desc"]="Barbarian Shard, collect the shards to activate or upgrade." }, [23002]={ - ["name"]="White-Hair Catherine Shard", + ["name"]="Er-Ya Shard", ["desc"]="Er-Ya Shard, collect the shards to activate or upgrade." }, [24001]={ - ["name"]="Allen Shard", + ["name"]="Claymore Kid Shard", ["desc"]="Claymore Kid Shard, collect the shards to activate or upgrade." }, [32001]={ + ["name"]="Onion Shard", ["desc"]="Onion Shard, collect the shards to activate or upgrade." }, [33001]={ + ["name"]="Fawn Shard", ["desc"]="Fawn Shard, collect the shards to activate or upgrade." }, [33002]={ + ["name"]="Timberwolf Shard", ["desc"]="Timberwolf Shard, collect the shards to activate or upgrade." }, [34001]={ + ["name"]="Mulan Shard", ["desc"]="Mulan Shard, collect the shards to activate or upgrade." }, [42001]={ + ["name"]="Iceheart Shard", ["desc"]="Iceheart Shard, collect the shards to activate or upgrade." }, [43001]={ + ["name"]="Ice Maiden Shard", ["desc"]="Ice Maiden Shard, collect the shards to activate or upgrade." }, [43002]={ + ["name"]="Raven Shard", ["desc"]="Raven Shard, collect the shards to activate or upgrade." }, [44001]={ + ["name"]="Frost Enchantress Shard", ["desc"]="Frost Enchantress Shard, collect the shards to activate or upgrade." }, [52001]={ + ["name"]="Ninja Lun Shard", ["desc"]="Ninja Lun Shard, collect the shards to activate or upgrade." }, [53001]={ + ["name"]="Witch Kiki Shard", ["desc"]="Witch Kiki Shard, collect the shards to activate or upgrade." }, [53002]={ + ["name"]="Soul Hunter Shard", ["desc"]="Soul Hunter Shard, collect the shards to activate or upgrade." }, [54001]={ + ["name"]="Butterfly Shard", ["desc"]="Butterfly Shard, collect the shards to activate or upgrade." } } diff --git a/lua/app/config/strings/ja/item.lua b/lua/app/config/strings/ja/item.lua index 23b094a0..7aef2dab 100644 --- a/lua/app/config/strings/ja/item.lua +++ b/lua/app/config/strings/ja/item.lua @@ -12,112 +12,112 @@ local item = { ["desc"]="ステージクリアに必要なのは、当然スタミナだぜ。" }, [4]={ - ["name"]="Uncommon Hero" + }, [5]={ - ["name"]="Rare Hero" + }, [6]={ - ["name"]="Epic Hero" + }, [7]={ - ["name"]="Pass Point" + }, [8]={ - ["name"]="Wooden Box" + }, [9]={ - ["name"]="Wooden Chest" + }, [10]={ - ["name"]="Gold Chest" + }, [11]={ - ["name"]="Platinum Chest" + }, [12]={ - ["name"]="EXP" + }, [13]={ - ["name"]="Common Key" + }, [14]={ - ["name"]="Exquisite Key" + }, [15]={ - ["name"]="Precious Key" + }, [16]={ - ["name"]="Quest Chest" + }, [17]={ - ["name"]="Ad Chest" + }, [18]={ - ["name"]="Platinum Large Chest" + }, [19]={ - ["name"]="Random Shard" + }, [12001]={ - ["name"]="Dancer Shard" + }, [13001]={ - ["name"]="Claude Shard" + }, [13002]={ - ["name"]="Flare Shard" + }, [14001]={ - ["name"]="Alexander Shard" + }, [22001]={ - ["name"]="Blade Maid Shard" + }, [23001]={ - ["name"]="Barbarian Shard" + }, [23002]={ - ["name"]="Er-Ya Shard" + }, [24001]={ - ["name"]="Claymore Kid Shard" + }, [32001]={ - ["name"]="Onion Shard" + }, [33001]={ - ["name"]="Fawn Shard" + }, [33002]={ - ["name"]="Timberwolf Shard" + }, [34001]={ - ["name"]="Mulan Shard" + }, [42001]={ - ["name"]="Iceheart Shard" + }, [43001]={ - ["name"]="Ice Maiden Shard" + }, [43002]={ - ["name"]="Raven Shard" + }, [44001]={ - ["name"]="Frost Enchantress Shard" + }, [52001]={ - ["name"]="Ninja Lun Shard" + }, [53001]={ - ["name"]="Witch Kiki Shard" + }, [53002]={ - ["name"]="Soul Hunter Shard" + }, [54001]={ - ["name"]="Butterfly Shard" + } } local config = { diff --git a/lua/app/config/task.lua b/lua/app/config/task.lua index a8d7586a..60929b36 100644 --- a/lua/app/config/task.lua +++ b/lua/app/config/task.lua @@ -553,7 +553,6 @@ local task = { ["num_for_nothing"]="Uwg=" } }, - ["lock"]=2, ["icon"]="7" }, [37]={ @@ -569,7 +568,6 @@ local task = { ["num_for_nothing"]="UQ0=" } }, - ["lock"]=2, ["icon"]="7" }, [38]={ @@ -585,7 +583,6 @@ local task = { ["num_for_nothing"]="Vwhc" } }, - ["lock"]=2, ["icon"]="7" }, [39]={ @@ -601,7 +598,6 @@ local task = { ["num_for_nothing"]="Vw1c" } }, - ["lock"]=2, ["icon"]="7" }, [40]={ @@ -617,7 +613,6 @@ local task = { ["num_for_nothing"]="Uwg=" } }, - ["lock"]=2, ["icon"]="7" }, [41]={ @@ -633,7 +628,6 @@ local task = { ["num_for_nothing"]="UQ0=" } }, - ["lock"]=2, ["icon"]="7" }, [42]={ @@ -649,7 +643,6 @@ local task = { ["num_for_nothing"]="Vwhc" } }, - ["lock"]=2, ["icon"]="7" }, [43]={ @@ -665,7 +658,6 @@ local task = { ["num_for_nothing"]="Vw1c" } }, - ["lock"]=2, ["icon"]="7" }, [44]={ @@ -1270,7 +1262,6 @@ local task = { ["num_for_nothing"]="Vw1c" } }, - ["lock"]=2, ["icon"]="7" }, [84]={ @@ -1286,7 +1277,6 @@ local task = { ["num_for_nothing"]="Vw1c" } }, - ["lock"]=2, ["icon"]="7" }, [85]={ diff --git a/lua/app/config/tutorial.lua b/lua/app/config/tutorial.lua index 3022d325..291dc200 100644 --- a/lua/app/config/tutorial.lua +++ b/lua/app/config/tutorial.lua @@ -453,7 +453,7 @@ local tutorial = { } }, [50000]={ - ["next_id"]=10, + ["next_id"]=50010, ["type"]=2, ["target_name"]="main_ui(Clone)/sub_ui_node/main_comp/left_btn", ["arrow_direction"]=2, @@ -463,7 +463,6 @@ local tutorial = { } }, [50010]={ - ["next_id"]=20, ["type"]=3, ["txt"]="tutorial_txt_6", ["txt_offset"]={ diff --git a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua index 25608f42..3ad0cbf9 100644 --- a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua +++ b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua @@ -14,10 +14,13 @@ end function GoldPigUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() + self.uiMap = uiMap uiMap["gold_pig_ui.bg.close_btn"]:addClickListener(function() self:closeUI() end) + self:initSpine() + uiMap["gold_pig_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_TITLE)) uiMap["gold_pig_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_DESC)) @@ -70,4 +73,13 @@ function GoldPigUI:onLoadRootComplete() end) end +function GoldPigUI:initSpine() + self.titleSpine = self.uiMap["gold_pig_ui.bg.ui_spine_obj"] + local trackEntry = self.titleSpine:playAnim("open", false) + local time = self.titleSpine:getAnimation(trackEntry).Duration + self:performWithDelayGlobal(function() + self.titleSpine:playAnim("idle", true) + end, time) +end + return GoldPigUI \ No newline at end of file diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index 75dccdb2..c30d1e94 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -195,7 +195,7 @@ function BattleResultUI:tryShowGoldPig() local currGemCount = DataManager.GoldPigData:getCount() local maxGemCount = DataManager.GoldPigData:getMaxCount() if lastGemCount > currGemCount then - lastGemCount = 0 + lastGemCount = currGemCount end self.goldPigGemTx:setText("+" .. currGemCount - lastGemCount) GFunc.centerImgAndTx(self.goldPigGemImg, self.goldPigGemTx, 0, -4) diff --git a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua index 6b659715..ede99e12 100644 --- a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua @@ -9,8 +9,8 @@ function SideBarIdleCell:getIsOpen() return DataManager.IdleData:getIsOpen() end -function SideBarIdleCell:getIconRes() - return "main_btn_hang" +function SideBarIdleCell:getSpineName() + return "ui_main_btn_hang" end function SideBarIdleCell:onClick() diff --git a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua index fb1dbc22..ddfbb7fb 100644 --- a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua @@ -9,8 +9,8 @@ function SideBarSevenDaysCell:getIsOpen() return DataManager.SevenDayData:getIsOpen() end -function SideBarSevenDaysCell:getIconRes() - return "main_btn_sevenday" +function SideBarSevenDaysCell:getSpineName() + return "ui_main_btn_sevenday" end function SideBarSevenDaysCell:onClick() diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 2a1e2718..641f1f3e 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -655,7 +655,7 @@ function MainCityUI:refreshTask() self.taskBtn:setVisible(true) local showRedPoint = DataManager.DailyTaskData:getIsShowRedPoint() if showRedPoint then - self.taskBtn:addRedPoint(42, 42, 0.8) + self.taskBtn:addRedPoint(40, 40, 0.7) else self.taskBtn:removeRedPoint() end @@ -812,13 +812,13 @@ function MainCityUI:refreshBottomRp() local uiMap = self.root:genAllChildren() local heroRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_2.rp_node"] if DataManager.HeroData:getRp() then - heroRpObj:addRedPoint(0, 0, 1) + heroRpObj:addRedPoint(0, 0, 0.7) else heroRpObj:removeRedPoint() end local shopRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_3.rp_node"] if DataManager.ShopData:getRp() then - shopRpObj:addRedPoint(0, 0, 1) + shopRpObj:addRedPoint(0, 0, 0.7) else shopRpObj:removeRedPoint() end diff --git a/lua/app/ui/shop/box_level_ui.lua b/lua/app/ui/shop/box_level_ui.lua index a68b31ac..08500cf9 100644 --- a/lua/app/ui/shop/box_level_ui.lua +++ b/lua/app/ui/shop/box_level_ui.lua @@ -1,7 +1,7 @@ local BoxLevelUI = class("BoxLevelUI", BaseUI) -local BASE_CELL_HEIGHT = 200 -local BG_WITHOUT_3_BOX_HEIGHT = 638 +local BOX_3_CELL_HEIGHT = 260 +local BG_WITHOUT_3_BOX_HEIGHT = 660 function BoxLevelUI:ctor(params) params = params or {} @@ -24,11 +24,13 @@ function BoxLevelUI:onLoadRootComplete() self.bg = self.uiMap["box_level_ui.bg"] self.titleTx = self.uiMap["box_level_ui.bg.title_img.title"] + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_37)) self.lvTx = self.uiMap["box_level_ui.bg.lv_node.lv_bg.text"] self.leftArrow = self.uiMap["box_level_ui.bg.lv_node.left_arrow"] self.rightArrow = self.uiMap["box_level_ui.bg.lv_node.right_arrow"] self.box1Node = self.uiMap["box_level_ui.bg.box_1"] + self.box1AddBg = self.uiMap["box_level_ui.bg.box_1.bg_img"] self.box1Add1Node = self.uiMap["box_level_ui.bg.box_1.add_node_1"] self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add1Text = self.uiMap["box_level_ui.bg.box_1.add_node_1.text"] @@ -39,6 +41,7 @@ function BoxLevelUI:onLoadRootComplete() self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box2Node = self.uiMap["box_level_ui.bg.box_2"] + self.box2AddBg = self.uiMap["box_level_ui.bg.box_2.bg_img"] self.box2Add1Node = self.uiMap["box_level_ui.bg.box_2.add_node_1"] self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add1Text = self.uiMap["box_level_ui.bg.box_2.add_node_1.text"] @@ -99,14 +102,16 @@ function BoxLevelUI:refresh() self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT) else self.box3Node:setVisible(true) - self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT + BASE_CELL_HEIGHT) + self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT + BOX_3_CELL_HEIGHT) end if self.level == 1 then + self.box1AddBg:setVisible(false) self.box1Add1Node:setVisible(false) self.box1Add2Node:setVisible(false) self.box1Desc:setVisible(true) + self.box2AddBg:setVisible(false) self.box2Add1Node:setVisible(false) self.box2Add2Node:setVisible(false) self.box2Desc:setVisible(true) @@ -115,10 +120,12 @@ function BoxLevelUI:refresh() self.box3Add2Node:setVisible(false) self.box3Desc:setVisible(true) else + self.box1AddBg:setVisible(false) self.box1Add1Node:setVisible(false) self.box1Add2Node:setVisible(false) self.box1Desc:setVisible(false) + self.box2AddBg:setVisible(false) self.box2Add1Node:setVisible(false) self.box2Add2Node:setVisible(false) self.box2Desc:setVisible(false) @@ -133,6 +140,7 @@ function BoxLevelUI:refresh() local count = #reward1 if count == 1 then + self.box1AddBg:setVisible(true) self.box1Add1Node:setVisible(true) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:setNum("") @@ -141,6 +149,7 @@ function BoxLevelUI:refresh() end) self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) else + self.box1AddBg:setVisible(true) self.box1Add1Node:setVisible(true) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:setNum("") @@ -160,6 +169,7 @@ function BoxLevelUI:refresh() local count = #reward2 if count == 1 then + self.box2AddBg:setVisible(true) self.box2Add1Node:setVisible(true) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:setNum("") @@ -168,6 +178,7 @@ function BoxLevelUI:refresh() end) self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) else + self.box2AddBg:setVisible(true) self.box2Add1Node:setVisible(true) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:setNum("") diff --git a/lua/app/ui/shop/box_level_up_ui.lua b/lua/app/ui/shop/box_level_up_ui.lua index 5e1fd8c8..f8e55916 100644 --- a/lua/app/ui/shop/box_level_up_ui.lua +++ b/lua/app/ui/shop/box_level_up_ui.lua @@ -23,6 +23,7 @@ function BoxLevelUpUI:onLoadRootComplete() self.lvTx = self.uiMap["box_level_up_ui.lv_up.text"] self.box1Node = self.uiMap["box_level_up_ui.box_1"] + self.box1AddBg = self.uiMap["box_level_up_ui.box_1.bg_img"] self.box1Add1Node = self.uiMap["box_level_up_ui.box_1.add_node_1"] self.box1Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_1.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add1Text = self.uiMap["box_level_up_ui.box_1.add_node_1.text"] @@ -33,6 +34,7 @@ function BoxLevelUpUI:onLoadRootComplete() self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box2Node = self.uiMap["box_level_up_ui.box_2"] + self.box2AddBg = self.uiMap["box_level_up_ui.box_2.bg_img"] self.box2Add1Node = self.uiMap["box_level_up_ui.box_2.add_node_1"] self.box2Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_2.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add1Text = self.uiMap["box_level_up_ui.box_2.add_node_1.text"] @@ -62,10 +64,12 @@ function BoxLevelUpUI:refresh() self.lvTx:setText("Lv." .. tostring(self.level)) self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) -- 点击继续 + self.box1AddBg:setVisible(false) self.box1Add1Node:setVisible(false) self.box1Add2Node:setVisible(false) self.box1Desc:setVisible(false) + self.box2AddBg:setVisible(false) self.box2Add1Node:setVisible(false) self.box2Add2Node:setVisible(false) self.box2Desc:setVisible(false) @@ -80,6 +84,7 @@ function BoxLevelUpUI:refresh() local count = #reward1 if count == 1 then + self.box1AddBg:setVisible(true) self.box1Add1Node:setVisible(true) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:setNum("") @@ -88,6 +93,7 @@ function BoxLevelUpUI:refresh() end) self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) else + self.box1AddBg:setVisible(true) self.box1Add1Node:setVisible(true) self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) self.box1Add1ItemCell:setNum("") @@ -107,6 +113,7 @@ function BoxLevelUpUI:refresh() local count = #reward2 if count == 1 then + self.box2AddBg:setVisible(true) self.box2Add1Node:setVisible(true) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:setNum("") @@ -115,6 +122,7 @@ function BoxLevelUpUI:refresh() end) self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) else + self.box2AddBg:setVisible(true) self.box2Add1Node:setVisible(true) self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) self.box2Add1ItemCell:setNum("") diff --git a/lua/app/ui/shop/box_reward_ui.lua b/lua/app/ui/shop/box_reward_ui.lua index 88b3010b..eedde5a1 100644 --- a/lua/app/ui/shop/box_reward_ui.lua +++ b/lua/app/ui/shop/box_reward_ui.lua @@ -50,10 +50,6 @@ function BoxRewardUI:ctor(params) for id, count in pairs(fragmentMap) do table.insert(self.fragmentRewards, {id = id, count = count}) end - - for i = 1, 10 do - table.insert(self.fragmentRewards, {id = 12001, count = 100}) - end end function BoxRewardUI:isFullScreen() diff --git a/lua/app/ui/shop/cell/beginner_sell_cell.lua b/lua/app/ui/shop/cell/beginner_sell_cell.lua index 10c20019..0c1c9754 100644 --- a/lua/app/ui/shop/cell/beginner_sell_cell.lua +++ b/lua/app/ui/shop/cell/beginner_sell_cell.lua @@ -5,6 +5,7 @@ local BASE_CELL_HEIGHT = 320 function BeginnerSellCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["gift_cell.bg"] + self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_3.png") self.leftArrow = uiMap["gift_cell.left_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"] @@ -26,13 +27,7 @@ function BeginnerSellCell:init() end -- 不限时时使用1类型 否则使用2类型 - self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] - self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"] - self.priceText1 = uiMap["gift_cell.bg.price_1"] - - self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"] - self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"] - self.priceText2 = uiMap["gift_cell.bg.price_2"] + self.priceText = uiMap["gift_cell.bg.price"] self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeText = uiMap["gift_cell.bg.time_img.text"] @@ -66,16 +61,8 @@ function BeginnerSellCell:refresh() end end self.reweardLayout:RefreshLayout() - -- 价格(使用1类型,且不显示原价) - self.originPriceImg1:setVisible(false) - self.originPriceText1:setVisible(false) - self.priceText1:setVisible(true) - - self.originPriceImg2:setVisible(false) - self.originPriceText2:setVisible(false) - self.priceText2:setVisible(false) - - self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) + -- 价格 + self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) -- 限时(隐藏) self.timeImg:setVisible(false) diff --git a/lua/app/ui/shop/cell/chapter_cell.lua b/lua/app/ui/shop/cell/chapter_cell.lua index c259aa4f..88671895 100644 --- a/lua/app/ui/shop/cell/chapter_cell.lua +++ b/lua/app/ui/shop/cell/chapter_cell.lua @@ -6,6 +6,7 @@ local MAX_REWARD_COUNT = 4 function ChapterCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["gift_cell.bg"] + self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_2.png") self.leftArrow = uiMap["gift_cell.left_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"] @@ -27,13 +28,7 @@ function ChapterCell:init() end -- 不限时时使用1类型 否则使用2类型 - self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] - self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"] - self.priceText1 = uiMap["gift_cell.bg.price_1"] - - self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"] - self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"] - self.priceText2 = uiMap["gift_cell.bg.price_2"] + self.priceText = uiMap["gift_cell.bg.price"] self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeText = uiMap["gift_cell.bg.time_img.text"] @@ -82,17 +77,8 @@ function ChapterCell:refresh(idx, cfgInfo, totalCount, arrowCallback) end end self.reweardLayout:RefreshLayout() - -- 价格(使用1类型)(取消原价) - self.originPriceImg1:setVisible(false) - self.originPriceText1:setVisible(false) - self.priceText1:setVisible(true) - - self.originPriceImg2:setVisible(false) - self.originPriceText2:setVisible(false) - self.priceText2:setVisible(false) - - self.originPriceText1:setText(GFunc.getFormatPrice(cfgInfo.original)) - self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) + -- 价格 + self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) -- 限时(隐藏) self.timeImg:setVisible(false) diff --git a/lua/app/ui/shop/cell/coin_sell_cell.lua b/lua/app/ui/shop/cell/coin_sell_cell.lua index e7267845..9719e7b2 100644 --- a/lua/app/ui/shop/cell/coin_sell_cell.lua +++ b/lua/app/ui/shop/cell/coin_sell_cell.lua @@ -5,6 +5,7 @@ local BASE_CELL_HEIGHT = 320 function CoinSellCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["gift_cell.bg"] + self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_6.png") self.leftArrow = uiMap["gift_cell.left_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"] @@ -24,15 +25,7 @@ function CoinSellCell:init() self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) end end - - -- 不限时时使用1类型 否则使用2类型 - self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] - self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"] - self.priceText1 = uiMap["gift_cell.bg.price_1"] - - self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"] - self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"] - self.priceText2 = uiMap["gift_cell.bg.price_2"] + self.priceText = uiMap["gift_cell.bg.price"] self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeText = uiMap["gift_cell.bg.time_img.text"] @@ -63,16 +56,8 @@ function CoinSellCell:refresh() end end self.reweardLayout:RefreshLayout() - -- 价格(使用2类型,且不显示原价) - self.originPriceImg1:setVisible(false) - self.originPriceText1:setVisible(false) - self.priceText1:setVisible(false) - - self.originPriceImg2:setVisible(false) - self.originPriceText2:setVisible(false) - self.priceText2:setVisible(true) - - self.priceText2:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) + -- 价格 + self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) -- 限时 self.timeImg:setVisible(true) self:refreshTime() @@ -114,7 +99,7 @@ function CoinSellCell:refreshTime() remainTime = 0 end end - self.timeText:setText(Time:formatNumTimeStr(remainTime)) + self.timeText:setText(Time:formatNumTime(remainTime)) end function CoinSellCell:getCellCount() diff --git a/lua/app/ui/shop/cell/gold_cell.lua b/lua/app/ui/shop/cell/gold_cell.lua index 6e972797..4885000d 100644 --- a/lua/app/ui/shop/cell/gold_cell.lua +++ b/lua/app/ui/shop/cell/gold_cell.lua @@ -21,7 +21,7 @@ function GoldCell:refresh(id, cfgInfo) local idleTime = cfgInfo.idel_time local cost = cfgInfo.cost local adMaxTimes = cfgInfo.daily or 0 - local goldNum = DataManager.ShopData:getCommonDailyCoinNum(idleTime) + local goldNum = DataManager.ShopData:getCommonDailyCoinNum(id) self.icon:setSprite(GConst.ATLAS_PATH.SHOP, GConst.ShopConst.COIN_ICON_NAME[id]) diff --git a/lua/app/ui/shop/cell/grow_cell.lua b/lua/app/ui/shop/cell/grow_cell.lua index 63a8adbe..7581608c 100644 --- a/lua/app/ui/shop/cell/grow_cell.lua +++ b/lua/app/ui/shop/cell/grow_cell.lua @@ -4,6 +4,7 @@ local MAX_REWARD_COUNT = 4 function GrowCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["gift_cell.bg"] + self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_5.png") self.leftArrow = uiMap["gift_cell.left_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"] @@ -25,13 +26,7 @@ function GrowCell:init() end -- 不限时时使用1类型 否则使用2类型 - self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] - self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"] - self.priceText1 = uiMap["gift_cell.bg.price_1"] - - self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"] - self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"] - self.priceText2 = uiMap["gift_cell.bg.price_2"] + self.priceText = uiMap["gift_cell.bg.price"] self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeText = uiMap["gift_cell.bg.time_img.text"] @@ -61,16 +56,8 @@ function GrowCell:refresh(idx, gift) end end self.reweardLayout:RefreshLayout() - -- 价格(使用2类型) - self.originPriceImg1:setVisible(false) - self.originPriceText1:setVisible(false) - self.priceText1:setVisible(false) - - self.originPriceImg2:setVisible(false) - self.originPriceText2:setVisible(false) - self.priceText2:setVisible(true) - - self.priceText2:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) + -- 价格 + self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) -- 限时 self.timeImg:setVisible(true) self:refreshTime() @@ -92,7 +79,7 @@ function GrowCell:refreshTime() if remainTime <= 0 then remainTime = 0 end - self.timeText:setText(Time:formatNumTimeStr(remainTime)) + self.timeText:setText(Time:formatNumTime(remainTime)) end function GrowCell:onClickGift(id) diff --git a/lua/app/ui/shop/cell/level_cell.lua b/lua/app/ui/shop/cell/level_cell.lua index 99325557..fe10f539 100644 --- a/lua/app/ui/shop/cell/level_cell.lua +++ b/lua/app/ui/shop/cell/level_cell.lua @@ -4,6 +4,7 @@ local MAX_REWARD_COUNT = 4 function LevelCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["gift_cell.bg"] + self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_4.png") self.leftArrow = uiMap["gift_cell.left_arrow"] self.rightArrow = uiMap["gift_cell.right_arrow"] @@ -25,13 +26,7 @@ function LevelCell:init() end -- 不限时时使用1类型 否则使用2类型 - self.originPriceImg1 = uiMap["gift_cell.bg.origin_price_1"] - self.originPriceText1 = uiMap["gift_cell.bg.origin_price_1.text"] - self.priceText1 = uiMap["gift_cell.bg.price_1"] - - self.originPriceImg2 = uiMap["gift_cell.bg.origin_price_2"] - self.originPriceText2 = uiMap["gift_cell.bg.origin_price_2.text"] - self.priceText2 = uiMap["gift_cell.bg.price_2"] + self.priceText = uiMap["gift_cell.bg.price"] self.timeImg = uiMap["gift_cell.bg.time_img"] self.timeText = uiMap["gift_cell.bg.time_img.text"] @@ -58,16 +53,8 @@ function LevelCell:refresh(idx, cfgInfo, clickCallback) end end self.reweardLayout:RefreshLayout() - -- 价格(使用1类型) - self.originPriceImg1:setVisible(false) - self.originPriceText1:setVisible(false) - self.priceText1:setVisible(true) - - self.originPriceImg2:setVisible(false) - self.originPriceText2:setVisible(false) - self.priceText2:setVisible(false) - - self.priceText1:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) + -- 价格 + self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) -- 限时(隐藏) self.timeImg:setVisible(false) diff --git a/lua/app/ui/shop/gift_pop_ui.lua b/lua/app/ui/shop/gift_pop_ui.lua index b8dc7fae..5741d480 100644 --- a/lua/app/ui/shop/gift_pop_ui.lua +++ b/lua/app/ui/shop/gift_pop_ui.lua @@ -173,7 +173,7 @@ function GiftPopUI:updateTime() remainTime = 0 self:checkNextPopGiftOrClose() end - self.timeText:setText(GFunc.getTimeStr(remainTime)) + self.timeText:setText(Time:formatNumTime(remainTime)) end end elseif self.actType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT then -- 成长礼包 @@ -187,7 +187,7 @@ function GiftPopUI:updateTime() remainTime = 0 self:checkNextPopGiftOrClose() end - self.timeText:setText(GFunc.getTimeStr(remainTime)) + self.timeText:setText(Time:formatNumTime(remainTime)) end self.timeNode:setVisible(hasTime) end diff --git a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua b/lua/app/userdata/activity/gold_pig/gold_pig_data.lua index 9d7c369f..34b7a24f 100644 --- a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua +++ b/lua/app/userdata/activity/gold_pig/gold_pig_data.lua @@ -70,6 +70,7 @@ function GoldPigData:checkOpen() self.nextShowTime = self.endTime + self:getTimeOverCD() if Time:getServerTime() >= self.endTime then -- 超过时间该消失了 self.data.isOpen = false + self:levelDown() else self.data.isOpen = true DataManager:registerDataCd("GoldPigData") @@ -96,6 +97,7 @@ function GoldPigData:addGoldPigCount() return end if self.data.count >= info.max_diamond then -- 已经满了 + self.lastCount = self.data.count return end self.lastCount = self.data.count diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index 908d677b..01824d29 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -342,15 +342,17 @@ function ShopData:resetCommonDailyCoinAdCount() end -- 根据时间得到当前挂机金币奖励 -function ShopData:getCommonDailyCoinNum(time) - local coinPerHour = DataManager.IdleData:getGoldPerHour() - return coinPerHour * time // 3600 +function ShopData:getCommonDailyCoinNum(id) + local cfgInfo = self:getMallGoldConfig()[id] + if cfgInfo then + return cfgInfo.gold.num + end end function ShopData:getCommonDailyCoinDataById(id) local cfgInfo = self:getMallGoldConfig()[id] if cfgInfo then - return self:getCommonDailyCoinNum(cfgInfo.idel_time), cfgInfo.cost + return cfgInfo.gold.num, cfgInfo.cost end end @@ -764,14 +766,12 @@ function ShopData:getHasGotFirstRechargeReward() return boughtNum > 0 end --- 侧边栏是否展示 要求功能开启 等级不低于2 未领取该奖励 +-- 侧边栏是否展示 要求功能开启 未领取该奖励 function ShopData:getShowFirstRechargeSideBar() if not self:getIsFirstRechargeOpen() then return false end - - local lv = DataManager.PlayerData:getLv() - if lv > 1 and not self:getHasGotFirstRechargeReward() then + if not self:getHasGotFirstRechargeReward() then return true else return false