From 56936f582b0844ea055b6ca7a515455454e4c4eb Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 24 Sep 2025 16:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 33 + lua/app/common/data_manager.lua | 34 +- lua/app/common/pay_manager.lua | 566 +- lua/app/config/act_gift.lua | 13719 +++++++++------- lua/app/config/const.lua | 27 +- lua/app/config/func_open.lua | 2 +- lua/app/config/strings/cn/mall_gold.lua | 15 + .../strings/cn/mall_gold.lua.meta} | 2 +- lua/app/global/global_const.lua | 7 + lua/app/global/global_func.lua | 8 + lua/app/module/shop/shop_const.lua | 177 +- lua/app/module/shop/shop_manager.lua | 469 +- lua/app/ui/fund/bounty_collection_comp.lua | 198 + ...a.meta => bounty_collection_comp.lua.meta} | 2 +- lua/app/ui/fund/bounty_comp.lua | 168 + .../bounty_comp.lua.meta} | 2 +- lua/app/ui/fund/cell/fund_tower_cell.lua | 95 + ...cell.lua.meta => fund_tower_cell.lua.meta} | 2 +- lua/app/ui/fund/cell/growth_fund_cell.lua | 89 - .../ui/fund/cell/growth_fund_reward_cell.lua | 88 - lua/app/ui/fund/fund_chapter_comp.lua | 191 + lua/app/ui/fund/fund_chapter_comp.lua.meta | 10 + lua/app/ui/fund/fund_level_comp.lua | 219 + lua/app/ui/fund/fund_level_comp.lua.meta | 10 + lua/app/ui/fund/fund_main_ui.lua | 290 + lua/app/ui/fund/fund_main_ui.lua.meta | 10 + lua/app/ui/fund/fund_reward_ui.lua | 83 + lua/app/ui/fund/fund_reward_ui.lua.meta | 10 + lua/app/ui/fund/growth_fund_ui.lua | 248 - lua/app/ui/fund/tower_bounty_comp.lua | 177 + lua/app/ui/fund/tower_bounty_comp.lua.meta | 10 + lua/app/ui/main_city/main_city_ui.lua | 3 +- lua/app/ui/shop/box_hero_ui.lua | 173 - lua/app/ui/shop/box_level_ui.lua | 218 - lua/app/ui/shop/box_level_ui.lua.meta | 10 - lua/app/ui/shop/box_level_up_ui.lua | 163 - lua/app/ui/shop/box_level_up_ui.lua.meta | 10 - lua/app/ui/shop/box_open_ui.lua | 81 - lua/app/ui/shop/box_open_ui.lua.meta | 10 - lua/app/ui/shop/box_reward_ui.lua | 326 - lua/app/ui/shop/box_reward_ui.lua.meta | 10 - lua/app/ui/shop/buy_gem_ui.lua | 61 + lua/app/ui/shop/buy_gem_ui.lua.meta | 10 + lua/app/ui/shop/buy_vit_ui.lua | 234 + lua/app/ui/shop/buy_vit_ui.lua.meta | 10 + lua/app/ui/shop/cell.meta | 2 +- lua/app/ui/shop/cell/arena_gift_sell_cell.lua | 104 - .../shop/cell/arena_gift_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/armor_gift_sell_cell.lua | 110 - .../shop/cell/armor_gift_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/beginner_sell_cell.lua | 90 - .../ui/shop/cell/beginner_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/box_hero_cell.lua | 63 - lua/app/ui/shop/cell/box_hero_cell.lua.meta | 10 - lua/app/ui/shop/cell/box_sell_cell.lua | 146 - lua/app/ui/shop/cell/box_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/chapter_cell.lua | 146 +- lua/app/ui/shop/cell/chapter_cell.lua.meta | 2 +- lua/app/ui/shop/cell/chapter_sell_cell.lua | 54 - .../ui/shop/cell/chapter_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/coin_sell_cell.lua | 113 - lua/app/ui/shop/cell/coin_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/core_soul_cell.lua | 245 + lua/app/ui/shop/cell/core_soul_cell.lua.meta | 10 + lua/app/ui/shop/cell/core_soul_main_cell.lua | 22 + .../ui/shop/cell/core_soul_main_cell.lua.meta | 10 + lua/app/ui/shop/cell/daily_cell.lua | 157 + lua/app/ui/shop/cell/daily_cell.lua.meta | 10 + lua/app/ui/shop/cell/daily_main_cell.lua | 128 + lua/app/ui/shop/cell/daily_main_cell.lua.meta | 10 + lua/app/ui/shop/cell/force_skin_shop_cell.lua | 73 + .../shop/cell/force_skin_shop_cell.lua.meta | 10 + lua/app/ui/shop/cell/gem_cell.lua | 135 +- lua/app/ui/shop/cell/gem_cell.lua.meta | 2 +- lua/app/ui/shop/cell/gem_main_cell.lua | 18 + lua/app/ui/shop/cell/gem_main_cell.lua.meta | 10 + lua/app/ui/shop/cell/gem_sell_cell.lua | 61 - lua/app/ui/shop/cell/gem_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/gift_reward_cell.lua | 47 - .../ui/shop/cell/gift_reward_cell.lua.meta | 10 - lua/app/ui/shop/cell/gold_cell.lua | 152 +- lua/app/ui/shop/cell/gold_cell.lua.meta | 2 +- lua/app/ui/shop/cell/gold_main_cell.lua | 12 + lua/app/ui/shop/cell/gold_main_cell.lua.meta | 10 + lua/app/ui/shop/cell/gold_sell_cell.lua | 51 - lua/app/ui/shop/cell/gold_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/grow_cell.lua | 91 - lua/app/ui/shop/cell/grow_cell.lua.meta | 10 - lua/app/ui/shop/cell/grow_sell_cell.lua | 60 - lua/app/ui/shop/cell/grow_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/hot_cell.lua | 119 - lua/app/ui/shop/cell/hot_cell.lua.meta | 10 - lua/app/ui/shop/cell/hot_sell_cell.lua | 115 - lua/app/ui/shop/cell/hot_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/level_cell.lua | 74 - lua/app/ui/shop/cell/level_cell.lua.meta | 10 - lua/app/ui/shop/cell/level_sell_cell.lua | 51 - lua/app/ui/shop/cell/level_sell_cell.lua.meta | 10 - lua/app/ui/shop/cell/pop_hero_cell.lua | 103 - lua/app/ui/shop/cell/pop_hero_cell.lua.meta | 10 - lua/app/ui/shop/cell/pop_reward_cell.lua | 82 - lua/app/ui/shop/cell/pop_reward_cell.lua.meta | 10 - .../ui/shop/cell/weapon_gift_sell_cell.lua | 110 - .../shop/cell/weapon_gift_sell_cell.lua.meta | 10 - lua/app/ui/shop/first_recharge_pop_ui.lua | 103 - .../ui/shop/first_recharge_pop_ui.lua.meta | 10 - lua/app/ui/shop/first_recharge_ui.lua | 220 + lua/app/ui/shop/first_recharge_ui.lua.meta | 10 + lua/app/ui/shop/gift_pop_chapter_ui.lua | 6 - lua/app/ui/shop/gift_pop_chapter_ui.lua.meta | 10 - lua/app/ui/shop/gift_pop_grow_up_ui.lua | 6 - lua/app/ui/shop/gift_pop_grow_up_ui.lua.meta | 10 - lua/app/ui/shop/gift_pop_ui.lua | 333 - lua/app/ui/shop/gift_pop_ui.lua.meta | 10 - lua/app/ui/shop/introduct_pop_ui.lua | 96 - lua/app/ui/shop/introduct_pop_ui.lua.meta | 10 - lua/app/ui/shop/open_box_ui.lua | 204 + lua/app/ui/shop/open_box_ui.lua.meta | 10 + lua/app/ui/shop/pay_select_ui.lua | 105 + lua/app/ui/shop/pay_select_ui.lua.meta | 10 + lua/app/ui/shop/shop_comp.lua | 697 +- lua/app/userdata/gift_pop.meta | 8 + lua/app/userdata/gift_pop/gift_pop_data.lua | 586 + .../userdata/gift_pop/gift_pop_data.lua.meta | 10 + lua/app/userdata/payment.meta | 8 + lua/app/userdata/payment/payment_data.lua | 368 + .../userdata/payment/payment_data.lua.meta | 10 + lua/app/userdata/shop/shop_data.lua | 1846 +-- 128 files changed, 14212 insertions(+), 11754 deletions(-) create mode 100755 lua/app/config/strings/cn/mall_gold.lua rename lua/app/{ui/fund/growth_fund_ui.lua.meta => config/strings/cn/mall_gold.lua.meta} (86%) create mode 100755 lua/app/ui/fund/bounty_collection_comp.lua rename lua/app/ui/fund/{cell/growth_fund_cell.lua.meta => bounty_collection_comp.lua.meta} (86%) create mode 100755 lua/app/ui/fund/bounty_comp.lua rename lua/app/ui/{shop/box_hero_ui.lua.meta => fund/bounty_comp.lua.meta} (86%) create mode 100755 lua/app/ui/fund/cell/fund_tower_cell.lua rename lua/app/ui/fund/cell/{growth_fund_reward_cell.lua.meta => fund_tower_cell.lua.meta} (86%) delete mode 100644 lua/app/ui/fund/cell/growth_fund_cell.lua delete mode 100644 lua/app/ui/fund/cell/growth_fund_reward_cell.lua create mode 100755 lua/app/ui/fund/fund_chapter_comp.lua create mode 100644 lua/app/ui/fund/fund_chapter_comp.lua.meta create mode 100755 lua/app/ui/fund/fund_level_comp.lua create mode 100644 lua/app/ui/fund/fund_level_comp.lua.meta create mode 100755 lua/app/ui/fund/fund_main_ui.lua create mode 100644 lua/app/ui/fund/fund_main_ui.lua.meta create mode 100755 lua/app/ui/fund/fund_reward_ui.lua create mode 100644 lua/app/ui/fund/fund_reward_ui.lua.meta delete mode 100644 lua/app/ui/fund/growth_fund_ui.lua create mode 100755 lua/app/ui/fund/tower_bounty_comp.lua create mode 100644 lua/app/ui/fund/tower_bounty_comp.lua.meta delete mode 100644 lua/app/ui/shop/box_hero_ui.lua delete mode 100644 lua/app/ui/shop/box_level_ui.lua delete mode 100644 lua/app/ui/shop/box_level_ui.lua.meta delete mode 100644 lua/app/ui/shop/box_level_up_ui.lua delete mode 100644 lua/app/ui/shop/box_level_up_ui.lua.meta delete mode 100644 lua/app/ui/shop/box_open_ui.lua delete mode 100644 lua/app/ui/shop/box_open_ui.lua.meta delete mode 100644 lua/app/ui/shop/box_reward_ui.lua delete mode 100644 lua/app/ui/shop/box_reward_ui.lua.meta create mode 100755 lua/app/ui/shop/buy_gem_ui.lua create mode 100755 lua/app/ui/shop/buy_gem_ui.lua.meta create mode 100755 lua/app/ui/shop/buy_vit_ui.lua create mode 100755 lua/app/ui/shop/buy_vit_ui.lua.meta mode change 100644 => 100755 lua/app/ui/shop/cell.meta delete mode 100644 lua/app/ui/shop/cell/arena_gift_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/arena_gift_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/armor_gift_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/armor_gift_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/beginner_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/beginner_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/box_hero_cell.lua delete mode 100644 lua/app/ui/shop/cell/box_hero_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/box_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/box_sell_cell.lua.meta mode change 100644 => 100755 lua/app/ui/shop/cell/chapter_cell.lua mode change 100644 => 100755 lua/app/ui/shop/cell/chapter_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/chapter_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/chapter_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/coin_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/coin_sell_cell.lua.meta create mode 100644 lua/app/ui/shop/cell/core_soul_cell.lua create mode 100755 lua/app/ui/shop/cell/core_soul_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/core_soul_main_cell.lua create mode 100755 lua/app/ui/shop/cell/core_soul_main_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/daily_cell.lua create mode 100755 lua/app/ui/shop/cell/daily_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/daily_main_cell.lua create mode 100755 lua/app/ui/shop/cell/daily_main_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/force_skin_shop_cell.lua create mode 100755 lua/app/ui/shop/cell/force_skin_shop_cell.lua.meta mode change 100644 => 100755 lua/app/ui/shop/cell/gem_cell.lua mode change 100644 => 100755 lua/app/ui/shop/cell/gem_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/gem_main_cell.lua create mode 100755 lua/app/ui/shop/cell/gem_main_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/gem_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/gem_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/gift_reward_cell.lua delete mode 100644 lua/app/ui/shop/cell/gift_reward_cell.lua.meta mode change 100644 => 100755 lua/app/ui/shop/cell/gold_cell.lua mode change 100644 => 100755 lua/app/ui/shop/cell/gold_cell.lua.meta create mode 100755 lua/app/ui/shop/cell/gold_main_cell.lua create mode 100755 lua/app/ui/shop/cell/gold_main_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/gold_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/gold_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/grow_cell.lua delete mode 100644 lua/app/ui/shop/cell/grow_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/grow_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/grow_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/hot_cell.lua delete mode 100644 lua/app/ui/shop/cell/hot_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/hot_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/hot_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/level_cell.lua delete mode 100644 lua/app/ui/shop/cell/level_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/level_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/level_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/pop_hero_cell.lua delete mode 100644 lua/app/ui/shop/cell/pop_hero_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/pop_reward_cell.lua delete mode 100644 lua/app/ui/shop/cell/pop_reward_cell.lua.meta delete mode 100644 lua/app/ui/shop/cell/weapon_gift_sell_cell.lua delete mode 100644 lua/app/ui/shop/cell/weapon_gift_sell_cell.lua.meta delete mode 100644 lua/app/ui/shop/first_recharge_pop_ui.lua delete mode 100644 lua/app/ui/shop/first_recharge_pop_ui.lua.meta create mode 100755 lua/app/ui/shop/first_recharge_ui.lua create mode 100755 lua/app/ui/shop/first_recharge_ui.lua.meta delete mode 100644 lua/app/ui/shop/gift_pop_chapter_ui.lua delete mode 100644 lua/app/ui/shop/gift_pop_chapter_ui.lua.meta delete mode 100644 lua/app/ui/shop/gift_pop_grow_up_ui.lua delete mode 100644 lua/app/ui/shop/gift_pop_grow_up_ui.lua.meta delete mode 100644 lua/app/ui/shop/gift_pop_ui.lua delete mode 100644 lua/app/ui/shop/gift_pop_ui.lua.meta delete mode 100644 lua/app/ui/shop/introduct_pop_ui.lua delete mode 100644 lua/app/ui/shop/introduct_pop_ui.lua.meta create mode 100755 lua/app/ui/shop/open_box_ui.lua create mode 100755 lua/app/ui/shop/open_box_ui.lua.meta create mode 100755 lua/app/ui/shop/pay_select_ui.lua create mode 100755 lua/app/ui/shop/pay_select_ui.lua.meta create mode 100644 lua/app/userdata/gift_pop.meta create mode 100644 lua/app/userdata/gift_pop/gift_pop_data.lua create mode 100755 lua/app/userdata/gift_pop/gift_pop_data.lua.meta create mode 100644 lua/app/userdata/payment.meta create mode 100755 lua/app/userdata/payment/payment_data.lua create mode 100755 lua/app/userdata/payment/payment_data.lua.meta diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 017c0e4a..fcd0c80f 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -193,6 +193,20 @@ BIReport.ITEM_GET_TYPE = { FORCE_SUMMON = "force_summon", FORCE_SUMMON_WISH_HREO_ID = "force_summon_wish_hero_id", ACT_SUMMON_HERO_GIFT = "act_summon_hero_gift", + + -- 等级弹窗礼包 + -- GIFT_POP_LV = "gift_pop_lv", + -- GIFT_POP_HERO_LV = "gift_pop_hero_lv", + GIFT_POP_CHAPTER = "gift_pop_chapter", + + -- 商城相关 + SHOP_CHAPTER = "shop_chapter", + -- SHOP_CORE_SOUL = "shop_core_soul", + SHOP_DAILY = "shop_daily", + SHOP_DAILY_REFRESH = "shop_daily_refresh", + SHOP_GEM = "shop_gem", + SHOP_GOLD = "shop_gold", + -- SHOP_EMBLEM = "shop_emblem", } BIReport.ADS_CLICK_TYPE = { @@ -280,6 +294,20 @@ BIReport.GIFT_TYPE = { RUNES_GIFT = "RunesGift", TOURN_WAVE_GIFT = "TournWaveGift", TOURN_ARENA_GIFT = "TournArenaGift", + + -- 等级弹窗礼包 + -- GIFT_POP_LV = "gift_pop_lv", + -- GIFT_POP_HERO_LV = "gift_pop_hero_lv", + GIFT_POP_CHAPTER = "gift_pop_chapter", + + -- 商城相关 + SHOP_CHAPTER = "shop_chapter", + -- SHOP_CORE_SOUL = "shop_core_soul", + SHOP_DAILY = "shop_daily", + SHOP_DAILY_REFRESH = "shop_daily_refresh", + SHOP_GEM = "shop_gem", + SHOP_GOLD = "shop_gold", + -- SHOP_EMBLEM = "shop_emblem", } BIReport.COIN_TYPE = { @@ -359,6 +387,11 @@ BIReport.RUNES_FORMATION = { CHAPTER = "chapter", } +BIReport.PAY_DOUBLE = { + NORMAL = "Normal", + DOUBLED = "Doubled", +} + -- b6 local EVENT_NAME_EXIT = "client_exit" local EVENT_NAME_FIGHT = "client_fight" diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index 69cce666..575c01d9 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -42,6 +42,8 @@ function DataManager:init() self:initManager("FourteenDayData", "app/userdata/activity/fourteen_day/fourteen_day_data") self:initManager("ActPvpData", "app/userdata/activity/act_pvp/act_pvp_data") self:initManager("TalentData", "app/userdata/talent/talent_data") + self:initManager("GiftPopData", "app/userdata/gift_pop/gift_pop_data") + self:initManager("PaymentData", "app/userdata/payment/payment_data") end function DataManager:initManager(name, path) @@ -179,25 +181,29 @@ function DataManager:initWithServerData(data) self.DailyTaskData:init(data.task_daily, data.task_achievement) self.IdleData:init(data.idle) self.SevenDayData:init(data.seven_day) - self.ShopData:initBase() - self.ShopData:initActGift(data.act) -- 礼包购买信息 - self.ShopData:initMallDaily(data.mall_daily_store) -- 每日特惠 - self.ShopData:initCommonDailyGoldGift(data.mall_idle and data.mall_idle.ad_count) -- 常驻金币礼包 - self.ShopData:initGrowUpGift(data.act_grow_up_gift2) -- 成长礼包 - self.ShopData:initLevelUpGift(data.act_level_up_gift) -- 助力/金币礼包 - self.ShopData:initIntroductGift(data.act_introductory_gift) -- 入门礼包 + self.ShopData:init() + -- self.ShopData:refreshChapterShop(data.mall_chapter) + -- self.ShopData:refreshCoreSoulShop(data.soul) + self.ShopData:refreshDailyShop(data.mall_daily_store) + -- self.ShopData:refreshGoldShop(data.mall_gold) + -- self.ShopData:refreshEmblemShop(data.mall_mythic_store) + -- self.ShopData:initVit(data.energy_limit) + -- self.ShopData:initThirdPayOrder(data.third_pay) + -- self.ShopData:initThirdPayGiftOrder(data.third_pay) + -- self.ShopData:initBase() + -- self.ShopData:initActGift(data.act) -- 礼包购买信息 + -- self.ShopData:initMallDaily(data.mall_daily_store) -- 每日特惠 + -- self.ShopData:initCommonDailyGoldGift(data.mall_idle and data.mall_idle.ad_count) -- 常驻金币礼包 + -- self.ShopData:initGrowUpGift(data.act_grow_up_gift2) -- 成长礼包 + -- self.ShopData:initLevelUpGift(data.act_level_up_gift) -- 助力/金币礼包 + -- self.ShopData:initIntroductGift(data.act_introductory_gift) -- 入门礼包 -- 活动要在礼包后初始化 self.ActivityData:init() -- 商店礼包都初始化完了后检查一下每日红点 - self.ShopData:checkShopDiscountRedPoint() - self.ShopData:checkLoginPopInfo() -- 需要写在shopdata所有初始化之后 + -- self.ShopData:checkShopDiscountRedPoint() + -- self.ShopData:checkLoginPopInfo() -- 需要写在shopdata所有初始化之后 self.SummonData:init(data.summon_data.summons) self.AIHelperData:init(nil, true) - -- 成长基金要在ShopData和PlayerDataBagData还有之后初始化,依赖这些数据 - if data.fund then - self.GrowthFundData:init(data.fund.funds) - end - self.HeroFundData:init(data.hero_fund) self.FourteenDayData:init(data.fourteen_bounty) -- 任务数据最后初始化,依赖其他模块的数据 diff --git a/lua/app/common/pay_manager.lua b/lua/app/common/pay_manager.lua index fd5bbe16..22d63f75 100644 --- a/lua/app/common/pay_manager.lua +++ b/lua/app/common/pay_manager.lua @@ -1,334 +1,328 @@ local PayManager = class("PayManager", BaseModule) PayManager.PURCHARSE_TYPE = { - ACT_GIFT = 1, - ACT_GOLD_PIG = 2, - CHAPTER_GIFT = 3, - GROW_UP_GIFT = 4,-- 已废弃 - MALL_TREASURE = 5, - GROW_UP_GIFT_NEW = 6, + ACT_GIFT = 1, + SHOP_GEM = 2, + -- GIFT_ROUTINE = 3, + -- GIFT_JOLLYMAX = 4, } PayManager.PURCHARSE_ACT_TYPE = { - FIRST_RECHARGE = 1, - COIN_GIFT = 2, - INTRODUCTORY_GIFT = 3, - BEGINNER_GIFT = 4, - LEVEL_UP_GIFT = 5, - GROWTH_FUND = 6, - BOUNTY = 7, - ARENA_BOUNTY = 8, - ARENA_GIFT = 9, - ARMOR_FUND = 10, - WEAPON_GIFT = 11, - ARMOR_GIFT = 12, - ACT_SUMMER = 13, - ACT_HERO_FUND = 14, - WEAPON_UPGRADE_GIFT = 15, - ARMOR_UPGRADE_GIFT = 16, - FOURTEEN_DAY_GIFT = 17, - ACT_PVP_BOUNTY = 22, - FULL_MOON_HERO_GIFT = 18, - FULL_MOON_NEW_HERO_GIFT = 19, - FULL_MOON_SKIN_GIFT = 20, - RUNES_GIFT = 21, - TOURN_WAVE_GIFT = 23, - TOURN_ARENA_GIFT = 24, + -- FIRST_RECHARGE = 1, + -- COIN_GIFT = 2, + -- INTRODUCTORY_GIFT = 3, + -- BEGINNER_GIFT = 4, + -- LEVEL_UP_GIFT = 5, + -- GROWTH_FUND = 6, + -- BOUNTY = 7, + -- ARENA_BOUNTY = 8, + -- ARENA_GIFT = 9, + -- ARMOR_FUND = 10, + -- WEAPON_GIFT = 11, + -- ARMOR_GIFT = 12, + -- ACT_SUMMER = 13, + -- ACT_HERO_FUND = 14, + -- WEAPON_UPGRADE_GIFT = 15, + -- ARMOR_UPGRADE_GIFT = 16, + -- FOURTEEN_DAY_GIFT = 17, + -- ACT_PVP_BOUNTY = 22, + -- FULL_MOON_HERO_GIFT = 18, + -- FULL_MOON_NEW_HERO_GIFT = 19, + -- FULL_MOON_SKIN_GIFT = 20, + -- RUNES_GIFT = 21, + -- TOURN_WAVE_GIFT = 23, + -- TOURN_ARENA_GIFT = 24, + GIFT_POP_CHAPTER = 10, } PayManager.PURCHARSE_TYPE_CONFIG = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = "act_gift", - [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = "act_gold_pig", - [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = "mall_treasure", - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "act_chapter_store", - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = "act_growup_gift_new", + [PayManager.PURCHARSE_TYPE.ACT_GIFT] = "act_gift", + [PayManager.PURCHARSE_TYPE.SHOP_GEM] = "mall_treasure", + -- [PayManager.PURCHARSE_TYPE.GIFT_ROUTINE] = "gift_routine", + -- [PayManager.PURCHARSE_TYPE.GIFT_JOLLYMAX] = "gift_jollymax", } PayManager.BI_ITEM_GET_TYPE = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = BIReport.ITEM_GET_TYPE.FIRST_RECHARGE, - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = BIReport.ITEM_GET_TYPE.COIN_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.INTRODUCTORY_GIFT] = BIReport.ITEM_GET_TYPE.INTRODUCTORY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = BIReport.ITEM_GET_TYPE.BEGINNER_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = BIReport.ITEM_GET_TYPE.LEVEL_UP_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.GROWTH_FUND] = BIReport.ITEM_GET_TYPE.GROWTH_FUND, - [PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.ITEM_GET_TYPE.BOUNTY, - [PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.ITEM_GET_TYPE.ARENA_BOUNTY, - [PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.ITEM_GET_TYPE.ARENA_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.ITEM_GET_TYPE.ARMOR_FUND, - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.ITEM_GET_TYPE.ACT_SUMMER, - [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND, - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT] = BIReport.ITEM_GET_TYPE.FOURTEEN_DAY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ACT_PVP_BOUNTY] = BIReport.ITEM_GET_TYPE.ACT_PVP_BOUNTY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_HERO_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_HERO_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_NEW_HERO_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_NEW_HERO_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_SKIN_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_SKIN_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.RUNES_GIFT] = BIReport.ITEM_GET_TYPE.RUNES_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.TOURN_WAVE_GIFT] = BIReport.ITEM_GET_TYPE.TOURN_WAVE_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.TOURN_ARENA_GIFT] = BIReport.ITEM_GET_TYPE.TOURN_ARENA_GIFT, - }, - [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.ITEM_GET_TYPE.GOLD_PIG, - [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.ITEM_GET_TYPE.MALL_TREASURE, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = BIReport.ITEM_GET_TYPE.ACT_CHAPTER_STORE, - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = BIReport.ITEM_GET_TYPE.GROW_UP_GIFT_NEW, + [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { + [PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER] = BIReport.ITEM_GET_TYPE.GIFT_POP_CHAPTER, + -- [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = BIReport.ITEM_GET_TYPE.FIRST_RECHARGE, + -- [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = BIReport.ITEM_GET_TYPE.COIN_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.INTRODUCTORY_GIFT] = BIReport.ITEM_GET_TYPE.INTRODUCTORY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = BIReport.ITEM_GET_TYPE.BEGINNER_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = BIReport.ITEM_GET_TYPE.LEVEL_UP_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.GROWTH_FUND] = BIReport.ITEM_GET_TYPE.GROWTH_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.ITEM_GET_TYPE.BOUNTY, + -- [PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.ITEM_GET_TYPE.ARENA_BOUNTY, + -- [PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.ITEM_GET_TYPE.ARENA_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.ITEM_GET_TYPE.ARMOR_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.ITEM_GET_TYPE.ACT_SUMMER, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT] = BIReport.ITEM_GET_TYPE.FOURTEEN_DAY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_PVP_BOUNTY] = BIReport.ITEM_GET_TYPE.ACT_PVP_BOUNTY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_HERO_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_HERO_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_NEW_HERO_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_NEW_HERO_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_SKIN_GIFT] = BIReport.ITEM_GET_TYPE.FULL_MOON_SKIN_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.RUNES_GIFT] = BIReport.ITEM_GET_TYPE.RUNES_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.TOURN_WAVE_GIFT] = BIReport.ITEM_GET_TYPE.TOURN_WAVE_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.TOURN_ARENA_GIFT] = BIReport.ITEM_GET_TYPE.TOURN_ARENA_GIFT, + }, + [PayManager.PURCHARSE_TYPE.SHOP_GEM] = BIReport.ITEM_GET_TYPE.SHOP_GEM, } PayManager.BI_GIFT_TYPE = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = BIReport.GIFT_TYPE.FIRST_RECHARGE, - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = BIReport.GIFT_TYPE.COIN_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.INTRODUCTORY_GIFT] = BIReport.GIFT_TYPE.INTRODUCTORY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = BIReport.GIFT_TYPE.BEGINNER_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = BIReport.GIFT_TYPE.LEVEL_UP_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.GROWTH_FUND] = BIReport.GIFT_TYPE.GROWTH_FUND, - [PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.GIFT_TYPE.BOUNTY, - [PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.GIFT_TYPE.ARENA_BOUNTY, - [PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.GIFT_TYPE.ARENA_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.GIFT_TYPE.ARMOR_FUND, - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.GIFT_TYPE.ACT_SUMMER, - [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.GIFT_TYPE.ACT_HERO_FUND, - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT] = BIReport.GIFT_TYPE.FOURTEEN_DAY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.ACT_PVP_BOUNTY] = BIReport.GIFT_TYPE.ACT_PVP_BOUNTY_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_HERO_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_HERO_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_NEW_HERO_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_NEW_HERO_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_SKIN_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_SKIN_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.RUNES_GIFT] = BIReport.GIFT_TYPE.RUNES_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.TOURN_WAVE_GIFT] = BIReport.GIFT_TYPE.TOURN_WAVE_GIFT, - [PayManager.PURCHARSE_ACT_TYPE.TOURN_ARENA_GIFT] = BIReport.GIFT_TYPE.TOURN_ARENA_GIFT, - }, - [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.GIFT_TYPE.GOLD_PIG, - [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.GIFT_TYPE.MALL_TREASURE, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = BIReport.GIFT_TYPE.ACT_CHAPTER_STORE, - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = BIReport.GIFT_TYPE.GROW_UP_GIFT_NEW, + [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { + [PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER] = BIReport.GIFT_TYPE.GIFT_POP_CHAPTER, + -- [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = BIReport.GIFT_TYPE.FIRST_RECHARGE, + -- [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = BIReport.GIFT_TYPE.COIN_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.INTRODUCTORY_GIFT] = BIReport.GIFT_TYPE.INTRODUCTORY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = BIReport.GIFT_TYPE.BEGINNER_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = BIReport.GIFT_TYPE.LEVEL_UP_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.GROWTH_FUND] = BIReport.GIFT_TYPE.GROWTH_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.GIFT_TYPE.BOUNTY, + -- [PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.GIFT_TYPE.ARENA_BOUNTY, + -- [PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.GIFT_TYPE.ARENA_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.GIFT_TYPE.ARMOR_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.GIFT_TYPE.ACT_SUMMER, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.GIFT_TYPE.ACT_HERO_FUND, + -- [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT] = BIReport.GIFT_TYPE.FOURTEEN_DAY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.ACT_PVP_BOUNTY] = BIReport.GIFT_TYPE.ACT_PVP_BOUNTY_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_HERO_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_HERO_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_NEW_HERO_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_NEW_HERO_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_SKIN_GIFT] = BIReport.GIFT_TYPE.FULL_MOON_SKIN_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.RUNES_GIFT] = BIReport.GIFT_TYPE.RUNES_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.TOURN_WAVE_GIFT] = BIReport.GIFT_TYPE.TOURN_WAVE_GIFT, + -- [PayManager.PURCHARSE_ACT_TYPE.TOURN_ARENA_GIFT] = BIReport.GIFT_TYPE.TOURN_ARENA_GIFT, + }, + [PayManager.PURCHARSE_TYPE.SHOP_GEM] = BIReport.GIFT_TYPE.SHOP_GEM, } function PayManager:getItemGetType(purchaseType, id) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] - if not cfgName then - return - end - local cfg = ConfigManager:getConfig(cfgName) - local typeMap = PayManager.BI_ITEM_GET_TYPE[purchaseType] - if not cfg or not cfg[id] or not typeMap then - return - end - local subType = cfg[id].type - if subType then - return typeMap[cfg[id].type] - else - if type(typeMap) ~= "table" then - return typeMap - end - end + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] + if not cfgName then + return + end + local cfg = ConfigManager:getConfig(cfgName) + local typeMap = PayManager.BI_ITEM_GET_TYPE[purchaseType] + if not cfg or not cfg[id] or not typeMap then + return + end + local subType = cfg[id].type + if subType then + return typeMap[cfg[id].type] + else + if type(typeMap) ~= "table" then + return typeMap + end + end end function PayManager:getGiftType(purchaseType, id) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] - if not cfgName then - return - end - local cfg = ConfigManager:getConfig(cfgName) - local typeMap = PayManager.BI_GIFT_TYPE[purchaseType] - if not cfg or not cfg[id] or not typeMap then - return - end - local subType = cfg[id].type - if subType then - return typeMap[cfg[id].type] - else - if type(typeMap) ~= "table" then - return typeMap - end - end + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] + if not cfgName then + return + end + local cfg = ConfigManager:getConfig(cfgName) + local typeMap = PayManager.BI_GIFT_TYPE[purchaseType] + if not cfg or not cfg[id] or not typeMap then + return + end + local subType = cfg[id].type + if subType then + return typeMap[cfg[id].type] + else + if type(typeMap) ~= "table" then + return typeMap + end + end end function PayManager:getGiftConfigInfo(purchaseType, id) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] - if not cfgName then - return - end - local cfg = ConfigManager:getConfig(cfgName) - if not cfg or not cfg[id] then - return - end - return cfg[id] + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] + if not cfgName then + return + end + local cfg = ConfigManager:getConfig(cfgName) + if not cfg or not cfg[id] then + return + end + return cfg[id] end function PayManager:getPackageRechargeId(purchaseType, id) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] - if not cfgName then - return - end - local cfg = ConfigManager:getConfig(cfgName) - if not cfg or not cfg[id] then - return - end - return cfg[id].recharge_id + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] + if not cfgName then + return + end + local cfg = ConfigManager:getConfig(cfgName) + if not cfg or not cfg[id] then + return + end + return cfg[id].recharge_id end function PayManager:purchasePackage(id, purchaseType) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] - if not cfgName then - return - end - local cfg = ConfigManager:getConfig(cfgName) - if not cfg or not cfg[id] then - return - end + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[purchaseType] + if not cfgName then + return + end + local cfg = ConfigManager:getConfig(cfgName) + if not cfg or not cfg[id] then + return + end - local rechargeId = cfg[id].recharge_id - local giftType = PayManager:getGiftType(purchaseType, id) - local productId - if rechargeId then - local rechargeCfg = ConfigManager:getConfig("recharge")[rechargeId] - if rechargeCfg == nil then - return - end - productId = rechargeCfg.payId - BIReport:postPayClick(giftType, id, rechargeId) - end - self:checkAndPay(productId, id, purchaseType, rechargeId) + local rechargeId = cfg[id].recharge_id + local giftType = PayManager:getGiftType(purchaseType, id) + local productId + if rechargeId then + local rechargeCfg = ConfigManager:getConfig("recharge")[rechargeId] + if rechargeCfg == nil then + return + end + productId = rechargeCfg.payId + BIReport:postPayClick(giftType, id, rechargeId) + end + self:checkAndPay(productId, id, purchaseType, rechargeId) end function PayManager:requestRewards(purchaseToken, orderId, originOrderId, productId, notShowRewardsBox, callback) - self:sendMsgToServer(purchaseToken, orderId, originOrderId, productId, function(binder, msgData) - if msgData.status == 0 then - local showRewards = not notShowRewardsBox - if DataManager.TutorialData and DataManager.TutorialData:getIsInTutorial() then -- 引导时不弹 - showRewards = false - end + self:sendMsgToServer(purchaseToken, orderId, originOrderId, productId, function(binder, msgData) + if msgData.status == 0 then + local showRewards = not notShowRewardsBox + if DataManager.TutorialData and DataManager.TutorialData:getIsInTutorial() then -- 引导时不弹 + showRewards = false + end - if showRewards then - if not EDITOR_MODE and not ModuleManager.AccountManager:getIsBinded() then -- 没绑定账户信息,提示去绑定 - ModuleManager.AccountManager:showBindUI() - end - if msgData.rewards and table.nums(msgData.rewards) > 0 then - GFunc.showRewardBox(msgData.rewards) - end - end + if showRewards then + if not EDITOR_MODE and not ModuleManager.AccountManager:getIsBinded() then -- 没绑定账户信息,提示去绑定 + ModuleManager.AccountManager:showBindUI() + end + if msgData.rewards and table.nums(msgData.rewards) > 0 then + GFunc.showRewardBox(msgData.rewards) + end + end - local biPayGetInfo = {} - table.foreach(msgData.gift, function(i, gift) - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[gift.act_type] - local cfgInfo = ConfigManager:getConfig(cfgName)[gift.id] - local rechargeId = cfgInfo.recharge_id - local beforCount = DataManager.PlayerData:getPayCounts(rechargeId) - DataManager.PlayerData:addPayment(rechargeId) - DataManager.ShopData:addPayment(rechargeId) -- 降档版本 - DataManager.ShopData:updateGiftInfo(gift) - table.insert(biPayGetInfo, { - giftType = gift.act_type, - giftId = gift.id, - rechargeId = cfgInfo.recharge_id - }) - if beforCount <= 0 then - BIReport:postFirstRechargeEvent(rechargeId) - end - end) + local biPayGetInfo = {} + table.foreach(msgData.gift, function(i, gift) + local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[gift.act_type] + local cfgInfo = ConfigManager:getConfig(cfgName)[gift.id] + local rechargeId = cfgInfo.recharge_id + local beforCount = DataManager.PlayerData:getPayCounts(rechargeId) + DataManager.PlayerData:addPayment(rechargeId) + DataManager.ShopData:addPayment(rechargeId) -- 降档版本 + DataManager.ShopData:updateGiftInfo(gift) + table.insert(biPayGetInfo, { + giftType = gift.act_type, + giftId = gift.id, + rechargeId = cfgInfo.recharge_id + }) + if beforCount <= 0 then + BIReport:postFirstRechargeEvent(rechargeId) + end + end) - for _, info in ipairs(biPayGetInfo) do - local giftType = PayManager:getGiftType(info.giftType, info.giftId) - BIReport:postPayGet(giftType, info.giftId, info.rechargeId, orderId, originOrderId, 1, msgData.rewards or {}) - local rechargeCfg = ConfigManager:getConfig("recharge")[info.rechargeId] - if rechargeCfg then - BIReport:postPurchase(rechargeCfg.price, rechargeCfg.payId, originOrderId, orderId) - end - end + for _, info in ipairs(biPayGetInfo) do + local giftType = PayManager:getGiftType(info.giftType, info.giftId) + BIReport:postPayGet(giftType, info.giftId, info.rechargeId, orderId, originOrderId, 1, msgData.rewards or {}) + local rechargeCfg = ConfigManager:getConfig("recharge")[info.rechargeId] + if rechargeCfg then + BIReport:postPurchase(rechargeCfg.price, rechargeCfg.payId, originOrderId, orderId) + end + end - -- 支付上报 - local data = {} - data.pay_money = DataManager.PlayerData:getTotalPayAmount() - data.pay_count = DataManager.PlayerData:getPayCount() - CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data) + -- 支付上报 + local data = {} + data.pay_money = DataManager.PlayerData:getTotalPayAmount() + data.pay_count = DataManager.PlayerData:getPayCount() + CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data) - -- 支付验证成功后消耗此订单 - if CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.Android then - if purchaseToken then - SDKManager:consumePurchase(purchaseToken) - end - elseif CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer then - if productId then - SDKManager:consumePurchase(productId) - SDKManager:delIosOrder(productId) - end - if originOrderId ~= "gm" then - SDKManager:delIosPayInfo(originOrderId) - end - end - elseif msgData.status == 1008 then -- 验证异常,但是需要消耗订单 - if CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.Android then - if purchaseToken then - SDKManager:consumePurchase(purchaseToken) - end - elseif CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer then - if productId then - SDKManager:consumePurchase(productId) - SDKManager:delIosOrder(productId) - end - if originOrderId ~= "gm" then - SDKManager:delIosPayInfo(originOrderId) - end - end - Logger.logError("重复验证") - else - Logger.logError("支付验证失败:%s", msgData.status) - local params = { - content = I18N:getGlobalText(I18N.GlobalConst.PAY_FAILED_DESC_1), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK, - okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK), - } - GFunc.showMessageBox(params) - end - if callback then - callback() - end - end) + -- 支付验证成功后消耗此订单 + if CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.Android then + if purchaseToken then + SDKManager:consumePurchase(purchaseToken) + end + elseif CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer then + if productId then + SDKManager:consumePurchase(productId) + SDKManager:delIosOrder(productId) + end + if originOrderId ~= "gm" then + SDKManager:delIosPayInfo(originOrderId) + end + end + elseif msgData.status == 1008 then -- 验证异常,但是需要消耗订单 + if CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.Android then + if purchaseToken then + SDKManager:consumePurchase(purchaseToken) + end + elseif CS.UnityEngine.Application.platform == CS.UnityEngine.RuntimePlatform.IPhonePlayer then + if productId then + SDKManager:consumePurchase(productId) + SDKManager:delIosOrder(productId) + end + if originOrderId ~= "gm" then + SDKManager:delIosPayInfo(originOrderId) + end + end + Logger.logError("重复验证") + else + Logger.logError("支付验证失败:%s", msgData.status) + local params = { + content = I18N:getGlobalText(I18N.GlobalConst.PAY_FAILED_DESC_1), + boxType = GConst.MESSAGE_BOX_TYPE.MB_OK, + okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK), + } + GFunc.showMessageBox(params) + end + if callback then + callback() + end + end) end function PayManager:checkAndPay(productId, id, purchaseType, rechargeId) - -- 检查是否可以支付 - SDKManager:checkPay(productId, function(code) - if code == 0 then - self:sendMessage(ProtoMsgType.FromMsgEnum.ActPayReq, {id = id, act_type = purchaseType}, {}, function(binder, msgData) - if msgData.status == 0 then - if msgData.uuid and msgData.uuid ~= GConst.EMPTY_STRING then - local giftType = PayManager:getGiftType(purchaseType, id) - BIReport:postPayTurn(giftType, id, rechargeId) - SDKManager:pay(productId, msgData.uuid, rechargeId, giftType, purchaseType, id, function(purchaseToken, orderId, originOrderId) - if purchaseToken and orderId then - self:requestRewards(purchaseToken, orderId, originOrderId, productId) - end - end) - else -- 没有支付信息,直接发奖 - if table.nums(msgData.rewards) > 0 then - GFunc.showRewardBox(msgData.rewards) - end - local giftData = {} - giftData.act_type = msgData.act_type - giftData.id = msgData.id - giftData.buy_count = DataManager.ShopData:getGiftBoughtNum(msgData.act_type, msgData.id) + 1 - giftData.latest_buy_at = Time:getServerTime() * 1000 -- 服务器都是毫秒 - DataManager.ShopData:updateGiftInfo(giftData) - end - else - Logger.logError("预支付失败") - end - end) - end - end) + -- 检查是否可以支付 + SDKManager:checkPay(productId, function(code) + if code == 0 then + self:sendMessage(ProtoMsgType.FromMsgEnum.ActPayReq, {id = id, act_type = purchaseType}, {}, function(binder, msgData) + if msgData.status == 0 then + if msgData.uuid and msgData.uuid ~= GConst.EMPTY_STRING then + local giftType = PayManager:getGiftType(purchaseType, id) + BIReport:postPayTurn(giftType, id, rechargeId) + SDKManager:pay(productId, msgData.uuid, rechargeId, giftType, purchaseType, id, function(purchaseToken, orderId, originOrderId) + if purchaseToken and orderId then + self:requestRewards(purchaseToken, orderId, originOrderId, productId) + end + end) + else -- 没有支付信息,直接发奖 + if table.nums(msgData.rewards) > 0 then + GFunc.showRewardBox(msgData.rewards) + end + local giftData = {} + giftData.act_type = msgData.act_type + giftData.id = msgData.id + giftData.buy_count = DataManager.ShopData:getGiftBoughtNum(msgData.act_type, msgData.id) + 1 + giftData.latest_buy_at = Time:getServerTime() * 1000 -- 服务器都是毫秒 + DataManager.ShopData:updateGiftInfo(giftData) + end + else + Logger.logError("预支付失败") + end + end) + end + end) end function PayManager:sendMsgToServer(purchaseToken, uuid, originOrderId, productId, callback) - local args = SDKManager:getPurchaseArgs(purchaseToken, uuid, originOrderId, productId) - self:sendMessage(ProtoMsgType.FromMsgEnum.ActPaidResultReq, args, {}, callback) + local args = SDKManager:getPurchaseArgs(purchaseToken, uuid, originOrderId, productId) + self:sendMessage(ProtoMsgType.FromMsgEnum.ActPaidResultReq, args, {}, callback) end return PayManager \ No newline at end of file diff --git a/lua/app/config/act_gift.lua b/lua/app/config/act_gift.lua index c1c1c833..3c224999 100644 --- a/lua/app/config/act_gift.lua +++ b/lua/app/config/act_gift.lua @@ -1,6 +1,1524 @@ local act_gift = { - [100102]={ + [10102]={ ["type"]=1, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3003, + ["id_for_nothing"]="VQhcAA==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10202]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10302]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10402]={ + ["type"]=1, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3004, + ["id_for_nothing"]="VQhcBw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10502]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10602]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10702]={ + ["type"]=1, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=4, + ["type_for_nothing"]="Ug==", + ["id"]=405, + ["id_for_nothing"]="UghZ", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=28, + ["id_for_nothing"]="VAA=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10802]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=4, + ["type_for_nothing"]="Ug==", + ["id"]=405, + ["id_for_nothing"]="UghZ", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [10902]={ + ["type"]=1, + ["reward"]={ + { + ["type"]=4, + ["type_for_nothing"]="Ug==", + ["id"]=405, + ["id_for_nothing"]="UghZ", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [30102]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["value"]=3000 + }, + [30202]={ + ["type"]=3, + ["recharge_id"]=10, + ["time_type"]=3, + ["value"]=3000 + }, + [40102]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40202]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40302]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40402]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40502]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40602]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40702]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40802]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [40902]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41002]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41102]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41202]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41302]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41402]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41502]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [41602]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [41702]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3000 + }, + [41802]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2700 + }, + [41902]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42002]={ + ["type"]=4, + ["recharge_id"]=10, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42102]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [42202]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [42302]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [42402]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [42502]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42602]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42702]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42802]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [42902]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [43002]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [43102]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [43202]={ + ["type"]=4, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [43502]={ + ["type"]=4, + ["recharge_id"]=12, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [43602]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [43702]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [43802]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [43902]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [44002]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [44102]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [44202]={ + ["type"]=4, + ["recharge_id"]=15, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [50102]={ + ["type"]=5, + ["recharge_id"]=3, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [50202]={ + ["type"]=5, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2000 + }, + [100102]={ + ["type"]=10, + ["parameter"]=2, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1700 + }, + [100202]={ + ["type"]=10, + ["parameter"]=4, + ["recharge_id"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=480, + ["num_for_nothing"]="UgBc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=240, + ["id_for_nothing"]="VAxc", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1300 + }, + [100302]={ + ["type"]=10, + ["parameter"]=7, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1400 + }, + [100402]={ + ["type"]=10, + ["parameter"]=10, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=14, + ["id_for_nothing"]="Vww=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1000 + }, + [100502]={ + ["type"]=10, + ["parameter"]=13, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=240, + ["id_for_nothing"]="VAxc", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [100602]={ + ["type"]=10, + ["parameter"]=15, + ["recharge_id"]=15, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1200 + }, + [100702]={ + ["type"]=10, + ["parameter"]=18, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1000 + }, + [100802]={ + ["type"]=10, + ["parameter"]=20, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [100902]={ + ["type"]=10, + ["parameter"]=23, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [101002]={ + ["type"]=10, + ["parameter"]=27, + ["recharge_id"]=12, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1200 + }, + [101102]={ + ["type"]=10, + ["parameter"]=32, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=93, + ["id_for_nothing"]="Xws=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=940 + }, + [101202]={ + ["type"]=10, + ["parameter"]=37, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [101302]={ + ["type"]=10, + ["parameter"]=42, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=160, + ["num_for_nothing"]="Vw5c" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=900 + }, + [101402]={ + ["type"]=10, + ["parameter"]=47, + ["recharge_id"]=12, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=232, + ["id_for_nothing"]="VAte", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=930 + }, + [101502]={ + ["type"]=10, + ["parameter"]=52, + ["recharge_id"]=15, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=229, + ["id_for_nothing"]="VApV", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=950 + }, + [101602]={ + ["type"]=10, + ["parameter"]=57, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=232, + ["id_for_nothing"]="VAte", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=850 + }, + [101702]={ + ["type"]=10, + ["parameter"]=62, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=224, + ["id_for_nothing"]="VApY", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=960 + }, + [101802]={ + ["type"]=10, + ["parameter"]=67, + ["recharge_id"]=12, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34, + ["id_for_nothing"]="VQw=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [101902]={ + ["type"]=10, + ["parameter"]=72, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34, + ["id_for_nothing"]="VQw=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["time_type"]=1, + ["limit_time"]=999999, + ["limit_time_2"]=3, + ["limit"]=1, + ["value"]=1100 + }, + [160102]={ + ["type"]=16, + ["recharge_id"]=5, + ["time_type"]=3, + ["value"]=230 + }, + [160202]={ + ["type"]=16, + ["recharge_id"]=14, + ["time_type"]=3, + ["value"]=200 + }, + [150102]={ + ["type"]=15, + ["parameter"]=1, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [150202]={ + ["type"]=15, + ["parameter"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [150302]={ + ["type"]=15, + ["parameter"]=1, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [150402]={ + ["type"]=15, + ["parameter"]=1, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [150502]={ + ["type"]=15, + ["parameter"]=1, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["limit"]=1, + ["value"]=1200 + }, + [150602]={ + ["type"]=15, + ["parameter"]=2, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [150702]={ + ["type"]=15, + ["parameter"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [150802]={ + ["type"]=15, + ["parameter"]=2, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [150902]={ + ["type"]=15, + ["parameter"]=2, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [151002]={ + ["type"]=15, + ["parameter"]=2, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["limit"]=1, + ["value"]=1200 + }, + [151102]={ + ["type"]=15, + ["parameter"]=3, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [151202]={ + ["type"]=15, + ["parameter"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [151302]={ + ["type"]=15, + ["parameter"]=3, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=210, + ["id_for_nothing"]="VAlc", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [151402]={ + ["type"]=15, + ["parameter"]=3, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [151502]={ + ["type"]=15, ["parameter"]=3, ["recharge_id"]=1, ["reward"]={ @@ -15,20 +1533,142 @@ local act_gift = { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=7, - ["id_for_nothing"]="UQ==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=2, + ["num_for_nothing"]="VA==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, ["limit"]=1, - ["value"]=90 + ["value"]=1000 }, - [100202]={ - ["type"]=1, + [151602]={ + ["type"]=15, + ["parameter"]=4, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [151702]={ + ["type"]=15, + ["parameter"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [151802]={ + ["type"]=15, + ["parameter"]=4, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=210, + ["id_for_nothing"]="VAlc", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [151902]={ + ["type"]=15, + ["parameter"]=4, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [152002]={ + ["type"]=15, ["parameter"]=4, ["recharge_id"]=1, ["reward"]={ @@ -43,104 +1683,592 @@ local act_gift = { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=7, - ["id_for_nothing"]="UQ==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=2, + ["num_for_nothing"]="VA==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, ["limit"]=1, - ["value"]=90 + ["value"]=1000 }, - [100302]={ - ["type"]=1, + [152102]={ + ["type"]=15, ["parameter"]=5, - ["recharge_id"]=2, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=240, - ["num_for_nothing"]="VAxc" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=1, ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=95 + ["limit"]=1 }, - [100402]={ - ["type"]=1, + [152202]={ + ["type"]=15, + ["parameter"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [152302]={ + ["type"]=15, + ["parameter"]=5, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=211, + ["id_for_nothing"]="VAld", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [152402]={ + ["type"]=15, + ["parameter"]=5, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [152502]={ + ["type"]=15, + ["parameter"]=5, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [152602]={ + ["type"]=15, ["parameter"]=6, - ["recharge_id"]=3, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=360, - ["num_for_nothing"]="VQ5c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=7, - ["id_for_nothing"]="UQ==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [152702]={ + ["type"]=15, + ["parameter"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [152802]={ + ["type"]=15, + ["parameter"]=6, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", ["num"]=300, ["num_for_nothing"]="VQhc" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=211, + ["id_for_nothing"]="VAld", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, ["limit"]=1, - ["value"]=90 + ["value"]=170 }, - [100502]={ - ["type"]=1, + [152902]={ + ["type"]=15, + ["parameter"]=6, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [153002]={ + ["type"]=15, + ["parameter"]=6, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [153102]={ + ["type"]=15, ["parameter"]=7, - ["recharge_id"]=3, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=360, - ["num_for_nothing"]="VQ5c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=7, - ["id_for_nothing"]="UQ==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [153202]={ + ["type"]=15, + ["parameter"]=7, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [153302]={ + ["type"]=15, + ["parameter"]=7, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34, + ["id_for_nothing"]="VQw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [153402]={ + ["type"]=15, + ["parameter"]=7, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [153502]={ + ["type"]=15, + ["parameter"]=7, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34, + ["id_for_nothing"]="VQw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=870 + }, + [153602]={ + ["type"]=15, + ["parameter"]=8, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [153702]={ + ["type"]=15, + ["parameter"]=8, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [153802]={ + ["type"]=15, + ["parameter"]=8, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", ["num"]=300, ["num_for_nothing"]="VQhc" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, ["limit"]=1, - ["value"]=90 + ["value"]=160 }, - [100602]={ - ["type"]=1, + [153902]={ + ["type"]=15, + ["parameter"]=8, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [154002]={ + ["type"]=15, ["parameter"]=8, ["recharge_id"]=2, ["reward"]={ @@ -155,189 +2283,893 @@ local act_gift = { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", - ["num"]=1, - ["num_for_nothing"]="Vw==" + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, ["limit"]=1, - ["value"]=95 + ["value"]=1000 }, - [100702]={ - ["type"]=1, + [154102]={ + ["type"]=15, ["parameter"]=9, - ["recharge_id"]=3, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=360, - ["num_for_nothing"]="VQ5c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=23, - ["id_for_nothing"]="VAs=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=90 + ["limit"]=1 }, - [100802]={ - ["type"]=1, + [154202]={ + ["type"]=15, + ["parameter"]=9, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [154302]={ + ["type"]=15, + ["parameter"]=9, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=210, + ["id_for_nothing"]="VAlc", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [154402]={ + ["type"]=15, + ["parameter"]=9, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [154502]={ + ["type"]=15, + ["parameter"]=9, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=1000 + }, + [154602]={ + ["type"]=15, ["parameter"]=10, - ["recharge_id"]=3, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=360, - ["num_for_nothing"]="VQ5c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=23, - ["id_for_nothing"]="VAs=", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [154702]={ + ["type"]=15, + ["parameter"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [154802]={ + ["type"]=15, + ["parameter"]=10, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=211, + ["id_for_nothing"]="VAld", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [154902]={ + ["type"]=15, + ["parameter"]=10, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", ["num"]=10, ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, ["limit"]=1, - ["value"]=90 + ["value"]=180 }, - [100902]={ - ["type"]=1, + [155002]={ + ["type"]=15, + ["parameter"]=10, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["limit"]=1, + ["value"]=930 + }, + [155102]={ + ["type"]=15, ["parameter"]=11, - ["recharge_id"]=4, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=480, - ["num_for_nothing"]="UgBc" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=54, - ["id_for_nothing"]="Uww=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=1, ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=95 + ["limit"]=1 }, - [101002]={ - ["type"]=1, + [155202]={ + ["type"]=15, + ["parameter"]=11, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [155302]={ + ["type"]=15, + ["parameter"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1, + ["value"]=160 + }, + [155402]={ + ["type"]=15, + ["parameter"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [155502]={ + ["type"]=15, + ["parameter"]=11, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["limit"]=1, + ["value"]=1000 + }, + [155602]={ + ["type"]=15, ["parameter"]=12, - ["recharge_id"]=6, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=720, - ["num_for_nothing"]="UQpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=23, - ["id_for_nothing"]="VAs=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } + ["parameter_pro"]={ + 1 }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=90 - }, - [101102]={ - ["type"]=1, - ["parameter"]=13, - ["recharge_id"]=6, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=720, - ["num_for_nothing"]="UQpc" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=23, - ["id_for_nothing"]="VAs=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=90 - }, - [101202]={ - ["type"]=1, - ["parameter"]=14, - ["recharge_id"]=4, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=480, - ["num_for_nothing"]="UgBc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54, - ["id_for_nothing"]="Uww=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=1, ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, - ["limit"]=1, - ["value"]=95 + ["limit"]=1 }, - [101302]={ - ["type"]=1, - ["parameter"]=15, + [155702]={ + ["type"]=15, + ["parameter"]=12, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [155802]={ + ["type"]=15, + ["parameter"]=12, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=210, + ["id_for_nothing"]="VAlc", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1, + ["value"]=130 + }, + [155902]={ + ["type"]=15, + ["parameter"]=12, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [156002]={ + ["type"]=15, + ["parameter"]=12, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=1000 + }, + [156102]={ + ["type"]=15, + ["parameter"]=13, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [156202]={ + ["type"]=15, + ["parameter"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [156302]={ + ["type"]=15, + ["parameter"]=13, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=211, + ["id_for_nothing"]="VAld", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [156402]={ + ["type"]=15, + ["parameter"]=13, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [156502]={ + ["type"]=15, + ["parameter"]=13, + ["recharge_id"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["limit"]=1, + ["value"]=930 + }, + [156602]={ + ["type"]=15, + ["parameter"]=14, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [156702]={ + ["type"]=15, + ["parameter"]=14, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [156802]={ + ["type"]=15, + ["parameter"]=14, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=34, + ["id_for_nothing"]="VQw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [156902]={ + ["type"]=15, + ["parameter"]=14, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1, + ["value"]=170 + }, + [157002]={ + ["type"]=15, + ["parameter"]=14, ["recharge_id"]=10, ["reward"]={ { @@ -351,530 +3183,921 @@ local act_gift = { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=28, - ["id_for_nothing"]="VAA=", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=167, - ["id_for_nothing"]="Vw5b", + ["id"]=19, + ["id_for_nothing"]="VwE=", ["num"]=1, ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=999999, - ["limit_time_2"]=3, ["limit"]=1, - ["value"]=90 + ["value"]=870 }, - [70102]={ - ["type"]=7, - ["recharge_id"]=13, - ["time_type"]=3, - ["value"]=3000 - }, - [70202]={ - ["type"]=7, - ["recharge_id"]=14, - ["time_type"]=3, - ["value"]=2000 - }, - [20102]={ - ["type"]=2, - ["pay_condition"]={ - 0, - 20 + [1500102]={ + ["type"]=20, + ["parameter"]=1, + ["parameter_pro"]={ + 1 }, - ["recharge_id"]=5, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=40000, - ["num_for_nothing"]="UghcA2U=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=1, - ["limit_time_2"]=6, - ["limit"]=1, - ["value"]=1000 + ["limit"]=1 }, - [20202]={ - ["type"]=2, - ["pay_condition"]={ - 20, - 50 - }, - ["recharge_id"]=7, + [1500202]={ + ["type"]=20, + ["parameter"]=1, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=60000, - ["num_for_nothing"]="UAhcA2U=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" } }, - ["time_type"]=1, - ["limit_time"]=1, - ["limit_time_2"]=6, - ["limit"]=1, - ["value"]=1200 + ["limit"]=1 }, - [20302]={ - ["type"]=2, - ["pay_condition"]={ - 50, - 9999 + [1500302]={ + ["type"]=20, + ["parameter"]=1, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } }, - ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=100000, - ["num_for_nothing"]="VwhcA2VR" + ["id"]=44, + ["id_for_nothing"]="Ugw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=1, - ["limit_time"]=1, - ["limit_time_2"]=6, ["limit"]=1, - ["value"]=1500 + ["value"]=180 }, - [50102]={ - ["type"]=5, - ["pay_condition"]={ - 0, - 10 + [1500402]={ + ["type"]=20, + ["parameter"]=1, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } }, + ["limit"]=1, + ["value"]=1150 + }, + [1500502]={ + ["type"]=20, + ["parameter"]=2, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1500602]={ + ["type"]=20, + ["parameter"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1500702]={ + ["type"]=20, + ["parameter"]=2, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44, + ["id_for_nothing"]="Ugw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1500802]={ + ["type"]=20, + ["parameter"]=2, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1150 + }, + [1500902]={ + ["type"]=20, + ["parameter"]=3, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1501002]={ + ["type"]=20, + ["parameter"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1501102]={ + ["type"]=20, + ["parameter"]=3, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44, + ["id_for_nothing"]="Ugw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1501202]={ + ["type"]=20, + ["parameter"]=3, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1150 + }, + [1501302]={ + ["type"]=20, + ["parameter"]=4, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1501402]={ + ["type"]=20, + ["parameter"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1501502]={ + ["type"]=20, + ["parameter"]=4, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44, + ["id_for_nothing"]="Ugw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1501602]={ + ["type"]=20, + ["parameter"]=4, + ["recharge_id"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1150 + }, + [1501702]={ + ["type"]=20, ["parameter"]=5, - ["recharge_id"]=5, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=1, ["num_for_nothing"]="Vw==" } }, - ["time_type"]=3, - ["limit"]=1, - ["value"]=800 + ["limit"]=1 }, - [50202]={ - ["type"]=5, - ["pay_condition"]={ - 10, - 30 - }, + [1501802]={ + ["type"]=20, ["parameter"]=5, - ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=2, ["num_for_nothing"]="VA==" } }, - ["time_type"]=3, - ["limit"]=1, - ["value"]=800 + ["limit"]=1 }, - [50302]={ - ["type"]=5, - ["pay_condition"]={ - 30, - 9999 - }, + [1501902]={ + ["type"]=20, ["parameter"]=5, - ["recharge_id"]=13, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44, + ["id_for_nothing"]="Ugw=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1502002]={ + ["type"]=20, + ["parameter"]=5, + ["recharge_id"]=1, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=600, - ["num_for_nothing"]="UAhc" + ["num"]=240, + ["num_for_nothing"]="VAxc" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1150 + }, + [1502102]={ + ["type"]=20, + ["parameter"]=6, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1502202]={ + ["type"]=20, + ["parameter"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=2, ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", - ["num"]=1, - ["num_for_nothing"]="Vw==" } }, - ["time_type"]=3, - ["limit"]=1, - ["value"]=800 + ["limit"]=1 }, - [50402]={ - ["type"]=5, - ["pay_condition"]={ - 0, - 15 - }, - ["parameter"]=15, - ["recharge_id"]=7, - ["reward"]={ + [1502302]={ + ["type"]=20, + ["parameter"]=6, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=210, - ["num_for_nothing"]="VAlc" - }, + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", + ["id"]=44, + ["id_for_nothing"]="Ugw=", ["num"]=1, ["num_for_nothing"]="Vw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=3, - ["num_for_nothing"]="VQ==" + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=3, ["limit"]=1, - ["value"]=800 + ["value"]=180 }, - [50502]={ - ["type"]=5, - ["pay_condition"]={ - 15, - 40 - }, - ["parameter"]=15, - ["recharge_id"]=12, + [1502402]={ + ["type"]=20, + ["parameter"]=6, + ["recharge_id"]=1, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=450, - ["num_for_nothing"]="Ug1c" + ["num"]=240, + ["num_for_nothing"]="VAxc" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", + ["id"]=45, + ["id_for_nothing"]="Ug0=", ["num"]=1, ["num_for_nothing"]="Vw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=5, - ["num_for_nothing"]="Uw==" + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=3, ["limit"]=1, - ["value"]=800 + ["value"]=1150 }, - [50602]={ - ["type"]=5, - ["pay_condition"]={ - 40, - 9999 + [1502502]={ + ["type"]=20, + ["parameter"]=7, + ["parameter_pro"]={ + 1 }, - ["parameter"]=15, - ["recharge_id"]=14, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=750, - ["num_for_nothing"]="UQ1c" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1502602]={ + ["type"]=20, + ["parameter"]=7, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=2, ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=8, - ["num_for_nothing"]="Xg==" } }, - ["time_type"]=3, - ["limit"]=1, - ["value"]=800 + ["limit"]=1 }, - [50702]={ - ["type"]=5, - ["pay_condition"]={ - 0, - 20 - }, - ["parameter"]=25, - ["recharge_id"]=10, - ["reward"]={ + [1502702]={ + ["type"]=20, + ["parameter"]=7, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", - ["num"]=2, - ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=5, - ["num_for_nothing"]="Uw==" + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" } }, - ["time_type"]=3, - ["limit"]=1, - ["value"]=800 - }, - [50802]={ - ["type"]=5, - ["pay_condition"]={ - 20, - 50 - }, - ["parameter"]=25, - ["recharge_id"]=13, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=600, - ["num_for_nothing"]="UAhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", + ["id"]=44, + ["id_for_nothing"]="Ugw=", ["num"]=1, ["num_for_nothing"]="Vw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=18, - ["num_for_nothing"]="VwA=" + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=3, ["limit"]=1, - ["value"]=800 + ["value"]=180 }, - [50902]={ - ["type"]=5, - ["pay_condition"]={ - 50, - 9999 - }, - ["parameter"]=25, - ["recharge_id"]=15, + [1502802]={ + ["type"]=20, + ["parameter"]=7, + ["recharge_id"]=1, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=900, - ["num_for_nothing"]="Xwhc" + ["num"]=240, + ["num_for_nothing"]="VAxc" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", - ["num"]=2, - ["num_for_nothing"]="VA==" + ["id"]=45, + ["id_for_nothing"]="Ug0=", + ["num"]=1, + ["num_for_nothing"]="Vw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=24, - ["num_for_nothing"]="VAw=" + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=3, ["limit"]=1, - ["value"]=800 + ["value"]=1100 }, - [40102]={ - ["type"]=4, - ["recharge_id"]=2, + [1502902]={ + ["type"]=20, + ["parameter"]=1, + ["parameter_pro"]={ + 1 + }, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=500, - ["num_for_nothing"]="Uwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=53001, - ["id_for_nothing"]="UwtcA2Q=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=13, - ["id_for_nothing"]="Vws=", + ["id"]=68, + ["id_for_nothing"]="UAA=", ["num"]=1, ["num_for_nothing"]="Vw==" } - } + }, + ["limit"]=1 }, - [10102]={ - ["type"]=1, + [1503002]={ + ["type"]=20, + ["parameter"]=1, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["num"]=50, + ["num_for_nothing"]="Uwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=500, - ["num_for_nothing"]="Uwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=3, - ["num_for_nothing"]="VQ==" + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" } - } + }, + ["limit"]=1 }, - [60102]={ - ["type"]=6, - ["recharge_id"]=13, - ["time_type"]=3, + [1503102]={ + ["type"]=20, + ["parameter"]=1, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, ["limit"]=1, - ["value"]=25 + ["value"]=200 }, - [60202]={ - ["type"]=6, - ["recharge_id"]=7, - ["time_type"]=3, - ["limit"]=1, - ["value"]=21 - }, - [60302]={ - ["type"]=6, - ["recharge_id"]=15, - ["time_type"]=3, - ["limit"]=1, - ["value"]=25 - }, - [60402]={ - ["type"]=6, - ["recharge_id"]=10, - ["time_type"]=3, - ["limit"]=1, - ["value"]=21 - }, - [30102]={ - ["type"]=3, + [1503202]={ + ["type"]=20, + ["parameter"]=1, ["recharge_id"]=3, ["reward"]={ { @@ -882,54 +4105,839 @@ local act_gift = { ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["num"]=360, + ["num_for_nothing"]="VQ5c" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=1000, - ["num_for_nothing"]="VwhcAw==" + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1503302]={ + ["type"]=20, + ["parameter"]=2, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1503402]={ + ["type"]=20, + ["parameter"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1503502]={ + ["type"]=20, + ["parameter"]=2, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1503602]={ + ["type"]=20, + ["parameter"]=2, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1503702]={ + ["type"]=20, + ["parameter"]=3, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1503802]={ + ["type"]=20, + ["parameter"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1503902]={ + ["type"]=20, + ["parameter"]=3, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1504002]={ + ["type"]=20, + ["parameter"]=3, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1504102]={ + ["type"]=20, + ["parameter"]=4, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1504202]={ + ["type"]=20, + ["parameter"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1504302]={ + ["type"]=20, + ["parameter"]=4, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1504402]={ + ["type"]=20, + ["parameter"]=4, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1504502]={ + ["type"]=20, + ["parameter"]=5, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1504602]={ + ["type"]=20, + ["parameter"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1504702]={ + ["type"]=20, + ["parameter"]=5, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1504802]={ + ["type"]=20, + ["parameter"]=5, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1504902]={ + ["type"]=20, + ["parameter"]=6, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1505002]={ + ["type"]=20, + ["parameter"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1505102]={ + ["type"]=20, + ["parameter"]=6, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1505202]={ + ["type"]=20, + ["parameter"]=6, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1505302]={ + ["type"]=20, + ["parameter"]=7, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["limit"]=1 + }, + [1505402]={ + ["type"]=20, + ["parameter"]=7, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["limit"]=1 + }, + [1505502]={ + ["type"]=20, + ["parameter"]=7, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=221, + ["id_for_nothing"]="VApd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=200 + }, + [1505602]={ + ["type"]=20, + ["parameter"]=7, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["limit"]=1, + ["value"]=1300 + }, + [1505702]={ + ["type"]=20, + ["parameter"]=1, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1505802]={ + ["type"]=20, + ["parameter"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1505902]={ + ["type"]=20, + ["parameter"]=1, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", ["num"]=3, ["num_for_nothing"]="VQ==" } }, - ["time_type"]=1, - ["limit_time"]=72, + ["limit"]=1, + ["value"]=180 + }, + [1506002]={ + ["type"]=20, + ["parameter"]=1, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [1506102]={ + ["type"]=20, + ["parameter"]=2, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, ["limit"]=1 }, - [80102]={ - ["type"]=8, - ["recharge_id"]=12, - ["time_type"]=3, - ["value"]=3000 - }, - [80202]={ - ["type"]=8, - ["recharge_id"]=13, - ["time_type"]=3, - ["value"]=2000 - }, - [90102]={ - ["type"]=9, - ["recharge_id"]=13, + [1506202]={ + ["type"]=20, + ["parameter"]=2, ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" - }, { ["type"]=1, ["type_for_nothing"]="Vw==", @@ -937,252 +4945,570 @@ local act_gift = { ["id_for_nothing"]="VA==", ["num"]=200, ["num_for_nothing"]="VAhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5, - ["id_for_nothing"]="Uw==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=6, - ["num_for_nothing"]="UA==" } }, - ["time_type"]=1, - ["limit_time"]=24, - ["limit_time_2"]=0, - ["value"]=200 + ["limit"]=1 }, - [90202]={ - ["type"]=9, - ["recharge_id"]=12, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" - }, + [1506302]={ + ["type"]=20, + ["parameter"]=2, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=200, - ["num_for_nothing"]="VAhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5, - ["id_for_nothing"]="Uw==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=6, - ["num_for_nothing"]="UA==" + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" } }, - ["time_type"]=1, - ["limit_time"]=24, - ["limit_time_2"]=0, - ["value"]=260 - }, - [90302]={ - ["type"]=9, - ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=200, - ["num_for_nothing"]="VAhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5, - ["id_for_nothing"]="Uw==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=6, - ["num_for_nothing"]="UA==" + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" } }, - ["time_type"]=1, - ["limit_time"]=24, - ["limit_time_2"]=0, - ["value"]=400 - }, - [90402]={ - ["type"]=9, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=200, - ["num_for_nothing"]="VAhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5, - ["id_for_nothing"]="Uw==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=6, - ["num_for_nothing"]="UA==" - } - }, - ["time_type"]=1, - ["limit_time"]=24, - ["limit_time_2"]=0, - ["value"]=800 - }, - [100102]={ - ["type"]=10, - ["recharge_id"]=10, - ["time_type"]=3, ["limit"]=1, - ["value"]=4000 + ["value"]=180 }, - [100202]={ - ["type"]=10, - ["recharge_id"]=10, - ["time_type"]=3, + [1506402]={ + ["type"]=20, + ["parameter"]=2, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, ["limit"]=1, - ["value"]=4000 + ["value"]=1100 + }, + [1506502]={ + ["type"]=20, + ["parameter"]=3, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1506602]={ + ["type"]=20, + ["parameter"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1506702]={ + ["type"]=20, + ["parameter"]=3, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1506802]={ + ["type"]=20, + ["parameter"]=3, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [1506902]={ + ["type"]=20, + ["parameter"]=4, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1507002]={ + ["type"]=20, + ["parameter"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1507102]={ + ["type"]=20, + ["parameter"]=4, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1507202]={ + ["type"]=20, + ["parameter"]=4, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [1507302]={ + ["type"]=20, + ["parameter"]=5, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1507402]={ + ["type"]=20, + ["parameter"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1507502]={ + ["type"]=20, + ["parameter"]=5, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1507602]={ + ["type"]=20, + ["parameter"]=5, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [1507702]={ + ["type"]=20, + ["parameter"]=6, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1507802]={ + ["type"]=20, + ["parameter"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1507902]={ + ["type"]=20, + ["parameter"]=6, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1508002]={ + ["type"]=20, + ["parameter"]=6, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 + }, + [1508102]={ + ["type"]=20, + ["parameter"]=7, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["limit"]=1 + }, + [1508202]={ + ["type"]=20, + ["parameter"]=7, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["limit"]=1 + }, + [1508302]={ + ["type"]=20, + ["parameter"]=7, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=24, + ["id_for_nothing"]="VAw=", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["limit"]=1, + ["value"]=180 + }, + [1508402]={ + ["type"]=20, + ["parameter"]=7, + ["recharge_id"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=360, + ["num_for_nothing"]="VQ5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=7, + ["num_for_nothing"]="UQ==" + } + }, + ["limit"]=1, + ["value"]=1100 }, [110102]={ ["type"]=11, - ["recharge_id"]=5, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1001, - ["id_for_nothing"]="VwhcAg==", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit_type"]=1, + ["limit"]=1 }, [110202]={ ["type"]=11, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1001, - ["id_for_nothing"]="VwhcAg==", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit"]=10, + ["value"]=130 }, [110302]={ ["type"]=11, @@ -1191,1787 +5517,1295 @@ local act_gift = { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6800, - ["num_for_nothing"]="UABcAw==" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["num"]=600, + ["num_for_nothing"]="UAhc" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit"]=1, + ["value"]=770 }, [110402]={ ["type"]=11, - ["recharge_id"]=5, + ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6800, - ["num_for_nothing"]="UABcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", ["num"]=20, ["num_for_nothing"]="VAg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit"]=2, + ["value"]=770 }, [110502]={ ["type"]=11, - ["recharge_id"]=5, + ["recharge_id"]=13, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7200, - ["num_for_nothing"]="UQpcAw==" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=30, + ["num_for_nothing"]="VQg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit"]=3, + ["value"]=600 }, [110602]={ ["type"]=11, - ["recharge_id"]=5, + ["recharge_id"]=16, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7200, - ["num_for_nothing"]="UQpcAw==" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=60, + ["num_for_nothing"]="UAg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=20, - ["num_for_nothing"]="VAg=" + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 + ["limit"]=5, + ["value"]=500 }, [110702]={ ["type"]=11, - ["recharge_id"]=7, + ["recharge_id"]=18, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7500, - ["num_for_nothing"]="UQ1cAw==" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=120, + ["num_for_nothing"]="Vwpc" }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 + ["limit"]=10, + ["value"]=500 }, - [110802]={ + [111302]={ ["type"]=11, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7500, - ["num_for_nothing"]="UQ1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1006, - ["id_for_nothing"]="VwhcBQ==", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } - }, + ["recharge_id"]=5, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, + ["limit"]=1, ["value"]=1000 }, - [110902]={ + [111402]={ ["type"]=11, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1006, - ["id_for_nothing"]="VwhcBQ==", - ["num"]=25, - ["num_for_nothing"]="VA0=" - } - }, + ["recharge_id"]=5, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, + ["limit"]=1, ["value"]=1000 }, - [111002]={ + [111502]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [111602]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [111702]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [111802]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [111902]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [112002]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [112102]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [112202]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [112802]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [112902]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113002]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113102]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113202]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113302]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113402]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113502]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113602]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [113702]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [114302]={ ["type"]=11, - ["recharge_id"]=7, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [114402]={ + ["type"]=11, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1006, - ["id_for_nothing"]="VwhcBQ==", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 + ["limit"]=10, + ["value"]=130 }, - [120102]={ - ["type"]=12, + [114502]={ + ["type"]=11, ["recharge_id"]=5, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=38, - ["id_for_nothing"]="VQA=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 - }, - [120202]={ - ["type"]=12, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=38, - ["id_for_nothing"]="VQA=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 - }, - [120302]={ - ["type"]=12, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6800, - ["num_for_nothing"]="UABcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", + ["id"]=40, + ["id_for_nothing"]="Ugg=", ["num"]=10, ["num_for_nothing"]="Vwg=" }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 - }, - [120402]={ - ["type"]=12, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6800, - ["num_for_nothing"]="UABcAw==" - }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=20, - ["num_for_nothing"]="VAg=" + ["num"]=600, + ["num_for_nothing"]="UAhc" } }, ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 - }, - [120502]={ - ["type"]=12, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7200, - ["num_for_nothing"]="UQpcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=800 - }, - [120602]={ - ["type"]=12, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7200, - ["num_for_nothing"]="UQpcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=30, - ["num_for_nothing"]="VQg=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 - }, - [120702]={ - ["type"]=12, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7500, - ["num_for_nothing"]="UQ1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 - }, - [120802]={ - ["type"]=12, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7500, - ["num_for_nothing"]="UQ1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=30, - ["num_for_nothing"]="VQg=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 - }, - [120902]={ - ["type"]=12, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=8000, - ["num_for_nothing"]="XghcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=43, - ["id_for_nothing"]="Ugs=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 - }, - [121002]={ - ["type"]=12, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=50, - ["num_for_nothing"]="Uwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=43, - ["id_for_nothing"]="Ugs=", - ["num"]=20, - ["num_for_nothing"]="VAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=12, - ["limit_time_2"]=1, - ["value"]=1000 - }, - [130002]={ - ["type"]=13, - ["recharge_id"]=11, ["limit"]=1, - ["value"]=1800 + ["value"]=770 }, - [130102]={ - ["type"]=13, - ["recharge_id"]=12, - ["limit"]=1, - ["value"]=1800 - }, - [130202]={ - ["type"]=13, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=30000, - ["num_for_nothing"]="VQhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=3400101, - ["id_for_nothing"]="VQxcA2RRfg==", - ["num"]=1, - ["num_for_nothing"]="Vw==" - } - }, - ["limit"]=1, - ["value"]=1000 - }, - [130302]={ - ["type"]=13, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=30000, - ["num_for_nothing"]="VQhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5400101, - ["id_for_nothing"]="UwxcA2RRfg==", - ["num"]=1, - ["num_for_nothing"]="Vw==" - } - }, - ["limit"]=1, - ["value"]=1000 - }, - [130402]={ - ["type"]=13, + [114602]={ + ["type"]=11, ["recharge_id"]=10, ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=770 + }, + [114702]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=30, + ["num_for_nothing"]="VQg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=600 + }, + [114802]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=60, + ["num_for_nothing"]="UAg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=500 + }, + [114902]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=500 + }, + [115502]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [115602]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [115702]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [115802]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [115902]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [116002]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [116102]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [116202]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [116302]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [116402]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117002]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117102]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117202]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117302]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117402]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117502]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117602]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117702]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117802]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [117902]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102102]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102202]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102302]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102402]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102502]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102602]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102702]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102802]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1102902]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103002]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103102]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103202]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103302]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103402]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103502]={ + ["type"]=11, + ["recharge_id"]=5, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103602]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103702]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103802]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1103902]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1104002]={ + ["type"]=11, + ["recharge_id"]=10, + ["time_type"]=1, + ["limit"]=1, + ["value"]=1000 + }, + [1104102]={ + ["type"]=11, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1104202]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=130 + }, + [1104302]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", ["num"]=10, ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" } }, + ["time_type"]=1, ["limit"]=1, - ["value"]=1100 + ["value"]=770 }, - [130502]={ - ["type"]=13, - ["recharge_id"]=11, - ["limit"]=1, - ["value"]=1800 - }, - [130602]={ - ["type"]=13, - ["recharge_id"]=12, - ["limit"]=1, - ["value"]=1800 - }, - [140403]={ - ["type"]=14, + [1104402]={ + ["type"]=11, ["recharge_id"]=10, - ["limit"]=1 - }, - [140404]={ - ["type"]=14, - ["recharge_id"]=12, - ["limit"]=1 - }, - [140405]={ - ["type"]=14, - ["recharge_id"]=11, - ["limit"]=1 - }, - [150102]={ - ["type"]=15, - ["parameter_pro"]={ - 0, - 20 + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=770 + }, + [1104502]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=600 + }, + [1104602]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=500 + }, + [1104702]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=500 + }, + [30302]={ + ["type"]=3, + ["recharge_id"]=10, + ["time_type"]=3, + ["value"]=2300 + }, + [30402]={ + ["type"]=3, + ["recharge_id"]=10, + ["time_type"]=3, + ["value"]=2300 + }, + [30502]={ + ["type"]=3, + ["recharge_id"]=10, + ["time_type"]=3, + ["value"]=2300 + }, + [20102]={ + ["type"]=2, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + } + }, + ["time_type"]=3, + ["value"]=3000 + }, + [20202]={ + ["type"]=2, ["recharge_id"]=5, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1001, - ["id_for_nothing"]="VwhcAg==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=5, - ["num_for_nothing"]="Uw==" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" } }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 + ["time_type"]=3, + ["value"]=3000 }, - [150202]={ - ["type"]=15, - ["parameter_pro"]={ - 20, - 40 - }, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=6000, - ["num_for_nothing"]="UAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1001, - ["id_for_nothing"]="VwhcAg==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150302]={ - ["type"]=15, - ["parameter_pro"]={ - 40, - 60 - }, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150402]={ - ["type"]=15, - ["parameter_pro"]={ - 60, - 80 - }, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=60, - ["num_for_nothing"]="UAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150502]={ - ["type"]=15, - ["parameter_pro"]={ - 80, - 100 - }, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=16000, - ["num_for_nothing"]="Vw5cA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150602]={ - ["type"]=15, - ["parameter_pro"]={ - 100, - 120 - }, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=16000, - ["num_for_nothing"]="Vw5cA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1002, - ["id_for_nothing"]="VwhcAQ==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150702]={ - ["type"]=15, - ["parameter_pro"]={ - 120, - 140 - }, + [20302]={ + ["type"]=2, ["recharge_id"]=15, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=24000, - ["num_for_nothing"]="VAxcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150802]={ - ["type"]=15, - ["parameter_pro"]={ - 140, - 160 - }, - ["recharge_id"]=15, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=24000, - ["num_for_nothing"]="VAxcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1003, - ["id_for_nothing"]="VwhcAA==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [150902]={ - ["type"]=15, - ["parameter_pro"]={ - 160, - 180 - }, - ["recharge_id"]=17, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=40000, - ["num_for_nothing"]="UghcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1006, - ["id_for_nothing"]="VwhcBQ==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [151002]={ - ["type"]=15, - ["parameter_pro"]={ - 180, - 200 - }, - ["recharge_id"]=17, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=40000, - ["num_for_nothing"]="UghcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1004, - ["id_for_nothing"]="VwhcBw==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1005, - ["id_for_nothing"]="VwhcBg==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1006, - ["id_for_nothing"]="VwhcBQ==", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160102]={ - ["type"]=16, - ["parameter_pro"]={ - 0, - 20 - }, - ["recharge_id"]=7, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=12000, - ["num_for_nothing"]="VwpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=38, - ["id_for_nothing"]="VQA=", - ["num"]=60, - ["num_for_nothing"]="UAg=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=39, ["id_for_nothing"]="VQE=", - ["num"]=5, - ["num_for_nothing"]="Uw==" + ["num"]=1, + ["num_for_nothing"]="Vw==" } }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 + ["time_type"]=3, + ["value"]=3000 }, - [160202]={ - ["type"]=16, + [20402]={ + ["type"]=2, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + ["time_type"]=3, + ["value"]=3000 + }, + [118502]={ + ["type"]=11, ["parameter_pro"]={ - 20, - 40 + 1 }, - ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=12000, - ["num_for_nothing"]="VwpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=38, - ["id_for_nothing"]="VQA=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=40, - ["num_for_nothing"]="Ugg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160302]={ - ["type"]=16, - ["parameter_pro"]={ - 40, - 60 - }, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160402]={ - ["type"]=16, - ["parameter_pro"]={ - 60, - 80 - }, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160502]={ - ["type"]=16, - ["parameter_pro"]={ - 80, - 100 - }, - ["recharge_id"]=15, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=32000, - ["num_for_nothing"]="VQpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160602]={ - ["type"]=16, - ["parameter_pro"]={ - 100, - 120 - }, - ["recharge_id"]=15, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=32000, - ["num_for_nothing"]="VQpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=39, - ["id_for_nothing"]="VQE=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=80, - ["num_for_nothing"]="Xgg=" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160702]={ - ["type"]=16, - ["parameter_pro"]={ - 120, - 140 - }, - ["recharge_id"]=16, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=48000, - ["num_for_nothing"]="UgBcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160802]={ - ["type"]=16, - ["parameter_pro"]={ - 140, - 160 - }, - ["recharge_id"]=16, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=48000, - ["num_for_nothing"]="UgBcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=40, - ["id_for_nothing"]="Ugg=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [160902]={ - ["type"]=16, - ["parameter_pro"]={ - 160, - 180 - }, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=80000, - ["num_for_nothing"]="XghcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=43, - ["id_for_nothing"]="Ugs=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [161002]={ - ["type"]=16, - ["parameter_pro"]={ - 180, - 200 - }, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=80000, - ["num_for_nothing"]="XghcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=41, - ["id_for_nothing"]="Ugk=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=42, - ["id_for_nothing"]="Ugo=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=43, - ["id_for_nothing"]="Ugs=", - ["num"]=120, - ["num_for_nothing"]="Vwpc" - } - }, - ["time_type"]=1, - ["limit_time"]=6, - ["limit_time_2"]=1, - ["value"]=800 - }, - [170102]={ - ["type"]=17, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=2, ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [118602]={ + ["type"]=11, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", + ["num"]=700, + ["num_for_nothing"]="UQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=5, ["num_for_nothing"]="Uw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=50, + ["num_for_nothing"]="Uwg=" } - } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=160 }, - [170202]={ - ["type"]=17, + [118702]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=140 + }, + [118802]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=130 + }, + [118902]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=8000, + ["num_for_nothing"]="XghcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=110 + }, + [119002]={ + ["type"]=11, ["recharge_id"]=5, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["time_type"]=1, + ["limit"]=1, + ["value"]=800 + }, + [119102]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=35, + ["num_for_nothing"]="VQ0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=720 + }, + [119202]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=630 + }, + [119302]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", ["num"]=120, ["num_for_nothing"]="Vwpc" }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=530 + }, + [119402]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [119502]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + }, { ["type"]=1, ["type_for_nothing"]="Vw==", @@ -2979,30 +6813,32 @@ local act_gift = { ["id_for_nothing"]="Vw==", ["num"]=5000, ["num_for_nothing"]="UwhcAw==" - }, + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=170 + }, + [119602]={ + ["type"]=11, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" + ["num"]=2500, + ["num_for_nothing"]="VA1cAw==" } }, - ["limit"]=5, - ["value"]=800 - }, - [170302]={ - ["type"]=17, - ["recharge_id"]=10, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", - ["num"]=300, - ["num_for_nothing"]="VQhc" + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" }, { ["type"]=1, @@ -3011,7 +6847,1663 @@ local act_gift = { ["id_for_nothing"]="Vw==", ["num"]=10000, ["num_for_nothing"]="VwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=140 + }, + [119702]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=5500, + ["num_for_nothing"]="Uw1cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=20, + ["num_for_nothing"]="VAg=" }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=30000, + ["num_for_nothing"]="VQhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=130 + }, + [119802]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=9000, + ["num_for_nothing"]="XwhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=50000, + ["num_for_nothing"]="UwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=120 + }, + [119902]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=1, + ["value"]=920 + }, + [120002]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=25, + ["num_for_nothing"]="VA0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=20000, + ["num_for_nothing"]="VAhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=790 + }, + [120102]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=40000, + ["num_for_nothing"]="UghcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=640 + }, + [120202]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=80, + ["num_for_nothing"]="Xgg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100000, + ["num_for_nothing"]="VwhcA2VR" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=570 + }, + [1100102]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1100202]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=700, + ["num_for_nothing"]="UQhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=160 + }, + [1100302]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=140 + }, + [1100402]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=130 + }, + [1100502]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=8000, + ["num_for_nothing"]="XghcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=110 + }, + [1100602]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["time_type"]=1, + ["limit"]=1, + ["value"]=800 + }, + [1100702]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=35, + ["num_for_nothing"]="VQ0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=720 + }, + [1100802]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=630 + }, + [1100902]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=530 + }, + [1101002]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1101102]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=170 + }, + [1101202]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2500, + ["num_for_nothing"]="VA1cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=140 + }, + [1101302]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=5500, + ["num_for_nothing"]="Uw1cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=30000, + ["num_for_nothing"]="VQhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=130 + }, + [1101402]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=9000, + ["num_for_nothing"]="XwhcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=50000, + ["num_for_nothing"]="UwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=120 + }, + [1101502]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=10000, + ["num_for_nothing"]="VwhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=1, + ["value"]=920 + }, + [1101602]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=25, + ["num_for_nothing"]="VA0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=20000, + ["num_for_nothing"]="VAhcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=790 + }, + [1101702]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1800, + ["num_for_nothing"]="VwBcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=40000, + ["num_for_nothing"]="UghcA2U=" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=640 + }, + [1101802]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=80, + ["num_for_nothing"]="Xgg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100000, + ["num_for_nothing"]="VwhcA2VR" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=570 + }, + [1101902]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2600 + }, + [1102002]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2800 + }, + [1800102]={ + ["type"]=18, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=257, + ["id_for_nothing"]="VA1b", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + ["time_type"]=3, + ["cd"]=24, + ["value"]=1100 + }, + [1104802]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1104902]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=20, + ["value"]=130 + }, + [1105002]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=940 + }, + [1105102]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=35, + ["num_for_nothing"]="VQ0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=850 + }, + [1105202]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=730 + }, + [1105302]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=580 + }, + [1105402]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=580 + }, + [1105502]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1105602]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=20, + ["value"]=130 + }, + [1105702]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=1000 + }, + [1105802]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=25, + ["num_for_nothing"]="VA0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=890 + }, + [1105902]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=730 + }, + [1106002]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=80, + ["num_for_nothing"]="Xgg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=580 + }, + [1106102]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=160, + ["num_for_nothing"]="Vw5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=580 + }, + [1106202]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1106302]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=20, + ["value"]=130 + }, + [1106402]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=940 + }, + [1106502]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=35, + ["num_for_nothing"]="VQ0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=850 + }, + [1106602]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=730 + }, + [1106702]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=120, + ["num_for_nothing"]="Vwpc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=580 + }, + [1106802]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=240, + ["num_for_nothing"]="VAxc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=580 + }, + [1106902]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 + }, + [1107002]={ + ["type"]=11, + ["item_cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=20, + ["value"]=130 + }, + [1107102]={ + ["type"]=11, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=1000 + }, + [1107202]={ + ["type"]=11, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=25, + ["num_for_nothing"]="VA0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["time_type"]=1, + ["limit"]=2, + ["value"]=890 + }, + [1107302]={ + ["type"]=11, + ["recharge_id"]=13, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["time_type"]=1, + ["limit"]=3, + ["value"]=730 + }, + [1107402]={ + ["type"]=11, + ["recharge_id"]=16, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=80, + ["num_for_nothing"]="Xgg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["time_type"]=1, + ["limit"]=5, + ["value"]=580 + }, + [1107502]={ + ["type"]=11, + ["recharge_id"]=18, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=12000, + ["num_for_nothing"]="VwpcA2U=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=160, + ["num_for_nothing"]="Vw5c" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["time_type"]=1, + ["limit"]=10, + ["value"]=580 + }, + [1107602]={ + ["type"]=11, + ["parameter_pro"]={ + 1 + }, + ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", @@ -3021,93 +8513,13 @@ local act_gift = { ["num_for_nothing"]="VAhc" } }, - ["limit"]=5, - ["value"]=800 + ["time_type"]=1, + ["limit_type"]=1, + ["limit"]=1 }, - [170402]={ - ["type"]=17, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", - ["num"]=720, - ["num_for_nothing"]="UQpc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=400, - ["num_for_nothing"]="Ughc" - } - }, - ["limit"]=5, - ["value"]=900 - }, - [170502]={ - ["type"]=17, - ["recharge_id"]=16, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", - ["num"]=2000, - ["num_for_nothing"]="VAhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=50000, - ["num_for_nothing"]="UwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1000, - ["num_for_nothing"]="VwhcAw==" - } - }, - ["limit"]=5, - ["value"]=900 - }, - [170602]={ - ["type"]=17, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=51, - ["id_for_nothing"]="Uwk=", - ["num"]=4200, - ["num_for_nothing"]="UgpcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=100000, - ["num_for_nothing"]="VwhcA2VR" - }, + [1107702]={ + ["type"]=11, + ["item_cost"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", @@ -3117,2883 +8529,22 @@ local act_gift = { ["num_for_nothing"]="VAhcAw==" } }, - ["limit"]=5, - ["value"]=1000 - }, - [180102]={ - ["type"]=18, - ["recharge_id"]=7, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=5000, - ["num_for_nothing"]="UwhcAw==" + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=5, + ["num_for_nothing"]="Uw==" } }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=8, - ["num_for_nothing"]="Xg==" - } - }, - ["limit"]=1 + ["time_type"]=1, + ["limit"]=20, + ["value"]=130 }, - [180202]={ - ["type"]=18, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - ["limit"]=1 - }, - [180302]={ - ["type"]=18, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=18000, - ["num_for_nothing"]="VwBcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - } - }, - ["limit"]=1 - }, - [180402]={ - ["type"]=18, - ["recharge_id"]=15, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=450, - ["num_for_nothing"]="Ug1c" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=24000, - ["num_for_nothing"]="VAxcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - } - }, - ["limit"]=1 - }, - [180502]={ - ["type"]=18, - ["recharge_id"]=17, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1000, - ["num_for_nothing"]="VwhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=34000, - ["num_for_nothing"]="VQxcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - } - }, - ["limit"]=1 - }, - [180602]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [180702]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [180802]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [180902]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [181002]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [181102]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [181202]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [181302]={ - ["type"]=18, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - } - }, - ["choose_reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14001, - ["id_for_nothing"]="VwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14002, - ["id_for_nothing"]="VwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14003, - ["id_for_nothing"]="VwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14004, - ["id_for_nothing"]="VwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24001, - ["id_for_nothing"]="VAxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24002, - ["id_for_nothing"]="VAxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24003, - ["id_for_nothing"]="VAxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=24004, - ["id_for_nothing"]="VAxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34002, - ["id_for_nothing"]="VQxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34003, - ["id_for_nothing"]="VQxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34004, - ["id_for_nothing"]="VQxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44001, - ["id_for_nothing"]="UgxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44002, - ["id_for_nothing"]="UgxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44003, - ["id_for_nothing"]="UgxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=44004, - ["id_for_nothing"]="UgxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54001, - ["id_for_nothing"]="UwxcA2Q=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54002, - ["id_for_nothing"]="UwxcA2c=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54003, - ["id_for_nothing"]="UwxcA2Y=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [190102]={ - ["type"]=19, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - ["limit"]=1 - }, - [190202]={ - ["type"]=19, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=12, - ["num_for_nothing"]="Vwo=" - } - }, - ["limit"]=1 - }, - [190302]={ - ["type"]=19, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=18000, - ["num_for_nothing"]="VwBcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=24, - ["num_for_nothing"]="VAw=" - } - }, - ["limit"]=1 - }, - [190402]={ - ["type"]=19, - ["recharge_id"]=15, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=450, - ["num_for_nothing"]="Ug1c" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=24000, - ["num_for_nothing"]="VAxcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=36, - ["num_for_nothing"]="VQ4=" - } - }, - ["limit"]=1 - }, - [190502]={ - ["type"]=19, - ["recharge_id"]=17, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1000, - ["num_for_nothing"]="VwhcAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=34000, - ["num_for_nothing"]="VQxcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=96, - ["num_for_nothing"]="Xw4=" - } - }, - ["limit"]=1 - }, - [190602]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [190702]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [190802]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [190902]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [191002]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [191102]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [191202]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [191302]={ - ["type"]=19, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=42000, - ["num_for_nothing"]="UgpcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=54004, - ["id_for_nothing"]="UwxcA2E=", - ["num"]=138, - ["num_for_nothing"]="VwtU" - } - }, - ["limit"]=1 - }, - [200102]={ - ["type"]=20, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=30000, - ["num_for_nothing"]="VQhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=5400401, - ["id_for_nothing"]="UwxcA2FRfg==", - ["num"]=1, - ["num_for_nothing"]="Vw==" - } - }, - ["limit"]=1, - ["value"]=1000 - }, - [200202]={ - ["type"]=20, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=30000, - ["num_for_nothing"]="VQhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=4400201, - ["id_for_nothing"]="UgxcA2dRfg==", - ["num"]=1, - ["num_for_nothing"]="Vw==" - } - }, - ["limit"]=1, - ["value"]=1000 - }, - [210102]={ - ["type"]=21, + [1107802]={ + ["type"]=11, ["recharge_id"]=5, ["reward"]={ { @@ -6001,30 +8552,32 @@ local act_gift = { ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=75, - ["num_for_nothing"]="UQ0=" + ["num"]=3600, + ["num_for_nothing"]="VQ5cAw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=7500, - ["num_for_nothing"]="UQ1cAw==" + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=2, + ["num_for_nothing"]="VA==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=55, - ["id_for_nothing"]="Uw0=", - ["num"]=750, - ["num_for_nothing"]="UQ1c" + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=1, + ["num_for_nothing"]="Vw==" } }, - ["limit"]=5 + ["time_type"]=1, + ["limit"]=2, + ["value"]=940 }, - [210202]={ - ["type"]=21, + [1107902]={ + ["type"]=11, ["recharge_id"]=10, ["reward"]={ { @@ -6032,488 +8585,226 @@ local act_gift = { ["type_for_nothing"]="Vw==", ["id"]=2, ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" + ["num"]=6000, + ["num_for_nothing"]="UAhcAw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=15000, - ["num_for_nothing"]="Vw1cA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=55, - ["id_for_nothing"]="Uw0=", - ["num"]=1500, - ["num_for_nothing"]="Vw1cAw==" - } - }, - ["limit"]=5 - }, - [210302]={ - ["type"]=21, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=30000, - ["num_for_nothing"]="VQhcA2U=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=55, - ["id_for_nothing"]="Uw0=", - ["num"]=3000, - ["num_for_nothing"]="VQhcAw==" - } - }, - ["limit"]=5 - }, - [220102]={ - ["type"]=22, - ["recharge_id"]=11, - ["limit"]=1, - ["value"]=1800 - }, - [220202]={ - ["type"]=22, - ["recharge_id"]=12, - ["value"]=1800 - }, - [230102]={ - ["type"]=23, - ["recharge_id"]=11, - ["time_type"]=2, - ["limit"]=1, - ["value"]=3000 - }, - [230202]={ - ["type"]=23, - ["recharge_id"]=12, - ["time_type"]=2, - ["limit"]=1, - ["value"]=3000 - }, - [230302]={ - ["type"]=23, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=3, - ["id_for_nothing"]="VQ==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - } - } - }, - [230402]={ - ["type"]=23, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", - ["num"]=1, - ["num_for_nothing"]="Vw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=6, - ["id_for_nothing"]="UA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=5000, - ["num_for_nothing"]="UwhcAw==" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [230502]={ - ["type"]=23, - ["recharge_id"]=10, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", - ["num"]=2, - ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=6, - ["id_for_nothing"]="UA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [230602]={ - ["type"]=23, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", - ["num"]=1, - ["num_for_nothing"]="Vw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=12, - ["num_for_nothing"]="Vwo=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [230702]={ - ["type"]=23, - ["recharge_id"]=16, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", - ["num"]=2, - ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=30, - ["num_for_nothing"]="VQg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=50000, - ["num_for_nothing"]="UwhcA2U=" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [230802]={ - ["type"]=23, - ["recharge_id"]=18, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=15, - ["id_for_nothing"]="Vw0=", - ["num"]=4, - ["num_for_nothing"]="Ug==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=60, - ["num_for_nothing"]="UAg=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=100000, - ["num_for_nothing"]="VwhcA2VR" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [240102]={ - ["type"]=24, - ["recharge_id"]=11, - ["time_type"]=2, - ["limit"]=1, - ["value"]=3000 - }, - [240202]={ - ["type"]=24, - ["recharge_id"]=12, - ["time_type"]=2, - ["limit"]=1, - ["value"]=3000 - }, - [240302]={ - ["type"]=24, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", - ["num"]=1, - ["num_for_nothing"]="Vw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=300, - ["num_for_nothing"]="VQhc" - } - } - }, - [240402]={ - ["type"]=24, - ["recharge_id"]=5, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", + ["id"]=262, + ["id_for_nothing"]="VA5e", ["num"]=3, ["num_for_nothing"]="VQ==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=6, - ["id_for_nothing"]="UA==", + ["id"]=209, + ["id_for_nothing"]="VAhV", ["num"]=2, ["num_for_nothing"]="VA==" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=5000, - ["num_for_nothing"]="UwhcAw==" } }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 + ["time_type"]=1, + ["limit"]=2, + ["value"]=800 }, - [240502]={ - ["type"]=24, - ["recharge_id"]=10, + [1108002]={ + ["type"]=11, + ["recharge_id"]=13, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", - ["num"]=7, - ["num_for_nothing"]="UQ==" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=9000, + ["num_for_nothing"]="XwhcAw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=6, - ["id_for_nothing"]="UA==", + ["id"]=262, + ["id_for_nothing"]="VA5e", ["num"]=5, ["num_for_nothing"]="Uw==" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=10000, - ["num_for_nothing"]="VwhcA2U=" + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=3, + ["num_for_nothing"]="VQ==" } }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 + ["time_type"]=1, + ["limit"]=3, + ["value"]=610 }, - [240602]={ - ["type"]=24, - ["recharge_id"]=13, - ["reward"]={ - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", - ["num"]=15, - ["num_for_nothing"]="Vw0=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=12, - ["num_for_nothing"]="Vwo=" - }, - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=20000, - ["num_for_nothing"]="VAhcA2U=" - } - }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 - }, - [240702]={ - ["type"]=24, + [1108102]={ + ["type"]=11, ["recharge_id"]=16, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", - ["num"]=40, - ["num_for_nothing"]="Ugg=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=18000, + ["num_for_nothing"]="VwBcA2U=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=30, - ["num_for_nothing"]="VQg=" + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=10, + ["num_for_nothing"]="Vwg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=50000, - ["num_for_nothing"]="UwhcA2U=" + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=5, + ["num_for_nothing"]="Uw==" } }, - ["time_type"]=2, + ["time_type"]=1, ["limit"]=5, - ["value"]=3000 + ["value"]=470 }, - [240802]={ - ["type"]=24, + [1108202]={ + ["type"]=11, ["recharge_id"]=18, ["reward"]={ { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=22, - ["id_for_nothing"]="VAo=", - ["num"]=90, - ["num_for_nothing"]="Xwg=" + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=36000, + ["num_for_nothing"]="VQ5cA2U=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=47, - ["id_for_nothing"]="Ug8=", - ["num"]=60, - ["num_for_nothing"]="UAg=" + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=20, + ["num_for_nothing"]="VAg=" }, { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=100000, - ["num_for_nothing"]="VwhcA2VR" + ["id"]=209, + ["id_for_nothing"]="VAhV", + ["num"]=10, + ["num_for_nothing"]="Vwg=" } }, - ["time_type"]=2, - ["limit"]=5, - ["value"]=3000 + ["time_type"]=1, + ["limit"]=10, + ["value"]=470 + }, + [30602]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3200 + }, + [30702]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3300 + }, + [30802]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=2500 + }, + [30902]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3200 + }, + [31002]={ + ["type"]=3, + ["recharge_id"]=5, + ["time_type"]=3, + ["limit"]=1, + ["value"]=3300 + }, + [1900102]={ + ["type"]=19, + ["parameter_pro"]={ + 2, + 3 + }, + ["recharge_id"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=243, + ["id_for_nothing"]="VAxf", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=6, + ["limit"]=1, + ["value"]=800 + }, + [1900202]={ + ["type"]=19, + ["parameter_pro"]={ + 2, + 7 + }, + ["recharge_id"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1200, + ["num_for_nothing"]="VwpcAw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=247, + ["id_for_nothing"]="VAxb", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["time_type"]=1, + ["limit_time"]=6, + ["limit"]=1, + ["value"]=1000 } } local config = { -data=act_gift,count=147 +data=act_gift,count=397 } return config \ No newline at end of file diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua index aca6280e..e0db8336 100644 --- a/lua/app/config/const.lua +++ b/lua/app/config/const.lua @@ -44,6 +44,30 @@ local const = { ["act_gold_pig_full_cd"]={ ["value"]=12 }, + ["summon_core_adtimes_1"]={ + ["value"]=3.0 + }, + ["mall_daily_free_refresh"]={ + ["value"]=1.0 + }, + ["mall_daily_ad_refresh"]={ + ["value"]=2.0 + }, + ["mall_daily_refresh"]={ + ["value"]=2.0 + }, + ["mall_daily_refresh_cost"]={ + ["cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + } + }, ["bounty_buy_cost"]={ ["reward"]={ { @@ -122,9 +146,6 @@ local const = { ["diamond_refresh_skill"]={ ["value"]=1 }, - ["mall_daily_ad_refresh"]={ - ["value"]=1 - }, ["mall_daily_diamond_refresh"]={ ["value"]=2 }, diff --git a/lua/app/config/func_open.lua b/lua/app/config/func_open.lua index 30d3e5d2..2a274de2 100644 --- a/lua/app/config/func_open.lua +++ b/lua/app/config/func_open.lua @@ -28,7 +28,7 @@ local func_open = { ["pop_ups"]=1 }, ["mall_daily"]={ - ["stage"]=999, + ["stage"]=1, ["icon"]="module_unlock_dailyshop" }, ["store_box_open"]={ diff --git a/lua/app/config/strings/cn/mall_gold.lua b/lua/app/config/strings/cn/mall_gold.lua new file mode 100755 index 00000000..3078ed87 --- /dev/null +++ b/lua/app/config/strings/cn/mall_gold.lua @@ -0,0 +1,15 @@ +local mall_gold = { + [1]={ + ["name"]="一点金币" + }, + [2]={ + ["name"]="一些金币" + }, + [3]={ + ["name"]="成堆的金币" + } +} +local config = { +data=mall_gold,count=3 +} +return config \ No newline at end of file diff --git a/lua/app/ui/fund/growth_fund_ui.lua.meta b/lua/app/config/strings/cn/mall_gold.lua.meta similarity index 86% rename from lua/app/ui/fund/growth_fund_ui.lua.meta rename to lua/app/config/strings/cn/mall_gold.lua.meta index dc167370..e3da3076 100644 --- a/lua/app/ui/fund/growth_fund_ui.lua.meta +++ b/lua/app/config/strings/cn/mall_gold.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5a975799c3c9cc14fafc8e2c8d9cf4a7 +guid: d79d3aa4c247049d7b0b03346072bbbd ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index 6b84a83e..a49ca646 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -701,6 +701,13 @@ GConst.REWARD_TYPE = { RUNES = 5, } +GConst.REWARD_TYPE_NUM = { + ITEM = 1, + EQUIP = 2, + SOUL = 3, + COLLECTION = 4, +} + GConst.INT_TO_STRING = { [0] = "0", [1] = "1", diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index ccbf1bf9..6f351a5d 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -1039,6 +1039,14 @@ function GFunc.getQuality(type, id) return qlt end +function GFunc.getIconResByReward(reward) + if reward.type == GConst.REWARD_TYPE_NUM.ITEM then + return GFunc.getIconRes(reward.id) + elseif reward.type == GConst.REWARD_TYPE_NUM.EQUIP then + return GFunc.getEquipIconRes(reward.id) + end +end + ---得到展示奖励的图集名称,图片资源id function GFunc.getRewardIconRes(type, id) if type == GConst.REWARD_TYPE.REWARD_NONE then diff --git a/lua/app/module/shop/shop_const.lua b/lua/app/module/shop/shop_const.lua index 678d20f6..68a43734 100644 --- a/lua/app/module/shop/shop_const.lua +++ b/lua/app/module/shop/shop_const.lua @@ -1,61 +1,140 @@ local ShopConst = {} -ShopConst.FIRST_RECHARGE_ID = 10102 -- 首充礼包ID -ShopConst.BEGINNER_GIFT_ID = 40102 -- 新手礼包ID -ShopConst.INTRODUCT_GIFT_ID = 30102 -- 入门礼包ID -ShopConst.INTRODUCTORY_GIFT_TRIGGER_CHAPTER_ID = 2 -- 入门礼包触发的章节ID -ShopConst.MAIN_UI_POP_TYPE = { -- 当触发弹窗时,相关联的类型礼包也要触发 - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = true, - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = true, - }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = true +ShopConst.PRIVILEGE_CARD_ID = { + AD_CARD = 20102, + MONTHLY_CARD = 20202, + LIFETIME_CARD = 20302, + CHALLEGE_CARD = 20402, } -ShopConst.BOX_REWARD_TYPE = { - SUMMON = 1, - BOUNTY = 2, - ARENA_BOUNTY = 3, - ARENA_AD_BOX = 4, +ShopConst.PRIVILEGE_CARD_ID_MAP = { + [ShopConst.PRIVILEGE_CARD_ID.AD_CARD] = 1, + [ShopConst.PRIVILEGE_CARD_ID.MONTHLY_CARD] = 1, + [ShopConst.PRIVILEGE_CARD_ID.LIFETIME_CARD] = 1, + [ShopConst.PRIVILEGE_CARD_ID.CHALLEGE_CARD] = 1, } -ShopConst.PAGE_TYPE = { - DISCOUNT = 1, - MAIN = 2 -} --- 商店主要商品页面的类型 -ShopConst.MAIN_PAGE_TYPE = { - HOT = 1, - GEM = 2, - GOLD = 3 +--首充档位 +ShopConst.FIRST_RECHARGE_GEARS = { + GEAR_1 = 1, + GEAR_2 = 2, + GEAR_3 = 3 } -ShopConst.GEM_ICON_NAME = { - [1] = "shop_diamond_1", - [2] = "shop_diamond_2", - [3] = "shop_diamond_3", - [4] = "shop_diamond_4", - [5] = "shop_diamond_5", - [6] = "shop_diamond_6", - [7] = "shop_diamond_7", - [8] = "shop_diamond_8", - [9] = "shop_diamond_9", - [10] = "shop_diamond_9", - [11] = "shop_diamond_9", - [12] = "shop_diamond_9", - [13] = "shop_diamond_9", - [14] = "shop_diamond_9", - [15] = "shop_diamond_9", - [16] = "shop_diamond_9", - [17] = "shop_diamond_9", - [18] = "shop_diamond_9", - [19] = "shop_diamond_9", - [20] = "shop_diamond_9", +-- 首充id +ShopConst.FIRST_RECHARGE_ID = { + [ShopConst.FIRST_RECHARGE_GEARS.GEAR_1] = {10102, 10202, 10302},-- 第一档首充 + [ShopConst.FIRST_RECHARGE_GEARS.GEAR_2] = {10402, 10502, 10602},-- 第二档首充 + [ShopConst.FIRST_RECHARGE_GEARS.GEAR_3] = {10702, 10802, 10902},-- 第三档首充 } -ShopConst.COIN_ICON_NAME = { - [1] = "shop_species_1", - [2] = "shop_species_2", - [3] = "shop_species_3", + +-- 新首充id +-- ShopConst.FIRST_RECHARGE_ID_2 = { +-- [ShopConst.FIRST_RECHARGE_GEARS.GEAR_1] = {11002, 11102, 11202},-- 第一档首充 +-- [ShopConst.FIRST_RECHARGE_GEARS.GEAR_2] = {11302, 11402, 11502},-- 第二档首充 +-- [ShopConst.FIRST_RECHARGE_GEARS.GEAR_3] = {11602, 11702, 11802},-- 第三档首充 +-- } +ShopConst.PRIVILEGE_SHOW_PAGE = { + FREE_DAILY_REWARDS = 1, + AD_CARD = 2, + MONTHLY_CARD = 3, + LIFETIME_CARD = 4, + CHALLEGE_CARD = 5, } +-- 脚本路径 +ShopConst.PRIVILEGE_COMP = { + FREE_DAILY_REWARDS = "app/ui/privilege/comp/free_daily_rewards_comp", + AD_CARD = "app/ui/privilege/comp/ad_card_comp", + MONTHLY_CARD = "app/ui/privilege/comp/monthly_card_comp", + LIFETIME_CARD = "app/ui/privilege/comp/lifetime_card_comp", + CHALLEGE_CARD = "app/ui/privilege/comp/challege_card_comp", +} + +ShopConst.PRIVILEGE_PAGE_BTN_ICON_ATLAS = { + [ShopConst.PRIVILEGE_SHOW_PAGE.MONTHLY_CARD] = GConst.ATLAS_PATH.UI_ACT_COMMON, +} +ShopConst.PRIVILEGE_PAGE_BTN_ICON_1 = { + [ShopConst.PRIVILEGE_SHOW_PAGE.MONTHLY_CARD] = "bounty_btn_1_1", +} +ShopConst.PRIVILEGE_PAGE_BTN_ICON_2 = { + [ShopConst.PRIVILEGE_SHOW_PAGE.MONTHLY_CARD] = "bounty_btn_1_2", +} +ShopConst.PRIVILEGE_PAGE_BTN_DESC = { + [ShopConst.PRIVILEGE_SHOW_PAGE.MONTHLY_CARD] = "MONTHLY_CARD_1", +} + +-- fund 活动 +ShopConst.FUND_SHOW_PAGE = { + FUND = 1, + CHAPTER_FUND = 2, + BOUNTY = 3, + BOUNTY_COLLECTION = 4, + TOWER_BOUNTY = 5, + BOUNTY_GROWTH = 6, +} +-- 脚本路径 +ShopConst.FUND_COMP = { + [ShopConst.FUND_SHOW_PAGE.FUND] = "app/ui/fund/fund_level_comp", + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "app/ui/fund/fund_chapter_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = "app/ui/fund/bounty_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = "app/ui/fund/bounty_collection_comp", + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "app/ui/fund/tower_bounty_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = "app/ui/bounty/bounty_growth_comp", +} +-- 预制体挂载的组件 +ShopConst.FUND_COMP_NAME = { + [ShopConst.FUND_SHOW_PAGE.FUND] = "fund_main_ui.fund_level_comp", + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "fund_main_ui.fund_chapter_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = "fund_main_ui.bounty_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = "fund_main_ui.bounty_collection_comp", + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "fund_main_ui.tower_bounty_comp", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = "fund_main_ui.bounty_growth_comp", +} +-- 动态加载的组件 +ShopConst.FUND_COMP_PATH = { + -- [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "assets/prefabs/ui/privilege/fund_chapter_comp.prefab", + -- [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "assets/prefabs/ui/privilege/tower_bounty_comp.prefab", +} + +ShopConst.FUND_PAGE_BTN_ICON_ATLAS = { + [ShopConst.FUND_SHOW_PAGE.FUND] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = GConst.ATLAS_PATH.UI_ACT_COMMON, +} +ShopConst.FUND_PAGE_BTN_ICON_1 = { + [ShopConst.FUND_SHOW_PAGE.FUND] = "act_common_btn_11_1", + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "act_common_btn_10_1", + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = "act_common_btn_5_1", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = "act_common_btn_6_1", + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "act_common_btn_5_1", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = "act_common_btn_18_1", +} +ShopConst.FUND_PAGE_BTN_ICON_2 = { + [ShopConst.FUND_SHOW_PAGE.FUND] = "act_common_btn_11_2", + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "act_common_btn_10_2", + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = "act_common_btn_5_2", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = "act_common_btn_6_2", + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "act_common_btn_5_2", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = "act_common_btn_18_2", +} +ShopConst.FUND_PAGE_BTN_DESC = { + [ShopConst.FUND_SHOW_PAGE.FUND] = "FUND_DESC_1", + [ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND] = "FUND_CHAPTER_DESC_1", + [ShopConst.FUND_SHOW_PAGE.BOUNTY] = "BOUNTY_DESC_8", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION] = "COLLECTION_DESC_1", + [ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY] = "TOWER_DESC_1", + [ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH] = "FUND_GROWTH_TAG_DESC_1", +} + +ShopConst.CORE_SOUL_TYPE = { + NORMAL = 1, + ELITE = 2 +} +ShopConst.CORE_SOUL_NORMAL_MAX_COUNT = 10 -- 魂芯普通宝箱自适应抽取数量限制 +ShopConst.CORE_SOUL_ELITE_MULTI_COUNT = 10 -- 史诗宝箱多抽的次数 + return ShopConst \ No newline at end of file diff --git a/lua/app/module/shop/shop_manager.lua b/lua/app/module/shop/shop_manager.lua index 68fdc522..2e5a7c3a 100644 --- a/lua/app/module/shop/shop_manager.lua +++ b/lua/app/module/shop/shop_manager.lua @@ -1,25 +1,49 @@ local ShopManager = class("ShopManager", BaseModule) --- 展示商城宝箱 -function ShopManager:showBoxHeroUI(type) - UIManager:showUI("app/ui/shop/box_hero_ui", {type = type}) +ShopManager.COMMERCE_TYPE = { + CHAPTER_GIFT = 1, + SUMMON = 2, + DAILY_STORE = 3, + EMBLEM = 4, + GEM_STORE = 5, + GOLD_STORE = 6, + FORCE_SKIN = 7, + CORE_SOUL_STORE = 8, +} + +ShopManager.SUMMON_ID = { + NORMAL = 1, + EPIC = 2, + SSR = 3, +} + +function ShopManager:showBuyGemUI() + UIManager:showUI("app/ui/shop/buy_gem_ui") end --- 展示竞技场ad宝箱 -function ShopManager:showArenaAdBoxUI(isWin) - local params = { - isWin = isWin - } - UIManager:showUI("app/ui/shop/box_hero_ui", {arena = params}) +function ShopManager:showFirstRechargeUI() + UIManager:showUI("app/ui/shop/first_recharge_ui") end -function ShopManager:showBoxLevelUI() - UIManager:showUI("app/ui/shop/box_level_ui") +function ShopManager:showFundUI(showPage) + UIManager:showUI("app/ui/fund/fund_main_ui", {showPage = showPage}) +end + +function ShopManager:showFundRewardUI(params) + UIManager:showUI("app/ui/fund/fund_reward_ui", params) +end + +function ShopManager:showThirdGiftPopUI() + UIManager:showUI("app/ui/shop/third_gift_pop_ui") +end + +function ShopManager:showVoucherReceiveUI() + UIManager:showUI("app/ui/shop/voucher_receive_ui") end -- 宝箱奖励开箱界面 type,params,rewards function ShopManager:showBoxOpenUI(params) - UIManager:showUI("app/ui/shop/box_open_ui", params) + return UIManager:showUI("app/ui/shop/open_box_ui", params) end -- 宝箱奖励展示界面 @@ -27,217 +51,290 @@ function ShopManager:showBoxRewardUI(params) UIManager:showUI("app/ui/shop/box_reward_ui", params) end -function ShopManager:showBoxLevelUpUI(params) - UIManager:showUI("app/ui/shop/box_level_up_ui", params) +-- 章节礼包 +function ShopManager:reqBuyChapterGift(id) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallChapterBuyReq, {id = id}, self.rspBuyChapterGift, BIReport.ITEM_GET_TYPE.SHOP_CHAPTER) end --- 触发弹窗礼包 -function ShopManager:triggerGiftPopUI(actType, actId, showType) - -- 入门礼包不在通用触发条件内 - if (actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.INTRODUCT_GIFT_ID) then - self:showGiftPopUI(actType, actId, false, showType) - DataManager.ShopData:removePopUpGift(actType, actId) - else - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACT_GIFT_SHOW_OPEN, true) then - self:showGiftPopUI(actType, actId, false, showType) - DataManager.ShopData:removePopUpGift(actType, actId) - end - end +function ShopManager:rspBuyChapterGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:onBuyChapterGiftSuccess(result.reqData.id) end -function ShopManager:showGiftPopUI(actType, actId, onlySelf, showType) - if GFunc.isShenhe() then - return - end - if actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.FIRST_RECHARGE_ID then - UIManager:showUI("app/ui/shop/first_recharge_pop_ui", {showType = showType}) - elseif actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ShopConst.INTRODUCT_GIFT_ID then - UIManager:showUI("app/ui/shop/introduct_pop_ui", {showType = showType}) - elseif actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and (actId == GConst.ActivityConst.SKIN_GIFT_ID_1 or actId == GConst.ActivityConst.SKIN_GIFT_ID_2) then - ModuleManager.ActivityManager:showActivityUI(GConst.ActivityConst.PANEL_TYPE.SKIN) - elseif actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and actId == GConst.ActivityConst.HERO_GIFT_ID_1 then - ModuleManager.ActivityManager:showActivityUI(GConst.ActivityConst.PANEL_TYPE.HERO) - elseif actType == PayManager.PURCHARSE_TYPE.CHAPTER_GIFT then - UIManager:showUI("app/ui/shop/gift_pop_chapter_ui", {type = actType, id = actId, onlySelf = onlySelf, showType = showType}) - elseif actType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW then - UIManager:showUI("app/ui/shop/gift_pop_grow_up_ui", {type = actType, id = actId, onlySelf = onlySelf, showType = showType}) - else - UIManager:showUI("app/ui/shop/gift_pop_ui", {type = actType, id = actId, onlySelf = onlySelf, showType = showType}) - end +-- 魂芯商店 +function ShopManager:reqBuyCoreSoulBox(id, free, times) + self:sendMessage(ProtoMsgType.FromMsgEnum.SoulSummonReq, {id = id, free = free, times = times}, self.rspBuyCoreSoulBox, BIReport.ITEM_GET_TYPE.SHOP_CORE_SOUL) end --- 触发金币弹窗礼包 -function ShopManager:triggerCoinGiftPopUI(actId) - self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) +function ShopManager:rspBuyCoreSoulBox(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + DataManager.ShopData:onBuyCoreSoulBoxSuccess(result.reqData.id, result.reqData.free, result.reqData.times, result.trigger_count) + local rewards = {} + for _, reward in ipairs(result.rewards) do + if reward.type == GConst.REWARD_TYPE.SOUL then + table.insert(rewards, reward) + end + end + table.sort(rewards, function(a, b) + return a.soul.uid < b.soul.uid + end) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CLOSE_BOX_REWARD_UI) + local goldKeyCost = 0 + if result.reqData.id == GConst.ShopConst.CORE_SOUL_TYPE.ELITE then + if result.costs then + for _, cost in ipairs(result.costs) do + if cost.item and cost.item.id == GConst.ItemConst.GOLD_KEY then + goldKeyCost = cost.item.count + end + end + end + end + + ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.OPEN_CORE_SOUL_BOX, result.reqData, goldKeyCost) + if result.reqData.id then + local uiObj = self:showBoxOpenUI({type = GConst.BOX_REWARD_TYPE.SUMMON, openType = result.reqData.id, count = result.reqData.times, rewards = rewards}) + uiObj:addEnterAniCompleteListener(function() + DataManager.ShopData:setDirty() + end) + end + -- bi + if result.reqData.id == GConst.ShopConst.CORE_SOUL_TYPE.NORMAL then + BIReport:postBoxReward(BIReport.BOX_TYPE.NORMAL_BOX, result.rewards, nil, result.reqData.free, result.reqData.times) + elseif result.reqData.id == GConst.ShopConst.CORE_SOUL_TYPE.ELITE then + BIReport:postBoxReward(BIReport.BOX_TYPE.EPIC_BOX, result.rewards, nil, result.reqData.free, result.reqData.times) + end end --- 触发成长礼包 -function ShopManager:triggerGrowUpGiftPopUI(actId) - self:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) +-- 每日商店 +function ShopManager:reqBuyDailyGift(id) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallDailyBuyReq, {id = id}, self.rspBuyDailyGift, BIReport.ITEM_GET_TYPE.SHOP_DAILY) end --- 购买每日特惠商品 -function ShopManager:buyMallDailyGift(id, isAd) - if not DataManager.ShopData:getMallDailyIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_DESC)) - return - end +function ShopManager:rspBuyDailyGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end - local params = {id = id} - local rewards, costs = DataManager.ShopData:getMallDailyRewardAndCost(id) - - if costs then - if not GFunc.checkCost(costs.id, costs.num, true) then - -- 尝试触发金币礼包 - if costs.id == GConst.ItemConst.ITEM_ID_GOLD then - self:tryTriggerCoinGift() - end - return - end - end - - -- 二次弹窗确认 - if costs then - local isCoin = costs.id == GConst.ItemConst.ITEM_ID_GOLD - local params ={ - titleTx = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_31), - content = isCoin and I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_32) or I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_33), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - showToday = GConst.MESSAGE_BOX_SHOW_TODAY.HOT_SELL_BUY, - costId = costs.id, - costNum = costs.num, - okFunc = function() - local responseData = { - rewards = rewards, - costs = costs - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BuyMallDailyReq, params, responseData, self.buyMallDailyGiftFinish, BIReport.ITEM_GET_TYPE.MALL_DAILY) - end, - } - GFunc.showMessageBox(params) - else - local responseData = { - rewards = rewards, - costs = costs - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BuyMallDailyReq, params, responseData, self.buyMallDailyGiftFinish, BIReport.ITEM_GET_TYPE.MALL_DAILY) - end + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:refreshDailyShop(result.store) end -function ShopManager:buyMallDailyGiftFinish(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - GFunc.showRewardBox(result.rewards) - DataManager.ShopData:updateMallDailyGoods(result.good_info) - end +-- 每日商店刷新 +function ShopManager:reqRefreshDailyGift(isAd) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallDailyRefreshReq, {Ad = isAd}, self.rspRefreshDailyGift, BIReport.ITEM_GET_TYPE.SHOP_DAILY_REFRESH) end --- 重置每日特惠商品(type 1广告 2钻石) -function ShopManager:resetMallDailyGift(type) - if not DataManager.ShopData:getMallDailyIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_DESC)) - return - end +function ShopManager:rspRefreshDailyGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end - if type == 2 then -- 钻石刷新 - if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, DataManager.ShopData:getMallDailyDiamondResetCost(), true) then - return - end - end - - local params = {reset_type = type} - local responseData = {} - if type == 2 then - local costs = {type = GConst.REWARD_TYPE.ITEM, id = GConst.ITEM_ID_GEM, num = DataManager.ShopData:getMallDailyDiamondResetCost()} - responseData.costs = costs - end - self:sendMessage(ProtoMsgType.FromMsgEnum.MallDailyResetReq, params, responseData, self.resetMallDailyGiftFinish, BIReport.ITEM_GET_TYPE.MALL_DAILY_RESET) + DataManager.ShopData:refreshDailyShop(result.store) end -function ShopManager:resetMallDailyGiftFinish(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - local resetType = result.reqData and result.reqData.reset_type - if resetType == 1 then -- 免费的 - DataManager.ShopData:addMallDailyAdResetCount() - else - DataManager.ShopData:addMallDailyDiamondResetCount() - end - DataManager.ShopData:initMallDaily(result.mall_daily_info) - end +function ShopManager:reqBuyEmblemGift(id) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallMythicBuyReq, {id = id}, self.rspBuyEmblemGift, BIReport.ITEM_GET_TYPE.SHOP_EMBLEM) end --- 跨天刷新每日商店数据 -function ShopManager:mallDailyGiftOverDay() - local params = {} - local responseData = {} - self:sendMessage(ProtoMsgType.FromMsgEnum.MallDailyOverDayReq, params, responseData, self.mallDailyGiftOverDayFinish) +function ShopManager:rspBuyEmblemGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:onBuyEmblemGiftSuccess(result.reqData.id) end -function ShopManager:mallDailyGiftOverDayFinish(result) - -- 消息无用 仅为了触发推送 +function ShopManager:reqBuyEmblemGift(id) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallMythicBuyReq, {id = id}, self.rspBuyEmblemGift, BIReport.ITEM_GET_TYPE.SHOP_EMBLEM) end -function ShopManager:onMallDailyReset(result) - if result.status == 0 then - DataManager.ShopData:initMallDaily(result.mall_daily_info) - end +function ShopManager:rspBuyEmblemGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:onBuyEmblemGiftSuccess(result.reqData.id) end --- 常规金币 -function ShopManager:buyMallIdleCoin(id, isAd) - local params = {id = id, ad = isAd} - local rewardNum, costs = DataManager.ShopData:getCommonDailyCoinDataById(id) - - local responseData = { - rewards = {type = GConst.REWARD_TYPE.ITEM, id = GConst.ITEM_ID_GOLD, num = rewardNum}, - costs = costs - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BuyMallIdleReq, params, responseData, self.buyMallIdleCoinFinish, BIReport.ITEM_GET_TYPE.MALL_IDLE) +-- 金币商店 +function ShopManager:reqBuyGoldGift(id) + self:sendMessage(ProtoMsgType.FromMsgEnum.MallGoldBuyReq, {id = id}, self.rspBuyGoldGift, BIReport.ITEM_GET_TYPE.SHOP_GOLD) end -function ShopManager:buyMallIdleCoinFinish(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - GFunc.showRewardBox(result.rewards) - DataManager.ShopData:initCommonDailyGoldGift(result.ad_count) - end +function ShopManager:rspBuyGoldGift(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:onBuyGoldGiftSuccess(result.reqData.id) end --- 推送助力礼包 -function ShopManager:onTriggerLevelUpGift(result) - DataManager.ShopData:onTriggerLevelUpGift(result.current_level_up_gift) +-- 钻石商店 +function ShopManager:onBuyGemGift(id, doubleType) + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.SHOP_GEM, nil, doubleType) end --- 尝试触发金币礼包 -function ShopManager:tryTriggerCoinGift() - local triggerId = DataManager.ShopData:checkAndGetCoinGiftTriggerId() - if triggerId then - local params = {gold_gift_id = triggerId} - local responseData = {} - self:sendMessage(ProtoMsgType.FromMsgEnum.TriggerGoldGiftReq, params, responseData, self.tryTriggerCoinGiftFinish) - return true - else - -- 不满足触发条件 - if EDITOR_MODE then - Logger.log("不满足金币礼包触发条件") - end - end +-- 首冲礼包购买 +function ShopManager:onBuyFirstRecharge(gear, day) + PayManager:purchasePackage(DataManager.ShopData:getFirstRechargeGiftId(gear, day), PayManager.PURCHARSE_TYPE.ACT_GIFT, true) end -function ShopManager:tryTriggerCoinGiftFinish(result) - if result.status == 0 then - DataManager.ShopData:onTriggerCoinGift(result.reqData.gold_gift_id) - -- 立即触发金币弹窗 - self:triggerCoinGiftPopUI(result.reqData.gold_gift_id) - end +-- 购买体力 +function ShopManager:reqBuyVit(buyType) + if buyType == GConst.VIT_BUY_TYPE.AD then + self:sendMessage(ProtoMsgType.FromMsgEnum.EnergyByADReq, {}, self.rspBuyVit, BIReport.ITEM_GET_TYPE.BUY_VIT) + else + self:sendMessage(ProtoMsgType.FromMsgEnum.EnergyByDiamondReq, {}, self.rspBuyVit, BIReport.ITEM_GET_TYPE.BUY_VIT) + end end --- 推送成长礼包 -function ShopManager:onTriggerGrowUpGift(result) - DataManager.ShopData:initGrowUpGift(result.group_up_gift) +function ShopManager:rspBuyVit(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end - -- 有2种情况 1.处于英雄升级/解锁界面 立即触发弹窗 2.购买了成长礼包,此时仅标记,在奖励弹窗结束后再弹 - if UIManager:getTopUIObj() == UIManager.UI_PATH.HERO_DETAIL_UI then - self:triggerGrowUpGiftPopUI(result.group_up_gift.current_grow_up_id) - end + GFunc.showRewardBox(result.rewards) + DataManager.ShopData:onVitBuySuccess(result.energy_limit) + -- 累计购买体力X次 + ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.BUY_VIT_NUM) +end + +function ShopManager:checkWebPurchaseGift() + if DataManager.TutorialData:getIsInTutorial() then + return false + end + if DataManager.ShopData:getNeedShowGiftReceiveUI() then + ModuleManager.ShopManager:showThirdGiftPopUI() + return true + end + return false +end + +--@region 领取三方支付礼包 +function ShopManager:receiveWebPurchaseGiftRewards() + local orders = DataManager.ShopData:getThirdPayGiftOrders() + local orderIds = {} + for k, v in ipairs(orders) do + table.insert(orderIds, v.order_id) + end + local parmas = { + order_ids = orderIds + } + self:sendMessage(ProtoMsgType.FromMsgEnum.ThirdPayGiftReq, parmas, self.onReceiveWebPurchaseGiftRewards, BIReport.ITEM_GET_TYPE.WEB_PAY_GIFT) +end + +function ShopManager:onReceiveWebPurchaseGiftRewards(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + if result.rewards then + GFunc.showRewardBox(result.rewards) + end + local isJollyMax = false + for k, v in ipairs(result.reqData.order_ids) do + local orderInfo = DataManager.ShopData:getThirdPayGiftOrderInfo(v) + if orderInfo then + local cfg + local rewards + local giftId = orderInfo.gift_id + if orderInfo.gift_type == PayManager.PURCHARSE_TYPE.ACT_GIFT then + cfg = ConfigManager:getConfig("act_gift")[giftId] + rewards = cfg.reward + elseif orderInfo.gift_type == PayManager.PURCHARSE_TYPE.GIFT_ROUTINE then + cfg = ConfigManager:getConfig("gift_routine")[giftId] + rewards = cfg.reward + elseif orderInfo.gift_type == PayManager.PURCHARSE_TYPE.SHOP_GEM then + cfg = ConfigManager:getConfig("mall_treasure")[giftId] + rewards = {} + if cfg.reward then + for i,v in ipairs(cfg.reward) do + table.insert(rewards, v) + end + if DataManager.PaymentData:isGemStoreDouble(giftId) then + for i,v in ipairs(cfg.reward) do + table.insert(rewards, v) + end + end + end + elseif orderInfo.gift_type == PayManager.PURCHARSE_TYPE.GIFT_JOLLYMAX then + cfg = ConfigManager:getConfig("gift_jollymax")[giftId] + rewards = cfg.reward + isJollyMax = true + end + if isJollyMax or VersionCompatible:getIsRUPackage() then + -- local rCfg = ConfigManager:getConfig("recharge")[cfg.recharge_id] + -- local productId = rCfg[VersionCompatible:getRechargePayId()] + local productId = cfg.goods_id + BIReport:postReceiveThirdPayJollyMaxGiftRewards(orderInfo.order_id, productId, orderInfo.gift_id, orderInfo.revenue, rewards, cfg.price) + BIReport:postJollyMaxPurchase(orderInfo.revenue, productId, orderInfo.order_id) + else + local rCfg = ConfigManager:getConfig("recharge")[cfg.recharge_id] + local productId = rCfg[VersionCompatible:getRechargePayId()] + BIReport:postReceiveThirdPayGiftRewars(orderInfo.order_id, productId, orderInfo.gift_id, orderInfo.revenue, rewards, rCfg.price) + BIReport:postVTCPurchase(orderInfo.revenue, productId, orderInfo.order_id) + end + end + end + -- 购买礼包后续处理 + if isJollyMax or VersionCompatible:getIsRUPackage() then + PayManager:requestThirdJollyMaxGiftRewards(result.gifts or {}) + else + PayManager:requestThirdGiftRewards(result.gifts or {}) + end + DataManager.ShopData:deleteThirdPayGiftOrders(result.reqData.order_ids) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.RECEIVE_WEB_PURCHASE_REWARDS_SUCCESS) +end +--@endregion + +function ShopManager:checkWebPurchase() + if DataManager.TutorialData:getIsInTutorial() then + return false + end + if DataManager.ShopData:getNeedShowVoucherReceiveUI() then + self:showVoucherReceiveUI() + return true + end + return false +end + +function ShopManager:receiveWebPurchaseRewards() + local orders = DataManager.ShopData:getThirdPayOrders() + local orderIds = {} + for k, v in ipairs(orders) do + table.insert(orderIds, v.order_id) + end + local parmas = { + order_ids = orderIds + } + self:sendMessage(ProtoMsgType.FromMsgEnum.ThirdPayClaimReq, parmas, self.onReceiveWebPurchaseRewards, BIReport.ITEM_GET_TYPE.WEB_PAY) +end + +function ShopManager:onReceiveWebPurchaseRewards(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + for k, v in ipairs(result.reqData.order_ids) do + local orderInfo = DataManager.ShopData:getThirdPayOrderInfo(v) + if orderInfo then + BIReport:postReceiveThirdPayRewars(orderInfo.order_id, orderInfo.voucher, orderInfo.product_id, orderInfo.revenue, orderInfo.price) + BIReport:postWebPurchase(orderInfo.revenue, orderInfo.product_id, orderInfo.order_id) + end + end + DataManager.ShopData:deleteThirdPayOrders(result.reqData.order_ids) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.RECEIVE_WEB_PURCHASE_REWARDS_SUCCESS) end return ShopManager \ No newline at end of file diff --git a/lua/app/ui/fund/bounty_collection_comp.lua b/lua/app/ui/fund/bounty_collection_comp.lua new file mode 100755 index 00000000..8b718fe3 --- /dev/null +++ b/lua/app/ui/fund/bounty_collection_comp.lua @@ -0,0 +1,198 @@ +local BountyCollectionComp = class("BountyCollectionComp", LuaComponent) + +local CELL = "app/ui/privilege/cell/bounty_collection_cell" + +function BountyCollectionComp:onClose() +end + +function BountyCollectionComp:init() + local uiMap = self:getUIMap() + self.btnHelp = uiMap["bounty_collection_comp.top.tx_title.btn_help"] + self.timeBg = uiMap["bounty_collection_comp.top.time"] + self.txTime = uiMap["bounty_collection_comp.top.time.tx_time"] + self.txPro = uiMap["bounty_collection_comp.top.img_prog.tx_pro"] + self.txLv = uiMap["bounty_collection_comp.level_node.content.level.tx_lv"] + self.imgProg = uiMap["bounty_collection_comp.level_node.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.txProg = uiMap["bounty_collection_comp.level_node.content.prog.tx_prog"] + self.scrollrect = uiMap["bounty_collection_comp.scrollrect"] + self.btnGet = uiMap["bounty_collection_comp.btns.btn_get"] + self.txGet = uiMap["bounty_collection_comp.btns.btn_get.tx_desc"] + + + + self.btnBuy1 = uiMap["bounty_collection_comp.btns.btn_buy_1"] + self.txBuy1 = uiMap["bounty_collection_comp.btns.btn_buy_1.tx_desc"] + self.pro1_Items = {} + self.pro1_TxCount = {} + self.pro1_ImgIcon = {} + for i = 1, 4 do + local item = uiMap["bounty_collection_comp.top.tips_1.groud.item_" .. i] + local txCount = uiMap["bounty_collection_comp.top.tips_1.groud.item_" .. i .. ".tx_count"] + local imgProg = uiMap["bounty_collection_comp.top.tips_1.groud.item_" .. i .. ".img_prog"] + table.insert(self.pro1_Items, item) + table.insert(self.pro1_TxCount, txCount) + table.insert(self.pro1_ImgIcon, imgProg) + end + + self.btnBuy2 = uiMap["bounty_collection_comp.btns.btn_buy_2"] + self.txBuy2 = uiMap["bounty_collection_comp.btns.btn_buy_2.tx_desc"] + self.pro2_Items = {} + self.pro2_TxCount = {} + self.pro2_ImgIcon = {} + for i = 1, 4 do + local item = uiMap["bounty_collection_comp.top.tips_2.groud.item_" .. i] + local txCount = uiMap["bounty_collection_comp.top.tips_2.groud.item_" .. i .. ".tx_count"] + local imgProg = uiMap["bounty_collection_comp.top.tips_2.groud.item_" .. i .. ".img_prog"] + table.insert(self.pro2_Items, item) + table.insert(self.pro2_TxCount, txCount) + table.insert(self.pro2_ImgIcon, imgProg) + end + + self.txTitle = uiMap["bounty_collection_comp.top.tx_title"] + self.txLevelTips = uiMap["bounty_collection_comp.top.level_node.content.tx_level_tips"] + self.txLevel = uiMap["bounty_collection_comp.scrollrect.title.tx_level"] + self.txCommon = uiMap["bounty_collection_comp.scrollrect.title.tx_common"] + self.txPro1 = uiMap["bounty_collection_comp.scrollrect.title.tx_pro_1"] + self.txPro2 = uiMap["bounty_collection_comp.scrollrect.title.tx_pro_2"] + self.txTips1 = uiMap["bounty_collection_comp.top.tips.tx_tips1"] + self.txTips2 = uiMap["bounty_collection_comp.top.btn_buy_2.tips_2.tx_tips"] + self.txDescInfo1 = uiMap["bounty_collection_comp.top.btn_buy_1.img.tx_desc_info"] + self.txDescInfo2 = uiMap["bounty_collection_comp.top.btn_buy_2.img.tx_desc_info"] + + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_26)) + self.txLevelTips:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_28)) + self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_5)) + self.txCommon:setText(I18N:getGlobalText(I18N.GlobalConst.BOUNTY_DESC_5)) + self.txPro1:setText(I18N:getGlobalText(I18N.GlobalConst.BOUNTY_DESC_6)) + self.txPro2:setText(I18N:getGlobalText(I18N.GlobalConst.BOUNTY_DESC_7)) + self.txTips1:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_29)) + self.txTips2:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_29)) + self.txDescInfo1:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_30)) + self.txDescInfo2:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_31)) + + local cfg = DataManager.BagData:getRecoveryCfg(GConst.ItemConst.ITEM_ID_CHALLENGE_TEAM) + local add = cfg and cfg.bounty or 0 + + self.btnBuy1:addClickListener(function() + ModuleManager.ShopManager:showFundRewardUI({ + txTitle = "提升等级,领取超值豪礼", + giftIds = DataManager.BountyCollectionData:getProRewardGiftId(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1), + rewards = DataManager.BountyCollectionData:getAllRewards(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1), + func = function() + ModuleManager.CollectionManager:onUnlockPro(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1) + end, + }) + end) + self.btnBuy2:addClickListener(function() + ModuleManager.ShopManager:showFundRewardUI({ + txTitle = "提升等级,领取超值豪礼", + giftIds = DataManager.BountyCollectionData:getProRewardGiftId(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2), + rewards = DataManager.BountyCollectionData:getAllRewards(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2), + func = function() + ModuleManager.CollectionManager:onUnlockPro(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2) + end, + }) + end) + self.btnGet:addClickListener(function() + ModuleManager.CollectionManager:reqGetAllRewards() + end) + self.btnHelp:addClickListener(function() + -- ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.BOUNTY_DESC_9), self.btnHelp) + end) + self:bind(DataManager.BountyCollectionData, "isDirty", function() + self:refresh() + end) + + self:updateTime() + local meshProComp = self.txTime:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + self.timeBg:setSizeDeltaX(meshProComp + 55) +end + +function BountyCollectionComp:updateTime() + self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.NEXT_REFRESH_DESC, Time:formatNumTimeStr(DataManager.BountyCollectionData:getRemainTime()))) +end + +function BountyCollectionComp:refresh() + local lv = DataManager.BountyCollectionData:getLevel() + local exp = DataManager.BountyCollectionData:getExp() + local maxLv = DataManager.BountyCollectionData:getMaxLv() + if lv >= maxLv then + exp = 0 + lv = maxLv + end + self.txLv:setText(lv) + local curExp = exp + local fullExp = DataManager.BountyCollectionData:getLvUpExp() + self.txProg:setText(curExp .. "/" .. fullExp) + self.imgProg.value = curExp / fullExp + + local gift1 = ConfigManager:getConfig("act_gift")[DataManager.BountyCollectionData:getProRewardGiftId(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1)] + local gift2 = ConfigManager:getConfig("act_gift")[DataManager.BountyCollectionData:getProRewardGiftId(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2)] + self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) + self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) + self.txPro:setText(gift2.value .. "%") + + self.btnGet:setActive(DataManager.BountyCollectionData:canGetRewards()) + self.btnBuy1:setActive(not DataManager.BountyCollectionData:isUnlockReward(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1)) + self.btnBuy2:setActive(not DataManager.BountyCollectionData:isUnlockReward(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2)) + + if self.scrollRect == nil then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index) + end) + end + local count = DataManager.BountyCollectionData:getMaxLv() + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(count) + elseif self.scrollRect:getTotalCount() ~= count then + self.scrollRect:clearCells() + self.scrollRect:refillCells(count) + else + self.scrollRect:updateAllCell() + end + + self.scrollRect:moveToIndex(DataManager.BountyCollectionData:getMoveIdx()) + + -- local rewards = DataManager.BountyCollectionData:getAllRewards(GConst.BountyCollectionConst.REWARD_GEAR.PRO_1) + -- for i,v in ipairs(self.pro1_Items) do + -- v:setActive(false) + -- end + -- local index = 0 + -- for id, reward in pairs(rewards) do + -- index = index + 1 + -- local item = self.pro1_Items[index] + -- local txCount = self.pro1_TxCount[index] + -- local imgProg = self.pro1_ImgIcon[index] + -- if reward then + -- item:setActive(true) + -- local itemNum = reward.num or 0 + -- imgProg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(id)) + -- txCount:setText(itemNum) + -- end + -- end + + -- rewards = DataManager.BountyCollectionData:getAllRewards(GConst.BountyCollectionConst.REWARD_GEAR.PRO_2) + -- for i,v in ipairs(self.pro2_Items) do + -- v:setActive(false) + -- end + -- index = 0 + -- for id, reward in pairs(rewards) do + -- index = index + 1 + -- local item = self.pro2_Items[index] + -- local txCount = self.pro2_TxCount[index] + -- local imgProg = self.pro2_ImgIcon[index] + -- if reward then + -- item:setActive(true) + -- local itemNum = reward.num or 0 + -- imgProg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(id)) + -- txCount:setText(itemNum) + -- end + -- end + BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.BOUNTY_COLLECTION) +end + +return BountyCollectionComp \ No newline at end of file diff --git a/lua/app/ui/fund/cell/growth_fund_cell.lua.meta b/lua/app/ui/fund/bounty_collection_comp.lua.meta similarity index 86% rename from lua/app/ui/fund/cell/growth_fund_cell.lua.meta rename to lua/app/ui/fund/bounty_collection_comp.lua.meta index 871c0417..ce9e59d9 100644 --- a/lua/app/ui/fund/cell/growth_fund_cell.lua.meta +++ b/lua/app/ui/fund/bounty_collection_comp.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2bc37d625f652654b83c5cedaaa8c2f1 +guid: 3927d7c172ad64a9c9a46ac6422b78de ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/fund/bounty_comp.lua b/lua/app/ui/fund/bounty_comp.lua new file mode 100755 index 00000000..68657aad --- /dev/null +++ b/lua/app/ui/fund/bounty_comp.lua @@ -0,0 +1,168 @@ +local BountyComp = class("BountyComp", LuaComponent) + +local CELL = "app/ui/privilege/cell/bounty_cell" + +function BountyComp:onClose() +end + +function BountyComp:init() + local uiMap = self:getUIMap() + self.txTitle = uiMap["bounty_comp.top.tx_title"] + self.btnHelp = uiMap["bounty_comp.top.tx_title.btn_help"] + self.txTime = uiMap["bounty_comp.top.time.tx_time"] + self.txTips = uiMap["bounty_comp.top.tx_tips"] + self.txTips1 = uiMap["bounty_comp.top.img_prog.tx_tips1"] + self.levelNode = uiMap["bounty_comp.level_node"] + self.txLv = uiMap["bounty_comp.top.level_node.content.level.tx_lv"] + self.imgProg = uiMap["bounty_comp.top.level_node.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.txProg = uiMap["bounty_comp.top.level_node.content.prog.tx_prog"] + self.txLvTips = uiMap["bounty_comp.level_node.content.tx_tips"] + self.txToday = uiMap["bounty_comp.level_node.content.tx_today"] + self.scrollrect = uiMap["bounty_comp.scrollrect"] + self.txLevel = uiMap["bounty_comp.scrollrect.title.tx_level"] + self.txCommon = uiMap["bounty_comp.scrollrect.title.tx_common"] + self.txPro1 = uiMap["bounty_comp.scrollrect.title.tx_pro_1"] + self.txPro2 = uiMap["bounty_comp.scrollrect.title.tx_pro_2"] + self.btnGet = uiMap["bounty_comp.btns.btn_get"] + self.txGet = uiMap["bounty_comp.btns.btn_get.tx_desc"] + self.btnBuy1 = uiMap["bounty_comp.top.btn_buy_1"] + self.txBuy1 = uiMap["bounty_comp.top.btn_buy_1.tx_desc"] + self.btnBuy2 = uiMap["bounty_comp.top.btn_buy_2"] + self.txBuy2 = uiMap["bounty_comp.top.btn_buy_2.tx_desc"] + + + self.pro1_Items = {} + self.pro1_TxCount = {} + self.pro1_ImgIcon = {} + for i = 1, 4 do + local item = uiMap["bounty_comp.top.btn_buy_1.tips_1.groud.item_" .. i] + local txCount = uiMap["bounty_comp.top.btn_buy_1.tips_1.groud.item_" .. i .. ".tx_count"] + local imgProg = uiMap["bounty_comp.top.btn_buy_1.tips_1.groud.item_" .. i .. ".img_prog"] + table.insert(self.pro1_Items, item) + table.insert(self.pro1_TxCount, txCount) + table.insert(self.pro1_ImgIcon, imgProg) + end + + self.pro2_Items = {} + self.pro2_TxCount = {} + self.pro2_ImgIcon = {} + for i = 1, 4 do + local item = uiMap["bounty_comp.top.btn_buy_2.tips_2.groud.item_" .. i] + local txCount = uiMap["bounty_comp.top.btn_buy_2.tips_2.groud.item_" .. i .. ".tx_count"] + local imgProg = uiMap["bounty_comp.top.btn_buy_2.tips_2.groud.item_" .. i .. ".img_prog"] + table.insert(self.pro2_Items, item) + table.insert(self.pro2_TxCount, txCount) + table.insert(self.pro2_ImgIcon, imgProg) + end + + self.btnBuy1:addClickListener(function() + ModuleManager.BountyManager:onUnlockPro(GConst.BountyConst.REWARD_GEAR.PRO_1) + end) + self.btnBuy2:addClickListener(function() + ModuleManager.BountyManager:onUnlockPro(GConst.BountyConst.REWARD_GEAR.PRO_2) + end) + self.btnGet:addClickListener(function() + ModuleManager.BountyManager:reqGetAllRewards() + end) + self.btnHelp:addClickListener(function() + -- ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.BOUNTY_DESC_9), self.btnHelp) + end) + self:bind(DataManager.BountyData, "isDirty", function() + self:refresh(true) + end) + + -- self.txTitle:setSizeDeltaX(400) + -- local width = self.txTitle:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + -- width = math.min(400, width) + -- self.txTitle:setSizeDeltaX(width) +end + +function BountyComp:updateTime() + self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.NEXT_REFRESH_DESC, Time:formatNumTimeStr(DataManager.BountyData:getRemainTime()))) +end + +function BountyComp:refresh(notFirst) + local lv = DataManager.BountyData:getLevel() + local exp = DataManager.BountyData:getExp() + local maxLv = DataManager.BountyData:getMaxLv() + if lv >= maxLv then + exp = 0 + lv = maxLv + end + self.txLv:setText(lv) + local curExp = exp + local fullExp = DataManager.BountyData:getLvUpExp() + self.txProg:setText(curExp .. "/" .. fullExp) + self.imgProg.value = curExp / fullExp + + local gift1 = ConfigManager:getConfig("act_gift")[DataManager.BountyData:getProRewardGiftId(GConst.BountyConst.REWARD_GEAR.PRO_1)] + local gift2 = ConfigManager:getConfig("act_gift")[DataManager.BountyData:getProRewardGiftId(GConst.BountyConst.REWARD_GEAR.PRO_2)] + self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) + self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) + self.txTips1:setText(gift2.value .. "%") + + self.btnGet:setActive(DataManager.BountyData:canGetRewards()) + self.btnBuy1:setActive(not DataManager.BountyData:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_1)) + self.btnBuy2:setActive(not DataManager.BountyData:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_2)) + + if self.scrollRect == nil then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index) + end) + end + local count = DataManager.BountyData:getMaxLv() + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(count) + elseif self.scrollRect:getTotalCount() ~= count then + self.scrollRect:clearCells() + self.scrollRect:refillCells(count) + else + self.scrollRect:updateAllCell() + end + + if not notFirst then + self.scrollRect:moveToIndex(DataManager.BountyData:getMoveIdx()) + end + + local rewards = DataManager.BountyData:getAllRewards(GConst.BountyConst.REWARD_GEAR.PRO_1) + for i,v in ipairs(self.pro1_Items) do + v:setActive(false) + end + for i,v in ipairs(self.pro2_Items) do + v:setActive(false) + end + local index = 0 + for id, reward in pairs(rewards) do + index = index + 1 + local item = self.pro1_Items[index] + local txCount = self.pro1_TxCount[index] + local imgProg = self.pro1_ImgIcon[index] + if reward then + item:setActive(true) + local itemNum = reward.num or 0 + imgProg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(id)) + txCount:setText(itemNum) + end + end + rewards = DataManager.BountyData:getAllRewards(GConst.BountyConst.REWARD_GEAR.PRO_2) + index = 0 + for id, reward in pairs(rewards) do + index = index + 1 + local item = self.pro2_Items[index] + local txCount = self.pro2_TxCount[index] + local imgProg = self.pro2_ImgIcon[index] + if reward then + item:setActive(true) + local itemNum = reward.num or 0 + imgProg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(id)) + txCount:setText(itemNum) + end + end + +end + +return BountyComp \ No newline at end of file diff --git a/lua/app/ui/shop/box_hero_ui.lua.meta b/lua/app/ui/fund/bounty_comp.lua.meta similarity index 86% rename from lua/app/ui/shop/box_hero_ui.lua.meta rename to lua/app/ui/fund/bounty_comp.lua.meta index c4f43583..e75399ed 100644 --- a/lua/app/ui/shop/box_hero_ui.lua.meta +++ b/lua/app/ui/fund/bounty_comp.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 25ac045a469b3854c9a8b5ff90fce9e6 +guid: 70f6846bac89e41f5b7f7cf47f9800f2 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/fund/cell/fund_tower_cell.lua b/lua/app/ui/fund/cell/fund_tower_cell.lua new file mode 100755 index 00000000..bded5aa0 --- /dev/null +++ b/lua/app/ui/fund/cell/fund_tower_cell.lua @@ -0,0 +1,95 @@ +local FundTowerCell = class("FundTowerCell", BaseCell) + +function FundTowerCell:init() + local uiMap = self:getUIMap() + self.progNode = uiMap["fund_tower_cell.prog"] + self.imgProg = uiMap["fund_tower_cell.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.lvNode = uiMap["fund_tower_cell.level"] + self.txLv = uiMap["fund_tower_cell.level.tx_lv"] + self.freeRewardCells = {} + for i = 1, 2 do + table.insert(self.freeRewardCells, uiMap["fund_tower_cell.rewards_free.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) + end + self.proRewardCells = {} + for i = 1, 2 do + table.insert(self.proRewardCells, uiMap["fund_tower_cell.rewards_pro.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) + end + + self.colorLight = BF.Color(0.6235294, 0.3137255, 0.1764706, 1) + self.colorGray = BF.Color(0.3568628, 0.3568628, 0.3568628, 1) +end + +function FundTowerCell:refresh(index, id, isLast) + -- 刷新进度 + local helf = self:getBaseObject():getSizeDeltaY() / 2 + if self:getIndex() == 1 then + self.progNode:setAnchoredPositionY(-helf / 2) + self.progNode:setSizeDeltaY(helf) + elseif isLast then + self.progNode:setAnchoredPositionY(helf / 2) + self.progNode:setSizeDeltaY(helf) + else + self.progNode:setAnchoredPositionY(0) + self.progNode:setSizeDeltaY(self:getBaseObject():getSizeDeltaY()) + end + + local needChapter = DataManager.TowerFundData:getNeedChapter(id) + + local stage = DataManager.TowerFundData:getStageById(id) + local curLayer = DataManager.TowerData:getCurMaxLayer() + + self.txLv:setText(needChapter) + if curLayer >= needChapter then + self.imgProg.value = 1 + self.lvNode:setSprite(GConst.ATLAS_PATH.UI_TOUWE, "tower_dec_2") + -- self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorLight + else + self.imgProg.value = 0 + self.lvNode:setSprite(GConst.ATLAS_PATH.UI_TOUWE, "tower_dec_3") + -- self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorGray + end + + local freeRewards = DataManager.TowerFundData:getFreeRewards(id) + local freeReceived = DataManager.TowerFundData:getFreeGot(id) + local canGet = DataManager.TowerFundData:getFreeCanGet(id) + for i, cell in ipairs(self.freeRewardCells) do + if freeRewards and freeRewards[i] then + cell:showCell() + cell:refreshByConfig(freeRewards[i], freeReceived, freeReceived) + if canGet then + cell:addClickListener(function() + ModuleManager.FundTowerManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:hideCell() + end + end + + local proRewards = DataManager.TowerFundData:getProRewards(id) + local proReceived = DataManager.TowerFundData:getProGot(id) + local locked = not DataManager.TowerFundData:getProBought(stage) + local canGet = DataManager.TowerFundData:getProCanGet(id) + for i, cell in ipairs(self.proRewardCells) do + if proRewards and proRewards[i] then + cell:showCell() + cell:refreshByConfig(proRewards[i], proReceived, proReceived) + cell:showLock(locked) + if canGet then + cell:addClickListener(function() + ModuleManager.FundTowerManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:hideCell() + end + end +end + +return FundTowerCell diff --git a/lua/app/ui/fund/cell/growth_fund_reward_cell.lua.meta b/lua/app/ui/fund/cell/fund_tower_cell.lua.meta similarity index 86% rename from lua/app/ui/fund/cell/growth_fund_reward_cell.lua.meta rename to lua/app/ui/fund/cell/fund_tower_cell.lua.meta index 6e16472c..12f3d42e 100644 --- a/lua/app/ui/fund/cell/growth_fund_reward_cell.lua.meta +++ b/lua/app/ui/fund/cell/fund_tower_cell.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3e3a08bdfecbd8b49ada85fa70fe5c8b +guid: cb54eb5ca6d0d4fcdbd53a0bd5f8abac ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/fund/cell/growth_fund_cell.lua b/lua/app/ui/fund/cell/growth_fund_cell.lua deleted file mode 100644 index 7127d00e..00000000 --- a/lua/app/ui/fund/cell/growth_fund_cell.lua +++ /dev/null @@ -1,89 +0,0 @@ -local GrowthFundCell = class("GrowthFundCell", BaseCell) - -local Fund_REWARD_CELL = "app/ui/fund/cell/growth_fund_reward_cell" - -function GrowthFundCell:init() - local uiMap = self:getUIMap() - local width = GConst.UI_SCREEN_WIDTH - - self.fundRewardCell1 = uiMap["growth_fund_cell.fund_reward_cell_1"]:addLuaComponent(Fund_REWARD_CELL) - self.fundRewardCell1:setAnchoredPositionX(-width/3) - self.fundRewardCell1:addClickListener(function() - if self.fundId == nil then - return - end - local iCslaimed = DataManager.GrowthFundData:getIsClaimedBase(self.fundId) - local needLevel = DataManager.GrowthFundData:getNeedLevel(self.fundId) - local playerLevel = DataManager.PlayerData:getLv() - if not iCslaimed and playerLevel >= needLevel then - ModuleManager.FundManager:claimFundRewards() - else - local freeReward = DataManager.GrowthFundData:getFreeFundRewards(self.fundId) - local reward = freeReward and freeReward[1] - if reward then - ModuleManager.TipsManager:showRewardTips(reward.id, reward.type, self.fundRewardCell1:getBaseObject()) - end - end - end) - self.fundRewardCell2 = uiMap["growth_fund_cell.fund_reward_cell_2"]:addLuaComponent(Fund_REWARD_CELL) - self.fundRewardCell2:addClickListener(function() - if self.fundId == nil then - return - end - local iCslaimed = DataManager.GrowthFundData:getIsClaimedBase(self.fundId) - local needLevel = DataManager.GrowthFundData:getNeedLevel(self.fundId) - local playerLevel = DataManager.PlayerData:getLv() - if not iCslaimed and playerLevel >= needLevel and DataManager.GrowthFundData:getIsBoughtBase(self.fundId) then - ModuleManager.FundManager:claimFundRewards() - else - local baseReward = DataManager.GrowthFundData:getBaseFundRewards(self.fundId) - local reward = baseReward and baseReward[1] - if reward then - ModuleManager.TipsManager:showRewardTips(reward.id, reward.type, self.fundRewardCell2:getBaseObject()) - end - end - end) - self.fundRewardCell3 = uiMap["growth_fund_cell.fund_reward_cell_3"]:addLuaComponent(Fund_REWARD_CELL) - self.fundRewardCell3:addClickListener(function() - if self.fundId == nil then - return - end - local iCslaimed = DataManager.GrowthFundData:getIsClaimedAdvance(self.fundId) - local needLevel = DataManager.GrowthFundData:getNeedLevel(self.fundId) - local playerLevel = DataManager.PlayerData:getLv() - if not iCslaimed and playerLevel >= needLevel and DataManager.GrowthFundData:getIsBoughtAdvance(self.fundId) then - ModuleManager.FundManager:claimFundRewards() - else - local advanceReward = DataManager.GrowthFundData:getAdvanceFundRewards(self.fundId) - local reward = advanceReward and advanceReward[1] - if reward then - ModuleManager.TipsManager:showRewardTips(reward.id, reward.type, self.fundRewardCell3:getBaseObject()) - end - end - end) - self.fundRewardCell3:setAnchoredPositionX(width/3) - self.levelBg = uiMap["growth_fund_cell.lv_bg"] - self.levelBg:setAnchoredPositionX(-width/6) - self.levelGrayImg = uiMap["growth_fund_cell.lv_bg.gray"] - self.levelTx = uiMap["growth_fund_cell.lv_bg.tx"] -end - -function GrowthFundCell:refresh(id) - self.fundId = id - local GrowthFundData = DataManager.GrowthFundData - local needLevel = DataManager.GrowthFundData:getNeedLevel(id) - local playerLevel = DataManager.PlayerData:getLv() - local isActive = playerLevel >= needLevel - self.levelGrayImg:setVisible(not isActive) - self.levelTx:setText(GFunc.intToString(needLevel)) - local freeReward, baseReward, advanceReward = GrowthFundData:getAllStepFundRewards(id) - self.fundRewardCell1:refresh(freeReward[1], isActive and 1 or 0, false, GrowthFundData:getIsClaimedFree(id)) - self.fundRewardCell2:refresh(baseReward[1], isActive and 2 or 0, not GrowthFundData:getIsBoughtBase(id), GrowthFundData:getIsClaimedBase(id)) - self.fundRewardCell3:refresh(advanceReward[1], isActive and 3 or 0, not GrowthFundData:getIsBoughtAdvance(id), GrowthFundData:getIsClaimedAdvance(id)) -end - -function GrowthFundCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return GrowthFundCell \ No newline at end of file diff --git a/lua/app/ui/fund/cell/growth_fund_reward_cell.lua b/lua/app/ui/fund/cell/growth_fund_reward_cell.lua deleted file mode 100644 index b8e5f9f9..00000000 --- a/lua/app/ui/fund/cell/growth_fund_reward_cell.lua +++ /dev/null @@ -1,88 +0,0 @@ -local GrowthFundRewardCell = class("GrowthFundRewardCell", BaseCell) - -function GrowthFundRewardCell:init() - local uiMap = self:getUIMap() - self.bg = uiMap["fund_reward_cell.bg"] - self.icon = uiMap["fund_reward_cell.icon"] - self.numTx = uiMap["fund_reward_cell.num"] - self.check = uiMap["fund_reward_cell.check"] - self.fragment = uiMap["fund_reward_cell.fragment"] - self.light = uiMap["fund_reward_cell.light"] - self.lock = uiMap["fund_reward_cell.lock"] - self.baseObject:addClickListener(function() - if self.clickCallback then - self.clickCallback() - elseif self.rewardId ~= nil then - ModuleManager.TipsManager:showRewardTips(self.rewardId, self.rewardType, self.baseObject) - end - end) -end - -function GrowthFundRewardCell:refresh(reward, step, isLock, showCheck) - if step == 0 then - self.bg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_5") - elseif step == 1 then - self.bg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_2") - elseif step == 2 then - self.bg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_3") - else - self.bg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_4") - end - if isLock then - self.lock:setVisible(true) - self.light:setVisible(false) - else - self.lock:setVisible(false) - if step == 0 or showCheck then - self.light:setVisible(false) - else - self.light:setVisible(true) - end - end - self.check:setVisible(showCheck == true) - if reward.type == GConst.REWARD_TYPE.ITEM then - self:_refreshItem(reward) - self.rewardId = reward.id - self.rewardType = reward.type - else - self.rewardId = nil - end -end - -function GrowthFundRewardCell:_refreshItem(item) - local info = ConfigManager:getConfig("item")[item.id] - if info == nil then - return - end - self.numTx:setText(item.count or item.num) - if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then - local heroInfo = ConfigManager:getConfig("hero")[info.parameter] - if heroInfo then - self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroInfo.icon) - else - self.icon:setSprite(GConst.ATLAS_PATH.COMMON, "common_alpha") - end - self.fragment:setVisible(true) - else - self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, info.icon) - self.fragment:setVisible(false) - end -end - -function GrowthFundRewardCell:setVisible(visible) - self.baseObject:setActive(visible) -end - -function GrowthFundRewardCell:setAnchoredPositionX(x) - self.baseObject:setAnchoredPositionX(x) -end - -function GrowthFundRewardCell:setTouchEnable(enable) - self.baseObject:setTouchEnable(enable) -end - -function GrowthFundRewardCell:addClickListener(callback) - self.clickCallback = callback -end - -return GrowthFundRewardCell \ No newline at end of file diff --git a/lua/app/ui/fund/fund_chapter_comp.lua b/lua/app/ui/fund/fund_chapter_comp.lua new file mode 100755 index 00000000..9109bb12 --- /dev/null +++ b/lua/app/ui/fund/fund_chapter_comp.lua @@ -0,0 +1,191 @@ +local FundChapterComp = class("FundChapterComp", LuaComponent) + +local CELL = "app/ui/privilege/cell/fund_chapter_cell" + +local TAG_COMMON_TOTAL_SIZE = 640 +local TAG_SIZE = 178 + +function FundChapterComp:onClose() + self.curStage = nil +end + +function FundChapterComp:init() + local uiMap = self:getUIMap() + self.banner = uiMap["fund_chapter_comp.bg.banner"] + self.txTitle = uiMap["fund_chapter_comp.top.tx_title"] + self.bg = uiMap["fund_chapter_comp.top.bg"] + self.txDesc = uiMap["fund_chapter_comp.top.bg.desc_1"] + self.txDesc2 = uiMap["fund_chapter_comp.top.bg.desc_2"] + self.btnHelp = uiMap["fund_chapter_comp.top.tx_title.btn_help"] + self.scrollrect = uiMap["fund_chapter_comp.scrollrect"] + self.txLevel = uiMap["fund_chapter_comp.scrollrect.title.tx_level"] + self.txCommon = uiMap["fund_chapter_comp.scrollrect.title.tx_common"] + self.txPro = uiMap["fund_chapter_comp.scrollrect.title.tx_pro"] + self.btnGet = uiMap["fund_chapter_comp.btns.btn_get"] + self.txGet = uiMap["fund_chapter_comp.btns.btn_get.tx_desc"] + self.btnBuy = uiMap["fund_chapter_comp.btns.btn_buy"] + self.txCost = uiMap["fund_chapter_comp.btns.btn_buy.tx_cost"] + self.tagsNode = uiMap["fund_chapter_comp.tags"] + self.tagsViewport = uiMap["fund_chapter_comp.tags.viewport"] + self.tagsContent = uiMap["fund_chapter_comp.tags.viewport.content"] + self.tags = {} + self.tagImgs = {} + self.tagDescs = {} + for i = 1, 20 do + table.insert(self.tags, uiMap["fund_chapter_comp.tags.viewport.content.tag_" .. i]) + table.insert(self.tagImgs, uiMap["fund_chapter_comp.tags.viewport.content.tag_" .. i .. ".img"]) + table.insert(self.tagDescs, uiMap["fund_chapter_comp.tags.viewport.content.tag_" .. i .. ".img.tx_desc"]) + end + + self.btnBuy:addClickListener(function() + local giftId = DataManager.ChapterFundData:getProGiftId(self.curStage) + ModuleManager.FundChapterManager:onBuyLevelGift(giftId) + end) + self.btnGet:addClickListener(function() + ModuleManager.FundChapterManager:getReward(self.curStage) + end) + self.btnHelp:addClickListener(function() + ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_2), self.btnHelp) + end) + self:bind(DataManager.ChapterFundData, "isDirty", function() + if not DataManager.ChapterFundData:getIsOpen() then + return + end + if not DataManager.ChapterFundData:isStageUnlock(self.curStage) then + self.curStage = DataManager.ChapterFundData:getCurStage() + end + if self.curStage == nil then + return + end + if not DataManager.ChapterFundData:canGetRewards(self.curStage) then + local claimedStage = DataManager.ChapterFundData:getMinUnclaimedStage() + if claimedStage ~= nil then + self.curStage = claimedStage + end + end + self:refresh(true) + end) +end + +function FundChapterComp:refresh(isAuto) + if self.curStage == nil then + self.curStage = DataManager.ChapterFundData:getMinUnclaimedStage() or DataManager.ChapterFundData:getMaxUnclaimedStage() + isAuto = true + end + + self:updateData(self.curStage) + self:refreshStageTags() + if isAuto then + local stageList = DataManager.ChapterFundData:getUnlockStageList() + local index + for k, v in pairs(stageList) do + if self.curStage == v then + index = k + end + end + if index then + self.tagsContent:setAnchoredPositionX(-self.tags[index]:getAnchoredPositionX()) + end + end + if not DataManager.ChapterFundData:getProBought(self.curStage) then + local giftId = DataManager.ChapterFundData:getProGiftId(self.curStage) + local cfg = ConfigManager:getConfig("act_gift")[giftId] + self.txCost:setText(GFunc.getFormatPrice(cfg.recharge_id)) + self.btnBuy:setActive(true) + else + self.btnBuy:setActive(false) + end + self.btnGet:setActive(DataManager.ChapterFundData:canGetRewards(self.curStage)) + + if self.curStage == 1 then + self.banner:setTexture("assets/arts/textures/background/fund/fund_banner_1.png") + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_1)) + else + self.banner:setTexture("assets/arts/textures/background/fund/fund_banner_1.png") + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst["FUND_CHAPTER_TAG_DESC_" .. self.curStage])) + end + local w = self.txTitle:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + if w > 300 then + self.txTitle:setSizeDeltaX(310) + else + self.txTitle:setSizeDeltaX(w + 10) + end + + self.maxIndex = #self.cfgList + self.minIndex = DataManager.ChapterFundData:getMinUnclaimedRewardIndex(self.curStage) + if self.scrollRect == nil then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(self.cfgList[index], index == self.maxIndex) + end) + end + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(self.maxIndex) + elseif self.scrollRect:getTotalCount() ~= self.maxIndex then + self.scrollRect:clearCells() + self.scrollRect:refillCells(self.maxIndex) + else + self.scrollRect:updateAllCell() + end + self.scrollRect:moveToIndex(self.minIndex) + if self.curStage then + BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_LEVEL .. self.curStage) + end +end + +function FundChapterComp:updateData(stage) + stage = stage or DataManager.ChapterFundData:getCurStage() + if DataManager.ChapterFundData:getIsOpen(stage) then + self.cfgList = DataManager.ChapterFundData:getListByStage(stage) + else + self.cfgList = {} + end +end + +function FundChapterComp:onClickStageTag(stage) + self.curStage = stage + self:refresh() +end + +function FundChapterComp:refreshStageTags() + local stageList = DataManager.ChapterFundData:getUnlockStageList() + if #stageList <= 1 then + self.tagsNode:setActive(false) + return + end + self.tagsNode:setActive(true) + local totalWidth = #stageList * TAG_SIZE + (#stageList - 1) * 5 + self.tagsContent:setSizeDeltaX(totalWidth) + self.tagsViewport:setSizeDeltaX(totalWidth < TAG_COMMON_TOTAL_SIZE and totalWidth or TAG_COMMON_TOTAL_SIZE) + + for i, tag in ipairs(self.tags) do + local stage = stageList[i] + if stage then + tag:setActive(true) + local isSelect = self.curStage == stage + self.tagImgs[i]:setSprite(GConst.ATLAS_PATH.COMMON, isSelect and "common_menu_4" or "common_menu_5") + self.tagImgs[i]:setAnchoredPositionY(isSelect and 5 or 0) + self.tagDescs[i]:setText(I18N:getGlobalText(I18N.GlobalConst["FUND_CHAPTER_TAG_DESC_" .. stage])) + + if DataManager.ChapterFundData:canGetRewards(stage) then + tag:addRedPoint(80, 33, 0.9) + else + tag:removeRedPoint() + end + + tag:addClickListener(function() + if isSelect then + return + end + self:onClickStageTag(stage) + end) + else + tag:setActive(false) + end + end +end + +return FundChapterComp \ No newline at end of file diff --git a/lua/app/ui/fund/fund_chapter_comp.lua.meta b/lua/app/ui/fund/fund_chapter_comp.lua.meta new file mode 100644 index 00000000..1ae09647 --- /dev/null +++ b/lua/app/ui/fund/fund_chapter_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 83a20fb24b94e4aec8813262035e4230 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/fund_level_comp.lua b/lua/app/ui/fund/fund_level_comp.lua new file mode 100755 index 00000000..cc6442be --- /dev/null +++ b/lua/app/ui/fund/fund_level_comp.lua @@ -0,0 +1,219 @@ +local FundLevelComp = class("FundLevelComp", LuaComponent) + +local CELL = "app/ui/privilege/cell/fund_level_cell" + +local TAG_COMMON_TOTAL_SIZE = 640 +local TAG_SIZE = 178 + +function FundLevelComp:onClose() + self.curStage = nil +end + +function FundLevelComp:init() + local uiMap = self:getUIMap() + self.banner = uiMap["fund_level_comp.bg.banner"] + self.txTitle = uiMap["fund_level_comp.top.tx_title"] + self.bg = uiMap["fund_level_comp.top.bg"] + self.txDesc = uiMap["fund_level_comp.top.bg.desc_1"] + self.txDesc2 = uiMap["fund_level_comp.top.bg.desc_2"] + self.btnHelp = uiMap["fund_level_comp.top.tx_title.btn_help"] + self.scrollrect = uiMap["fund_level_comp.scrollrect"] + self.txLevel = uiMap["fund_level_comp.scrollrect.title.tx_level"] + self.txCommon = uiMap["fund_level_comp.scrollrect.title.tx_common"] + self.txPro = uiMap["fund_level_comp.scrollrect.title.tx_pro"] + self.btnGet = uiMap["fund_level_comp.btns.btn_get"] + self.txGet = uiMap["fund_level_comp.btns.btn_get.tx_desc"] + self.btnBuy = uiMap["fund_level_comp.btns.btn_buy"] + self.txCost = uiMap["fund_level_comp.btns.btn_buy.tx_cost"] + self.tagsNode = uiMap["fund_level_comp.tags"] + self.tagsViewport = uiMap["fund_level_comp.tags.viewport"] + self.tagsContent = uiMap["fund_level_comp.tags.viewport.content"] + self.tags = {} + self.tagImgs = {} + self.tagDescs = {} + for i = 1, 20 do + table.insert(self.tags, uiMap["fund_level_comp.tags.viewport.content.tag_" .. i]) + table.insert(self.tagImgs, uiMap["fund_level_comp.tags.viewport.content.tag_" .. i .. ".img"]) + table.insert(self.tagDescs, uiMap["fund_level_comp.tags.viewport.content.tag_" .. i .. ".img.tx_desc"]) + end + self.imgProgress = uiMap["fund_level_comp.top.img_prog"] + self.txProg = uiMap["fund_level_comp.top.img_prog.tx_prog"] + self.txGetAll = uiMap["fund_level_comp.top.bg.desc_2.img_reward.tx_get_all"] + + self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_4)) + self.txDesc2:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_29)) + self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_5)) + self.txCommon:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_5)) + self.txPro:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_6)) + self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_CLAIMALL)) + + self.btnBuy:addClickListener(function() + local giftId = DataManager.FundLevelData:getProActId(self.curStage) + ModuleManager.FundLevelManager:onBuyLevelGift(giftId) + end) + self.btnGet:addClickListener(function() + ModuleManager.FundLevelManager:getReward(self.curStage) + end) + self.btnHelp:addClickListener(function() + ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_2), self.btnHelp) + end) + self:bind(DataManager.FundLevelData, "isDirty", function() + if not DataManager.FundLevelData:getIsOpen() then + return + end + if not DataManager.FundLevelData:isStageUnlock(self.curStage) then + self.curStage = DataManager.FundLevelData:getCurStage() + end + if self.curStage == nil then + return + end + if not DataManager.FundLevelData:canGetRewards(self.curStage) then + local claimedStage = DataManager.FundLevelData:getMinUnclaimedStage() + if claimedStage ~= nil then + self.curStage = claimedStage + end + end + self:refresh(true) + end) +end + +function FundLevelComp:refresh(isAuto) + if self.curStage == nil then + self.curStage = DataManager.FundLevelData:getMinUnclaimedStage() or DataManager.FundLevelData:getMaxUnclaimedStage() + isAuto = true + end + + self:updateData(self.curStage) + self:refreshStageTags() + if isAuto then + local stageList = DataManager.FundLevelData:getUnlockStageList() + local index + for k, v in pairs(stageList) do + if self.curStage == v then + index = k + end + end + if index then + self.tagsContent:setAnchoredPositionX(-self.tags[index]:getAnchoredPositionX()) + end + end + if not DataManager.FundLevelData:getProBought(self.curStage) then + local giftId = DataManager.FundLevelData:getProActId(self.curStage) + local cfg = ConfigManager:getConfig("act_gift")[giftId] + self.txCost:setText(GFunc.getFormatPrice(cfg.recharge_id)) + self.txProg:setText(cfg.value .. "%") + self.btnBuy:setActive(true) + else + self.btnBuy:setActive(false) + end + self.btnGet:setActive(DataManager.FundLevelData:canGetRewards(self.curStage)) + + if self.curStage == 1 then + self.banner:setTexture("assets/arts/textures/background/fund/fund_banner_2.png") + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_1)) + else + self.banner:setTexture("assets/arts/textures/background/fund/fund_banner_2.png") + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst["FUND_TAG_DESC_" .. self.curStage])) + end + local w = self.txTitle:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + if w > 600 then + self.txTitle:setSizeDeltaX(610) + else + self.txTitle:setSizeDeltaX(w + 10) + end + + self.maxIndex = #self.cfgList + self.minIndex = DataManager.FundLevelData:getMinUnclaimedRewardIndex(self.curStage) + if self.scrollRect == nil then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(self.cfgList[index], index == self.maxIndex) + end) + end + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(self.maxIndex) + elseif self.scrollRect:getTotalCount() ~= self.maxIndex then + self.scrollRect:clearCells() + self.scrollRect:refillCells(self.maxIndex) + else + self.scrollRect:updateAllCell() + end + self.scrollRect:moveToIndex(self.minIndex) + + if self.curStage then + BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_CHAPTER .. self.curStage) + end + local count = 0 + for i,id in ipairs(self.cfgList) do + local cfgFree = DataManager.FundLevelData:getFreeRewards(id) + local cfgPro = DataManager.FundLevelData:getProRewards(id) + if cfgFree then + for _,v in ipairs(cfgFree) do + count = count + v.num + end + end + if cfgPro then + for _,v in ipairs(cfgPro) do + count = count + v.num + end + end + end + self.txGetAll:setText(count) +end + +function FundLevelComp:updateData(stage) + stage = stage or DataManager.FundLevelData:getCurStage() + if DataManager.FundLevelData:getIsOpen(stage) then + self.cfgList = DataManager.FundLevelData:getListByStage(stage) + else + self.cfgList = {} + end +end + +function FundLevelComp:onClickStageTag(stage) + self.curStage = stage + self:refresh() +end + +function FundLevelComp:refreshStageTags() + local stageList = DataManager.FundLevelData:getUnlockStageList() + if #stageList <= 1 then + self.tagsNode:setActive(false) + return + end + self.tagsNode:setActive(true) + local totalWidth = #stageList * TAG_SIZE + (#stageList - 1) * 5 + self.tagsContent:setSizeDeltaX(totalWidth) + self.tagsViewport:setSizeDeltaX(totalWidth < TAG_COMMON_TOTAL_SIZE and totalWidth or TAG_COMMON_TOTAL_SIZE) + + for i, tag in ipairs(self.tags) do + local stage = stageList[i] + if stage then + tag:setActive(true) + local isSelect = self.curStage == stage + self.tagImgs[i]:setSprite(GConst.ATLAS_PATH.COMMON, isSelect and "common_menu_4" or "common_menu_5") + self.tagImgs[i]:setAnchoredPositionY(isSelect and 5 or 0) + self.tagDescs[i]:setText(I18N:getGlobalText(I18N.GlobalConst["FUND_TAG_DESC_" .. stage])) + + if DataManager.FundLevelData:canGetRewards(stage) then + tag:addRedPoint(80, 33, 0.9) + else + tag:removeRedPoint() + end + + tag:addClickListener(function() + if isSelect then + return + end + self:onClickStageTag(stage) + end) + else + tag:setActive(false) + end + end +end + +return FundLevelComp \ No newline at end of file diff --git a/lua/app/ui/fund/fund_level_comp.lua.meta b/lua/app/ui/fund/fund_level_comp.lua.meta new file mode 100644 index 00000000..b7e66722 --- /dev/null +++ b/lua/app/ui/fund/fund_level_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 919c89f0eec9b4ba3b0d387882b59bf1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/fund_main_ui.lua b/lua/app/ui/fund/fund_main_ui.lua new file mode 100755 index 00000000..68648d06 --- /dev/null +++ b/lua/app/ui/fund/fund_main_ui.lua @@ -0,0 +1,290 @@ +local FundMainUI = class("FundMainUI", BaseUI) +-- FundMainUI +local BTN_WIDTH = 82 +local BTN_RIGHT = 20 +local BTN_SPACING = 26 + +function FundMainUI:showCommonBG() + return false +end + +function FundMainUI:onPressBackspace() + self:closeUI() +end + +function FundMainUI:getPrefabPath() + return "assets/prefabs/ui/fund/fund_main_ui.prefab" +end + +function FundMainUI:onClose() + if self.subComps then + for _, comp in pairs(self.subComps) do + if comp.onClose then + comp:onClose() + end + end + end + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP) + + local callback = self.callback + self.callback = nil + if callback then + callback() + end +end + +function FundMainUI:ctor(param) + if param and param.showPage then + self.curPage = param.showPage + self.onlyShowPage = param.onlyShowPage + self.callback = param.callback + else + self:switchOtherPage() + end +end + +function FundMainUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.btnClose = uiMap["fund_main_ui.bottom.btn_close"] + self.btnNode = uiMap["fund_main_ui.bottom.btns"] + self.btnContent = uiMap["fund_main_ui.bottom.btns.viewport.content"] + self.btns = {} + self.txBtns = {} + for i = 1, table.nums(GConst.ShopConst.FUND_SHOW_PAGE) do + table.insert(self.btns, uiMap["fund_main_ui.bottom.btns.viewport.content.btn_" .. i]) + table.insert(self.txBtns, uiMap["fund_main_ui.bottom.btns.viewport.content.btn_" .. i .. ".tx_desc"]) + end + self.compsRoot = uiMap["fund_main_ui.comps"] + for i, btn in ipairs(self.btns) do + self.txBtns[i]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.ShopConst.FUND_PAGE_BTN_DESC[i]])) + btn:addClickListener(function() + self:onChangePage(i) + end) + end + + self:initComps() + self:scheduleGlobal(function() + self:updateTime() + end, 1) + self:updateTime() + + self.btnClose:addClickListener(function() + self:closeUI() + end) + self:bind(DataManager.FundLevelData, "isDirty", function() + self:refreshRedPoint() + if self.curPage ~= GConst.ShopConst.FUND_SHOW_PAGE.FUND then + return + end + self:onRefresh() + end) + self:bind(DataManager.ChapterFundData, "isDirty", function() + self:refreshRedPoint() + if self.curPage ~= GConst.ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND then + return + end + self:onRefresh() + end) + self:bind(DataManager.BountyData, "isDirty", function() + self:refreshRedPoint() + end) + self:bind(DataManager.BountyCollectionData, "isDirty", function() + self:refreshRedPoint() + end) + self:bind(DataManager.TowerData, "isDirty", function() + self:onRefresh() + end) + self:bind(DataManager.TowerFundData, "isDirty", function() + self:onRefresh() + end) + self:bind(DataManager.BountyGrowthData, "isDirty", function() + self:onRefresh() + end) + self:bind(DataManager.PaymentData, "isDirty", function() + self:onRefresh() + end) +end + +function FundMainUI:initComps() + if self.subComps then + return + end + local uiMap = self.root:genAllChildren() + self.subComps = {} + + for k, id in pairs(GConst.ShopConst.FUND_SHOW_PAGE) do + if GConst.ShopConst.FUND_COMP_NAME[id] then + -- 预制体挂载 + local obj = uiMap[GConst.ShopConst.FUND_COMP_NAME[id]] + self:initGlobalHelp(obj) + obj:initPrefabHelper() + obj:genAllChildren() + local comp = obj:addLuaComponent(GConst.ShopConst.FUND_COMP[id]) + self.subComps[id] = comp + elseif GConst.ShopConst.FUND_COMP_PATH[id] then + -- 动态加载 + self:loadModule(GConst.ShopConst.FUND_COMP_PATH[id], self.compsRoot, GConst.ShopConst.FUND_COMP[id], function(comp) + comp:getBaseObject():setActive(false) + self.subComps[id] = comp + + -- 判断当前需要展示界面是否是刚加载完的界面,是的话刷新一下界面 + if self.curPage == id then + self:onRefresh() + end + end) + end + end +end + +function FundMainUI:updateTime() + if self.subComps then + for _, comp in pairs(self.subComps) do + if comp.updateTime then + comp:updateTime() + end + end + end +end + +function FundMainUI:onChangePage(page) + if self.curPage == page then + return + end + + for i, comp in pairs(self.subComps) do + if page ~= i and self.curPage == i and comp.onClose then + comp:onClose() + end + end + + self.curPage = page + self:onRefresh() +end + +function FundMainUI:switchOtherPage() + if DataManager.BountyData:showRedPoint() then + self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY + elseif DataManager.BountyCollectionData:showRedPoint() then + self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION + elseif DataManager.FundLevelData:getRedPoint() then + self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.FUND + elseif DataManager.ChapterFundData:getRedPoint() then + self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND + -- elseif DataManager.MonthlyCardData:getIsOpen() then + -- self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.MONTHLY_CARD + elseif DataManager.BountyGrowthData:getIsOpen() then + self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH + end + + if self.curPage ~= nil then + return + end + + for page = 1, table.nums(GConst.ShopConst.FUND_SHOW_PAGE) do + if self:isOpen(page) then + self.curPage = page + break + end + end +end + +function FundMainUI:onRefresh() + if self.curPage == GConst.ShopConst.FUND_SHOW_PAGE.FUND then + if DataManager.FundLevelData:getIsAllClaimed() then + local page = self.curPage + self:switchOtherPage() + if page == self.curPage then + return self:closeUI() + else + return self:onRefresh() + end + end + end + if self.curPage == GConst.ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND then + if DataManager.ChapterFundData:getIsAllClaimed() then + local page = self.curPage + self:switchOtherPage() + if page == self.curPage then + return self:closeUI() + else + return self:onRefresh() + end + end + end + + local openCount = 0 + for i, btn in ipairs(self.btns) do + if self:isOpen(i) then + btn:setActive(true) + openCount = openCount + 1 + if self.curPage == i then + btn:setSprite(GConst.ShopConst.FUND_PAGE_BTN_ICON_ATLAS[i], GConst.ShopConst.FUND_PAGE_BTN_ICON_1[i]) + else + btn:setSprite(GConst.ShopConst.FUND_PAGE_BTN_ICON_ATLAS[i], GConst.ShopConst.FUND_PAGE_BTN_ICON_2[i]) + end + else + btn:setActive(false) + end + end + local width = BTN_RIGHT + BTN_WIDTH * openCount + BTN_SPACING * (openCount - 1) + 20 + self.btnContent:setSizeDeltaX(width) + self.btnContent:setAnchoredPositionX(math.max(width - self.btnNode:getSizeDeltaX(), 0)) + + for i, comp in pairs(self.subComps) do + if self.curPage == i then + comp:getBaseObject():setActive(true) + comp:refresh() + else + comp:getBaseObject():setActive(false) + end + end + + -- 红点 + self:refreshRedPoint() + + self.btnNode:setActive(not self.onlyShowPage) +end + +function FundMainUI:refreshRedPoint() + for i, btn in ipairs(self.btns) do + if self:hasRedPoint(i) then + btn:addRedPoint(30, 30, 0.9) + else + btn:removeRedPoint() + end + end +end + +function FundMainUI:isOpen(type) + if type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY then + return DataManager.BountyData:isOpen() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION then + return DataManager.BountyCollectionData:isOpen() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.FUND then + return DataManager.FundLevelData:getIsOpen() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND then + return DataManager.ChapterFundData:getIsOpen() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY then + return DataManager.TowerData:isOpen() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH then + return DataManager.BountyGrowthData:getIsOpen() + end +end + +function FundMainUI:hasRedPoint(type) + if type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY then + return DataManager.BountyData:showRedPoint() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION then + return DataManager.BountyCollectionData:showRedPoint() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.FUND then + return DataManager.FundLevelData:getRedPoint() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.CHAPTER_FUND then + return DataManager.ChapterFundData:getRedPoint() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.TOWER_BOUNTY then + return DataManager.TowerFundData:getRedPoint() + elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH then + return DataManager.BountyGrowthData:getRedPoint() + end +end + +return FundMainUI \ No newline at end of file diff --git a/lua/app/ui/fund/fund_main_ui.lua.meta b/lua/app/ui/fund/fund_main_ui.lua.meta new file mode 100644 index 00000000..d6d4795e --- /dev/null +++ b/lua/app/ui/fund/fund_main_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7879ba2518a2946eea6f030201798907 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/fund_reward_ui.lua b/lua/app/ui/fund/fund_reward_ui.lua new file mode 100755 index 00000000..ba516a0f --- /dev/null +++ b/lua/app/ui/fund/fund_reward_ui.lua @@ -0,0 +1,83 @@ +local BaseTips = require "app/ui/tips/base_tips" +local FundRewardUI = class("FundRewardUI", BaseTips) +--fund_reward_ui FundRewardUI +local REWARD_BOX_CELL = "app/ui/tips/cell/reward_box_cell" + +function FundRewardUI:ctor(params) + self.params = params or {} + self.params.txTitle = self.params.txTitle + self.params.giftIds = self.params.giftIds + self.params.rewards = params.rewards or {} + self.params.func = params.func +end + +function FundRewardUI:getPrefabPath() + return "assets/prefabs/ui/fund/fund_reward_ui.prefab" +end + +function FundRewardUI:setRootUI(ui) + self.parentUI = ui +end + +function FundRewardUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.btnCloseMask = uiMap["fund_reward_ui.btn_close_mask"] + self.content = uiMap["fund_reward_ui.content"] + self.txTitle = uiMap["fund_reward_ui.content.tx_title"] + self.btnClose = uiMap["fund_reward_ui.content.btn_close"] + self.imgArt = uiMap["fund_reward_ui.content.img_art"] + self.imgProg = uiMap["fund_reward_ui.content.img_art.img_prog"] + self.txPro = uiMap["fund_reward_ui.content.img_art.img_prog.tx_pro"] + self.scrollrect = uiMap["fund_reward_ui.content.img_art.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.btnBuy = uiMap["fund_reward_ui.content.btn_buy"] + self.txDescBuy = uiMap["fund_reward_ui.content.btn_buy.tx_desc_buy"] + + if self.params.giftIds ~= nil then + local gift = ConfigManager:getConfig("act_gift")[self.params.giftIds] + if gift ~= nil then + self.txDescBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) + self.txPro:setText(gift.value .. "%") + end + self.btnBuy:setVisible(true) + self.imgProg:setVisible(true) + else + self.imgProg:setVisible(false) + self.btnBuy:setVisible(false) + end + self.txTitle:setText(self.params.txTitle) + + self.btnBuy:addClickListener(function() + if self.params.func ~= nil then + self.params.func() + end + self:closeUI() + end) + + self.btnCloseMask:addClickListener(function() + self:closeUI() + end) + self.btnClose:addClickListener(function() + self:closeUI() + end) + + local count = #self.params.rewards + if count <= 5 then + uiMap["fund_reward_ui.content.img_art.scrollrect"]:setAnchoredPositionY(-191) + else + uiMap["fund_reward_ui.content.img_art.scrollrect"]:setAnchoredPositionY(-128) + end + + self.scrollrect:addInitCallback(function() + return GConst.TYPEOF_LUA_CLASS.REWARD_CELL + end) + self.scrollrect:addRefreshCallback(function(index, cell) + cell:refreshByConfig(self.params.rewards[index]) + end) + if self.scrollrect:getTotalCount() == #self.params.rewards then + self.scrollrect:updateAllCell() + else + self.scrollrect:refillCells(#self.params.rewards) + end +end + +return FundRewardUI \ No newline at end of file diff --git a/lua/app/ui/fund/fund_reward_ui.lua.meta b/lua/app/ui/fund/fund_reward_ui.lua.meta new file mode 100644 index 00000000..06b2b92b --- /dev/null +++ b/lua/app/ui/fund/fund_reward_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bfaae72c5ce11422abf21b1e61ea07df +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/growth_fund_ui.lua b/lua/app/ui/fund/growth_fund_ui.lua deleted file mode 100644 index 901d4fd5..00000000 --- a/lua/app/ui/fund/growth_fund_ui.lua +++ /dev/null @@ -1,248 +0,0 @@ -local GrowthFundUI = class("GrowthFundUI", BaseUI) - -function GrowthFundUI:isFullScreen() - return true -end - -function GrowthFundUI:onPressBackspace() - self:closeUI() -end - -function GrowthFundUI:getCurrencyParams() - if self.currencyParams == nil then - self.currencyParams = { - itemIds = { - GConst.ItemConst.ITEM_ID_GOLD, - GConst.ItemConst.ITEM_ID_GEM, - GConst.ItemConst.ITEM_ID_VIT, - }, - showType = GConst.CURRENCY_TYPE.HORIZONTAL - } - end - return self.currencyParams -end - -function GrowthFundUI:getPrefabPath() - return "assets/prefabs/ui/fund/growth_fund_ui.prefab" -end - -function GrowthFundUI:ctor() - self.fundGrade = DataManager.GrowthFundData:getFundGrade() - self:initGradeInfoList() -end - -function GrowthFundUI:initGradeInfoList() - self.gradeInfoList = DataManager.GrowthFundData:getCurrGradeInfoList() - local playerLevel = DataManager.PlayerData:getLv() - local cfg = ConfigManager:getConfig("act_level_fund") - self.inactiveIndex = nil - for k, v in ipairs(self.gradeInfoList) do - if cfg[v] then - if playerLevel < cfg[v].level then - self.inactiveIndex = k - break - end - end - end - if self.inactiveIndex == nil then - self.inactiveIndex = #self.gradeInfoList + 1 - end -end - -function GrowthFundUI:onClose() - if self.originTitleBgHeight then - self.uiMap["growth_fund_ui.title_img.bg"]:setSizeDeltaY(self.originTitleBgHeight) - end - if self.heroNode then - self.heroNode:removeAllChildren() - end -end - -function GrowthFundUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - - self.uiMap["growth_fund_ui.down.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self:initTitle() - self:initPayBtns() - self:initRewards() - self:bindData() - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROWTH_FUND, nil, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -function GrowthFundUI:initTitle() - self.titleTx = self.uiMap["growth_fund_ui.title_img.title_tx"] - self.titleDialogBg = self.uiMap["growth_fund_ui.title_img.bg"] - self.originTitleBgHeight = self.titleDialogBg:fastGetSizeDeltaY() - self.heroNode = self.uiMap["growth_fund_ui.title_img.hero_node"] - self.heroNode:removeAllChildren() -end - -function GrowthFundUI:initPayBtns() - local width = GConst.UI_SCREEN_WIDTH - - local freeTx = self.uiMap["growth_fund_ui.title_bg_2.free_tx"] - freeTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - freeTx:setAnchoredPositionX(-width/3) - - self.payBtn1 = self.uiMap["growth_fund_ui.title_bg_2.btn_1"] - self.payBtn1:addClickListener(function() - ModuleManager.FundManager:buyLevelFund(DataManager.GrowthFundData:getFundBaseId()) - end) - self.payBtnTx1 = self.uiMap["growth_fund_ui.title_bg_2.btn_1.text"] - - self.payBtn2 = self.uiMap["growth_fund_ui.title_bg_2.btn_2"] - self.payBtn2:setAnchoredPositionX(width/3) - self.payBtn2:addClickListener(function() - ModuleManager.FundManager:buyLevelFund(DataManager.GrowthFundData:getFundAdvanceId()) - end) - self.payBtnTx2 = self.uiMap["growth_fund_ui.title_bg_2.btn_2.text"] -end - -function GrowthFundUI:initRewards() - self.scrollRect = self.uiMap["growth_fund_ui.scrollrect"] - self.scrollRectComp = self.scrollRect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return "app/ui/fund/cell/growth_fund_cell" - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.gradeInfoList[index]) - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:setTotalCount(0) - - self.progressBg = self.uiMap["growth_fund_ui.scrollrect.viewport.content.progress_bg"] - self.progressComp = self.uiMap["growth_fund_ui.scrollrect.viewport.content.progress_bg.progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.grayImg = self.uiMap["growth_fund_ui.scrollrect.viewport.content.gray_img"] - self.horizontalLine = self.uiMap["growth_fund_ui.scrollrect.viewport.content.line_img"] - self.verticalLine1 = self.uiMap["growth_fund_ui.scrollrect.viewport.content.vertical_line_1"] - self.verticalLine2 = self.uiMap["growth_fund_ui.scrollrect.viewport.content.vertical_line_2"] -end - -function GrowthFundUI:bindData() - self:bind(DataManager.GrowthFundData, "dirty", function() - if self.fundGrade ~= DataManager.GrowthFundData:getFundGrade() then - self.fundGrade = DataManager.GrowthFundData:getFundGrade() - self:initGradeInfoList() - end - self:onRefresh() - end) -end - -function GrowthFundUI:onRefresh() - self:refreshTitle() - self:refreshPayBtns() - self:refreshRewards() -end - -function GrowthFundUI:refreshTitle() - local fundGrade = DataManager.GrowthFundData:getFundGrade() - if fundGrade == 1 then - self.uiMap["growth_fund_ui.title_img"]:setTexture("assets/arts/textures/background/fund/fund_bg_1.png") - self.titleDialogBg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_9") - self:showHeroSpine(1) - elseif fundGrade == 2 then - self.uiMap["growth_fund_ui.title_img"]:setTexture("assets/arts/textures/background/fund/fund_bg_2.png") - self.titleDialogBg:setSprite(GConst.ATLAS_PATH.FUND, "fund_bg_1") - self:showHeroSpine(2) - end - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.LEVEL_FUND_DESC_1, fundGrade)) - local height = self.titleTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight + 58 - if height < self.originTitleBgHeight then - height = self.originTitleBgHeight - end - self.titleDialogBg:setSizeDeltaY(height) -end - -function GrowthFundUI:refreshPayBtns() - if not DataManager.GrowthFundData:getIsBoughtBase() then - local rechargeId = DataManager.GrowthFundData:getCurrGradeBaseRechargeId() - self.payBtnTx1:setText(GFunc.getFormatPrice(rechargeId)) - self.payBtn1:setTouchEnable(true) - else - self.payBtnTx1:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - self.payBtn1:setTouchEnable(false) - end - if not DataManager.GrowthFundData:getIsBoughtAdvance() then - local rechargeId = DataManager.GrowthFundData:getCurrGradeAdvanceRechargeId() - self.payBtnTx2:setText(GFunc.getFormatPrice(rechargeId)) - self.payBtn2:setTouchEnable(true) - else - self.payBtnTx2:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - self.payBtn2:setTouchEnable(false) - end -end - -function GrowthFundUI:refreshRewards() - local count = #self.gradeInfoList - if self.scrollRectComp:getTotalCount() <= 0 then - self.scrollRectComp:refillCells(count) - local minIndex = DataManager.GrowthFundData:getMinUnclaimedRewardIndex() - if minIndex > 1 then - self.scrollRectComp:moveToIndex(minIndex) - end - elseif self.scrollRectComp:getTotalCount() ~= count then -- 打开界面的时候定位到当前可领取的最低等级奖励,如果没有则定位到当前等级 - self.scrollRectComp:clearCells() - self.scrollRectComp:refillCells(count) - else - self.scrollRectComp:updateAllCell() - end - - local topRecoveryOffset = self.scrollRectComp:getTopRecoveryOffset() - local contentWidth = self.scrollRect:getRectWidth() - local cellWidth = self.scrollRectComp:getCellHeight() - self.progressBg:setAnchoredPosition(contentWidth/3, -topRecoveryOffset - cellWidth/2) - self.progressBg:setSizeDeltaX(cellWidth*(count - 1)) - local percent = (self.inactiveIndex - 2) / (count - 1) - if percent < 0 then - percent = 0 - end - self.progressComp.value = percent - - self.grayImg:setAnchoredPositionY(-topRecoveryOffset - (self.inactiveIndex - 1)*cellWidth) - self.grayImg:setSizeDeltaY(cellWidth*count + GConst.UI_SCREEN_HEIGHT) - - local lineHeight = topRecoveryOffset + cellWidth*count + GConst.UI_SCREEN_HEIGHT*2 - self.verticalLine1:setAnchoredPositionX(contentWidth/3) - self.verticalLine1:setSizeDeltaY(lineHeight) - - self.verticalLine2:setAnchoredPositionX(contentWidth*2/3) - self.verticalLine2:setSizeDeltaY(lineHeight) - - self.horizontalLine:setAnchoredPositionY(-topRecoveryOffset - (self.inactiveIndex - 1)*cellWidth) -end - -function GrowthFundUI:showHeroSpine(index) - if self.heroSpineIndex == index then - return - end - self.heroSpineIndex = index - local heroId = 0 - if index == 1 then - heroId = GFunc.getConstValue("level_fund_hero_1") - elseif index == 2 then - heroId = GFunc.getConstValue("level_fund_hero_2") - end - if heroId <= 0 then - return - end - local hero = DataManager.HeroData:getHeroById(heroId) - if not hero then - return - end - SpineManager:loadHeroAsync(hero:getModelId(), self.heroNode, function(spineObject) - if self:isClosed() then - spineObject:destroy() - return - end - if self.heroSpine then - self.heroSpine:destroy() - end - spineObject:playAnimation("idle", true) - self.heroSpine = spineObject - end) -end - -return GrowthFundUI \ No newline at end of file diff --git a/lua/app/ui/fund/tower_bounty_comp.lua b/lua/app/ui/fund/tower_bounty_comp.lua new file mode 100755 index 00000000..b432f184 --- /dev/null +++ b/lua/app/ui/fund/tower_bounty_comp.lua @@ -0,0 +1,177 @@ +local TowerBountyComp = class("TowerBountyComp", LuaComponent) + +local CELL = "app/ui/fund/cell/fund_tower_cell" + +local TAG_COMMON_TOTAL_SIZE = 640 +local TAG_SIZE = 178 + +function TowerBountyComp:onClose() + self.curStage = nil +end + +function TowerBountyComp:init() + local uiMap = self:getUIMap() + self.banner = uiMap["tower_bounty_comp.bg.banner"] + self.bg = uiMap["tower_bounty_comp.top.bg"] + self.txDesc = uiMap["tower_bounty_comp.top.bg.desc_1"] + self.txDesc2 = uiMap["tower_bounty_comp.top.bg.desc_2"] + self.btnHelp = uiMap["tower_bounty_comp.top.tx_title.btn_help"] + self.scrollrect = uiMap["tower_bounty_comp.scrollrect"] + self.txLevel = uiMap["tower_bounty_comp.scrollrect.title.tx_level"] + self.txCommon = uiMap["tower_bounty_comp.scrollrect.title.tx_common"] + self.txPro = uiMap["tower_bounty_comp.scrollrect.title.tx_pro"] + self.btnGet = uiMap["tower_bounty_comp.btns.btn_get"] + self.txGet = uiMap["tower_bounty_comp.btns.btn_get.tx_desc"] + self.btnBuy = uiMap["tower_bounty_comp.btns.btn_buy"] + self.txCost = uiMap["tower_bounty_comp.btns.btn_buy.tx_cost"] + self.tagsNode = uiMap["tower_bounty_comp.tags"] + self.tagsViewport = uiMap["tower_bounty_comp.tags.viewport"] + self.tagsContent = uiMap["tower_bounty_comp.tags.viewport.content"] + self.tags = {} + self.tagImgs = {} + self.tagDescs = {} + for i = 1, 10 do + table.insert(self.tags, uiMap["tower_bounty_comp.tags.viewport.content.tag_" .. i]) + table.insert(self.tagImgs, uiMap["tower_bounty_comp.tags.viewport.content.tag_" .. i .. ".img"]) + table.insert(self.tagDescs, uiMap["tower_bounty_comp.tags.viewport.content.tag_" .. i .. ".img.tx_desc"]) + end + + self.btnBuy:addClickListener(function() + local giftId = DataManager.TowerFundData:getProGiftId(self.curStage) + ModuleManager.FundTowerManager:onBuyTowerBounty(giftId) + end) + self.btnGet:addClickListener(function() + ModuleManager.FundTowerManager:getReward(self.curStage) + end) + self.btnHelp:addClickListener(function() + ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.FUND_TOWER_DESC_2), self.btnHelp) + end) + self:bind(DataManager.TowerFundData, "isDirty", function() + if not DataManager.TowerFundData:getIsOpen() then + return + end + if not DataManager.TowerFundData:isStageUnlock(self.curStage) then + self.curStage = DataManager.TowerFundData:getCurStage() + end + if self.curStage == nil then + return + end + if not DataManager.TowerFundData:canGetRewards(self.curStage) then + local claimedStage = DataManager.TowerFundData:getMinUnclaimedStage() + if claimedStage ~= nil then + self.curStage = claimedStage + end + end + self:refresh(true) + end) +end + +function TowerBountyComp:refresh(isAuto) + if self.curStage == nil then + self.curStage = DataManager.TowerFundData:getMinUnclaimedStage() or DataManager.TowerFundData:getMaxUnclaimedStage() + isAuto = true + end + + self:updateData(self.curStage) + self:refreshStageTags() + if isAuto then + local stageList = DataManager.TowerFundData:getUnlockStageList() + local index + for k, v in pairs(stageList) do + if self.curStage == v then + index = k + end + end + if index then + self.tagsContent:setAnchoredPositionX(-self.tags[index]:getAnchoredPositionX()) + end + end + + if not DataManager.TowerFundData:getProBought(self.curStage) then + local giftId = DataManager.TowerFundData:getProGiftId(self.curStage) + local cfg = ConfigManager:getConfig("act_gift")[giftId] + self.txCost:setText(GFunc.getFormatPrice(cfg.recharge_id)) + self.btnBuy:setActive(true) + else + self.btnBuy:setActive(false) + end + self.btnGet:setActive(DataManager.TowerFundData:canGetRewards(self.curStage)) + self.maxIndex = #self.cfgList + self.minIndex = DataManager.TowerFundData:getMinUnclaimedRewardIndex(self.curStage) + if self.scrollRect == nil then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index, self.cfgList[index], index == self.maxIndex) + end) + end + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(self.maxIndex) + elseif self.scrollRect:getTotalCount() ~= self.maxIndex then + self.scrollRect:clearCells() + self.scrollRect:refillCells(self.maxIndex) + else + self.scrollRect:updateAllCell() + end + self.scrollRect:moveToIndex(self.minIndex) + + if self.curStage then + BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.TOWER_BOUNTY .. self.curStage) + end +end + +function TowerBountyComp:updateData(stage) + stage = stage or DataManager.TowerFundData:getCurStage() + if DataManager.TowerFundData:getIsOpen(stage) then + self.cfgList = DataManager.TowerFundData:getListByStage(stage) + else + self.cfgList = {} + end +end + +function TowerBountyComp:onClickStageTag(stage) + self.curStage = stage + self:refresh() +end + +function TowerBountyComp:refreshStageTags() + local stageList = DataManager.TowerFundData:getUnlockStageList() + if #stageList <= 1 then + self.tagsNode:setActive(false) + return + end + self.tagsNode:setActive(true) + local totalWidth = #stageList * TAG_SIZE + (#stageList - 1) * 5 + self.tagsContent:setSizeDeltaX(totalWidth) + self.tagsViewport:setSizeDeltaX(totalWidth < TAG_COMMON_TOTAL_SIZE and totalWidth or TAG_COMMON_TOTAL_SIZE) + + for i, tag in ipairs(self.tags) do + local stage = stageList[i] + if stage then + tag:setActive(true) + local isSelect = self.curStage == stage + self.tagImgs[i]:setSprite(GConst.ATLAS_PATH.COMMON, isSelect and "common_menu_4" or "common_menu_5") + self.tagImgs[i]:setAnchoredPositionY(isSelect and 5 or 0) + self.tagDescs[i]:setText(I18N:getGlobalText(I18N.GlobalConst["FUND_TOWER_TAG_DESC_" .. stage])) + + if DataManager.TowerFundData:canGetRewards(stage) then + tag:addRedPoint(80, 33, 0.9) + else + tag:removeRedPoint() + end + + tag:addClickListener(function() + if isSelect then + return + end + self:onClickStageTag(stage) + end) + else + tag:setActive(false) + end + end +end + +return TowerBountyComp \ No newline at end of file diff --git a/lua/app/ui/fund/tower_bounty_comp.lua.meta b/lua/app/ui/fund/tower_bounty_comp.lua.meta new file mode 100644 index 00000000..44fac088 --- /dev/null +++ b/lua/app/ui/fund/tower_bounty_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8bb6da30880fd4533b9c77e0f459b782 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 1e99960a..e209f904 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -847,7 +847,6 @@ function MainCityUI:switchComp(index) comp:getBaseObject():setActive(i == index) if i == index then if index == GConst.MainCityConst.BOTTOM_PAGE.SHOP then - comp:clearPostFlag() comp:refresh() elseif index == GConst.MainCityConst.BOTTOM_PAGE.HERO then comp:refresh(GConst.BattleConst.BATTLE_TYPE.STAGE) @@ -1031,7 +1030,7 @@ function MainCityUI:refreshBottomRp() heroRpObj:removeRedPoint() end local shopRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_3.rp_node"] - if DataManager.ShopData:getRp() then + if DataManager.ShopData:showRedPoint() then shopRpObj:addRedPoint(0, 0, 1) else shopRpObj:removeRedPoint() diff --git a/lua/app/ui/shop/box_hero_ui.lua b/lua/app/ui/shop/box_hero_ui.lua deleted file mode 100644 index a6f9a8ed..00000000 --- a/lua/app/ui/shop/box_hero_ui.lua +++ /dev/null @@ -1,173 +0,0 @@ -local BoxHeroUI = class("BoxHeroUI", BaseUI) - -local TITLE_TEXT = { - [GConst.SummonConst.SUMMON_TYPE.LV_1] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1), -- 普通宝箱 - [GConst.SummonConst.SUMMON_TYPE.LV_2] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2), -- 精致宝箱 - [GConst.SummonConst.SUMMON_TYPE.LV_3] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3), -- 珍贵宝箱 -} -local ICON_NAME = { - [GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1", - [GConst.SummonConst.SUMMON_TYPE.LV_2] = "shop_chest_2", - [GConst.SummonConst.SUMMON_TYPE.LV_3] = "shop_chest_3" -} -local MAX_ITEM_NUM = 4 - -function BoxHeroUI:ctor(params) - params = params or {} - - self.summonType = params.type - self.arenaBoxInfo = params.arena -end - -function BoxHeroUI:isFullScreen() - return false -end - -function BoxHeroUI:onPressBackspace() - self:closeUI() -end - -function BoxHeroUI:getPrefabPath() - return "assets/prefabs/ui/shop/box_hero_ui.prefab" -end - -function BoxHeroUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.uiMap["box_hero_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self.titleTx = self.uiMap["box_hero_ui.bg.title"] - self.boxImg = self.uiMap["box_hero_ui.bg.box"] - - -- 购买按钮 - self.buyBtn = self.uiMap["box_hero_ui.bg.buy_btn"] - self.buyBtnTx = self.uiMap["box_hero_ui.bg.buy_btn.text"] - self.buyBtnIcon = self.uiMap["box_hero_ui.bg.buy_btn.icon"] - -- 视频按钮 - self.adBtn = self.uiMap["box_hero_ui.bg.ad_btn"] - self.adBtnTx = self.uiMap["box_hero_ui.bg.ad_btn.tx_ad"] - self.adBtnIcon = self.uiMap["box_hero_ui.bg.ad_btn.img_ad"] - -- tag提示 - self.tag = self.uiMap["box_hero_ui.bg.item_node.item_4.tag"] - self.txTag = self.uiMap["box_hero_ui.bg.item_node.item_4.tag.tx_tag"] - - self.itemNodeLayout = self.uiMap["box_hero_ui.bg.item_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.itemNodeList = {} - self.itemCellList = {} - self.itemTextList = {} - self.itemHelpList = {} - for i = 1, MAX_ITEM_NUM do - table.insert(self.itemNodeList, self.uiMap["box_hero_ui.bg.item_" .. i]) - table.insert(self.itemCellList, CellManager:addCellComp(self.uiMap["box_hero_ui.bg.item_".. i .. ".item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL)) - table.insert(self.itemTextList, self.uiMap["box_hero_ui.bg.item_".. i .. ".num"]) - table.insert(self.itemHelpList, self.uiMap["box_hero_ui.bg.item_" .. i .. ".help"]) - end - - self.adBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_36)) - GFunc.centerImgAndTx(self.adBtnIcon, self.adBtnTx, 5) - - -- 奖励界面打开时 关闭此界面 - self:addEventListener(EventManager.CUSTOM_EVENT.CLOSE_BOX_HERO_UI, function() - if self.arenaBoxInfo then - self:closeUI() - else - self:onRefresh() - end - end) -end - -function BoxHeroUI:onRefresh() - self.buyBtn:setActive(false) - self.adBtn:setActive(false) - self.tag:setActive(false) - - if self.summonType then - self:refreshCummonBox() - elseif self.arenaBoxInfo then - self:refreshArenaAdBox() - end -end - --- 刷新商城宝箱 -function BoxHeroUI:refreshCummonBox() - self.buyBtn:setActive(true) - self.buyBtn:addClickListener(function() - self:onClickSummon() - end) - - self.titleTx:setText(TITLE_TEXT[self.summonType]) - self.boxImg:setSprite(GConst.ATLAS_PATH.SHOP, ICON_NAME[self.summonType]) - - self:showRewards(DataManager.SummonData:getSummonTotalRewardByLv(self.summonType))-- 本次实际奖励 - - local costItem, cost = DataManager.SummonData:getSummonCost(self.summonType) - if GFunc.checkCost(costItem.id, costItem.num, false) then - self.buyBtnIcon:setSprite(GFunc.getIconRes(costItem.id)) - self.buyBtnTx:setText(costItem.num) - else - self.buyBtnIcon:setSprite(GFunc.getIconRes(cost.id)) - self.buyBtnTx:setText(cost.num) - end - GFunc.centerImgAndTx(self.buyBtnIcon, self.buyBtnTx, 5) -end - --- 刷新竞技场ad宝箱 -function BoxHeroUI:refreshArenaAdBox() - self.adBtn:setActive(true) - self.adBtn:addClickListener(function() - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.ARENA_AD_BOX, function () - ModuleManager.ArenaManager:reqAdBoxReward(self.arenaBoxInfo.isWin) - end) - end) - - self.tag:setActive(true) - self.txTag:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_35)) - - if self.arenaBoxInfo.isWin then - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_33)) - self.boxImg:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_5") - else - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_34)) - self.boxImg:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_4") - end - self:showRewards(DataManager.ArenaData:getAdBoxRewards(self.arenaBoxInfo.isWin)) -end - -function BoxHeroUI:showRewards(rewards) - for i = 1, MAX_ITEM_NUM do - if i <= #rewards then - self.itemNodeList[i]:setVisible(true) - self.itemCellList[i]:refreshByCfg(rewards[i].id, 0) - self.itemCellList[i]:setNum("") - self.itemTextList[i]:setText(rewards[i].num) - self.itemCellList[i]:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(rewards[i].id, GConst.REWARD_TYPE.ITEM, self.itemCellList[i]:getBaseObject()) - end) - - 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) - end) - else - self.itemHelpList[i]:setVisible(false) - end - else - self.itemNodeList[i]:setVisible(false) - end - end - self.itemNodeLayout:RefreshLayout() -end - -function BoxHeroUI:onClickSummon() - local costItem, cost = DataManager.SummonData:getSummonCost(self.summonType) - if GFunc.checkCost(costItem.id, costItem.num, false) then - ModuleManager.SummonManager:summon(self.summonType, 1) - elseif GFunc.checkCost(cost.id, cost.num, true) then - ModuleManager.SummonManager:summon(self.summonType, 2) - end -end - -return BoxHeroUI \ No newline at end of file diff --git a/lua/app/ui/shop/box_level_ui.lua b/lua/app/ui/shop/box_level_ui.lua deleted file mode 100644 index 8f063d95..00000000 --- a/lua/app/ui/shop/box_level_ui.lua +++ /dev/null @@ -1,218 +0,0 @@ -local BoxLevelUI = class("BoxLevelUI", BaseUI) - -local BOX_3_CELL_HEIGHT = 260 -local BG_WITHOUT_3_BOX_HEIGHT = 660 - -function BoxLevelUI:ctor(params) - params = params or {} - self.level = params.level or DataManager.SummonData:getSummonLevel() -end - -function BoxLevelUI:isFullScreen() - return false -end - -function BoxLevelUI:getPrefabPath() - return "assets/prefabs/ui/shop/box_level_ui.prefab" -end - -function BoxLevelUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.uiMap["box_level_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - 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.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"] - self.box1Add2Node = self.uiMap["box_level_ui.bg.box_1.add_node_2"] - self.box1Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_1.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box1Add2Text = self.uiMap["box_level_ui.bg.box_1.add_node_2.text"] - self.box1Desc = self.uiMap["box_level_ui.bg.box_1.none_text"] - self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.box2Node = self.uiMap["box_level_ui.bg.box_2"] - 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"] - self.box2Add2Node = self.uiMap["box_level_ui.bg.box_2.add_node_2"] - self.box2Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_2.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box2Add2Text = self.uiMap["box_level_ui.bg.box_2.add_node_2.text"] - self.box2Desc = self.uiMap["box_level_ui.bg.box_2.none_text"] - self.box2Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.box3Node = self.uiMap["box_level_ui.bg.box_3"] - self.box3Add1Node = self.uiMap["box_level_ui.bg.box_3.add_node_1"] - self.box3Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_3.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box3Add1Text = self.uiMap["box_level_ui.bg.box_3.add_node_1.text"] - self.box3Add2Node = self.uiMap["box_level_ui.bg.box_3.add_node_2"] - self.box3Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_3.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box3Add2Text = self.uiMap["box_level_ui.bg.box_3.add_node_2.text"] - self.box3Desc = self.uiMap["box_level_ui.bg.box_3.none_text"] - self.box3Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.bottomDesc = self.uiMap["box_level_ui.bg.title"] - self.bottomDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_5)) -- 开宝箱提升等级,增加宝箱奖励 - - self.leftArrow:addClickListener(function() - self.level = self.level - 1 - if self.level <= 1 then - self.level = 1 - end - self:refresh() - end) - self.rightArrow:addClickListener(function() - self.level = self.level + 1 - if self.level >= DataManager.SummonData:getSummonMaxLv() then - self.level = DataManager.SummonData:getSummonMaxLv() - end - self:refresh() - end) - - self:refresh() -end - -function BoxLevelUI:refresh() - self.lvTx:setText("Lv." .. tostring(self.level)) - - local maxLevel = DataManager.SummonData:getSummonMaxLv() - if self.level == 1 then - self.leftArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_3") - self.rightArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_2") - elseif self.level == maxLevel then - self.leftArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_2") - self.rightArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_3") - else - self.leftArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_2") - self.rightArrow:setSprite(GConst.ATLAS_PATH.COMMON, "common_arrow_2") - end - - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_3_OPEN, true) then - self.box3Node:setVisible(false) - self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT) - else - self.box3Node:setVisible(true) - self.bg:setSizeDeltaY(BG_WITHOUT_3_BOX_HEIGHT + BOX_3_CELL_HEIGHT) - end - - if self.level == 1 then - self.box1Add1Node:setVisible(false) - self.box1Add2Node:setVisible(false) - self.box1Desc:setVisible(true) - - self.box2Add1Node:setVisible(false) - self.box2Add2Node:setVisible(false) - self.box2Desc:setVisible(true) - - self.box3Add1Node:setVisible(false) - self.box3Add2Node:setVisible(false) - self.box3Desc:setVisible(true) - else - self.box1Add1Node:setVisible(false) - self.box1Add2Node:setVisible(false) - self.box1Desc:setVisible(false) - - self.box2Add1Node:setVisible(false) - self.box2Add2Node:setVisible(false) - self.box2Desc:setVisible(false) - - self.box3Add1Node:setVisible(false) - self.box3Add2Node:setVisible(false) - self.box3Desc:setVisible(false) - - local reward1 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_1, self.level) - local reward2 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_2, self.level) - local reward3 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_3, self.level) - - local count = #reward1 - if count == 1 then - self.box1Add1Node:setVisible(true) - self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) - self.box1Add1ItemCell:setNum("") - self.box1Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[1].id, GConst.REWARD_TYPE.ITEM, self.box1Add1ItemCell:getBaseObject()) - end) - self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) - else - self.box1Add1Node:setVisible(true) - self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) - self.box1Add1ItemCell:setNum("") - self.box1Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[1].id, GConst.REWARD_TYPE.ITEM, self.box1Add1ItemCell:getBaseObject()) - end) - self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) - - self.box1Add2Node:setVisible(true) - self.box1Add2ItemCell:refreshByCfg(reward1[2].id, 0) - self.box1Add2ItemCell:setNum("") - self.box1Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[2].id, GConst.REWARD_TYPE.ITEM, self.box1Add2ItemCell:getBaseObject()) - end) - self.box1Add2Text:setText("+" .. tostring(reward1[2].num)) - end - - local count = #reward2 - if count == 1 then - self.box2Add1Node:setVisible(true) - self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) - self.box2Add1ItemCell:setNum("") - self.box2Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[1].id, GConst.REWARD_TYPE.ITEM, self.box2Add1ItemCell:getBaseObject()) - end) - self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) - else - self.box2Add1Node:setVisible(true) - self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) - self.box2Add1ItemCell:setNum("") - self.box2Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[1].id, GConst.REWARD_TYPE.ITEM, self.box2Add1ItemCell:getBaseObject()) - end) - self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) - - self.box2Add2Node:setVisible(true) - self.box2Add2ItemCell:refreshByCfg(reward2[2].id, 0) - self.box2Add2ItemCell:setNum("") - self.box2Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[2].id, GConst.REWARD_TYPE.ITEM, self.box2Add2ItemCell:getBaseObject()) - end) - self.box2Add2Text:setText("+" .. tostring(reward2[2].num)) - end - - local count = #reward3 - if count == 1 then - self.box3Add1Node:setVisible(true) - self.box3Add1ItemCell:refreshByCfg(reward3[1].id, 0) - self.box3Add1ItemCell:setNum("") - self.box3Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[1].id, GConst.REWARD_TYPE.ITEM, self.box3Add1ItemCell:getBaseObject()) - end) - self.box3Add1Text:setText("+" .. tostring(reward3[1].num)) - else - self.box3Add1Node:setVisible(true) - self.box3Add1ItemCell:refreshByCfg(reward3[1].id, 0) - self.box3Add1ItemCell:setNum("") - self.box3Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[1].id, GConst.REWARD_TYPE.ITEM, self.box3Add1ItemCell:getBaseObject()) - end) - self.box3Add1Text:setText("+" .. tostring(reward3[1].num)) - - self.box3Add2Node:setVisible(true) - self.box3Add2ItemCell:refreshByCfg(reward3[2].id, 0) - self.box3Add2ItemCell:setNum("") - self.box3Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[2].id, GConst.REWARD_TYPE.ITEM, self.box3Add2ItemCell:getBaseObject()) - end) - self.box3Add2Text:setText("+" .. tostring(reward3[2].num)) - end - end -end - -return BoxLevelUI \ No newline at end of file diff --git a/lua/app/ui/shop/box_level_ui.lua.meta b/lua/app/ui/shop/box_level_ui.lua.meta deleted file mode 100644 index 8b46bf28..00000000 --- a/lua/app/ui/shop/box_level_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 63f0b0bc9452a954ebac303e7b7f5afb -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/box_level_up_ui.lua b/lua/app/ui/shop/box_level_up_ui.lua deleted file mode 100644 index 5e1fd8c8..00000000 --- a/lua/app/ui/shop/box_level_up_ui.lua +++ /dev/null @@ -1,163 +0,0 @@ -local BoxLevelUpUI = class("BoxLevelUpUI", BaseUI) - -function BoxLevelUpUI:ctor(params) - params = params or {} - self.level = params.level or DataManager.SummonData:getSummonLevel() -end - -function BoxLevelUpUI:isFullScreen() - return true -end - -function BoxLevelUpUI:getPrefabPath() - return "assets/prefabs/ui/shop/box_level_up_ui.prefab" -end - -function BoxLevelUpUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.uiMap["box_level_up_ui.mask"]:addClickListener(function() - self:closeUI() - end) - - self.titleTx = self.uiMap["box_level_up_ui.title.text"] - self.lvTx = self.uiMap["box_level_up_ui.lv_up.text"] - - self.box1Node = self.uiMap["box_level_up_ui.box_1"] - 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"] - self.box1Add2Node = self.uiMap["box_level_up_ui.box_1.add_node_2"] - self.box1Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_1.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box1Add2Text = self.uiMap["box_level_up_ui.box_1.add_node_2.text"] - self.box1Desc = self.uiMap["box_level_up_ui.box_1.none_text"] - self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.box2Node = self.uiMap["box_level_up_ui.box_2"] - 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"] - self.box2Add2Node = self.uiMap["box_level_up_ui.box_2.add_node_2"] - self.box2Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_2.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box2Add2Text = self.uiMap["box_level_up_ui.box_2.add_node_2.text"] - self.box2Desc = self.uiMap["box_level_up_ui.box_2.none_text"] - self.box2Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.box3Node = self.uiMap["box_level_up_ui.box_3"] - self.box3Add1Node = self.uiMap["box_level_up_ui.box_3.add_node_1"] - self.box3Add1ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_3.add_node_1.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box3Add1Text = self.uiMap["box_level_up_ui.box_3.add_node_1.text"] - self.box3Add2Node = self.uiMap["box_level_up_ui.box_3.add_node_2"] - self.box3Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_3.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - self.box3Add2Text = self.uiMap["box_level_up_ui.box_3.add_node_2.text"] - self.box3Desc = self.uiMap["box_level_up_ui.box_3.none_text"] - self.box3Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 - - self.closeTx = self.uiMap["box_level_up_ui.close_tx"] - - self:refresh() -end - -function BoxLevelUpUI:refresh() - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_6)) -- 宝箱等级提升! - self.lvTx:setText("Lv." .. tostring(self.level)) - self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) -- 点击继续 - - self.box1Add1Node:setVisible(false) - self.box1Add2Node:setVisible(false) - self.box1Desc:setVisible(false) - - self.box2Add1Node:setVisible(false) - self.box2Add2Node:setVisible(false) - self.box2Desc:setVisible(false) - - self.box3Add1Node:setVisible(false) - self.box3Add2Node:setVisible(false) - self.box3Desc:setVisible(false) - - local reward1 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_1, self.level) - local reward2 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_2, self.level) - local reward3 = DataManager.SummonData:getSummonRewardByLv(GConst.SummonConst.SUMMON_TYPE.LV_3, self.level) - - local count = #reward1 - if count == 1 then - self.box1Add1Node:setVisible(true) - self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) - self.box1Add1ItemCell:setNum("") - self.box1Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[1].id, GConst.REWARD_TYPE.ITEM, self.box1Add1ItemCell:getBaseObject()) - end) - self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) - else - self.box1Add1Node:setVisible(true) - self.box1Add1ItemCell:refreshByCfg(reward1[1].id, 0) - self.box1Add1ItemCell:setNum("") - self.box1Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[1].id, GConst.REWARD_TYPE.ITEM, self.box1Add1ItemCell:getBaseObject()) - end) - self.box1Add1Text:setText("+" .. tostring(reward1[1].num)) - - self.box1Add2Node:setVisible(true) - self.box1Add2ItemCell:refreshByCfg(reward1[2].id, 0) - self.box1Add2ItemCell:setNum("") - self.box1Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward1[2].id, GConst.REWARD_TYPE.ITEM, self.box1Add2ItemCell:getBaseObject()) - end) - self.box1Add2Text:setText("+" .. tostring(reward1[2].num)) - end - - local count = #reward2 - if count == 1 then - self.box2Add1Node:setVisible(true) - self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) - self.box2Add1ItemCell:setNum("") - self.box2Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[1].id, GConst.REWARD_TYPE.ITEM, self.box2Add1ItemCell:getBaseObject()) - end) - self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) - else - self.box2Add1Node:setVisible(true) - self.box2Add1ItemCell:refreshByCfg(reward2[1].id, 0) - self.box2Add1ItemCell:setNum("") - self.box2Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[1].id, GConst.REWARD_TYPE.ITEM, self.box2Add1ItemCell:getBaseObject()) - end) - self.box2Add1Text:setText("+" .. tostring(reward2[1].num)) - - self.box2Add2Node:setVisible(true) - self.box2Add2ItemCell:refreshByCfg(reward2[2].id, 0) - self.box2Add2ItemCell:setNum("") - self.box2Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward2[2].id, GConst.REWARD_TYPE.ITEM, self.box2Add2ItemCell:getBaseObject()) - end) - self.box2Add2Text:setText("+" .. tostring(reward2[2].num)) - end - - local count = #reward3 - if count == 1 then - self.box3Add1Node:setVisible(true) - self.box3Add1ItemCell:refreshByCfg(reward3[1].id, 0) - self.box3Add1ItemCell:setNum("") - self.box3Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[1].id, GConst.REWARD_TYPE.ITEM, self.box3Add1ItemCell:getBaseObject()) - end) - self.box3Add1Text:setText("+" .. tostring(reward3[1].num)) - else - self.box3Add1Node:setVisible(true) - self.box3Add1ItemCell:refreshByCfg(reward3[1].id, 0) - self.box3Add1ItemCell:setNum("") - self.box3Add1ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[1].id, GConst.REWARD_TYPE.ITEM, self.box3Add1ItemCell:getBaseObject()) - end) - self.box3Add1Text:setText("+" .. tostring(reward3[1].num)) - - self.box3Add2Node:setVisible(true) - self.box3Add2ItemCell:refreshByCfg(reward3[2].id, 0) - self.box3Add2ItemCell:setNum("") - self.box3Add2ItemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward3[2].id, GConst.REWARD_TYPE.ITEM, self.box3Add2ItemCell:getBaseObject()) - end) - self.box3Add2Text:setText("+" .. tostring(reward3[2].num)) - end -end - -return BoxLevelUpUI \ No newline at end of file diff --git a/lua/app/ui/shop/box_level_up_ui.lua.meta b/lua/app/ui/shop/box_level_up_ui.lua.meta deleted file mode 100644 index 2d5eb8ae..00000000 --- a/lua/app/ui/shop/box_level_up_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a0c868370ad4a41428279122b3d5dc49 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/box_open_ui.lua b/lua/app/ui/shop/box_open_ui.lua deleted file mode 100644 index 4f1718ab..00000000 --- a/lua/app/ui/shop/box_open_ui.lua +++ /dev/null @@ -1,81 +0,0 @@ -local BoxOpenUI = class("BoxOpenUI", BaseUI) -local AUDIO_DELAY_TIME = 0.4 -local SPINE_OPEN_TIME = 1.4 -local DEFAULT_SPINE_NAME = "ui_shop_box_1" -- 默认的展示动画 - -local SUMMON_SPINE_NAME = { - [1] = "ui_shop_box_1", - [2] = "ui_shop_box_2", - [3] = "ui_shop_box_3", -} -local BOUNTY_SPINE_NAME = { - [8] = "ui_bounty_chestopen_1", - [9] = "ui_bounty_chestopen_2", - [11] = "ui_bounty_chestopen_3", - [18] = "ui_bounty_chestopen_4", - [10] = "ui_bounty_chestopen_5", -} -local ARENA_BOUNTY_SPINE_NAME = { - [8] = "ui_bounty_chestopen_1", - [9] = "ui_bounty_chestopen_2", - [11] = "ui_bounty_chestopen_3", - [18] = "ui_bounty_chestopen_4", - [10] = "ui_bounty_chestopen_5", -} - -local ARENA_AD_BOX_SPINE_NAME = { - [1] = "ui_arena_adchest_1", - [2] = "ui_arena_adchest_2", -} - -function BoxOpenUI:ctor(params) - self.params = params or {} -- 将信息传递给下一个界面 - self.type = self.params and self.params.type - self.index = self.params.params -end - -function BoxOpenUI:isFullScreen() - return true -end - -function BoxOpenUI:getPrefabPath() - return "assets/prefabs/ui/shop/box_open_ui.prefab" -end - -function BoxOpenUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.bg = self.uiMap["box_open_ui.bg"] - -- 奖励界面打开时 关闭此界面 - self:addEventListener(EventManager.CUSTOM_EVENT.CLOSE_BOX_OPEN_UI, function() - self:closeUI() - end) - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CLOSE_BOX_HERO_UI) - -- 播放spine表现 播放完毕后打开奖励UI - self.spineObj = self.uiMap["box_open_ui.ui_spine_obj"] - local spineName - if self.type == GConst.ShopConst.BOX_REWARD_TYPE.SUMMON then - spineName = SUMMON_SPINE_NAME[self.index] - elseif self.type == GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY then - spineName = BOUNTY_SPINE_NAME[self.index] - elseif self.type == GConst.ShopConst.BOX_REWARD_TYPE.ARENA_BOUNTY then - spineName = ARENA_BOUNTY_SPINE_NAME[self.index] - elseif self.type == GConst.ShopConst.BOX_REWARD_TYPE.ARENA_AD_BOX then - spineName = ARENA_AD_BOX_SPINE_NAME[self.index] - end - if not spineName then - spineName = DEFAULT_SPINE_NAME - end - self.spineObj:loadAssetAsync(spineName, function() - self.spineObj:playAnim("born", false, true, true) - self.spineObj:getSkeletonGraphic().enabled = true - self:performWithDelayGlobal(function() - ModuleManager.ShopManager:showBoxRewardUI(self.params) - end, SPINE_OPEN_TIME) - end, false) - -- 音频 - self:performWithDelayGlobal(function() - AudioManager:playEffect(AudioManager.EFFECT_ID.SUMMON_START) - end, AUDIO_DELAY_TIME) -end - -return BoxOpenUI \ No newline at end of file diff --git a/lua/app/ui/shop/box_open_ui.lua.meta b/lua/app/ui/shop/box_open_ui.lua.meta deleted file mode 100644 index 41be02bf..00000000 --- a/lua/app/ui/shop/box_open_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ec611b1975a74654aa3cda5ebf0ea461 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/box_reward_ui.lua b/lua/app/ui/shop/box_reward_ui.lua deleted file mode 100644 index 8659a11d..00000000 --- a/lua/app/ui/shop/box_reward_ui.lua +++ /dev/null @@ -1,326 +0,0 @@ -local BoxRewardUI = class("BoxRewardUI", BaseUI) -local BOX_HERO_CELL = "app/ui/shop/cell/box_hero_cell" - -local CELL_NUM = 4 -local QLT_DELAY_TIME = { - [1] = 0.3, -- 预留 - [2] = 0.3, -- 绿 - [3] = 0.3, -- 蓝 - [4] = 0.5, -- 紫 - [5] = 0.5, -- 预留 -} -local FIRST_DELAY_TIME = 0 -local FADE_TIME = 0.5 -local MAX_SCREEN_CELL_COUNT = 8 -- 触发滑动的限制值 -local SCROLL_MOVE_TIME = 0.5 - -local REWARD_CELL_WIDTH = 160 -local REWARD_CELL_HEIGHT = 250 - -local BASE_CONTENT_HEIGHT = 600 -local JUMP_TIME_SCALE = 1000 - -local POSITION_X_DATA = { - [1] = {0}, - [2] = {-120, 120}, - [3] = {-200, 0, 200}, - [4] = {-240, -80, 80, 240} -} - -function BoxRewardUI:ctor(params) - self.params = params or {} - self.rewards = params.rewards or {} - self.actionStatus = {} -- 表现状态 - self.cellDelayTime = {} -- {idx,time} - self.isPlayAni = true - -- 前端用展示奖励 - self.fragmentRewards = {} - self.coinNum = 0 - local fragmentMap = {} - -- 将服务器格式转为前端用的格式 - for _, reward in ipairs(self.rewards) do - if reward.type == GConst.REWARD_TYPE.ITEM and reward.item.id == GConst.ItemConst.ITEM_ID_GOLD then - self.coinNum = self.coinNum + reward.item.count - elseif reward.item.id ~= GConst.ItemConst.ITEM_ID_GEM then - local id = reward.item.id - local count = reward.item.count - fragmentMap[id] = (fragmentMap[id] or 0) + count - end - end - for id, count in pairs(fragmentMap) do - table.insert(self.fragmentRewards, {id = id, count = count}) - end -end - -function BoxRewardUI:isFullScreen() - return true -end - -function BoxRewardUI:getPrefabPath() - return "assets/prefabs/ui/shop/box_reward_ui.prefab" -end - -function BoxRewardUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - - self.titleTx = self.uiMap["box_reward_ui.title.text"] - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_8)) -- 恭喜获得 - - self.coinNode = self.uiMap["box_reward_ui.coin_node"] - self.coinIcon = self.uiMap["box_reward_ui.coin_node.coin"] - self.coinTx = self.uiMap["box_reward_ui.coin_node.text"] - if self.coinNum > 0 then - self.coinNode:setVisible(true) - self.coinTx:setText(self.coinNum) - GFunc.centerImgAndTx(self.coinIcon, self.coinTx, 5) - else - self.coinNode:setVisible(false) - end - - self.closeTx = self.uiMap["box_reward_ui.close_tx"] - self:refreshCloseText() - - self.mask = self.uiMap["box_reward_ui.mask"] - self.mask:addClickListener(function() - -- 动画期间不可关闭 - if self.isPlayAni then - self:jump() - return - end - self:closeUI() - -- 如果宝箱等级提升了 则要弹出宝箱等级提升UI - if DataManager.SummonData:checkNeedPopBoxLvUpUI() then - DataManager.SummonData:clearNeedPopBoxLvUpUI() - ModuleManager.ShopManager:showBoxLevelUpUI() - end - end) - - -- 关闭上一个界面 - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CLOSE_BOX_OPEN_UI) - - -- 因为特殊表现 用普通scrollRect处理 - self.scrollRectContent = self.uiMap["box_reward_ui.scroll_rect.viewport.content"] - self.scrollMask = self.uiMap["box_reward_ui.scroll_mask"] - self.scrollMask:setVisible(true) - self.baseCell = self.uiMap["box_reward_ui.scroll_rect.viewport.content.cell"] - self.baseCell:setVisible(false) - -- 已拥有的cell - self.rewardCells = self.rewardCells or {} - local contentTrans = self.scrollRectContent:getTransform() - local alreadyCellCount = contentTrans.childCount - 1 - local rewardCount = #self.fragmentRewards - if alreadyCellCount > 0 then - for i = 1, alreadyCellCount do - local prefab = contentTrans:GetChild(i).gameObject - local UIPrefabObject = require "app/bf/unity/uiprefab_object" - local prefabObject = UIPrefabObject:create() - prefabObject:initWithPrefab(GConst.EMPTY_STRING, prefab) - prefabObject:initPrefabHelper() - -- 设定位置 - local index = i - local rowIdx = (index - 1) % CELL_NUM + 1 -- 横排位置 1-4 - local cowIdx = (index - 1) // CELL_NUM + 1 - if rewardCount <= CELL_NUM then -- 居中展示 - prefabObject:setAnchoredPosition(POSITION_X_DATA[rewardCount][rowIdx], 0) - else - prefabObject:setAnchoredPosition(POSITION_X_DATA[4][rowIdx], -(cowIdx - 1) * REWARD_CELL_HEIGHT) - end - table.insert(self.rewardCells, CellManager:addCellComp(prefabObject, BOX_HERO_CELL)) - end - end - local cellCount = #self.rewardCells - local needCreateCount = rewardCount - cellCount - -- 将cell扩充至与奖励等数量 - if needCreateCount > 0 then - for i = 1, needCreateCount do - local prefab = CS.UnityEngine.Object.Instantiate(self.baseCell:getGameObject()) - local UIPrefabObject = require "app/bf/unity/uiprefab_object" - local prefabObject = UIPrefabObject:create() - prefabObject:initWithPrefab(GConst.EMPTY_STRING, prefab) - prefabObject:initPrefabHelper() - prefabObject:setParent(self.scrollRectContent, false) - prefabObject:getTransform():SetAsLastSibling() - prefabObject:setVisible(true) - -- 设定位置 - local index = cellCount + i - local rowIdx = (index - 1) % CELL_NUM + 1 -- 横排位置 1-4 - local cowIdx = (index - 1) // CELL_NUM + 1 - if rewardCount <= CELL_NUM then -- 居中展示 - prefabObject:setAnchoredPosition(POSITION_X_DATA[rewardCount][rowIdx], 0) - else - prefabObject:setAnchoredPosition(POSITION_X_DATA[4][rowIdx], -(cowIdx - 1) * REWARD_CELL_HEIGHT) - end - table.insert(self.rewardCells, CellManager:addCellComp(prefabObject, BOX_HERO_CELL)) - end - end - -- 刷新 - cellCount = #self.rewardCells - for i = 1, cellCount do - if i <= rewardCount then - self.rewardCells[i]:setVisible(true) - self.rewardCells[i]:refresh(self.fragmentRewards[i]) - self.rewardCells[i]:disableAllEffect() - else - self.rewardCells[i]:setVisible(false) - end - end - self.maxCow = (rewardCount - 1) // CELL_NUM + 1 -- 最大行数 1-4 = 1, 5-8 = 2,... - self.maxScrollContentHeight = math.max(BASE_CONTENT_HEIGHT, self.maxCow * REWARD_CELL_HEIGHT) - self.scrollRectContent:setAnchoredPositionY(0) - self.scrollRectContent:setSizeDeltaY(self.maxScrollContentHeight) - - -- 如果超出屏蔽显示范围 初始化滑动数据 - if rewardCount > MAX_SCREEN_CELL_COUNT then - self.showAction = true - self.turnIdx = MAX_SCREEN_CELL_COUNT // CELL_NUM - self.maxIdx = math.ceil(rewardCount / CELL_NUM) - end - -- 播放表现 - if not self.cellSeqs then - self.cellSeqs = {} - end - for idx = 1, rewardCount do - local cell = self.rewardCells[idx] - self:playCellAction(cell, idx) - end -end - -function BoxRewardUI:playCellAction(cell, idx) - if self.actionStatus[idx] then - return - end - - local delayTime = FIRST_DELAY_TIME - if idx > 1 then - delayTime = self:getCellDelayTime(idx - 1) - end - - local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) - if not canvasGroup then - canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) - end - canvasGroup.alpha = 0 - - local seq = cell.baseObject:createBindTweenSequence() - table.insert(self.cellSeqs, seq) - - -- local tween = canvasGroup:DOFade(1, FADE_TIME) - seq:AppendInterval(delayTime) - -- tween:SetEase(CS.DG.Tweening.Ease.InOutSine) - seq:AppendCallback(function() - cell:setSpineVisible(false) -- 防止spine因透明度变化导致的闪白 - end) - -- seq:Append(tween) - seq:AppendCallback(function() - if not self:isClosed() then - -- 恢复显示 - canvasGroup.alpha = 1 - -- 特效 - if self.isPlayAni then - cell:playEffect() - else - cell:disableAllEffect() - end - -- 如果需要spine 则显示 - local heroEntity = DataManager.HeroData:getHeroById(self.fragmentRewards[idx].id) - if heroEntity and heroEntity:canLvUp() then - cell:setSpineVisible(true) - end - - self.actionStatus[idx] = true - self:turnToNext(idx) - -- 最后一个表现完毕 - if idx == #self.fragmentRewards then - self.isPlayAni = false - self:refreshCloseText() - self.scrollMask:setVisible(false) - end - end - end) -end - -function BoxRewardUI:turnToNext(idx) - if self:isClosed() then - return - end - if not self.isPlayAni then - return - end - if not self.showAction or idx ~= self.turnIdx * CELL_NUM then - return - end - if self.contentSeq then - self.contentSeq:Kill() - self.contentSeq = nil - end - self.contentSeq = self.root:createBindTweenSequence() - self.contentSeq:Append( - self.scrollRectContent:getTransform():DOLocalMoveY(math.min(self.maxScrollContentHeight - BASE_CONTENT_HEIGHT, (self.turnIdx + 1) * REWARD_CELL_HEIGHT - BASE_CONTENT_HEIGHT), SCROLL_MOVE_TIME) - ) - self.contentSeq:AppendCallback( - function() - self.turnIdx = self.turnIdx + 1 - if self.turnIdx >= self.maxIdx then - self.showAction = false - end - end - ) -end - -function BoxRewardUI:getCellDelayTime(idx) - if not self.cellDelayTime[idx] then - local reward = self.fragmentRewards[idx] - local id = reward.id - local qlt = 2 -- 默认品质 - local heroCfgInfo = ConfigManager:getConfig("hero")[id] - if heroCfgInfo then - qlt = heroCfgInfo.qlt - end - local cellDelayTime = QLT_DELAY_TIME[qlt] -- 这个cell的延迟时间 - if idx == 1 then - self.cellDelayTime[idx] = cellDelayTime - else - self.cellDelayTime[idx] = cellDelayTime + self:getCellDelayTime(idx - 1) - end - end - return self.cellDelayTime[idx] -end - -function BoxRewardUI:jump() - self.isPlayAni = false - - if self.cellSeqs then - for _, cellSeq in ipairs(self.cellSeqs) do - cellSeq.timeScale = JUMP_TIME_SCALE - end - end - if self.contentSeq then - self.contentSeq.timeScale = JUMP_TIME_SCALE - end - - -- 强制刷新一次表现 - local rewardCount = #self.fragmentRewards - for idx = 1, rewardCount do - local cell = self.rewardCells[idx] - local canvasGroup = cell.baseObject:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) - if not canvasGroup then - canvasGroup = cell.baseObject:addComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP) - end - canvasGroup.alpha = 1 - cell:disableAllEffect() - end - self.scrollRectContent:setAnchoredPositionY(self.maxScrollContentHeight - BASE_CONTENT_HEIGHT) - self.turnIdx = self.maxIdx - self.showAction = false - self:refreshCloseText() -end - -function BoxRewardUI:refreshCloseText() - if self.isPlayAni then - self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_SKIP)) - else - self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC)) - end -end - -return BoxRewardUI \ No newline at end of file diff --git a/lua/app/ui/shop/box_reward_ui.lua.meta b/lua/app/ui/shop/box_reward_ui.lua.meta deleted file mode 100644 index 33991d7b..00000000 --- a/lua/app/ui/shop/box_reward_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 46d2b5d91a9f98348a9799f5084c8044 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/buy_gem_ui.lua b/lua/app/ui/shop/buy_gem_ui.lua new file mode 100755 index 00000000..ecc1d7aa --- /dev/null +++ b/lua/app/ui/shop/buy_gem_ui.lua @@ -0,0 +1,61 @@ +local BuyGemUI = class("BuyGemUI", BaseUI) + +local GEM_CELL = "app/ui/shop/cell/gem_cell" + +function BuyGemUI:isFullScreen() + return false +end + +function BuyGemUI:showCommonBG() + return false +end + +function BuyGemUI:ctor() +end + +function BuyGemUI:getPrefabPath() + return "assets/prefabs/ui/shop/buy_gem_ui.prefab" +end + +function BuyGemUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.mask = uiMap["buy_gem_ui.mask"] + self.txTitle = uiMap["buy_gem_ui.content.tx_title"] + self.btnClose = uiMap["buy_gem_ui.content.btn_close"] + self.scrollrect = uiMap["buy_gem_ui.content.content.scrollrect"] + + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_6)) + + self.mask:addClickListener(function() + self:closeUI() + end) + self.btnClose:addClickListener(function() + self:closeUI() + end) + self:bind(DataManager.ShopData, "isDirty", function() + self:onRefresh() + end) +end + +function BuyGemUI:onRefresh() + local count = #ConfigManager:getConfig("mall_treasure") + if not self.scrollRect then + self.scrollRect = self.scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return GEM_CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index) + end) + end + if self.scrollRect:getTotalCount() == nil or self.scrollRect:getTotalCount() <= 0 then + self.scrollRect:refillCells(count) + elseif self.scrollRect:getTotalCount() ~= count then + self.scrollRect:clearCells() + self.scrollRect:refillCells(count) + else + self.scrollRect:updateAllCell() + end +end + +return BuyGemUI \ No newline at end of file diff --git a/lua/app/ui/shop/buy_gem_ui.lua.meta b/lua/app/ui/shop/buy_gem_ui.lua.meta new file mode 100755 index 00000000..4222feed --- /dev/null +++ b/lua/app/ui/shop/buy_gem_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 64d78238a6442b541a798b2942341c59 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/buy_vit_ui.lua b/lua/app/ui/shop/buy_vit_ui.lua new file mode 100755 index 00000000..4b06c3ec --- /dev/null +++ b/lua/app/ui/shop/buy_vit_ui.lua @@ -0,0 +1,234 @@ +local BuyVitUI = class("BuyVitUI", BaseUI) + +function BuyVitUI:isFullScreen() + return false +end + +function BuyVitUI:showCommonBG() + return false +end + +function BuyVitUI:ctor(params) + self.dataKey = params.dataKey +end + +function BuyVitUI:getPrefabPath() + return "assets/prefabs/ui/shop/buy_vit_ui.prefab" +end + +function BuyVitUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.mask = uiMap["buy_vit_ui.mask"] + self.txTitle = uiMap["buy_vit_ui.content.tx_title"] + self.btnClose = uiMap["buy_vit_ui.content.btn_close"] + self.buyNodes = {} + self.txRewards = {} + self.txCosts = {} + self.imgCosts = {} + self.txLimits = {} + self.imgChecks = {} + for k, buyType in pairs(GConst.VIT_BUY_TYPE) do + self.buyNodes[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType] + self.txRewards[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType .. ".tx_num"] + self.txCosts[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType .. ".tx_cost"] + self.imgCosts[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType .. ".img_cost"] + self.txLimits[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType .. ".tx_limit"] + self.imgChecks[buyType] = uiMap["buy_vit_ui.content.content.cell_" .. buyType .. ".img_check"] + end + + self.txTitle:setText(self:getBuyTitle()) + if self.buyNodes[GConst.VIT_BUY_TYPE.AD] then + self.buyNodes[GConst.VIT_BUY_TYPE.AD]:addClickListener(function() + if not GFunc.IsGotServerTime() then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.NEED_NET)) + return + end + SDKManager:showFullScreenAds(self:getBuyAdType(), function() + self:getBuyFunc(GConst.VIT_BUY_TYPE.AD) + end) + end) + end + self.buyNodes[GConst.VIT_BUY_TYPE.GEM]:addClickListener(function() + local cost = self:getBuyCost(GConst.VIT_BUY_TYPE.GEM) + if not GFunc.checkCost(GFunc.getRewardId(cost), GFunc.getRewardNum(cost), true, self:getBuyBI()) then + return + end + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.BUY_VIT_COUNT + params.okFunc = function() + self:getBuyFunc(GConst.VIT_BUY_TYPE.GEM) + end + GFunc.showMessageBox(params) + end) + self.mask:addClickListener(function() + self:closeUI() + end) + self.btnClose:addClickListener(function() + self:closeUI() + end) + + self:bind(DataManager[self.dataKey], "isDirty", function() + self:onRefresh() + end) +end + +function BuyVitUI:onRefresh() + for buyType, node in pairs(self.buyNodes) do + local reward = self:getBuyReward(buyType) + local cost = self:getBuyCost(buyType) + local remain = self:getBuyRemainCount(buyType) + + node:setSprite(GConst.ATLAS_PATH.UI_SHOP, self:getBuyBg(buyType)) + self.txRewards[buyType]:setText("x" .. GFunc.getRewardNum(reward)) + if remain < 9999 then + self.txLimits[buyType]:setText(I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_2, remain)) + else + self.txLimits[buyType]:setText("") + end + + if buyType == GConst.VIT_BUY_TYPE.AD then + GFunc.setAdsSprite(self.imgCosts[buyType]) + self.txCosts[buyType]:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_DESC)) + elseif buyType == GConst.VIT_BUY_TYPE.GEM then + self.imgCosts[buyType]:setSprite(GFunc.getIconResByReward(cost)) + self.txCosts[buyType]:setText(GFunc.getRewardNum(cost)) + end + GFunc.centerImgAndTx(self.imgCosts[buyType], self.txCosts[buyType], 3) + + if remain > 0 then + node:setTouchEnable(true) + self.imgChecks[buyType]:setActive(false) + self.imgCosts[buyType]:setActive(true) + self.txCosts[buyType]:setActive(true) + else + node:setTouchEnable(false) + self.imgChecks[buyType]:setActive(false) + self.imgCosts[buyType]:setActive(true) + self.txCosts[buyType]:setActive(true) + end + + -- 红点 + if buyType == GConst.VIT_BUY_TYPE.AD and remain > 0 then + node:addRedPoint(105, 160, 1) + else + node:removeRedPoint() + end + end +end + +-- 以下接口,如果要加新的道具,需要补充对应的逻辑 + +function BuyVitUI:getBuyTitle() + if self.dataKey == "ShopData" then + return I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_1) + end + if self.dataKey == "ChallengeTeamData" then + return I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_3) + end + if self.dataKey == "ChapterTeamData" then + return I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_4) + end +end + +function BuyVitUI:getBuyBg(buyType) + if self.dataKey == "ShopData" then + if buyType == GConst.VIT_BUY_TYPE.AD then + return "shop_bg_14" + end + if buyType == GConst.VIT_BUY_TYPE.GEM then + return "shop_bg_13" + end + end + if self.dataKey == "ChallengeTeamData" then + if buyType == GConst.VIT_BUY_TYPE.AD then + return "shop_bg_8" + end + if buyType == GConst.VIT_BUY_TYPE.GEM then + return "shop_bg_11" + end + end + if self.dataKey == "ChapterTeamData" then + if buyType == GConst.VIT_BUY_TYPE.AD then + return "shop_bg_10" + end + if buyType == GConst.VIT_BUY_TYPE.GEM then + return "shop_bg_9" + end + end +end + +function BuyVitUI:getBuyReward(buyType) + if self.dataKey == "ShopData" then + return DataManager.ShopData:getVitBuyReward(buyType) + end + if self.dataKey == "ChallengeTeamData" then + return DataManager.ChallengeTeamData:getVitBuyReward(buyType) + end + if self.dataKey == "ChapterTeamData" then + return DataManager.ChapterTeamData:getVitBuyReward(buyType) + end +end + +function BuyVitUI:getBuyCost(buyType) + if self.dataKey == "ShopData" then + return DataManager.ShopData:getVitBuyCost(buyType) + end + if self.dataKey == "ChallengeTeamData" then + return DataManager.ChallengeTeamData:getVitBuyCost(buyType) + end + if self.dataKey == "ChapterTeamData" then + return DataManager.ChapterTeamData:getVitBuyCost(buyType) + end +end + +function BuyVitUI:getBuyRemainCount(buyType) + if self.dataKey == "ShopData" then + return DataManager.ShopData:getVitBuyRemainCount(buyType) + end + if self.dataKey == "ChallengeTeamData" then + return DataManager.ChallengeTeamData:getVitBuyRemainCount(buyType) + end + if self.dataKey == "ChapterTeamData" then + return DataManager.ChapterTeamData:getVitBuyRemainCount(buyType) + end +end + +function BuyVitUI:getBuyFunc(buyType) + if self.dataKey == "ShopData" then + return ModuleManager.ShopManager:reqBuyVit(buyType) + end + if self.dataKey == "ChallengeTeamData" then + return ModuleManager.ChallengeTeamManager:reqChallengeBuyVitality(buyType == GConst.VIT_BUY_TYPE.AD) + end + if self.dataKey == "ChapterTeamData" then + return ModuleManager.ChapterTeamManager:reqBuyVitality(buyType) + end +end + +function BuyVitUI:getBuyBI() + if self.dataKey == "ShopData" then + return BIReport.ITEM_GET_TYPE.BUY_VIT + end + if self.dataKey == "ChallengeTeamData" then + return BIReport.ITEM_GET_TYPE.CHALLENGE_VITALITY_BUY_COUNT + end + if self.dataKey == "ChapterTeamData" then + return BIReport.ITEM_GET_TYPE.CHAPTER_TEAM_BUY_COUNT + end +end + +function BuyVitUI:getBuyAdType() + if self.dataKey == "ShopData" then + return BIReport.ADS_CLICK_TYPE.AD_ENERGY + end + if self.dataKey == "ChallengeTeamData" then + return BIReport.ADS_CLICK_TYPE.AD_CHALLENGE_ENERGY + end + if self.dataKey == "ChapterTeamData" then + return BIReport.ADS_CLICK_TYPE.AD_CHAPTER_TEAM_ENERGY + end +end + +return BuyVitUI diff --git a/lua/app/ui/shop/buy_vit_ui.lua.meta b/lua/app/ui/shop/buy_vit_ui.lua.meta new file mode 100755 index 00000000..21911534 --- /dev/null +++ b/lua/app/ui/shop/buy_vit_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f43b0222a0b232d45b3f9c9ecb4d1862 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell.meta b/lua/app/ui/shop/cell.meta old mode 100644 new mode 100755 index f895f03f..13c7d4c0 --- a/lua/app/ui/shop/cell.meta +++ b/lua/app/ui/shop/cell.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6c4977772b149c848a64d89632133d2e +guid: bf5f095a69b17a44db1ceec247bc89c4 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua b/lua/app/ui/shop/cell/arena_gift_sell_cell.lua deleted file mode 100644 index a6a5d683..00000000 --- a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua +++ /dev/null @@ -1,104 +0,0 @@ -local ArenaGiftSellCell = class("ArenaGiftSellCell", BaseCell) -local MAX_REWARD_COUNT = 4 -local BASE_CELL_HEIGHT = 320 - -local BG = { - [90102] = "assets/arts/textures/background/shop/arena_gift_banner_1.png", - [90202] = "assets/arts/textures/background/shop/arena_gift_banner_2.png", - [90302] = "assets/arts/textures/background/shop/arena_gift_banner_3.png", - [90402] = "assets/arts/textures/background/shop/arena_gift_banner_4.png", -} - -function ArenaGiftSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gift_cell.bg"] - if BG[DataManager.ArenaData:getGiftId()] then - self.bg:setTexture(BG[DataManager.ArenaData:getGiftId()]) - end - - self.leftArrow = uiMap["gift_cell.left_arrow"] - self.rightArrow = uiMap["gift_cell.right_arrow"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - - -- 不限时时使用1类型 否则使用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"] - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function ArenaGiftSellCell:refresh() - local actGiftId = DataManager.ArenaData:getGiftId() - local cfgInfo = ConfigManager:getConfig("act_gift")[actGiftId] - -- 超值 - if cfgInfo.value then - self.offImg:setVisible(true) - self.offText:setText(tostring(cfgInfo.value) .. "%") - else - self.offImg:setVisible(false) - end - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_40)) -- 竞技场特惠 - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时 - self.timeImg:setVisible(true) - self:refreshTime() - - self.clickArea:addClickListener(function() - self:onClickGift(actGiftId) - end) -end - -function ArenaGiftSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 竞技场固定1个 -end - -function ArenaGiftSellCell:getIsOpen() - return DataManager.ArenaData:getGiftId() ~= nil -end - -function ArenaGiftSellCell:refreshTime() - local remainTime = DataManager.ArenaData:getGiftRemainTime() - self.timeText:setText(Time:formatNumTime(remainTime)) -end - -function ArenaGiftSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function ArenaGiftSellCell:onClickGift(id) - -- PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) - ModuleManager.ArenaManager:showGiftPopUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -return ArenaGiftSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua.meta b/lua/app/ui/shop/cell/arena_gift_sell_cell.lua.meta deleted file mode 100644 index 0c402dd5..00000000 --- a/lua/app/ui/shop/cell/arena_gift_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2259d1a0184c8284d9c5a78fd212baf3 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/armor_gift_sell_cell.lua b/lua/app/ui/shop/cell/armor_gift_sell_cell.lua deleted file mode 100644 index ae91c346..00000000 --- a/lua/app/ui/shop/cell/armor_gift_sell_cell.lua +++ /dev/null @@ -1,110 +0,0 @@ -local ArmorSellCell = class("ArmorSellCell", BaseCell) -local MAX_REWARD_COUNT = 4 -local BASE_CELL_HEIGHT = 320 -local GIFT_TYPE = PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT - -function ArmorSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gift_cell.bg"] - self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_7_1.png") - - self.leftArrow = uiMap["gift_cell.left_arrow"] - self.rightArrow = uiMap["gift_cell.right_arrow"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - self.priceText = uiMap["gift_cell.bg.price"] - self.timeImg = uiMap["gift_cell.bg.time_img"] - self.timeText = uiMap["gift_cell.bg.time_img.text"] - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function ArmorSellCell:refresh() - local actGiftId = DataManager.ShopData:getGift(GIFT_TYPE).id - if actGiftId and actGiftId > 0 then - self.actGiftId = actGiftId - local cfgInfo = ConfigManager:getConfig("act_gift")[self.actGiftId] - -- 超值 - self.offText:setText(tostring(cfgInfo.value) .. "%") - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_25)) - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时 - self.timeImg:setVisible(true) - self:refreshTime() - - self.clickArea:addClickListener(function() - self:onClickGift(self.actGiftId) - end) - else -- 倒计时结束的情况 - if self.actGiftId then - DataManager.ShopData:setDirty() - self.actGiftId = nil - end - end -end - -function ArmorSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 固定1个 -end - -function ArmorSellCell:getIsOpen() - return DataManager.ShopData:getGift(GIFT_TYPE) ~= nil -end - -function ArmorSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function ArmorSellCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -function ArmorSellCell:refreshTime() - local remainTime = 0 - if self.actGiftId and self.actGiftId > 0 then - remainTime = DataManager.ShopData:getGiftRemainTime(GIFT_TYPE) - if remainTime <= 0 then - remainTime = 0 - end - end - self.timeText:setText(Time:formatNumTime(remainTime)) -end - -function ArmorSellCell:getCellCount() - if self.actGiftId and self.actGiftId > 0 then - return 1 - else - return 0 - end -end - -return ArmorSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/armor_gift_sell_cell.lua.meta b/lua/app/ui/shop/cell/armor_gift_sell_cell.lua.meta deleted file mode 100644 index ed2b9ba0..00000000 --- a/lua/app/ui/shop/cell/armor_gift_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cf795bbf49a759d4e8ffadab2525497c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/beginner_sell_cell.lua b/lua/app/ui/shop/cell/beginner_sell_cell.lua deleted file mode 100644 index aaca1ea4..00000000 --- a/lua/app/ui/shop/cell/beginner_sell_cell.lua +++ /dev/null @@ -1,90 +0,0 @@ -local BeginnerSellCell = class("BeginnerSellCell", BaseCell) -local MAX_REWARD_COUNT = 4 -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"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - - -- 不限时时使用1类型 否则使用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"] - - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function BeginnerSellCell:refresh() - local actGiftId = GConst.ShopConst.BEGINNER_GIFT_ID - local cfgInfo = ConfigManager:getConfig("act_gift")[actGiftId] - -- 超值 - if cfgInfo.value then - self.offImg:setVisible(true) - self.offText:setText(tostring(cfgInfo.value * 100) .. "%") - else - self.offImg:setVisible(false) - end - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_11)) -- 新手礼包 - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时(隐藏) - self.timeImg:setVisible(false) - - self.clickArea:addClickListener(function() - self:onClickGift(actGiftId) - end) -end - -function BeginnerSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 新手礼包固定1个 -end - -function BeginnerSellCell:getIsOpen() - return not DataManager.ShopData:getBeginnerGiftHasBuy() -end - -function BeginnerSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function BeginnerSellCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -return BeginnerSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/beginner_sell_cell.lua.meta b/lua/app/ui/shop/cell/beginner_sell_cell.lua.meta deleted file mode 100644 index fbe050b9..00000000 --- a/lua/app/ui/shop/cell/beginner_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 49dcb2ca91052ea45a769729b7325d05 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/box_hero_cell.lua b/lua/app/ui/shop/cell/box_hero_cell.lua deleted file mode 100644 index 56caf032..00000000 --- a/lua/app/ui/shop/cell/box_hero_cell.lua +++ /dev/null @@ -1,63 +0,0 @@ -local BoxHeroCell = class("BoxHeroCell", BaseCell) - -function BoxHeroCell:init() - local uiMap = self.baseObject:genAllChildren() - self.heroCell = CellManager:addCellComp(uiMap["cell.hero_cell"], GConst.TYPEOF_LUA_CLASS.HERO_CELL) - self.heroNumText = uiMap["cell.num_tx"] - self.effects = {} - self.effects[2] = uiMap["cell.effect_node.sfx_ui_zhaohuan_lv_b01"] - self.effects[3] = uiMap["cell.effect_node.sfx_ui_zhaohuan_lan_b01"] - self.effects[4] = uiMap["cell.effect_node.sfx_ui_zhaohuan_zi_b01"] - self:disableAllEffect() -end - -function BoxHeroCell:refresh(data) - self.data = data - local id = data.id - local num = data.count - self.heroCell:setShowRedPoint(false) - - local heroEntity = DataManager.HeroData:getHeroById(id) - if heroEntity then - self.heroCell:refresh(heroEntity) - else - self.heroCell:refreshWithCfgId(id) - end - self.heroNumText:setText("X" .. tostring(num)) -end - -function BoxHeroCell:playEffect() - if self.data and self.effects then - local id = self.data.id - local heroInfo = ConfigManager:getConfig("hero")[id] - if heroInfo then - local qlt = heroInfo.qlt - for key, effect in pairs(self.effects) do - if key == qlt then - effect:setActive(true) - effect:play() - else - effect:setActive(false) - end - end - end - end -end - -function BoxHeroCell:disableAllEffect() - if self.effects then - for key, effect in pairs(self.effects) do - effect:setActive(false) - end - end -end - -function BoxHeroCell:setSpineVisible(visible) - self.heroCell:setSpineVisible(visible) -end - -function BoxHeroCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return BoxHeroCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/box_hero_cell.lua.meta b/lua/app/ui/shop/cell/box_hero_cell.lua.meta deleted file mode 100644 index 62fe8cc3..00000000 --- a/lua/app/ui/shop/cell/box_hero_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3482ec01640b03a488ecb2abda8a4fb0 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/box_sell_cell.lua b/lua/app/ui/shop/cell/box_sell_cell.lua deleted file mode 100644 index c1b08fcd..00000000 --- a/lua/app/ui/shop/cell/box_sell_cell.lua +++ /dev/null @@ -1,146 +0,0 @@ -local BoxSellCell = class("BoxSellCell", BaseCell) - -local BASE_CELL_HEIGHT = 522 -local FULL_CELL_HEIGHT = 786 -local HEIGHT_ADD = 30 - -function BoxSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["box_sell_cell.bg"] - local boxNameTx1 = uiMap["box_sell_cell.bg.box_1.name_tx"] - boxNameTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1)) -- 普通宝箱 - local boxDescTx1 = uiMap["box_sell_cell.bg.box_1.desc_tx"] - boxDescTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_24)) -- 必出普通英雄 - self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1"] - self.boxBuyBtnCoin1 = uiMap["box_sell_cell.bg.box_1.buy_btn.coin"] - self.boxBuyBtnTx1 = uiMap["box_sell_cell.bg.box_1.buy_btn.buy_tx"] - local boxNameTx2 = uiMap["box_sell_cell.bg.box_2.name_tx"] - boxNameTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2)) -- 精致宝箱 - local boxDescTx2 = uiMap["box_sell_cell.bg.box_2.desc_tx"] - boxDescTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_25)) -- 必出稀有英雄 - self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2"] - self.boxBuyBtnCoin2 = uiMap["box_sell_cell.bg.box_2.buy_btn.coin"] - self.boxBuyBtnTx2 = uiMap["box_sell_cell.bg.box_2.buy_btn.buy_tx"] - self.box3 = uiMap["box_sell_cell.bg.box_3"] - local boxNameTx3 = uiMap["box_sell_cell.bg.box_3.name_tx"] - boxNameTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3)) -- 珍贵宝箱 - local boxDescTx3 = uiMap["box_sell_cell.bg.box_3.desc_tx"] - boxDescTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_26)) -- 必出史诗英雄 - self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3"] - self.boxBuyBtnCoin3 = uiMap["box_sell_cell.bg.box_3.buy_btn.coin"] - self.boxBuyBtnTx3 = uiMap["box_sell_cell.bg.box_3.buy_btn.buy_tx"] - self.progressSlider = uiMap["box_sell_cell.bg.progress_slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.progressLv = uiMap["box_sell_cell.bg.progress_lv"] - self.progressTx = uiMap["box_sell_cell.bg.progress_tx"] - self.helpBtn = uiMap["box_sell_cell.bg.help_btn"] - local titleTx = uiMap["box_sell_cell.title_bg.text"] - titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_27)) -- 宝箱 - - self.boxBuyBtn1:addClickListener(function() - self:onClickBox(GConst.SummonConst.SUMMON_TYPE.LV_1) - end) - self.boxBuyBtn2:addClickListener(function() - self:onClickBox(GConst.SummonConst.SUMMON_TYPE.LV_2) - end) - self.boxBuyBtn3:addClickListener(function() - self:onClickBox(GConst.SummonConst.SUMMON_TYPE.LV_3) - end) - self.helpBtn:addClickListener(function() - self:showHelpTips() - end) - - self.cellHeight = BASE_CELL_HEIGHT -end - -function BoxSellCell:refresh() - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_3_OPEN, true) then -- 没解锁的话第三个宝箱不显示 - self.cellHeight = BASE_CELL_HEIGHT + 70 - self.baseObject:setSizeDeltaY(BASE_CELL_HEIGHT) - self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_10.png") - self.bg:setSizeDeltaY(BASE_CELL_HEIGHT - HEIGHT_ADD) - self.box3:setVisible(false) - else - self.cellHeight = FULL_CELL_HEIGHT + 70 - self.baseObject:setSizeDeltaY(FULL_CELL_HEIGHT) - self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_9.png") - self.bg:setSizeDeltaY(FULL_CELL_HEIGHT - HEIGHT_ADD) - self.box3:setVisible(true) - end - self:refreshLv() - self:refreshCost() -end - -function BoxSellCell:refreshLv() - local lv = DataManager.SummonData:getSummonLevel() - local exp = DataManager.SummonData:getSummonExp() - local maxExp = DataManager.SummonData:getSummonMaxExp() - self.progressLv:setText("Lv." .. tostring(lv)) - if maxExp and maxExp > 0 then - self.progressTx:setText(tostring(exp) .. "/" .. tostring(maxExp)) - self.progressSlider.value = exp / maxExp - else - self.progressTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) - self.progressSlider.value = 1 - end -end - -function BoxSellCell:refreshCost() - local costItem1, cost1 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_1) - local costItem2, cost2 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_2) - local costItem3, cost3 = DataManager.SummonData:getSummonCost(GConst.SummonConst.SUMMON_TYPE.LV_3) - - if not cost1 or GFunc.checkCost(costItem1.id, costItem1.num, false) then - self.boxBuyBtnCoin1:setSprite(GFunc.getIconRes(costItem1.id)) - local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_1) - local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" - self.boxBuyBtnTx1:setText(totalCountStr .. "/" .. tostring(costItem1.num)) - else - self.boxBuyBtnCoin1:setSprite(GFunc.getIconRes(cost1.id)) - self.boxBuyBtnTx1:setText(cost1.num) - end - GFunc.centerImgAndTx(self.boxBuyBtnCoin1, self.boxBuyBtnTx1, 5) - - if not cost2 or GFunc.checkCost(costItem2.id, costItem2.num, false) then - self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(costItem2.id)) - local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_2) - local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" - self.boxBuyBtnTx2:setText(totalCountStr .. "/" .. tostring(costItem2.num)) - else - self.boxBuyBtnCoin2:setSprite(GFunc.getIconRes(cost2.id)) - self.boxBuyBtnTx2:setText(cost2.num) - end - GFunc.centerImgAndTx(self.boxBuyBtnCoin2, self.boxBuyBtnTx2, 5) - - if not cost3 or GFunc.checkCost(costItem3.id, costItem3.num, false) then - self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(costItem3.id)) - local totalCount = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_BOX_KEY_LV_3) - local totalCountStr = totalCount <= 99 and tostring(totalCount) or "99" - self.boxBuyBtnTx3:setText(totalCountStr .. "/" .. tostring(costItem3.num)) - else - self.boxBuyBtnCoin3:setSprite(GFunc.getIconRes(cost3.id)) - self.boxBuyBtnTx3:setText(cost3.num) - end - GFunc.centerImgAndTx(self.boxBuyBtnCoin3, self.boxBuyBtnTx3, 5) -end - -function BoxSellCell:onClickBox(summonType) - ModuleManager.ShopManager:showBoxHeroUI(summonType) -end - -function BoxSellCell:showHelpTips() - ModuleManager.ShopManager:showBoxLevelUI() -end - -function BoxSellCell:getCellHeight() - return self.cellHeight -end - -function BoxSellCell:getIsOpen() - return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.STORE_BOX_OPEN, true) -end - -function BoxSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return BoxSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/box_sell_cell.lua.meta b/lua/app/ui/shop/cell/box_sell_cell.lua.meta deleted file mode 100644 index 0f8dd319..00000000 --- a/lua/app/ui/shop/cell/box_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: caffbd8418813ca4a9f697470f753dd5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/chapter_cell.lua b/lua/app/ui/shop/cell/chapter_cell.lua old mode 100644 new mode 100755 index c6e7976f..4e017400 --- a/lua/app/ui/shop/cell/chapter_cell.lua +++ b/lua/app/ui/shop/cell/chapter_cell.lua @@ -1,98 +1,66 @@ local ChapterCell = class("ChapterCell", BaseCell) -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") + local uiMap = self:getUIMap() + self.txName = uiMap["chapter_cell.tx_name"] + self.rewardNode = uiMap["chapter_cell.reward_node"] + self.rewardNodeLayout = self.rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) + self.rewardCells = {} + for i = 1, 3 do + table.insert(self.rewardCells, uiMap["chapter_cell.reward_node.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) + end + self.costNode = uiMap["chapter_cell.cost"] + self.imgCost = uiMap["chapter_cell.cost.img_cost"] + self.txCost = uiMap["chapter_cell.cost.tx_cost"] + self.tag = uiMap["chapter_cell.tag"] + self.txOff = uiMap["chapter_cell.tag.tx_off"] + self.btnLeft = uiMap["chapter_cell.btn_left"] + self.btnRight = uiMap["chapter_cell.btn_right"] - self.leftArrow = uiMap["gift_cell.left_arrow"] - self.rightArrow = uiMap["gift_cell.right_arrow"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - - -- 不限时时使用1类型 否则使用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"] - - self.clickArea = uiMap["gift_cell.bg.click_area"] + self.baseObject:addClickListener(function() + -- local cost = DataManager.ShopData:getChapterGiftConfig(self.id).cost + -- if not GFunc.checkCost(GFunc.getRewardId(cost), GFunc.getRewardNum(cost), true, BIReport.ITEM_GET_TYPE.SHOP_CHAPTER) then + -- return + -- end + -- ModuleManager.ShopManager:reqBuyChapterGift(self.id) + PayManager:purchasePackage(self.info.id, PayManager.PURCHARSE_TYPE.ACT_GIFT) + end) + self.btnLeft:addClickListener(function() + if self.callback then + self.callback(1) + end + end) + self.btnRight:addClickListener(function() + if self.callback then + self.callback(-1) + end + end) end -function ChapterCell:refresh(idx, cfgInfo, totalCount, arrowCallback) - -- 箭头 - local showLeftArrow = true - local showRightArrow = true - if idx == 1 then - showLeftArrow = false - end - if idx == totalCount then - showRightArrow = false - end - self.leftArrow:setVisible(showLeftArrow) - self.rightArrow:setVisible(showRightArrow) - - self.leftArrow:addClickListener(function() - if idx > 1 then - arrowCallback(1) - end - end) - self.rightArrow:addClickListener(function() - if idx < totalCount then - arrowCallback(-1) - end - end) - -- 超值 - self.offText:setText(tostring(cfgInfo.value * 100) .. "%") - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_19, tostring(cfgInfo.chapter))) -- 第{0}章礼包 - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时(隐藏) - self.timeImg:setVisible(false) - - self.clickArea:addClickListener(function() - self:onClickGift(cfgInfo.id) - end) -end - -function ChapterCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function ChapterCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.CHAPTER_GIFT) +function ChapterCell:refresh(info, curIdx, maxIdx, callback) + self.info = info + self.callback = callback + local cfg = DataManager.GiftPopData:getGiftConfig(self.info.id) + -- self.baseObject:setSprite(GConst.ATLAS_PATH.UI_SHOP, cfg.atr_resource) + -- self.baseObject:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_gift_bg_3") + self.txName:setText(I18N:getText("act_gift", self.info.id, "value")) -- I18N:getGlobalText(I18N.GlobalConst.MALL_CHAPTER_DESC_1, cfg.parameter)) + self.txCost:setText(GFunc.getFormatPrice(cfg.recharge_id)) + -- GFunc.centerImgAndTx(self.imgCost, self.txCost, 3) + self.txOff:setText(cfg.value .. "%") + local rewardCount = 0 + for i, cell in pairs(self.rewardCells) do + if cfg.reward and cfg.reward[i] then + rewardCount = rewardCount + 1 + cell:setVisible(true) + cell:refreshByConfig(cfg.reward[i]) + else + cell:setVisible(false) + end + end + self.rewardNode:setSizeDeltaX(rewardCount * 102 + 12) + self.rewardNodeLayout:RefreshLayout() + self.btnLeft:setActive(maxIdx > 1 and curIdx > 1) + self.btnRight:setActive(maxIdx > 1 and curIdx < maxIdx) end return ChapterCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/chapter_cell.lua.meta b/lua/app/ui/shop/cell/chapter_cell.lua.meta old mode 100644 new mode 100755 index d377c892..58603920 --- a/lua/app/ui/shop/cell/chapter_cell.lua.meta +++ b/lua/app/ui/shop/cell/chapter_cell.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9d83d1e8c37389e4eb88dd51f2fcbde8 +guid: 1f7095593f1048f4aa16443056a5338e ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/shop/cell/chapter_sell_cell.lua b/lua/app/ui/shop/cell/chapter_sell_cell.lua deleted file mode 100644 index ac075bf7..00000000 --- a/lua/app/ui/shop/cell/chapter_sell_cell.lua +++ /dev/null @@ -1,54 +0,0 @@ -local ChapterSellCell = class("ChapterSellCell", BaseCell) -local CHAPTER_CELL = "app/ui/shop/cell/chapter_cell" -local BASE_CELL_HEIGHT = 320 - -function ChapterSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.scrollRectObj = uiMap["chapter_sell_cell.scroll_rect"] - self.contentObj = uiMap["chapter_sell_cell.scroll_rect.viewport.content"] - self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRect:addInitCallback(function() - return CHAPTER_CELL - end) - self.scrollRect:addRefreshCallback(function(idx, cell) - if self.actChapterCfg and self.actChapterCfg[idx] then - cell:refresh(idx, self.actChapterCfg[idx], #self.actChapterCfg, - function (add) - self.contentObj:addAnchoredPosition(add*720) - end) - end - end) - self.scrollRect:clearCells() - - self.cellHeight = BASE_CELL_HEIGHT -end - -function ChapterSellCell:refresh() - local actIdList = DataManager.ShopData:getActChapterStoreCanBuyActIds() - self.actChapterCfg = {} - local actChapterCfg = DataManager.ShopData:getActChapterStoreConfig() - for i = 1, #actIdList do - local cfgInfo = clone(actChapterCfg[actIdList[i]]) - cfgInfo.id = actIdList[i] - table.insert(self.actChapterCfg, cfgInfo) - end - local count = #self.actChapterCfg - self.scrollRect:refillCells(count) - self.contentObj:setAnchoredPositionX(0) - self.scrollRect:moveToIndex(count) -end - -function ChapterSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 章节礼包横向展开 -end - -function ChapterSellCell:getIsOpen() - -- 有可购买的礼包 才打开 - return #DataManager.ShopData:getActChapterStoreCanBuyActIds() > 0 -end - -function ChapterSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return ChapterSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/chapter_sell_cell.lua.meta b/lua/app/ui/shop/cell/chapter_sell_cell.lua.meta deleted file mode 100644 index ea2c2cfc..00000000 --- a/lua/app/ui/shop/cell/chapter_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 15313f1ba35cfcd46bb95876a7801283 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/coin_sell_cell.lua b/lua/app/ui/shop/cell/coin_sell_cell.lua deleted file mode 100644 index a73ec723..00000000 --- a/lua/app/ui/shop/cell/coin_sell_cell.lua +++ /dev/null @@ -1,113 +0,0 @@ -local CoinSellCell = class("CoinSellCell", BaseCell) -local MAX_REWARD_COUNT = 4 -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"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - self.priceText = uiMap["gift_cell.bg.price"] - - self.timeImg = uiMap["gift_cell.bg.time_img"] - self.timeText = uiMap["gift_cell.bg.time_img.text"] - - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function CoinSellCell:refresh() - local actGiftId = DataManager.ShopData:getValidCoinGiftId() - if actGiftId and actGiftId > 0 then - self.actGiftId = actGiftId -- 记录当前金币礼包ID - local cfgInfo = ConfigManager:getConfig("act_gift")[self.actGiftId] - -- 超值 - self.offText:setText(tostring(cfgInfo.value) .. "%") - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, tostring(cfgInfo.limit))) -- 限购{0}次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_14)) - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时 - self.timeImg:setVisible(true) - self:refreshTime() - - self.clickArea:addClickListener(function() - self:onClickGift(self.actGiftId) - end) - else -- 倒计时结束的情况 - if self.actGiftId then - DataManager.ShopData:setDirty() - self.actGiftId = nil - end - end -end - -function CoinSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 固定1个 -end - -function CoinSellCell:getIsOpen() - return DataManager.ShopData:getValidCoinGiftId() ~= nil -end - -function CoinSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function CoinSellCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -function CoinSellCell:refreshTime() - local remainTime = 0 - if self.actGiftId and self.actGiftId > 0 then - local cfgInfo = DataManager.ShopData:getActGiftConfig()[self.actGiftId] - local triggerTime = DataManager.ShopData:getCoinGiftTriggerTime() - remainTime = triggerTime + (cfgInfo.limit_time or 0) * 3600 - Time:getServerTime() - if remainTime <= 0 then - remainTime = 0 - end - end - self.timeText:setText(Time:formatNumTime(remainTime)) -end - -function CoinSellCell:getCellCount() - if self.actGiftId and self.actGiftId > 0 then - return 1 - else - return 0 - end -end - -return CoinSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/coin_sell_cell.lua.meta b/lua/app/ui/shop/cell/coin_sell_cell.lua.meta deleted file mode 100644 index b939fee3..00000000 --- a/lua/app/ui/shop/cell/coin_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c3011d7c0a218224a8e6601dd1c992cd -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/core_soul_cell.lua b/lua/app/ui/shop/cell/core_soul_cell.lua new file mode 100644 index 00000000..f0db3cb2 --- /dev/null +++ b/lua/app/ui/shop/cell/core_soul_cell.lua @@ -0,0 +1,245 @@ +local CoreSoulCell = class("CoreSoulCell", BaseCell) + +local TITLE_TX = { + [1] = I18N.GlobalConst.CORE_SUMMON_DESC_1, + [2] = I18N.GlobalConst.CORE_SUMMON_DESC_2, +} +local INFO_TX = { + [1] = I18N.GlobalConst.CORE_SUMMON_DESC_3, + [2] = I18N.GlobalConst.CORE_SUMMON_DESC_4, +} +local BIG_REWARD_TX = { + [1] = I18N.GlobalConst.CORE_SUMMON_DESC_9, + [2] = I18N.GlobalConst.CORE_SUMMON_DESC_10, +} +local LAST_BIG_REWARD_TX = { + [1] = I18N.GlobalConst.CORE_SUMMON_DESC_11, + [2] = I18N.GlobalConst.CORE_SUMMON_DESC_12, +} + +function CoreSoulCell:init() + local uiMap = self:getUIMap() + self.content = uiMap["core_soul_cell.content"] + self.txTitle = uiMap["core_soul_cell.content.tx_title"] + self.helpBtn = uiMap["core_soul_cell.content.help_btn"] + self.txInfo = uiMap["core_soul_cell.content.tx_info"] + self.icon = uiMap["core_soul_cell.content.icon"] + self.txTimes = uiMap["core_soul_cell.content.tx_times"] + self.itemIcon = uiMap["core_soul_cell.content.item_icon"] + self.adBtn = uiMap["core_soul_cell.content.ad_btn"] + self.adIcon = uiMap["core_soul_cell.content.ad_btn.ad_icon"] + self.adTx = uiMap["core_soul_cell.content.ad_btn.tx"] + self.singleBtn = uiMap["core_soul_cell.content.single_btn"] + self.singleTitleTx = uiMap["core_soul_cell.content.single_btn.tx_title"] + self.singleIcon = uiMap["core_soul_cell.content.single_btn.icon"] + self.singleTx = uiMap["core_soul_cell.content.single_btn.tx"] + self.multiBtn = uiMap["core_soul_cell.content.multi_btn"] + self.multiTitleTx = uiMap["core_soul_cell.content.multi_btn.tx_title"] + self.multiIcon = uiMap["core_soul_cell.content.multi_btn.icon"] + self.multiTx = uiMap["core_soul_cell.content.multi_btn.tx"] + self.multiIcon2 = uiMap["core_soul_cell.content.multi_btn.icon_2"] + self.multiTx2 = uiMap["core_soul_cell.content.multi_btn.tx_2"] +end +function CoreSoulCell:refresh(id) + self.id = id + if self.id == GConst.ShopConst.CORE_SOUL_TYPE.NORMAL then -- 普通宝箱 + self.adBtn:addClickListener(function() + if DataManager.ShopData:getCoreSoulAdRemainTimes() > 0 then + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_CORE_SOUL, function () + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, true, 1) + end) + end + end) + self.multiBtn:addClickListener(function() + local costId = DataManager.ShopData:getCoreSoulCostItemId(self.id) + local ownItemCount = DataManager.BagData.ItemData:getItemNumById(costId) + local maxItemCount = GConst.ShopConst.CORE_SOUL_NORMAL_MAX_COUNT + + local times = math.min(ownItemCount, maxItemCount) + if times > 0 then + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, false, times) + else + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH, I18N:getConfig("item")[costId].name)) + end + end) + else -- 史诗宝箱 + self.singleBtn:addClickListener(function() + local costId = DataManager.ShopData:getCoreSoulCostItemId(self.id) + local ownItemCount = DataManager.BagData.ItemData:getItemNumById(costId) + local ownGem = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_GEM) + local costGem = DataManager.ShopData:getCoreSoulSingleCostGemNum(self.id) + if ownItemCount >= 1 then + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, false, 1) + elseif ownGem >= costGem then + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SHOP_SOUL_SUMMON + params.okFunc = function() + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, false, 1) + end + GFunc.showMessageBox(params) + else + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH, I18N:getConfig("item")[GConst.ItemConst.ITEM_ID_GEM].name)) + end + end) + self.multiBtn:addClickListener(function() + local costId = DataManager.ShopData:getCoreSoulCostItemId(self.id) + local ownItemCount = DataManager.BagData.ItemData:getItemNumById(costId) + local ownGem = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_GEM) + local costGem = DataManager.ShopData:getCoreSoulSingleCostGemNum(self.id) + local totalCount = GConst.ShopConst.CORE_SOUL_ELITE_MULTI_COUNT + if ownItemCount >= totalCount then + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, false, totalCount) + elseif ownGem >= costGem * (totalCount - ownItemCount) then + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SHOP_SOUL_SUMMON + params.okFunc = function() + ModuleManager.ShopManager:reqBuyCoreSoulBox(self.id, false, totalCount) + end + GFunc.showMessageBox(params) + else + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ITEM_NOT_ENOUGH, I18N:getConfig("item")[GConst.ItemConst.ITEM_ID_GEM].name)) + end + end) + end + + -- self.content:setSprite(GConst.ATLAS_PATH.UI_SHOP, CONTENT_BG[self.id]) + self.txTitle:setText(I18N:getGlobalText(TITLE_TX[self.id])) + self.helpBtn:addClickListener(function() + self:onClickHelpBtn(self.id) + end) + self.txInfo:setText(I18N:getGlobalText(INFO_TX[self.id])) + -- self.icon:setSprite(GConst.ATLAS_PATH.UI_SHOP, CONTENT_BG[self.id]) + if self.id == 1 then + self.itemIcon:setActive(false) + local count = DataManager.ShopData:getCoreSoulBigRewardTimes(self.id) + self.txTimes:setAnchoredPositionX(0) + if count == 1 then + self.txTimes:setText(I18N:getGlobalText(LAST_BIG_REWARD_TX[self.id])) + else + self.txTimes:setText(I18N:getGlobalText(BIG_REWARD_TX[self.id], count)) + end + else + self.itemIcon:setActive(true) + self.txTimes:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_15)) + local txW = self.txTimes:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + self.txTimes:setAnchoredPositionX(-15) + self.txTimes:setSizeDeltaX(txW) + end + if self.id == GConst.ShopConst.CORE_SOUL_TYPE.NORMAL then + self.adBtn:setActive(true) + self.singleBtn:setActive(false) + self.multiBtn:setActive(true) + -- 普通广告 + GFunc.setAdsSprite(self.adIcon) + -- self.adBtn:setSprite("act_common_btn_blue_1" or "") + self.adTx:setText(DataManager.ShopData:getCoreSoulAdRemainTimes() .. "/" .. DataManager.ShopData:getCoreSoulAdMaxTimes()) + if DataManager.ShopData:getCoreSoulAdRemainTimes() > 0 then + self.adBtn:addRedPoint(40, 32, 0.9) + else + self.adBtn:removeRedPoint() + end + -- 普通多抽 + self.multiIcon2:setVisible(false) + self.multiTx2:setVisible(false) + local costId = DataManager.ShopData:getCoreSoulCostItemId(self.id) + local ownItemCount = DataManager.BagData.ItemData:getItemNumById(costId) + local maxItemCount = GConst.ShopConst.CORE_SOUL_NORMAL_MAX_COUNT + self.multiTitleTx:setText(I18N:getGlobalText(I18N.GlobalConst.CORE_SUMMON_DESC_5, math.min(ownItemCount, maxItemCount))) + self.multiIcon:setSprite(GFunc.getIconRes(costId)) + if ownItemCount <= 0 then -- 没有道具 + self.multiTx:setText("0/1") + self.multiBtn:removeRedPoint() + elseif ownItemCount <= maxItemCount then -- 有道具且在范围内,直接按当前拥有值消耗 + self.multiTx:setText(ownItemCount .. "/" .. ownItemCount) + self.multiBtn:addRedPoint(60, 32, 0.9) + else -- 按最大允许值消耗 + self.multiTx:setText(ownItemCount .. "/" .. maxItemCount) + self.multiBtn:addRedPoint(60, 32, 0.9) + end + GFunc.centerImgAndTx(self.multiIcon, self.multiTx, 0) + else + self.adBtn:setActive(false) + self.singleBtn:setActive(true) + self.multiBtn:setActive(true) + + self.singleTitleTx:setText(I18N:getGlobalText(I18N.GlobalConst.CORE_SUMMON_DESC_7)) + self.multiTitleTx:setText(I18N:getGlobalText(I18N.GlobalConst.CORE_SUMMON_DESC_8)) + + local costId = DataManager.ShopData:getCoreSoulCostItemId(self.id) + local ownItemCount = DataManager.BagData.ItemData:getItemNumById(costId) + local ownGem = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_GEM) + -- 史诗单抽 + if ownItemCount <= 0 then + self.singleIcon:setSprite(GFunc.getIconRes(GConst.ItemConst.ITEM_ID_GEM)) + local costGem = DataManager.ShopData:getCoreSoulSingleCostGemNum(self.id) + if ownGem < costGem then + self.singleTx:setText("" .. costGem .. "") + else + self.singleTx:setText(costGem) + end + self.singleBtn:removeRedPoint() + else + self.singleIcon:setSprite(GFunc.getIconRes(costId)) + self.singleTx:setText(ownItemCount .. "/1") + self.singleBtn:addRedPoint(60, 32, 0.9) + end + GFunc.centerImgAndTx(self.singleIcon, self.singleTx, 0) + -- 史诗多抽 + if ownItemCount <= 0 then -- 没有道具,全钻石 + self.multiIcon2:setVisible(false) + self.multiTx2:setVisible(false) + -- 显示钻石 + self.multiIcon:setSprite(GFunc.getIconRes(GConst.ItemConst.ITEM_ID_GEM)) + local costGem = DataManager.ShopData:getCoreSoulMultiCostGemNum(self.id) + if ownGem < costGem then + self.multiTx:setText("" .. costGem .. "") + else + self.multiTx:setText(costGem) + end + self.multiBtn:removeRedPoint() + GFunc.centerImgAndTx(self.multiIcon, self.multiTx, 0) + elseif ownItemCount < GConst.ShopConst.CORE_SOUL_ELITE_MULTI_COUNT then -- 需要和钻石混搭 + self.multiIcon2:setVisible(true) + self.multiTx2:setVisible(true) + -- 显示道具 + self.multiIcon:setSprite(GFunc.getIconRes(costId)) + self.multiTx:setText(ownItemCount) + -- 显示钻石 + self.multiIcon2:setSprite(GFunc.getIconRes(GConst.ItemConst.ITEM_ID_GEM)) + local otherCount = GConst.ShopConst.CORE_SOUL_ELITE_MULTI_COUNT - ownItemCount + local costGem = DataManager.ShopData:getCoreSoulSingleCostGemNum(self.id) * otherCount + if ownGem < costGem then + self.multiTx2:setText("" .. costGem .. "") + else + self.multiTx2:setText(costGem) + end + self.multiBtn:removeRedPoint() + GFunc.centerImgAndTxAndImgAndTx(self.multiIcon, self.multiTx, self.multiIcon2, self.multiTx2, 0) + else -- 可以道具全抽 + self.multiIcon2:setVisible(false) + self.multiTx2:setVisible(false) + + self.multiIcon:setSprite(GFunc.getIconRes(costId)) + self.multiTx:setText(ownItemCount .. "/" .. GConst.ShopConst.CORE_SOUL_ELITE_MULTI_COUNT) + self.multiBtn:addRedPoint(60, 32, 0.9) + GFunc.centerImgAndTx(self.multiIcon, self.multiTx, 0) + end + end +end + +function CoreSoulCell:setVisible(visible) + self.baseObject:setVisible(visible) +end + +function CoreSoulCell:onClickHelpBtn(idx) + ModuleManager.TipsManager:showSummonProbabilityTips({ + cfgName = "summon_core", + id = idx + }) +end + +return CoreSoulCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/core_soul_cell.lua.meta b/lua/app/ui/shop/cell/core_soul_cell.lua.meta new file mode 100755 index 00000000..0035c73c --- /dev/null +++ b/lua/app/ui/shop/cell/core_soul_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0fdbfabcf22c67046973158a7c97c6c0 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/core_soul_main_cell.lua b/lua/app/ui/shop/cell/core_soul_main_cell.lua new file mode 100755 index 00000000..0b0fbad8 --- /dev/null +++ b/lua/app/ui/shop/cell/core_soul_main_cell.lua @@ -0,0 +1,22 @@ +local CoreSoulMainCell = class("CoreSoulMainCell", BaseCell) + +function CoreSoulMainCell:init() + local uiMap = self:getUIMap() + self.normalCell = uiMap["core_soul_cell.cell_1"]:addLuaComponent("app/ui/shop/cell/core_soul_cell") + self.eliteCell = uiMap["core_soul_cell.cell_2"]:addLuaComponent("app/ui/shop/cell/core_soul_cell") + -- self:updateTime() + -- self.sid = uiMap["core_soul_cell.cell_1"]:scheduleGlobal(function () + -- self:updateTime() + -- end, 1) +end + +function CoreSoulMainCell:updateTime() + -- 无需处理 +end + +function CoreSoulMainCell:refresh() + self.normalCell:refresh(GConst.ShopConst.CORE_SOUL_TYPE.NORMAL) + self.eliteCell:refresh(GConst.ShopConst.CORE_SOUL_TYPE.ELITE) +end + +return CoreSoulMainCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/core_soul_main_cell.lua.meta b/lua/app/ui/shop/cell/core_soul_main_cell.lua.meta new file mode 100755 index 00000000..f051d432 --- /dev/null +++ b/lua/app/ui/shop/cell/core_soul_main_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 71d0626db99ea3848bbfbc66b2cade41 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/daily_cell.lua b/lua/app/ui/shop/cell/daily_cell.lua new file mode 100755 index 00000000..bbc89795 --- /dev/null +++ b/lua/app/ui/shop/cell/daily_cell.lua @@ -0,0 +1,157 @@ +local DailyCell = class("DailyCell", BaseCell) + +function DailyCell:init() + local uiMap = self:getUIMap() + self.content = uiMap["daily_cell.content"] + self.txName = uiMap["daily_cell.content.tx_name"] + self.rewardCell = uiMap["daily_cell.content.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.txLimit = uiMap["daily_cell.content.tx_limit"] + self.costNode = uiMap["daily_cell.content.cost"] + self.imgCost = uiMap["daily_cell.content.cost.img_cost"] + self.txCost = uiMap["daily_cell.content.cost.tx_cost"] + self.tag = uiMap["daily_cell.content.tag"] + self.txOff = uiMap["daily_cell.content.tag.tx_off"] + self.imgEmpty = uiMap["daily_cell.content.img_empty"] + self.txLock = uiMap["daily_cell.content.tx_lock"] +end + +function DailyCell:refresh(id) + self.id = id + + local reward = DataManager.ShopData:getDailyReward(self.id) + if reward then + self.rewardCell:refreshByConfig(reward) + if reward.type == GConst.REWARD_TYPE_NUM.ITEM then + self.txName:setText(I18N:getConfig("item")[reward.id].name) + elseif reward.type == GConst.REWARD_TYPE_NUM.EQUIP then + self.txName:setText(I18N:getConfig("equip")[reward.id].name) + end + end + + local cfg = DataManager.ShopData:getDailyConfig(self.id) + local remainCount = math.max(0, DataManager.ShopData:getDailyRemainCount(self.id)) + local adCount = cfg.limit_ad or 0 + local cost = DataManager.ShopData:getDailyCost(self.id) + + self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_15) .. remainCount) + + if remainCount <= 0 then + -- 告罄 + self.imgEmpty:setActive(true) + self.baseObject:setTouchEnable(false) + self.baseObject:removeRedPoint() + self.imgCost:setActive(false) + self.txCost:setText("" .. I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_14) .. "") + self.txCost:setAnchoredPositionX(0) + self.txCost:setSizeDeltaX(150) + elseif not cost or cost.num <= 0 then + self.imgEmpty:setActive(false) + self.baseObject:setTouchEnable(true) + if remainCount > adCount then + self.baseObject:addRedPoint(84, 118, 1.2) + -- 纯免费 + self.imgCost:setActive(false) + self.txCost:setText(I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_12)) + self.txCost:setAnchoredPositionX(0) + else + if SDKManager:isAdLoaded() then + self.baseObject:addRedPoint(84, 118, 1.2) + else + self.baseObject:removeRedPoint() + end + + -- 广告购买 + self.imgCost:setActive(true) + self.imgCost:setSizeDelta(45, 45) + GFunc.setAdsSprite(self.imgCost) + + self.txCost:setText("(" .. remainCount .. "/" .. adCount .. ")") + GFunc.centerImgAndTx(self.imgCost, self.txCost, 0) + end + + + self.baseObject:addClickListener(function() + if remainCount > adCount then -- 纯免费 + self:onBuy() + elseif remainCount > 0 then -- 广告免费 + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_DAILY_SHOP, function () + self:onBuy() + end) + else -- 付费 + self:onBuy() + end + end) + else + -- 道具购买 + self.imgEmpty:setActive(false) + self.baseObject:setTouchEnable(true) + self.baseObject:removeRedPoint() + + self.imgCost:setActive(true) + self.imgCost:setSizeDelta(60, 60) + self.imgCost:setSprite(GFunc.getIconResByReward(cost)) + self.txCost:setText(GFunc.getRewardNum(cost)) + GFunc.centerImgAndTx(self.imgCost, self.txCost, 0) + + self.baseObject:addClickListener(function() + local remainCount = math.max(0, DataManager.ShopData:getDailyRemainCount(self.id)) + if remainCount == 0 then + return + end + if not GFunc.checkCost(GFunc.getRewardId(cost), GFunc.getRewardNum(cost), true, BIReport.ITEM_GET_TYPE.SHOP_DAILY) then + return + end + if GFunc.getRewardId(cost) == GConst.ItemConst.ITEM_ID_GEM then + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SHOP_DAILY + params.okFunc = function() + self:onBuy() + end + GFunc.showMessageBox(params) + else + self:onBuy() + end + end) + end + + local locked = DataManager.ShopData:getDailyLocked(self.id) + if locked then + self.baseObject:setTouchEnable(false) + self.txLock:setText(locked or "") + self.baseObject:removeRedPoint() + + self.txName:setActive(false) + self.rewardCell:getBaseObject():setActive(false) + self.costNode:setActive(false) + self.txLimit:setActive(false) + self.tag:setActive(false) + else + self.baseObject:setTouchEnable(true) + self.txLock:setText("") + + self.txName:setActive(true) + self.rewardCell:getBaseObject():setActive(true) + self.costNode:setActive(true) + self.txLimit:setActive(true) + + local idx = DataManager.ShopData:getDailyIdx(self.id) + if cfg.value and cfg.value[idx] and cfg.value[idx] ~= 0 then + self.tag:setActive(true) + self.txOff:setText(cfg.value[idx] .. "%") + else + self.tag:setActive(false) + end + end +end + +function DailyCell:setVisible(visible) + self.baseObject:setVisible(visible) +end + +function DailyCell:onBuy() + ModuleManager.ShopManager:reqBuyDailyGift(self.id) +end + +return DailyCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/daily_cell.lua.meta b/lua/app/ui/shop/cell/daily_cell.lua.meta new file mode 100755 index 00000000..216313b3 --- /dev/null +++ b/lua/app/ui/shop/cell/daily_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 73ec34a91376a404c976e0750f083204 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/daily_main_cell.lua b/lua/app/ui/shop/cell/daily_main_cell.lua new file mode 100755 index 00000000..0a1edd14 --- /dev/null +++ b/lua/app/ui/shop/cell/daily_main_cell.lua @@ -0,0 +1,128 @@ +local DailyMainCell = class("DailyMainCell", BaseCell) + +function DailyMainCell:init() + local uiMap = self:getUIMap() + self.dailyCells = {} + for i = 1, 6 do + table.insert(self.dailyCells, uiMap["daily_cell.cell_" .. i]:addLuaComponent("app/ui/shop/cell/daily_cell")) + end + self.refreshNode = uiMap["daily_cell.refresh_node"] + self.txTime = uiMap["daily_cell.refresh_node.tx_time"] + -- 广告刷新 + self.btnRefreshAd = uiMap["daily_cell.refresh_node.btn_refresh_ad"] + self.imgAd = uiMap["daily_cell.refresh_node.btn_refresh_ad.img_ad"] + self.txAd = uiMap["daily_cell.refresh_node.btn_refresh_ad.tx_ad"] + self.txTimeAd = uiMap["daily_cell.refresh_node.btn_refresh_ad.tx_time"] + -- 免费刷新/钻石刷新 + self.btnRefresh = uiMap["daily_cell.refresh_node.btn_refresh"] + self.imgCost = uiMap["daily_cell.refresh_node.btn_refresh.img_cost"] + self.txCost = uiMap["daily_cell.refresh_node.btn_refresh.tx_cost"] + self.txTimeCost = uiMap["daily_cell.refresh_node.btn_refresh.tx_time"] + self.txFree = uiMap["daily_cell.refresh_node.btn_refresh.tx_free"] + + self:updateTime() + self.sid = self.txTime:scheduleGlobal(function () + self:updateTime() + end, 1) + + self.btnRefresh:addClickListener(function() + if DataManager.ShopData:getDailyFreeRefreshRemainCount() > 0 then + -- 可以免费刷新 + self:onRefreshDaily(false) + elseif DataManager.ShopData:getDailyCostRefreshRemainCount() > 0 then + -- 可以道具刷新 + local cost = DataManager.ShopData:getDailyRefreshCost() + if not GFunc.checkCost(GFunc.getRewardId(cost), GFunc.getRewardNum(cost), true) then + return + end + self:onRefreshDaily(false) + + -- local params = {} + -- params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + -- params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + -- params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SHOP_DAILY + -- params.okFunc = function() + -- self:onRefreshDaily(false) + -- end + -- GFunc.showMessageBox(params) + end + end) + self.btnRefreshAd:addClickListener(function() + if DataManager.ShopData:getDailyAdRefreshRemainCount() <= 0 then + return + end + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_DAILY_SHOP_REFRESH, function() + self:onRefreshDaily(true) + end) + end) +end + +function DailyMainCell:updateTime() + local remainTime = DataManager.ShopData:getDailyRefreshAutoTime() + self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_5, remainTime)) + if DataManager.ShopData:getDailyAdRefreshRemainCount() <= 0 then + self.txTimeAd:setText(remainTime) + end +end + +function DailyMainCell:refresh() + for idx, cell in pairs(self.dailyCells) do + cell:refresh(idx) + end + + -- 广告 + if DataManager.ShopData:getDailyAdRefreshRemainCount() > 0 then + self.btnRefreshAd:setTouchEnable(true) + GFunc.setGrey(self.btnRefreshAd:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), false) + GFunc.setAdsSprite(self.imgAd, false) + self.txTimeAd:setText("(" .. DataManager.ShopData:getDailyAdRefreshRemainCount() .. "/" .. DataManager.ShopData:getDailyRefreshAdCount() .. ")") + self.btnRefreshAd:addRedPoint(80, 25, 0.8) + else + self.btnRefreshAd:setTouchEnable(false) + GFunc.setGrey(self.btnRefreshAd:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), true) + GFunc.setAdsSprite(self.imgAd, true) + self.btnRefreshAd:removeRedPoint() + end + self.txAd:setText(I18N:getGlobalText(I18N.GlobalConst.REFRESH_DESC_1)) + GFunc.centerImgAndTx(self.imgAd, self.txAd, 3) + + -- 免费/钻石 + if DataManager.ShopData:getDailyFreeRefreshRemainCount() > 0 then + -- 可以免费刷新 + self.btnRefresh:setTouchEnable(true) + GFunc.setGrey(self.btnRefresh:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), false) + self.imgCost:setActive(false) + self.txCost:setText(I18N:getGlobalText(I18N.GlobalConst.REFRESH_DESC_2)) + self.txCost:setAnchoredPositionX(0) + self.txTimeCost:setText("(" .. DataManager.ShopData:getDailyFreeRefreshRemainCount() .. "/" .. DataManager.ShopData:getDailyRefreshFreeCount() .. ")") + self.txFree:setText("") + self.btnRefresh:addRedPoint(80, 25, 0.8) + elseif DataManager.ShopData:getDailyCostRefreshRemainCount() > 0 then + -- 可以道具刷新 + self.btnRefresh:setTouchEnable(true) + GFunc.setGrey(self.btnRefresh:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), false) + local cost = DataManager.ShopData:getDailyRefreshCost() + self.imgCost:setActive(true) + self.imgCost:setSprite(GFunc.getIconResByReward(cost)) + self.txCost:setText(GFunc.getRewardNum(cost)) + GFunc.centerImgAndTx(self.imgCost, self.txCost, 3) + self.txTimeCost:setText("(" .. DataManager.ShopData:getDailyCostRefreshRemainCount() .. "/" .. DataManager.ShopData:getDailyRefreshCostCount() .. ")") + self.txFree:setText("") + self.btnRefresh:removeRedPoint() + else + -- 没刷新次数 + self.btnRefresh:setTouchEnable(false) + GFunc.setGrey(self.btnRefresh:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE), true) + self.imgCost:setActive(false) + self.txCost:setText("") + self.txTimeCost:setText("") + self.txFree:setText(I18N:getGlobalText(I18N.GlobalConst.REFRESH_DESC_2)) + self.btnRefresh:removeRedPoint() + end +end + +function DailyMainCell:onRefreshDaily(isAd) + ModuleManager.ShopManager:reqRefreshDailyGift(isAd) +end + +return DailyMainCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/daily_main_cell.lua.meta b/lua/app/ui/shop/cell/daily_main_cell.lua.meta new file mode 100755 index 00000000..56996144 --- /dev/null +++ b/lua/app/ui/shop/cell/daily_main_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e4c0e9f438df1454c8ebb6da4ec0cf77 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/force_skin_shop_cell.lua b/lua/app/ui/shop/cell/force_skin_shop_cell.lua new file mode 100755 index 00000000..113c0ab1 --- /dev/null +++ b/lua/app/ui/shop/cell/force_skin_shop_cell.lua @@ -0,0 +1,73 @@ +local ForceSkinShopCell = class("ForceSkinShopCell", BaseCell) + +function ForceSkinShopCell:init() + local uiMap = self:getUIMap() + self.imgQlt = uiMap["force_skin_shop_cell.content.img_qlt"] + self.imgArt = uiMap["force_skin_shop_cell.content.img_art"] + self.nameNode = uiMap["force_skin_shop_cell.content.name"] + self.txForceName = uiMap["force_skin_shop_cell.content.name.tx_force_name"] + self.txSkinName = uiMap["force_skin_shop_cell.content.name.tx_skin_name"] + self.costNode = uiMap["force_skin_shop_cell.cost"] + self.imgCost = uiMap["force_skin_shop_cell.cost.img_cost"] + self.txCost = uiMap["force_skin_shop_cell.cost.tx_cost"] + self.txTips = uiMap["force_skin_shop_cell.tx_tips"] + + self:addClickListener(function() + ModuleManager.ForceManager:showForceSkinInfoUI(self.skinId) + end) +end + +function ForceSkinShopCell:refresh(skinId) + self.skinId = skinId + local forceId = DataManager.ForceData:getSkinForceId(self.skinId) + local qlt = DataManager.ForceData:getSkinQlt(self.skinId) + local unlock = DataManager.ForceData:isSkinUnlock(self.skinId) + local getType = DataManager.ForceData:getSkinGetType(self.skinId) + local canUnlock = DataManager.ForceData:canUnlockSkin(self.skinId) + + self.imgQlt:setSprite(GConst.ATLAS_PATH.UI_FORCE_SKIN, "skin_force_bg_" .. qlt) + -- self.imgArt:setSprite(GConst.ATLAS_PATH.ICON_SKIN_FORCE_SHOP, self.skinId) + self.txForceName:setText(DataManager.ForceData:getForceName(forceId)) + self.txSkinName:setText(DataManager.ForceData:getSkinName(self.skinId)) + + if not canUnlock and not unlock then + local param = DataManager.ForceData:getSkinGetParam(self.skinId) + if getType == GConst.ForceConst.SKIN_GET_TYPE.SHOP then + self.costNode:setActive(true) + self.imgCost:setActive(false) + self.txTips:setText(GConst.EMPTY_STRING) + self.txCost:setAnchoredPositionX(0) + local giftCfg = ConfigManager:getConfig("act_gift")[param[1]] + local price = GFunc.getFormatPrice(giftCfg.recharge_id) + self.txCost:setText(price) + elseif getType == GConst.ForceConst.SKIN_GET_TYPE.FUNC then + self.costNode:setActive(false) + local func = param[1] + local target = param[2] + if func == 1 then + self.txTips:setText(DataManager.ForceData:getSkinGetWay(self.skinId), target) + else + self.txTips:setText(GConst.EMPTY_STRING) + end + elseif getType == GConst.ForceConst.SKIN_GET_TYPE.ACT then + self.costNode:setActive(false) + self.txTips:setText(DataManager.ForceData:getSkinGetWay(self.skinId)) + elseif getType == GConst.ForceConst.SKIN_GET_TYPE.EXCHANGE then + self.costNode:setActive(true) + self.imgCost:setActive(true) + self.txTips:setText(GConst.EMPTY_STRING) + local giftCfg = ConfigManager:getConfig("act_gift")[param[1]] + local cost = giftCfg.item_cost[1] + local id = GFunc.getRewardId(cost) + local num = GFunc.getRewardNum(cost) + self.imgCost:setSprite(GFunc.getIconRes(id)) + self.txCost:setText(num) + GFunc.centerImgAndTx(self.imgCost, self.txCost, 3) + end + else + self.costNode:setActive(false) + self.txTips:setText("" .. I18N:getGlobalText(I18N.GlobalConst.SKIN_FORCE_DESC_6) .. "") + end +end + +return ForceSkinShopCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/force_skin_shop_cell.lua.meta b/lua/app/ui/shop/cell/force_skin_shop_cell.lua.meta new file mode 100755 index 00000000..2daf4368 --- /dev/null +++ b/lua/app/ui/shop/cell/force_skin_shop_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8cf3773a5a408624ea6f94ec77d9d32d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/gem_cell.lua b/lua/app/ui/shop/cell/gem_cell.lua old mode 100644 new mode 100755 index 82b136a2..e35aa62f --- a/lua/app/ui/shop/cell/gem_cell.lua +++ b/lua/app/ui/shop/cell/gem_cell.lua @@ -1,107 +1,60 @@ local GemCell = class("GemCell", BaseCell) function GemCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gem_cell.bg"] - self.icon = uiMap["gem_cell.icon"] - self.nameText = uiMap["gem_cell.num"] - self.priceText = uiMap["gem_cell.price"] - self.doubleNode = uiMap["gem_cell.double_bg"] - self.doubleDesc = uiMap["gem_cell.double_bg.desc"] - self.doubleText = uiMap["gem_cell.double_bg.num"] - self.doubleImg = uiMap["gem_cell.double_bg.icon"] - self.doubleOriginText = uiMap["gem_cell.double_bg.origin_num"] - self.doubleOriginLine = uiMap["gem_cell.double_bg.line"] - self.adNode = uiMap["gem_cell.ad"] - self.adImg = uiMap["gem_cell.ad.image"] - self.adText = uiMap["gem_cell.ad.desc"] - self.sellOutText = uiMap["gem_cell.sell_out"] + local uiMap = self:getUIMap() + self.content = uiMap["gem_cell.content"] + self.img = uiMap["gem_cell.content.img"] + self.txReward = uiMap["gem_cell.content.tx_reward"] + self.txPrice = uiMap["gem_cell.content.tx_price"] + self.tag = uiMap["gem_cell.content.tag"] + self.txDouble = uiMap["gem_cell.content.tag.tx_double"] + self.imgIcon = uiMap["gem_cell.content.tag.img_icon"] + self.txDoubleNum = uiMap["gem_cell.content.tag.tx_num"] - self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) -end - -function GemCell:refresh(id, cfgInfo) - local rechargeId = cfgInfo.recharge_id - local reward = cfgInfo.reward[1] - local limit = cfgInfo.limit or 0 - local adMaxTimes = cfgInfo.daily or 0 - local bought = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.MALL_TREASURE, id) - - local isFree = rechargeId == nil - local hasDoubleTimes = bought < limit - local leftDoubleTimes = limit - bought - - self.icon:setSprite(GConst.ATLAS_PATH.SHOP, GConst.ShopConst.GEM_ICON_NAME[id]) - if isFree then -- 免费广告 - self.adNode:setVisible(true) - self.priceText:setVisible(false) - self.doubleNode:setVisible(false) - - GFunc.setAdsSprite(self.adImg) - local adLeftCount = adMaxTimes - bought - if adLeftCount > 0 then - self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) - GFunc.centerImgAndTx(self.adImg, self.adText, 5) - self.sellOutText:setVisible(false) - - self:getBaseObject():addRedPoint(100, 145, 0.6) + self.baseObject:addClickListener(function() + local isDouble = DataManager.PaymentData:getGemStoreDoubleCount(self.id) > 0 + local doubleType = "" + if isDouble then + doubleType = BIReport.PAY_DOUBLE.DOUBLED else - self.adNode:setVisible(false) - self.sellOutText:setVisible(true) - - self:getBaseObject():removeRedPoint() + doubleType = BIReport.PAY_DOUBLE.NORMAL end - else -- 付费 - self.adNode:setVisible(false) - self.priceText:setVisible(true) - - if hasDoubleTimes then -- 有双倍效果 - self.doubleNode:setVisible(true) - self.doubleDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, tostring(leftDoubleTimes))) -- 剩余次数:{0} - self.doubleText:setText("+" .. tostring(reward.num * 2)) - -- GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5) - self.doubleOriginText:setText(reward.num) - self.doubleOriginLine:setVisible(true) - - self.doubleDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO):ForceMeshUpdate() - local txW = self.doubleDesc:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).renderedWidth - local setWidth = txW + 30 - local curWidth = self.doubleNode:getSizeDeltaX() - if setWidth > curWidth then - self.doubleNode:setSizeDeltaX(setWidth) - end - else - self.doubleNode:setVisible(false) - self.doubleOriginLine:setVisible(false) - end - self.sellOutText:setVisible(false) - end - self.nameText:setText(reward.num) - self.priceText:setText(GFunc.getFormatPrice(rechargeId)) - - self:addClickListener(function() - self:onClickGift(id, isFree) + ModuleManager.ShopManager:onBuyGemGift(self.id, doubleType) end) end -function GemCell:onClickGift(id, isAd) - if isAd then - local cfgInfo = DataManager.ShopData:getMallTreasureConfig()[id] - local adMaxTimes = cfgInfo.daily or 0 - local bought = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.MALL_TREASURE, id) - local adLeftCount = adMaxTimes - bought - if adLeftCount > 0 then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MALL_TREASURE, function () - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.MALL_TREASURE) - end) - end +function GemCell:refresh(id) + self.id = id + local cfg = DataManager.ShopData:getGemConfig(self.id) + local reward = cfg.reward[1] + if self.id >= 6 then + self.img:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_diamond_6") else - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.MALL_TREASURE) + self.img:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_diamond_" .. self.id) + end + self.txReward:setText(GFunc.getRewardNum(reward)) + local rechargeId = cfg.recharge_id + local priceStr = nil + if rechargeId and ConfigManager:getConfig("recharge")[rechargeId] then + priceStr = GFunc.getFormatPrice(rechargeId) + end + self.txPrice:setText(priceStr) + + local count = DataManager.PaymentData:getGemStoreDoubleCount(self.id) + if count > 0 then + self.tag:setActive(true) + self.txReward:setAnchoredPositionY(-90) + self.txDouble:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, count)) + self.txDoubleNum:setText("+" .. GFunc.getRewardNum(reward)) + GFunc.centerImgAndTx(self.imgIcon, self.txDoubleNum, 0) + else + self.tag:setActive(false) + self.txReward:setAnchoredPositionY(-50) end end -function GemCell:setVisible(visible) - self.baseObject:setVisible(visible) +function GemCell:setVisible(visible, scale) + self.baseObject:setVisible(visible, scale) end return GemCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gem_cell.lua.meta b/lua/app/ui/shop/cell/gem_cell.lua.meta old mode 100644 new mode 100755 index a696b8c9..d0c6e6d1 --- a/lua/app/ui/shop/cell/gem_cell.lua.meta +++ b/lua/app/ui/shop/cell/gem_cell.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e0b616e04a175984c89094cf09b2e892 +guid: f5288d41d8ad3824f9931dd5f28a0f8c ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/shop/cell/gem_main_cell.lua b/lua/app/ui/shop/cell/gem_main_cell.lua new file mode 100755 index 00000000..25fc627e --- /dev/null +++ b/lua/app/ui/shop/cell/gem_main_cell.lua @@ -0,0 +1,18 @@ +local GemMainCell = class("GemMainCell", BaseCell) + +function GemMainCell:refresh() + local uiMap = self:getUIMap() + + local MallTreasureCfg = ConfigManager:getConfig("mall_treasure") + for i = 1, 18 do + local cell = uiMap["gem_cell.cell_" .. i]:addLuaComponent("app/ui/shop/cell/gem_cell") + if MallTreasureCfg[i] then + cell:refresh(i) + cell:setVisible(true) + else + cell:setVisible(false) + end + end +end + +return GemMainCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gem_main_cell.lua.meta b/lua/app/ui/shop/cell/gem_main_cell.lua.meta new file mode 100755 index 00000000..c2e6eb3e --- /dev/null +++ b/lua/app/ui/shop/cell/gem_main_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b59b86dcb675f164ea5d3403e11f6ee4 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/gem_sell_cell.lua b/lua/app/ui/shop/cell/gem_sell_cell.lua deleted file mode 100644 index af76718b..00000000 --- a/lua/app/ui/shop/cell/gem_sell_cell.lua +++ /dev/null @@ -1,61 +0,0 @@ -local GemSellCell = class("GemSellCell", BaseCell) - -function GemSellCell:init() - local uiMap = self.baseObject:genAllChildren() - local titleTx = uiMap["gem_sell_cell.title_bg.text"] - titleTx:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GEM)) - - self.cells = {} - self.cellHeight = 0 - local cellHeight = nil - local cfg = DataManager.ShopData:getMallTreasureConfig() -- 审核模式读取另一张表 - for i = 1, 19 do -- 正常9个 提审19个 - local cell = uiMap["gem_sell_cell.cell_" .. i] - if cellHeight == nil then - local w, h = cell:fastGetSizeDelta() - cellHeight = h - end - local id = i - if CS.BF.BFMain.IsShenhe then - id = i + 1 -- 配置表结构约定 - end - if cfg[id] then - local cellComp = cell:addLuaComponent("app/ui/shop/cell/gem_cell") - cell:setVisible(true) - table.insert(self.cells, cellComp) - else - cell:setVisible(false) - end - end - local totalCount = #self.cells - if totalCount > 0 then - self.cellHeight = self.cellHeight + (20 + cellHeight) * math.ceil(totalCount / 3) + 80 - end -end - -function GemSellCell:refresh() - local cfg = DataManager.ShopData:getMallTreasureConfig() - for idx, v in ipairs(self.cells) do - local id = idx - if CS.BF.BFMain.IsShenhe then - id = idx + 1 -- 配置表结构约定 - v:refresh(id, cfg[id]) - else - v:refresh(id, cfg[id]) - end - end -end - -function GemSellCell:getCellHeight() - return self.cellHeight -end - -function GemSellCell:getIsOpen() - return true -end - -function GemSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return GemSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gem_sell_cell.lua.meta b/lua/app/ui/shop/cell/gem_sell_cell.lua.meta deleted file mode 100644 index 637fc3d2..00000000 --- a/lua/app/ui/shop/cell/gem_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 061713e2f54219449b0b87d922acaacf -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/gift_reward_cell.lua b/lua/app/ui/shop/cell/gift_reward_cell.lua deleted file mode 100644 index 0cf571f5..00000000 --- a/lua/app/ui/shop/cell/gift_reward_cell.lua +++ /dev/null @@ -1,47 +0,0 @@ -local GiftRewardCell = class("GiftRewardCell", BaseCell) - -function GiftRewardCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gift_reward_cell.bg"] - self.icon = uiMap["gift_reward_cell.icon"] - self.fragmenImg = uiMap["gift_reward_cell.fragment"] - self.numTx = uiMap["gift_reward_cell.num"] - - self.baseObject:addClickListener(function() - if self.clickCallback then - self.clickCallback() - end - end) -end - -function GiftRewardCell:refreshByConfig(reward) - local id = reward.id - local num = reward.num - local heroCfgInfo = ConfigManager:getConfig("hero")[id] - if heroCfgInfo then - local qlt = heroCfgInfo.qlt - self.bg:setSprite(GConst.ATLAS_PATH.SHOP, "shop_gift_bg_" .. qlt) - self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroCfgInfo.icon)) - self.fragmenImg:setVisible(true) - self.numTx:setText("X" .. tostring(num)) - else - local itemCfgInfo = ConfigManager:getConfig("item")[id] - self.bg:setSprite(GConst.ATLAS_PATH.SHOP, "shop_gift_bg") - self.icon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, tostring(itemCfgInfo.icon)) - self.fragmenImg:setVisible(false) - self.numTx:setText(num) - end - self:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(reward.id, reward.type, self.baseObject) - end) -end - -function GiftRewardCell:addClickListener(callback) - self.clickCallback = callback -end - -function GiftRewardCell:setVisible(visible, scale) - self.baseObject:setVisible(visible, scale) -end - -return GiftRewardCell diff --git a/lua/app/ui/shop/cell/gift_reward_cell.lua.meta b/lua/app/ui/shop/cell/gift_reward_cell.lua.meta deleted file mode 100644 index e9864d51..00000000 --- a/lua/app/ui/shop/cell/gift_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 88089f781c49b0c4d8a41180459d2f3e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/gold_cell.lua b/lua/app/ui/shop/cell/gold_cell.lua old mode 100644 new mode 100755 index 4885000d..8d1dcdf9 --- a/lua/app/ui/shop/cell/gold_cell.lua +++ b/lua/app/ui/shop/cell/gold_cell.lua @@ -1,101 +1,83 @@ local GoldCell = class("GoldCell", BaseCell) function GoldCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gold_cell.bg"] - self.icon = uiMap["gold_cell.icon"] - self.nameText = uiMap["gold_cell.num"] - self.costNode = uiMap["gold_cell.cost"] - self.costImg = uiMap["gold_cell.cost.icon"] - self.costText = uiMap["gold_cell.cost.num"] - self.adNode = uiMap["gold_cell.ad"] - self.adImg = uiMap["gold_cell.ad.image"] - self.adText = uiMap["gold_cell.ad.desc"] - self.descText = uiMap["gold_cell.desc"] - self.sellOutText = uiMap["gold_cell.sell_out"] + local uiMap = self:getUIMap() + self.content = uiMap["gold_cell.content"] + self.img = uiMap["gold_cell.content.img"] + self.txReward = uiMap["gold_cell.content.tx_reward"] + self.txDesc = uiMap["gold_cell.content.desc.tx_desc"] + self.costNode = uiMap["gold_cell.content.cost"] + self.imgCost = uiMap["gold_cell.content.cost.img_cost"] + self.txCost = uiMap["gold_cell.content.cost.tx_cost"] - self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) -- 已购买 -end - -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(id) - - self.icon:setSprite(GConst.ATLAS_PATH.SHOP, GConst.ShopConst.COIN_ICON_NAME[id]) - - local hasDaily = adMaxTimes > 0 - local adBought = DataManager.ShopData:getCommonDailyCoinAdBuyCount() -- 金币礼包AD购买次数 - local isAd = hasDaily and adMaxTimes > adBought - if isAd then -- 免费广告 - self.adNode:setVisible(true) - self.costNode:setVisible(false) - - GFunc.setAdsSprite(self.adImg) - local adLeftCount = adMaxTimes - adBought - if adLeftCount > 0 then - self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) - GFunc.centerImgAndTx(self.adImg, self.adText, 5) - self.sellOutText:setVisible(false) - - self:getBaseObject():addRedPoint(100, 145, 0.6) + self.baseObject:addClickListener(function() + if DataManager.ShopData:getGoldBuyRemainCountByFree(self.id) > 0 then + -- 免费 + ModuleManager.ShopManager:reqBuyGoldGift(self.id) + + elseif DataManager.ShopData:getGoldBuyRemainCountByAd(self.id) > 0 then + -- 广告免费 + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_SHOP_GOLD, function () + ModuleManager.ShopManager:reqBuyGoldGift(self.id) + end) else - self.adNode:setVisible(false) - self.sellOutText:setVisible(true) + -- 付费 + local cost = DataManager.ShopData:getGoldConfig(self.id).cost + if not GFunc.checkCost(GFunc.getRewardId(cost), GFunc.getRewardNum(cost), true) then + return + end - self:getBaseObject():removeRedPoint() + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_33) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.SHOP_GOLD + params.okFunc = function() + ModuleManager.ShopManager:reqBuyGoldGift(self.id) + end + GFunc.showMessageBox(params) end - else -- 付费 - self.adNode:setVisible(false) - self.costNode:setVisible(true) - - self.costText:setText(tostring(cost.num)) - GFunc.centerImgAndTx(self.costImg, self.costText, 5) - self.sellOutText:setVisible(false) - - self:getBaseObject():removeRedPoint() - end - self.nameText:setText(GFunc.num2Str(goldNum)) - - self.descText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_14)) -- 金币礼包 - - self:addClickListener(function() - self:onClickGift(id, isAd) end) end -function GoldCell:setVisible(visible) - self.baseObject:setVisible(visible) -end +function GoldCell:refresh(id) + self.id = id + local cfg = DataManager.ShopData:getGoldConfig(self.id) + local reward = cfg.gold -function GoldCell:onClickGift(id, isAd) - local cfg = DataManager.ShopData:getMallGoldConfig() - local cfgInfo = cfg[id] - if isAd then - local adMaxTimes = cfgInfo and cfgInfo.daily or 0 - local bought = DataManager.ShopData:getCommonDailyCoinAdBuyCount() -- 金币礼包购买次数 - local adLeftCount = adMaxTimes - bought - if adLeftCount > 0 then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MALL_GOLD, function () - ModuleManager.ShopManager:buyMallIdleCoin(id, isAd) - end) + self.img:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_species_" .. self.id) + self.txDesc:setText(I18N:getText("mall_gold", self.id, "name")) + self.txReward:setText(GFunc.getRewardNum(reward)) + + local totalFreeCount = DataManager.ShopData:getBuyGoldFreeCount(self.id) + local remainFreeCount = DataManager.ShopData:getGoldBuyRemainCountByFree(self.id) + local totalAdCount = DataManager.ShopData:getBuyGoldAdCount(self.id) + local remainAdCount = DataManager.ShopData:getGoldBuyRemainCountByAd(self.id) + if remainFreeCount > 0 then + -- 免费 + self.baseObject:addRedPoint(80, 120, 1.2) + self.imgCost:setActive(false) + self.txCost:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_DESC) .. "(" .. remainFreeCount .. "/" .. totalFreeCount .. ")") + self.txCost:setAnchoredPositionX(0) + elseif remainAdCount > 0 then + -- 广告免费 + if SDKManager:isAdLoaded() then + self.baseObject:addRedPoint(80, 120, 1.2) + else + self.baseObject:removeRedPoint() end + + self.imgCost:setActive(true) + GFunc.setAdsSprite(self.imgCost) + self.txCost:setText("(" .. remainAdCount .. "/" .. totalAdCount .. ")") + GFunc.centerImgAndTx(self.imgCost, self.txCost, 3) else - local costs = cfgInfo and cfgInfo.cost or {} - if not GFunc.checkCost(costs.id, costs.num, true) then - return - end - -- 二次提示 - local params = { - content = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_33), -- 是否使用钻石刷新每日特惠? - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK), - okFunc = function() - ModuleManager.ShopManager:buyMallIdleCoin(id, isAd) - end - } - GFunc.showMessageBox(params) + -- 付费 + local cost = cfg.cost + self.baseObject:removeRedPoint() + self.imgCost:setActive(true) + self.imgCost:setSprite(GFunc.getIconResByReward(cost)) + self.txCost:setText(GFunc.getRewardNum(cost)) + GFunc.centerImgAndTx(self.imgCost, self.txCost, 3) end end diff --git a/lua/app/ui/shop/cell/gold_cell.lua.meta b/lua/app/ui/shop/cell/gold_cell.lua.meta old mode 100644 new mode 100755 index 17b16cb2..58ed5373 --- a/lua/app/ui/shop/cell/gold_cell.lua.meta +++ b/lua/app/ui/shop/cell/gold_cell.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a579df8023b985842b736d3e6beba288 +guid: 24aeee5090b74a54eb80b1161f687743 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/shop/cell/gold_main_cell.lua b/lua/app/ui/shop/cell/gold_main_cell.lua new file mode 100755 index 00000000..c8801eb3 --- /dev/null +++ b/lua/app/ui/shop/cell/gold_main_cell.lua @@ -0,0 +1,12 @@ +local GoldMainCell = class("GoldMainCell", BaseCell) + +function GoldMainCell:refresh() + local uiMap = self:getUIMap() + + for i = 1, 3 do + local cell = uiMap["gold_cell.cell_" .. i]:addLuaComponent("app/ui/shop/cell/gold_cell") + cell:refresh(i) + end +end + +return GoldMainCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gold_main_cell.lua.meta b/lua/app/ui/shop/cell/gold_main_cell.lua.meta new file mode 100755 index 00000000..28de3120 --- /dev/null +++ b/lua/app/ui/shop/cell/gold_main_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7cc8251bbc63b154f8ccb8e582d25e4c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/gold_sell_cell.lua b/lua/app/ui/shop/cell/gold_sell_cell.lua deleted file mode 100644 index 7cd52e9c..00000000 --- a/lua/app/ui/shop/cell/gold_sell_cell.lua +++ /dev/null @@ -1,51 +0,0 @@ -local GoldSellCell = class("GoldSellCell", BaseCell) - -function GoldSellCell:init() - local uiMap = self.baseObject:genAllChildren() - local titleTx = uiMap["gold_sell_cell.title_bg.text"] - titleTx:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GOLD)) - - self.cells = {} - self.cellHeight = 0 - local cellHeight = nil - local cfg = DataManager.ShopData:getMallGoldConfig() - for i = 1, 3 do - local cell = uiMap["gold_sell_cell.cell_" .. i] - if cellHeight == nil then - local w, h = cell:fastGetSizeDelta() - cellHeight = h - end - if cfg[i] then - local cellComp = cell:addLuaComponent("app/ui/shop/cell/gold_cell") - cell:setVisible(true) - table.insert(self.cells, cellComp) - else - cell:setVisible(false) - end - end - local totalCount = #self.cells - if totalCount > 0 then - self.cellHeight = self.cellHeight + (20 + cellHeight) * math.ceil(totalCount / 3) + 80 - end -end - -function GoldSellCell:refresh() - local cfg = DataManager.ShopData:getMallGoldConfig() - for k, v in ipairs(self.cells) do - v:refresh(k, cfg[k]) - end -end - -function GoldSellCell:getCellHeight() - return self.cellHeight -end - -function GoldSellCell:getIsOpen() - return true -end - -function GoldSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return GoldSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gold_sell_cell.lua.meta b/lua/app/ui/shop/cell/gold_sell_cell.lua.meta deleted file mode 100644 index cfaec314..00000000 --- a/lua/app/ui/shop/cell/gold_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9790bf19c429525488b974b5eb9c2cc2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/grow_cell.lua b/lua/app/ui/shop/cell/grow_cell.lua deleted file mode 100644 index 5c24d964..00000000 --- a/lua/app/ui/shop/cell/grow_cell.lua +++ /dev/null @@ -1,91 +0,0 @@ -local GrowCell = class("GrowCell", BaseCell) -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"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - - -- 不限时时使用1类型 否则使用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"] - - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function GrowCell:refresh(idx, gift) - self.gift = gift - self.actId = gift.current_grow_up_id - local cfgInfo = DataManager.ShopData:getActGrowUpGiftConfig()[self.actId] - -- 超值 - self.offText:setText(tostring(cfgInfo.value) .. "%") - -- 限购 - if cfgInfo.limit then - self.limitImg:setVisible(true) - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, tostring(cfgInfo.limit))) -- 限购{0}次 - else - self.limitImg:setVisible(false) - end - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_13)) -- 成长礼包 - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时 - self.timeImg:setVisible(true) - self:refreshTime() - - self.clickArea:addClickListener(function() - self:onClickGift(self.actId) - end) -end - -function GrowCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function GrowCell:refreshTime() - local remainTime = DataManager.ShopData:getGrowUpGiftRemainTime() - if remainTime <= 0 then - remainTime = 0 - end - self.timeText:setText(Time:formatNumTime(remainTime)) -end - -function GrowCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW) -end - -return GrowCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/grow_cell.lua.meta b/lua/app/ui/shop/cell/grow_cell.lua.meta deleted file mode 100644 index 1e93b048..00000000 --- a/lua/app/ui/shop/cell/grow_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c7dad95a4d35f014fbe29f4d221fd858 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/grow_sell_cell.lua b/lua/app/ui/shop/cell/grow_sell_cell.lua deleted file mode 100644 index 26b24aad..00000000 --- a/lua/app/ui/shop/cell/grow_sell_cell.lua +++ /dev/null @@ -1,60 +0,0 @@ -local GrowSellCell = class("GrowSellCell", BaseCell) -local GROW_CELL = "app/ui/shop/cell/grow_cell" -local BASE_CELL_HEIGHT = 320 - -function GrowSellCell:init() - self.actGifts = {} - local uiMap = self.baseObject:genAllChildren() - self.scrollRectObj = uiMap["grow_sell_cell.scroll_rect"] - self.contentObj = uiMap["grow_sell_cell.scroll_rect.viewport.content"] - self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRect:addInitCallback(function() - return GROW_CELL - end) - self.scrollRect:addRefreshCallback(function(idx, cell) - if self.actGifts and self.actGifts[idx] then - cell:refresh(idx, self.actGifts[idx]) - end - end) - self.scrollRect:clearCells() - - self.cellHeight = BASE_CELL_HEIGHT -end - -function GrowSellCell:refresh() - self.actGifts = {} - table.insert(self.actGifts, DataManager.ShopData:getGrowUpGift()) - self.scrollRect:refillCells(#self.actGifts) - - self:getBaseObject():setSizeDeltaY(self:getCellHeight()) - self.scrollRectObj:setSizeDeltaY(self:getCellHeight()) -end - -function GrowSellCell:refreshTime() - if self.scrollRect then - if self.curCellCount ~= #self.actGifts then - self.curCellCount = self.actGifts - self:refresh() - else - self.scrollRect:refreshAll() - end - end -end - -function GrowSellCell:getCellCount() - return self.actGifts and #self.actGifts or 0 -end - -function GrowSellCell:getCellHeight() - return BASE_CELL_HEIGHT * self:getCellCount() -end - -function GrowSellCell:getIsOpen() - return DataManager.ShopData:hasGrowUpGift() -end - -function GrowSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return GrowSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/grow_sell_cell.lua.meta b/lua/app/ui/shop/cell/grow_sell_cell.lua.meta deleted file mode 100644 index fac15966..00000000 --- a/lua/app/ui/shop/cell/grow_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3734b11b82b80834393166a49267ea2c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/hot_cell.lua b/lua/app/ui/shop/cell/hot_cell.lua deleted file mode 100644 index 79e8ee0d..00000000 --- a/lua/app/ui/shop/cell/hot_cell.lua +++ /dev/null @@ -1,119 +0,0 @@ -local HotCell = class("HotCell", BaseCell) - -local AD_REWARD_ICON = { - [GConst.ItemConst.ITEM_ID_GOLD] = "shop_species_1", - [GConst.ItemConst.ITEM_ID_GEM] = "shop_diamond_1" -} - -function HotCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["hot_cell.bg"] - self.icon = uiMap["hot_cell.icon"] - self.nameText = uiMap["hot_cell.name"] - self.adNode = uiMap["hot_cell.ad"] - self.adImg = uiMap["hot_cell.ad.image"] - self.adText = uiMap["hot_cell.ad.desc"] - self.costNode = uiMap["hot_cell.cost"] - self.costImg = uiMap["hot_cell.cost.icon"] - self.costText = uiMap["hot_cell.cost.num"] - self.heroNode = uiMap["hot_cell.hero"] - self.heroCell = CellManager:addCellComp(uiMap["hot_cell.hero.hero_cell"], GConst.TYPEOF_LUA_CLASS.HERO_CELL) - self.heroNumText = uiMap["hot_cell.hero.num_tx"] - self.sellOutText = uiMap["hot_cell.sell_out"] - - self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) -- 已购买 -end - -function HotCell:refresh(data) - self.data = data - local id = data.id - local index = data.good_index - local bought = data.bought - local cfgInfo = DataManager.ShopData:getMallDailyConfig()[id] - local reward = cfgInfo.good and cfgInfo.good[index] - local cost = cfgInfo.cost and cfgInfo.cost[index] - - -- local isHeroReward = id ~= 1 -- 约定 - local isHeroReward = false - local isFree = id == 1 -- 约定 - - if isHeroReward then - self.icon:setVisible(false) - self.heroNode:setVisible(true) - - local heroEntity = DataManager.HeroData:getHeroById(reward.id) - if heroEntity then - self.heroCell:refresh(heroEntity) - else - self.heroCell:refreshWithCfgId(reward.id) - end - self.heroNumText:setText("X" .. tostring(reward.num)) - self.nameText:setText(ModuleManager.HeroManager:getHeroName(reward.id, false)) - else - self.icon:setVisible(true) - self.heroNode:setVisible(false) - - self.icon:setSprite(GConst.ATLAS_PATH.SHOP, AD_REWARD_ICON[reward.id]) - self.nameText:setText(reward.num) - end - if isFree then -- (1)广告商品 - self.adNode:setVisible(true) - self.costNode:setVisible(false) - - GFunc.setAdsSprite(self.adImg) - local adLeftCount = DataManager.ShopData:getMallDailyFirstItemAdMaxCount() - bought - if adLeftCount > 0 then - self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) - GFunc.centerImgAndTx(self.adImg, self.adText, 5) - self.sellOutText:setVisible(false) - - self:getBaseObject():addRedPoint(100, 145, 0.6) - else - self.adNode:setVisible(false) - self.sellOutText:setVisible(true) - - self:getBaseObject():removeRedPoint() - end - else -- (2,3)金币(4,5,6)钻石商品 - self.adNode:setVisible(false) - self.costNode:setVisible(true) - - local leftCount = DataManager.ShopData:getMallDailyGoodsLimitCount() - bought - if leftCount > 0 then - self.costImg:setSprite(GFunc.getIconRes(cost.id)) - self.costText:setText(cost.num) - GFunc.centerImgAndTx(self.costImg, self.costText, 5) - self.sellOutText:setVisible(false) - else - self.costNode:setVisible(false) - self.sellOutText:setVisible(true) - end - end - - self:addClickListener(function() - self:onClickGift(id, isFree) - end) -end - -function HotCell:onClickGift(id, isAd) - local bought = self.data.bought - if isAd then - local adLeftCount = DataManager.ShopData:getMallDailyFirstItemAdMaxCount() - bought - if adLeftCount > 0 then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MALL_DAILY, function () - ModuleManager.ShopManager:buyMallDailyGift(id, isAd) - end) - end - else - local leftCount = DataManager.ShopData:getMallDailyGoodsLimitCount() - bought - if leftCount > 0 then - ModuleManager.ShopManager:buyMallDailyGift(id, isAd) - end - end -end - -function HotCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return HotCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/hot_cell.lua.meta b/lua/app/ui/shop/cell/hot_cell.lua.meta deleted file mode 100644 index 59d1e0a5..00000000 --- a/lua/app/ui/shop/cell/hot_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f0d28230c07310f42b57246a5307c8f1 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/hot_sell_cell.lua b/lua/app/ui/shop/cell/hot_sell_cell.lua deleted file mode 100644 index 64b4cbe2..00000000 --- a/lua/app/ui/shop/cell/hot_sell_cell.lua +++ /dev/null @@ -1,115 +0,0 @@ -local HotSellCell = class("HotSellCell", BaseCell) -local HOT_CELL = "app/ui/shop/cell/hot_cell" -local CELL_COUNT = 6 - -function HotSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.cellHeight = self.baseObject:fastGetSizeDeltaY() + 20 - - uiMap["hot_sell_cell.title_bg.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_28)) -- 每日特惠 - uiMap["hot_sell_cell.help_btn"]:addClickListener(function() - ModuleManager.TipsManager:showDescTips(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_29), uiMap["hot_sell_cell.help_btn"]) - end) - self.time1Tx = uiMap["hot_sell_cell.time_icon_1.text"] - self.time2Tx = uiMap["hot_sell_cell.time_icon_2.text"] - self.time3Tx = uiMap["hot_sell_cell.time_icon_3.text"] - self.cells = {} - for i = 1, CELL_COUNT do - local cellObj = uiMap["hot_sell_cell.cell_" .. i] - local cell = cellObj:addLuaComponent(HOT_CELL) - table.insert(self.cells, cell) - end - - self.refreshBtn = uiMap["hot_sell_cell.refresh_btn"] - self.refreshAdImg = uiMap["hot_sell_cell.refresh_btn.ad_img"] - self.refreshGemImg = uiMap["hot_sell_cell.refresh_btn.gem_img"] - self.refreshText = uiMap["hot_sell_cell.refresh_btn.desc"] - - self.refreshBtn:addClickListener(function() - self:onClickRefresh() - end) -end - -function HotSellCell:refresh() - local goods = DataManager.ShopData:getMallDailyGoods() - local freeRefreshCount = DataManager.ShopData:getMallDailyAdLeftCount() -- 剩余免费刷新次数 - local gemRefreshCount = DataManager.ShopData:getMallDailyDiamondLeftCount() -- 剩余钻石刷新次数 - local gemRefreshCost = DataManager.ShopData:getMallDailyDiamondResetCost() -- 钻石刷新消耗 - if freeRefreshCount > 0 then - self.refreshBtn:setActive(true) - self.refreshAdImg:setVisible(true) - GFunc.setAdsSprite(self.refreshAdImg) - self.refreshGemImg:setVisible(false) - self.refreshText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_REFRESH)) - self.refreshBtn:addRedPoint(80, 30, 0.6) - elseif gemRefreshCount > 0 then - self.refreshBtn:setActive(true) - self.refreshAdImg:setVisible(false) - self.refreshGemImg:setVisible(true) - self.refreshText:setText(gemRefreshCost) - self.refreshBtn:removeRedPoint() - else - self.refreshBtn:setActive(false) - self.refreshBtn:removeRedPoint() - end - - local goodsCount = goods and #goods or 0 - for i = 1, CELL_COUNT do - if i <= goodsCount then - self.cells[i]:setVisible(true) - self.cells[i]:refresh(goods[i]) - else - self.cells[i]:setVisible(false) - end - end -end - -function HotSellCell:refreshTime() - local remainTime = Time:getOverOfServerToday() - Time:getServerTime() - if remainTime < 0 then - remainTime = 0 - end - local h,m,s = GFunc.getTimeWithHMS(remainTime) - self.time1Tx:setText(h) - self.time2Tx:setText(m) - self.time3Tx:setText(s) -end - -function HotSellCell:getCellHeight() - return self.cellHeight -end - -function HotSellCell:getIsOpen() - return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_DAILY, true) -end - -function HotSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function HotSellCell:onClickRefresh() - local freeRefreshCount = DataManager.ShopData:getMallDailyAdLeftCount() -- 免费刷新次数 - local gemRefreshCount = DataManager.ShopData:getMallDailyDiamondLeftCount() -- 钻石刷新次数 - local gemRefreshCost = DataManager.ShopData:getMallDailyDiamondResetCost() -- 钻石刷新消耗 - - if freeRefreshCount > 0 then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MALL_DAILY_RESET, function () - ModuleManager.ShopManager:resetMallDailyGift(1) - end) - elseif gemRefreshCount > 0 then - if GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, gemRefreshCost, true) then - -- 二次提示 - local params = { - content = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_30), -- 是否使用钻石刷新每日特惠? - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK), - okFunc = function() - ModuleManager.ShopManager:resetMallDailyGift(2) - end - } - GFunc.showMessageBox(params) - end - end -end - -return HotSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/hot_sell_cell.lua.meta b/lua/app/ui/shop/cell/hot_sell_cell.lua.meta deleted file mode 100644 index d67388c1..00000000 --- a/lua/app/ui/shop/cell/hot_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6438f703cbc963a4980dbe66a3bb9059 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/level_cell.lua b/lua/app/ui/shop/cell/level_cell.lua deleted file mode 100644 index 75f5d2b3..00000000 --- a/lua/app/ui/shop/cell/level_cell.lua +++ /dev/null @@ -1,74 +0,0 @@ -local LevelCell = class("LevelCell", BaseCell) -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"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - - -- 不限时时使用1类型 否则使用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"] - - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function LevelCell:refresh(idx, cfgInfo, clickCallback) - -- 超值 - self.offText:setText(tostring(cfgInfo.value) .. "%") - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_23, tostring(cfgInfo.parameter))) -- {0}级助力礼包 - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时(隐藏) - self.timeImg:setVisible(false) - - self.clickArea:addClickListener(function() - self:onClickGift(cfgInfo.id) - end) -end - -function LevelCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function LevelCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -return LevelCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/level_cell.lua.meta b/lua/app/ui/shop/cell/level_cell.lua.meta deleted file mode 100644 index a09cb562..00000000 --- a/lua/app/ui/shop/cell/level_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 36fbab6ccc9948a4191206a7aa8d8735 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/level_sell_cell.lua b/lua/app/ui/shop/cell/level_sell_cell.lua deleted file mode 100644 index d35ad780..00000000 --- a/lua/app/ui/shop/cell/level_sell_cell.lua +++ /dev/null @@ -1,51 +0,0 @@ -local LevelSellCell = class("LevelSellCell", BaseCell) -local LEVEL_CELL = "app/ui/shop/cell/level_cell" -local BASE_CELL_HEIGHT = 320 - -function LevelSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.scrollRectObj = uiMap["level_sell_cell.scroll_rect"] - self.contentObj = uiMap["level_sell_cell.scroll_rect.viewport.content"] - self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRect:addInitCallback(function() - return LEVEL_CELL - end) - self.scrollRect:addRefreshCallback(function(idx, cell) - if self.actGiftCfg and self.actGiftCfg[idx] then - cell:refresh(idx, self.actGiftCfg[idx]) - end - end) - self.scrollRect:clearCells() - - self.cellHeight = BASE_CELL_HEIGHT -end - -function LevelSellCell:refresh() - local actIds = DataManager.ShopData:getLevelUpGiftActIds() - self.actGiftCfg = {} - local actGiftCfg = ConfigManager:getConfig("act_gift") - for i = 1, #actIds do - local cfgInfo = clone(actGiftCfg[actIds[i]]) - cfgInfo.id = actIds[i] - table.insert(self.actGiftCfg, cfgInfo) - end - self.scrollRect:refillCells(#self.actGiftCfg) - - self:getBaseObject():setSizeDeltaY(self:getCellHeight()) - self.scrollRectObj:setSizeDeltaY(self:getCellHeight()) -end - -function LevelSellCell:getCellHeight() - local cellCount = self.actGiftCfg and #self.actGiftCfg or 0 - return BASE_CELL_HEIGHT * cellCount -end - -function LevelSellCell:getIsOpen() - return #DataManager.ShopData:getLevelUpGiftActIds() > 0 -end - -function LevelSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -return LevelSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/level_sell_cell.lua.meta b/lua/app/ui/shop/cell/level_sell_cell.lua.meta deleted file mode 100644 index 810f6dc1..00000000 --- a/lua/app/ui/shop/cell/level_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1da2708abce3d574cb5878bf216d9524 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/pop_hero_cell.lua b/lua/app/ui/shop/cell/pop_hero_cell.lua deleted file mode 100644 index 8a332c35..00000000 --- a/lua/app/ui/shop/cell/pop_hero_cell.lua +++ /dev/null @@ -1,103 +0,0 @@ -local PopHeroCell = class("PopHeroCell", BaseCell) - -function PopHeroCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["pop_hero_cell.bg"] - self.icon = uiMap["pop_hero_cell.icon"] - self.matchImg = uiMap["pop_hero_cell.match_img"] - self.progressBg = uiMap["pop_hero_cell.progress_bg"] - self.progress = uiMap["pop_hero_cell.progress_bg.progress"] - self.progressTx = uiMap["pop_hero_cell.progress_bg.progress_tx"] - self.lvUpArrow = uiMap["pop_hero_cell.effect_node.ui_spine_obj"] - self.fragmenImg = uiMap["pop_hero_cell.progress_bg.fragment_img"] - self.newBg = uiMap["pop_hero_cell.new_bg"] - self.newTx = uiMap["pop_hero_cell.new_bg.text"] - self.numTx = uiMap["pop_hero_cell.num_tx"] - - self.baseObject:addClickListener(function() - if self.clickCallback then - self.clickCallback() - end - end) -end - -function PopHeroCell:refresh(heroEntity, num) - local heroInfo = heroEntity:getConfig() - self:_refresh(heroInfo) - - local canLvUp = heroEntity:canLvUp() - self.lvUpArrow:setVisible(canLvUp) - if canLvUp then - self.lvUpArrow:playAnim("animation", true, false) - end - self.fragmenImg:setVisible(not canLvUp) - local materials = heroEntity:getLvUpMaterials() or {} - local fragmentCount = DataManager.BagData.ItemData:getItemNumById(heroEntity:getFragmentId()) - local needFragmentCount = materials[1] or 1 - self.progressTx:setText(fragmentCount .. "/" .. needFragmentCount) - if fragmentCount >= needFragmentCount then - self.progress:setSprite(GConst.ATLAS_PATH.COMMON, "common_progress_1", nil, self.progress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)) - else - self.progress:setSprite(GConst.ATLAS_PATH.COMMON, "common_progress_2", nil, self.progress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)) - end - self.progress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = fragmentCount / needFragmentCount - if heroEntity:isUnlock() then - self.progressBg:setVisible(not heroEntity:isMaxLv()) - else - if canLvUp then - self.progressBg:setVisible(true) - else - self.progressBg:setVisible(false) - end - end - if heroEntity:isActived() or fragmentCount > 0 then - self.newBg:setVisible(false) - else - self.newBg:setVisible(true) - self.newTx:setText("New") - end - self.numTx:setText("X" .. tostring(num)) -end - -function PopHeroCell:refreshWithCfgId(id, num) - local heroInfo = ConfigManager:getConfig("hero")[id] - self:_refresh(heroInfo) - local lv = heroInfo.begin_lv - local lvInfo = ConfigManager:getConfig("hero_level")[lv] - local materials = lvInfo["cost_" .. heroInfo.qlt] - local fragmentCount = DataManager.BagData.ItemData:getItemNumById(heroInfo.item_id) - if fragmentCount > 0 then -- 已拥有,则不是NEW了 - local needFragmentCount = materials[1] or 1 - self.progressTx:setText(fragmentCount .. "/" .. needFragmentCount) - self.progress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = fragmentCount / needFragmentCount - self.progressBg:setVisible(true) - else - self.progressBg:setVisible(false) - end - self.lvUpArrow:setVisible(false) - self.fragmenImg:setVisible(true) - - if fragmentCount > 0 then - self.newBg:setVisible(false) - else - self.newBg:setVisible(true) - self.newTx:setText("New") - end - self.numTx:setText("X" .. tostring(num)) -end - -function PopHeroCell:_refresh(heroInfo) - self.bg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[heroInfo.qlt]) - self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon)) - self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) -end - -function PopHeroCell:addClickListener(callback) - self.clickCallback = callback -end - -function PopHeroCell:setVisible(visible, scale) - self.baseObject:setVisible(visible, scale) -end - -return PopHeroCell diff --git a/lua/app/ui/shop/cell/pop_hero_cell.lua.meta b/lua/app/ui/shop/cell/pop_hero_cell.lua.meta deleted file mode 100644 index cbcaf361..00000000 --- a/lua/app/ui/shop/cell/pop_hero_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 996bfe193d1cbf048921a6dc5f669192 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/pop_reward_cell.lua b/lua/app/ui/shop/cell/pop_reward_cell.lua deleted file mode 100644 index 4ef1042b..00000000 --- a/lua/app/ui/shop/cell/pop_reward_cell.lua +++ /dev/null @@ -1,82 +0,0 @@ -local PopRewardCell = class("PopRewardCell", BaseCell) - -function PopRewardCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["pop_reward_cell.bg"] - self.choose = uiMap["pop_reward_cell.choose"] - self.imgChoose = uiMap["pop_reward_cell.img_choose"] - if not self.itemCell then - self.itemCell = CellManager:addCellComp(uiMap["pop_reward_cell.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) - end - if not self.popHeroCell then - self.popHeroCell = CellManager:addCellComp(uiMap["pop_reward_cell.pop_hero_cell"], GConst.TYPEOF_LUA_CLASS.POP_HERO_CELL) - end - self.descTx = uiMap["pop_reward_cell.desc_text"] - self:addClickListener(function() - if self.clickCallback then - self.clickCallback() - end - end) -end - --- 显示道具 -function PopRewardCell:refresh(id, num, showBg) - self.choose:setActive(false) - self.imgChoose:setActive(false) - self:setClickListener(nil) - local cfgInfo = ConfigManager:getConfig("item")[id] - if cfgInfo then - self.bg:setVisible(showBg) - if cfgInfo.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then -- 英雄展示 - self.itemCell:getBaseObject():setActive(false) - self.popHeroCell:getBaseObject():setActive(true) - - local heroEntity = DataManager.HeroData:getHeroById(id) - if heroEntity then - self.popHeroCell:refresh(heroEntity, num) - else - self.popHeroCell:refreshWithCfgId(id, num) - end - self.popHeroCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(id, GConst.REWARD_TYPE.ITEM, self.popHeroCell:getBaseObject()) - end) - self.descTx:setText(ModuleManager.HeroManager:getHeroName(id)) - else -- 通用道具 - self.itemCell:getBaseObject():setActive(true) - self.popHeroCell:getBaseObject():setActive(false) - - self.itemCell:refreshByCfg(id, 0) - self.itemCell:setNum("") - self.itemCell:addClickListener(function() - ModuleManager.TipsManager:showRewardTips(id, GConst.REWARD_TYPE.ITEM, self.itemCell:getBaseObject()) - end) - self.descTx:setText(num) - end - end -end - --- 显示可选 -function PopRewardCell:refreshChoose(clickFunc) - self.imgChoose:setActive(true) - self:setClickListener(clickFunc) -end - --- 只显示可选 -function PopRewardCell:refreshOnlyChoose(clickFunc) - self.choose:setActive(true) - self.imgChoose:setActive(false) - self.itemCell:getBaseObject():setActive(false) - self.popHeroCell:getBaseObject():setActive(false) - self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_12)) - self:setClickListener(clickFunc) -end - -function PopRewardCell:setClickListener(callback) - self.clickCallback = callback -end - -function PopRewardCell:setVisible(visible, scale) - self.baseObject:setVisible(visible, scale) -end - -return PopRewardCell diff --git a/lua/app/ui/shop/cell/pop_reward_cell.lua.meta b/lua/app/ui/shop/cell/pop_reward_cell.lua.meta deleted file mode 100644 index 0bbd47fd..00000000 --- a/lua/app/ui/shop/cell/pop_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c92892aa158345a47967c8b83f8fc181 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua b/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua deleted file mode 100644 index d449cf28..00000000 --- a/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua +++ /dev/null @@ -1,110 +0,0 @@ -local WeaponSellCell = class("WeaponSellCell", BaseCell) -local MAX_REWARD_COUNT = 4 -local BASE_CELL_HEIGHT = 320 -local GIFT_TYPE = PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT - -function WeaponSellCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg = uiMap["gift_cell.bg"] - self.bg:setTexture("assets/arts/textures/background/shop/shop_gift_banner_8_1.png") - - self.leftArrow = uiMap["gift_cell.left_arrow"] - self.rightArrow = uiMap["gift_cell.right_arrow"] - - self.offImg = uiMap["gift_cell.bg.off_img"] - self.offText = uiMap["gift_cell.bg.off_img.text"] - - self.limitImg = uiMap["gift_cell.bg.limit_img"] - self.limitText = uiMap["gift_cell.bg.limit_img.text"] - - self.titleText = uiMap["gift_cell.bg.title_text"] - - self.reweardLayout = uiMap["gift_cell.bg.reward_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) -- RefreshLayout() - if not self.rewardCellList then - self.rewardCellList = {} - for i = 1, MAX_REWARD_COUNT do - self.rewardCellList[i] = CellManager:addCellComp(uiMap["gift_cell.bg.reward_node.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.GIFT_REWARD_CELL) - end - end - self.priceText = uiMap["gift_cell.bg.price"] - self.timeImg = uiMap["gift_cell.bg.time_img"] - self.timeText = uiMap["gift_cell.bg.time_img.text"] - self.clickArea = uiMap["gift_cell.bg.click_area"] -end - -function WeaponSellCell:refresh() - local actGiftId = DataManager.ShopData:getGift(GIFT_TYPE).id - if actGiftId and actGiftId > 0 then - self.actGiftId = actGiftId - local cfgInfo = ConfigManager:getConfig("act_gift")[self.actGiftId] - -- 超值 - self.offText:setText(tostring(cfgInfo.value) .. "%") - -- 限购 - self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 - -- 标题 - self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_24)) - -- 奖励 - local rewardList = cfgInfo.reward - local count = rewardList and #rewardList or 0 - for i = 1, MAX_REWARD_COUNT do - if i <= count then - self.rewardCellList[i]:getBaseObject():setActive(true) - self.rewardCellList[i]:refreshByConfig(rewardList[i]) - else - self.rewardCellList[i]:getBaseObject():setActive(false) - end - end - self.reweardLayout:RefreshLayout() - -- 价格 - self.priceText:setText(GFunc.getFormatPrice(cfgInfo.recharge_id)) - -- 限时 - self.timeImg:setVisible(true) - self:refreshTime() - - self.clickArea:addClickListener(function() - self:onClickGift(self.actGiftId) - end) - else -- 倒计时结束的情况 - if self.actGiftId then - DataManager.ShopData:setDirty() - self.actGiftId = nil - end - end -end - -function WeaponSellCell:getCellHeight() - return BASE_CELL_HEIGHT -- 固定1个 -end - -function WeaponSellCell:getIsOpen() - return DataManager.ShopData:getGift(GIFT_TYPE) ~= nil -end - -function WeaponSellCell:setVisible(visible) - self.baseObject:setVisible(visible) -end - -function WeaponSellCell:onClickGift(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -function WeaponSellCell:refreshTime() - local remainTime = 0 - if self.actGiftId and self.actGiftId > 0 then - remainTime = DataManager.ShopData:getGiftRemainTime(GIFT_TYPE) - if remainTime <= 0 then - remainTime = 0 - end - end - self.timeText:setText(Time:formatNumTime(remainTime)) -end - -function WeaponSellCell:getCellCount() - if self.actGiftId and self.actGiftId > 0 then - return 1 - else - return 0 - end -end - -return WeaponSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua.meta b/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua.meta deleted file mode 100644 index 23218bc1..00000000 --- a/lua/app/ui/shop/cell/weapon_gift_sell_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3c6e1119654e6bd458010342be575fac -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/first_recharge_pop_ui.lua b/lua/app/ui/shop/first_recharge_pop_ui.lua deleted file mode 100644 index a1d05882..00000000 --- a/lua/app/ui/shop/first_recharge_pop_ui.lua +++ /dev/null @@ -1,103 +0,0 @@ -local FirstRechargePopUI = class("FirstRechargePopUI", BaseUI) -local MAX_ITEM_NUM = 3 - -function FirstRechargePopUI:ctor(params) - self.showType = params.showType -end - -function FirstRechargePopUI:isFullScreen() - return false -end - -function FirstRechargePopUI:getPrefabPath() - return "assets/prefabs/ui/shop/first_recharge_pop_ui.prefab" -end - -function FirstRechargePopUI:onPressBackspace() - self:closeUI() -end - -function FirstRechargePopUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.uiMap["first_recharge_pop_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self.titleTx = self.uiMap["first_recharge_pop_ui.bg.title_bg.title"] - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_34)) -- 首充豪礼 - - self.rewardCellList = {} - for i = 1, MAX_ITEM_NUM do - table.insert(self.rewardCellList, CellManager:addCellComp(self.uiMap["first_recharge_pop_ui.bg.pop_reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - - self.descText = self.uiMap["first_recharge_pop_ui.bg.desc_text"] - self.descText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_35)) -- 充值购买任意商品,即可获得如下奖励,仅此一次! - - self.funcBtn = self.uiMap["first_recharge_pop_ui.bg.func_btn"] - self.btnJumpText = self.uiMap["first_recharge_pop_ui.bg.func_btn.jump_text"] - self.btnGetText = self.uiMap["first_recharge_pop_ui.bg.func_btn.get_text"] - self.btnIcon = self.uiMap["first_recharge_pop_ui.bg.func_btn.icon"] - - self.btnJumpText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_36)) -- 商店 - self.btnGetText:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) -- 领取 - - self.funcBtn:addClickListener(function() - self:onClickFuncBtn() - end) - - self:_bind() - self:refresh() - - -- 上报 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.FIRST_RECHARGE, GConst.ShopConst.FIRST_RECHARGE_ID, self.showType) -end - -function FirstRechargePopUI:_bind() - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh() - end) -end - -function FirstRechargePopUI:refresh() - local cfgInfo = PayManager:getGiftConfigInfo(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID) - local rewards = cfgInfo.reward or {} - for i = 1, MAX_ITEM_NUM do - if i <= #rewards then - self.rewardCellList[i]:setVisible(true, 0.8) - self.rewardCellList[i]:refresh(rewards[i].id, rewards[i].num, true) - else - self.rewardCellList[i]:setVisible(false) - end - end - - -- 对于首充礼包,有跳转商店和领取2个分支 - local canGet = DataManager.ShopData:getHasFirstRechargeReward() - if canGet then - self.btnIcon:setVisible(false) - self.btnJumpText:setVisible(false) - self.btnGetText:setVisible(true) - else - local hasGet = DataManager.ShopData:getHasGotFirstRechargeReward() - if hasGet then - self:closeUI() - else - self.btnIcon:setVisible(true) - self.btnJumpText:setVisible(true) - self.btnGetText:setVisible(false) - end - end -end - -function FirstRechargePopUI:onClickFuncBtn() - -- 对于首充礼包,有跳转商店和领取2个分支 - local canGet = DataManager.ShopData:getHasFirstRechargeReward() - if canGet then - PayManager:purchasePackage(GConst.ShopConst.FIRST_RECHARGE_ID, PayManager.PURCHARSE_TYPE.ACT_GIFT) - else - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_SHOP, {page = GConst.ShopConst.PAGE_TYPE.DISCOUNT}) - self:closeUI() - end -end - -return FirstRechargePopUI \ No newline at end of file diff --git a/lua/app/ui/shop/first_recharge_pop_ui.lua.meta b/lua/app/ui/shop/first_recharge_pop_ui.lua.meta deleted file mode 100644 index a062972f..00000000 --- a/lua/app/ui/shop/first_recharge_pop_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d1ea4328dc9ac714d8d6e25ef668467e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/first_recharge_ui.lua b/lua/app/ui/shop/first_recharge_ui.lua new file mode 100755 index 00000000..bfa2a21a --- /dev/null +++ b/lua/app/ui/shop/first_recharge_ui.lua @@ -0,0 +1,220 @@ +local FirstRechargeUI = class("FirstRechargeUI", BaseUI) + +function FirstRechargeUI:isFullScreen() + return false +end + +function FirstRechargeUI:getPrefabPath() + return "assets/prefabs/ui/shop/first_recharge_ui.prefab" +end + +function FirstRechargeUI:onPressBackspace() + self:closeUI() +end + +function FirstRechargeUI:onClose() + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP) +end + +function FirstRechargeUI:ctor(params) + self:initData() +end + +function FirstRechargeUI:initData() + if DataManager.ShopData:isFirstRechargeOpen(GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_1) then + self.curGear = GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_1 + elseif DataManager.ShopData:isFirstRechargeOpen(GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_2) then + self.curGear = GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_2 + else + self.curGear = GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_3 + end +end + +function FirstRechargeUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.mask = uiMap["first_recharge_ui.mask"] + self.btnClose = uiMap["first_recharge_ui.btn_close"] + self.txTitle = uiMap["first_recharge_ui.tx_title"] + self.spineBanner = uiMap["first_recharge_ui.spine_banner"] + self.txTips = uiMap["first_recharge_ui.tips.tx_tips"] + self.btnGet = uiMap["first_recharge_ui.btn_get"] + self.txGet = uiMap["first_recharge_ui.btn_get.tx_desc"] + self.daysBg = {} + self.daysTitle = {} + self.daysRewardCells = {} + for i = 1, 3 do + table.insert(self.daysBg, uiMap["first_recharge_ui.rewards.day_" .. i]) + table.insert(self.daysTitle, uiMap["first_recharge_ui.rewards.day_" .. i .. ".tx_day"]) + local rewardCells = {} + for j = 1, 3 do + table.insert(rewardCells, uiMap["first_recharge_ui.rewards.day_" .. i .. ".reward_cell_" .. j]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) + end + self.daysRewardCells[i] = rewardCells + end + self.tagNode = uiMap["first_recharge_ui.tag"] + self.btnTags = {} + self.imgTags = {} + self.txTags = {} + for k, key in pairs(GConst.ShopConst.FIRST_RECHARGE_GEARS) do + self.btnTags[key] = uiMap["first_recharge_ui.tag.btn_" .. key] + self.txTags[key] = uiMap["first_recharge_ui.tag.btn_" .. key .. ".tx_desc"] + self.imgTags[key] = uiMap["first_recharge_ui.tag.btn_" .. key .. ".img_icon"] + end + + DataManager.ShopData:setFirstrechargePoped() + -- 上报 + BIReport:postPayUIShow(BIReport.GIFT_TYPE.FIRST_RECHARGE, DataManager.ShopData:getFirstRechargeGiftId(self.curGear)) + self:postChangePage() + + for gear, btn in pairs(self.btnTags) do + btn:addClickListener(function() + self.curGear = gear + self:onRefresh() + -- 上报 + BIReport:postPayUIShow(BIReport.GIFT_TYPE.FIRST_RECHARGE, DataManager.ShopData:getFirstRechargeGiftId(self.curGear)) + self:postChangePage() + end) + end + self.mask:addClickListener(function() + self:closeUI() + end) + self.btnClose:addClickListener(function() + self:closeUI() + end) + self.btnGet:addClickListener(function() + local boughtDay = DataManager.ShopData:getFirstRechargeBoughtDays(self.curGear) + local rewardDay = DataManager.ShopData:getFirstRechargeRewardDays(self.curGear) + if boughtDay > 0 then + -- 已购买 + if boughtDay > rewardDay then + ModuleManager.ShopManager:onBuyFirstRecharge(self.curGear, rewardDay + 1) + end + else + -- 未购买 + ModuleManager.ShopManager:onBuyFirstRecharge(self.curGear, rewardDay + 1) + end + end) + self:bind(DataManager.PaymentData, "isDirty", function() + if not DataManager.ShopData:isFirstRechargeOpen(self.curGear) then + self:initData() + end + self:onRefresh() + end) + self:addEventListener(EventManager.CUSTOM_EVENT.CROSS_DAY, function() + self:onRefresh() + end) +end + +function FirstRechargeUI:postChangePage() + if self.curGear then + BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME["FIRST_RECHARGE_PAGE_" .. self.curGear]) + end +end + +function FirstRechargeUI:onRefresh() + if not DataManager.ShopData:isFirstRechargeOpen() then + self:closeUI() + end + + local cfg = DataManager.ShopData:getActGiftConfig(DataManager.ShopData:getFirstRechargeGiftId(self.curGear)) + local price = GFunc.getFormatPrice(cfg.recharge_id) + + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst["FIRST_CHARGE_TITLE_" .. self.curGear])) + + local tips + local spineName + -- if DataManager.ShopData:isNewFirstRechargeGift(self.curGear) and self.curGear == GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_1 then + -- tips = I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_TIPS_1_NEW, price) + -- spineName = "ui_first_dec_4" + -- else + -- tips = I18N:getGlobalText(I18N.GlobalConst["FIRST_CHARGE_TIPS_" .. self.curGear], price) + -- spineName = "ui_first_dec_" .. self.curGear + -- end + tips = I18N:getGlobalText(I18N.GlobalConst["FIRST_CHARGE_TIPS_" .. self.curGear], price) + spineName = "ui_first_dec_" .. self.curGear + self.txTips:setText(tips) + + self.spineBanner:setActive(false) + self.spineBanner:loadAssetAsync(spineName, function() + self.spineBanner:setActive(true) + self.spineBanner:setLocalScale(1, 1) + self.spineBanner:playAnim("idle", true, true, true) + end) + + -- 档位标签 + local openCount = DataManager.ShopData:getFirstRechargeOpenCount() + for gear, btn in pairs(self.btnTags) do + if openCount > 1 and DataManager.ShopData:isFirstRechargeOpen(gear) then + btn:setActive(true) + local cfg = DataManager.ShopData:getActGiftConfig(DataManager.ShopData:getFirstRechargeGiftId(gear)) + self.imgTags[gear]:setSprite(GConst.ATLAS_PATH.UI_FIRST_CHARGE, "act_firstcharge_icon_".. gear) + -- if DataManager.ShopData:isNewFirstRechargeGift(gear) and gear == GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_1 then + -- btn:setSprite(GConst.ATLAS_PATH.UI_FIRST_CHARGE, gear == self.curGear and "act_firstcharge_btn_4" or "act_firstcharge_btn_4_1") + -- else + -- btn:setSprite(GConst.ATLAS_PATH.UI_FIRST_CHARGE, gear == self.curGear and ("act_firstcharge_btn_" .. gear) or ("act_firstcharge_btn_" .. gear .. "_1")) + -- end + btn:setSprite(GConst.ATLAS_PATH.UI_FIRST_CHARGE, gear == self.curGear and ("act_firstcharge_bg_2") or ("act_firstcharge_bg_3")) + self.txTags[gear]:setText("" .. I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_2, GFunc.getFormatPrice(cfg.recharge_id)) .. "") + local boughtDay = DataManager.ShopData:getFirstRechargeBoughtDays(gear) + local rewardDay = DataManager.ShopData:getFirstRechargeRewardDays(gear) + if boughtDay > 0 and boughtDay > rewardDay then + btn:addRedPoint(90, 30, 0.9) + else + btn:removeRedPoint() + end + else + btn:setActive(false) + end + end + + local boughtDay = DataManager.ShopData:getFirstRechargeBoughtDays(self.curGear) + local rewardDay = DataManager.ShopData:getFirstRechargeRewardDays(self.curGear) + + -- 奖励相关 + for day, bg in ipairs(self.daysBg) do + local giftId = DataManager.ShopData:getFirstRechargeGiftId(self.curGear, day) + local cfg = DataManager.ShopData:getActGiftConfig(giftId) + local rewards = cfg.reward + local received = DataManager.ShopData:isBoughtFirstRecharge(self.curGear, day) + local canGet = DataManager.ShopData:canGetFirstRechargeReward(self.curGear, day) + for i, cell in ipairs(self.daysRewardCells[day]) do + if rewards and rewards[i] then + cell:showCell() + cell:refreshByConfig(rewards[i], received, received) + if canGet then + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:hideCell() + end + end + -- bg:setSprite(GConst.ATLAS_PATH.UI_FIRST_CHARGE, canGet and "act_firstcharge_bg_1" or "act_firstcharge_bg_2") + self.daysTitle[day]:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_1, day)) + end + + -- 购买领取按钮 + if boughtDay > 0 then + -- 已购买 + if boughtDay > rewardDay then + self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_CLAIM)) + self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_2") + self.btnGet:setTouchEnable(true) + self.btnGet:addRedPoint(114, 38, 1) + else + self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_3)) + self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_5") + self.btnGet:setTouchEnable(false) + self.btnGet:removeRedPoint() + end + else + -- 未购买 + self.txGet:setText(price) + self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_2") + self.btnGet:setTouchEnable(true) + self.btnGet:removeRedPoint() + end +end + +return FirstRechargeUI \ No newline at end of file diff --git a/lua/app/ui/shop/first_recharge_ui.lua.meta b/lua/app/ui/shop/first_recharge_ui.lua.meta new file mode 100755 index 00000000..4f6d170a --- /dev/null +++ b/lua/app/ui/shop/first_recharge_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 188cd134184d67c48860a4cbb1beb112 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/gift_pop_chapter_ui.lua b/lua/app/ui/shop/gift_pop_chapter_ui.lua deleted file mode 100644 index aa2245e0..00000000 --- a/lua/app/ui/shop/gift_pop_chapter_ui.lua +++ /dev/null @@ -1,6 +0,0 @@ -local GifePopUI = require "app/ui/shop/gift_pop_ui" -local GiftPopChapterUI = class("GiftPopChapterUI", GifePopUI) - --- 章节礼包,为了避免界面和gift_pop_ui冲突 - -return GiftPopChapterUI \ No newline at end of file diff --git a/lua/app/ui/shop/gift_pop_chapter_ui.lua.meta b/lua/app/ui/shop/gift_pop_chapter_ui.lua.meta deleted file mode 100644 index 4bbbbb89..00000000 --- a/lua/app/ui/shop/gift_pop_chapter_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 96614378ea4a4f344b54836febd08ecf -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/gift_pop_grow_up_ui.lua b/lua/app/ui/shop/gift_pop_grow_up_ui.lua deleted file mode 100644 index 9ff56857..00000000 --- a/lua/app/ui/shop/gift_pop_grow_up_ui.lua +++ /dev/null @@ -1,6 +0,0 @@ -local GifePopUI = require "app/ui/shop/gift_pop_ui" -local GiftPopGrowUpUI = class("GiftPopGrowUpUI", GifePopUI) - --- 成长礼包,为了避免界面和gift_pop_ui冲突 - -return GiftPopGrowUpUI \ No newline at end of file diff --git a/lua/app/ui/shop/gift_pop_grow_up_ui.lua.meta b/lua/app/ui/shop/gift_pop_grow_up_ui.lua.meta deleted file mode 100644 index aa14ed1d..00000000 --- a/lua/app/ui/shop/gift_pop_grow_up_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dd25c271000965944a8a4c2c14311ee0 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/gift_pop_ui.lua b/lua/app/ui/shop/gift_pop_ui.lua deleted file mode 100644 index 4061109c..00000000 --- a/lua/app/ui/shop/gift_pop_ui.lua +++ /dev/null @@ -1,333 +0,0 @@ -local GiftPopUI = class("GiftPopUI", BaseUI) - -local GIFT_BG_NAME = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_2.png", - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_2.png", - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_2.png", - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_2.png", - }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = "assets/arts/textures/background/shop/shop_gift_bg_1.png", -} - -local GIFT_BG_BANNER_NAME = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = "assets/arts/textures/background/shop/shop_gift_banner_1_1.png", - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_3_1.png", - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_4_1.png", - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_6_1.png", - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_8_2.png", - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_7_2.png", - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_8_2.png", - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_7_2.png", - }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_2_1.png", - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = "assets/arts/textures/background/shop/shop_gift_banner_5_1.png", -} - -local GIFT_TITLE_TEXT = { - [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = I18N.GlobalConst.SHOP_DESC_9, - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = I18N.GlobalConst.SHOP_DESC_11, - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = I18N.GlobalConst.SHOP_DESC_12, - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = I18N.GlobalConst.SHOP_DESC_14, - [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = I18N.GlobalConst.EQUIP_DESC_24, - [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = I18N.GlobalConst.EQUIP_DESC_25, - }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = I18N.GlobalConst.SHOP_DESC_10, - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW] = I18N.GlobalConst.SHOP_DESC_13, -} - -local MAX_ITEM_NUM = 4 - -function GiftPopUI:ctor(params) - params = params or {} - - self.actType = params.type - if type(params.id) == "table" then - self.actIds = params.id - self.actId = self.actIds[1] - else - self.actId = params.id - end - self.onlySelf = params.onlySelf -- 有此标记时 关闭直接关闭界面 - self.showType = params.showType -end - -function GiftPopUI:isFullScreen() - return false -end - -function GiftPopUI:getPrefabPath() - return "assets/prefabs/ui/shop/gift_pop_ui.prefab" -end - -function GiftPopUI:onLoadRootComplete() - if not self.actType or not self.actId then - self:closeUI() - end - - self.uiMap = self.root:genAllChildren() - self.uiMap["gift_pop_ui.close_btn"]:addClickListener(function() - if self.onlySelf then - self:closeUI() - else - self:checkNextPopGiftOrClose() - end - end) - - self.titleTx = self.uiMap["gift_pop_ui.bg.title"] - self.banner = self.uiMap["gift_pop_ui.bg.banner"] - self.bg = self.uiMap["gift_pop_ui.bg"] - - self.offNode = self.uiMap["gift_pop_ui.bg.off_img"] - self.offText = self.uiMap["gift_pop_ui.bg.off_img.text"] - - self.rewardCellList = {} - for i = 1, MAX_ITEM_NUM do - table.insert(self.rewardCellList, CellManager:addCellComp(self.uiMap["gift_pop_ui.bg.item_node.pop_reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - self.itemNodeLayout = self.uiMap["gift_pop_ui.bg.item_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - - self.timeNode = self.uiMap["gift_pop_ui.bg.time_node"] - self.timeText = self.uiMap["gift_pop_ui.bg.time_node.text"] - - self.buyBtn = self.uiMap["gift_pop_ui.bg.buy_btn"] - self.buyBtnTx = self.uiMap["gift_pop_ui.bg.buy_btn.text"] - self.buyBtnIcon = self.uiMap["gift_pop_ui.bg.buy_btn.icon"] - - -- 界面切换 - self.nodeSwitch = self.uiMap["gift_pop_ui.switch_node"] - self.btnRight = self.uiMap["gift_pop_ui.switch_node.btn_right"] - self.btnLeft = self.uiMap["gift_pop_ui.switch_node.btn_left"] - self.pointsRoot = self.uiMap["gift_pop_ui.switch_node.points"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.points = {} - for i = 1, 10 do - table.insert(self.points, self.uiMap["gift_pop_ui.switch_node.points.point_" .. i]) - end - - self.btnRight:addClickListener(function() - local idx = table.indexof(self.actIds, self.actId) - if idx and idx + 1 <= #self.actIds then - self.actId = self.actIds[idx + 1] - end - self:refresh() - end) - self.btnLeft:addClickListener(function() - local idx = table.indexof(self.actIds, self.actId) - if idx and idx - 1 > 0 then - self.actId = self.actIds[idx - 1] - end - self:refresh() - end) - self.buyBtn:addClickListener(function() - self:onClickGift() - end) - - self:_bind() - self:scheduleGlobal(function() - self:updateTime() - end, 1) - self:refresh() -end - -function GiftPopUI:_bind() - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh(true) - end) -end - -function GiftPopUI:refresh(needCheck) - if needCheck then - -- 如果已经购买过了 则切为下一个或关闭UI 目前都是唯一礼包 - local bought = DataManager.ShopData:getGiftBoughtNum(self.actType, self.actId) - if bought ~= self.buyCount then - self:checkNextPopGiftOrClose() - return - end - else - self.buyCount = DataManager.ShopData:getGiftBoughtNum(self.actType, self.actId) -- 触发时该礼包的购买数量 - end - - if self.actType == PayManager.PURCHARSE_TYPE.ACT_GIFT then - local giftType = PayManager:getGiftConfigInfo(self.actType, self.actId).type - if giftType == PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT or giftType == PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT then - self.titleTx:setText(DataManager.EquipData:getGiftTitle(self.actId)) - else - self.titleTx:setText(I18N:getGlobalText(GIFT_TITLE_TEXT[self.actType][giftType])) - end - self.banner:setVisible(false) - self.banner:setTexture(GIFT_BG_BANNER_NAME[self.actType][giftType], function() - self.banner:setVisible(true) - end) - self.bg:setTexture(GIFT_BG_NAME[self.actType][giftType]) - else - self.titleTx:setText(I18N:getGlobalText(GIFT_TITLE_TEXT[self.actType])) - self.banner:setVisible(false) - self.banner:setTexture(GIFT_BG_BANNER_NAME[self.actType], function() - self.banner:setVisible(true) - end) - self.bg:setTexture(GIFT_BG_NAME[self.actType]) - end - - local cfgInfo = PayManager:getGiftConfigInfo(self.actType, self.actId) - if cfgInfo then - local off = cfgInfo.value or 0 - if off < 100 then -- 统一为百分比格式 - off = off * 100 - end - if off > 0 then - self.offNode:setVisible(true) - self.offText:setText(tostring(off) .. "%") - else - self.offNode:setVisible(false) - end - end - - local rewards = cfgInfo.reward or {} - for i = 1, MAX_ITEM_NUM do - for i = 1, MAX_ITEM_NUM do - if i <= #rewards then - self.rewardCellList[i]:setVisible(true, 0.8) - self.rewardCellList[i]:refresh(rewards[i].id, rewards[i].num, true) - else - self.rewardCellList[i]:setVisible(false) - end - end - end - self.itemNodeLayout:RefreshLayout() - - local rechargeId = cfgInfo.recharge_id - if rechargeId then - self.buyBtnTx:setText(GFunc.getFormatPrice(rechargeId)) - end - - -- 对于首充礼包,有跳转商店和领取2个分支 - if self.actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and self.actId == GConst.ShopConst.FIRST_RECHARGE_ID then - local canGet = DataManager.ShopData:getHasFirstRechargeReward() - if canGet then - self.buyBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) - else - local hasGet = DataManager.ShopData:getHasGotFirstRechargeReward() - if hasGet then - self:closeUI() - else - self.buyBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_15)) -- 前往商店 - end - end - end - - -- 上报 - local giftType = PayManager:getGiftType(self.actType, self.actId) - BIReport:postPayUIShow(giftType, self.actId, self.showType) - - self:updateTime() - self:showSwitch() -end - -function GiftPopUI:updateTime() - local hasTime = false - -- 部分礼包有倒计时 - if self.actType == PayManager.PURCHARSE_TYPE.ACT_GIFT then - local cfgInfo = DataManager.ShopData:getActGiftConfig()[self.actId] - if cfgInfo then - if cfgInfo and cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT then -- 金币礼包 - hasTime = true - local remainTime = 0 - local triggerTime = DataManager.ShopData:getCoinGiftTriggerTime() - remainTime = triggerTime + (cfgInfo.limit_time or 0) * 3600 - Time:getServerTime() - if remainTime <= 0 then - remainTime = 0 - self:checkNextPopGiftOrClose() - end - self.timeText:setText(Time:formatNumTime(remainTime)) - elseif cfgInfo and (cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT or cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT) then-- 装备礼包 - hasTime = true - local remainTime = DataManager.ShopData:getGiftRemainTime(cfgInfo.type) - if remainTime <= 0 then - remainTime = 0 - self:checkNextPopGiftOrClose() - end - self.timeText:setText(Time:formatNumTime(remainTime)) - elseif cfgInfo and (cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT or cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT) then-- 新装备礼包 - hasTime = true - local remainTime = DataManager.EquipData:getGiftRemainTime(self.actId) - if remainTime <= 0 then - remainTime = 0 - self:checkNextPopGiftOrClose() - end - self.timeText:setText(Time:formatNumTime(remainTime)) - end - end - elseif self.actType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW then -- 成长礼包 - hasTime = true - local remainTime = DataManager.ShopData:getGrowUpGiftRemainTime() - if remainTime <= 0 then - remainTime = 0 - self:checkNextPopGiftOrClose() - end - self.timeText:setText(Time:formatNumTime(remainTime)) - end - self.timeNode:setVisible(hasTime) -end - -function GiftPopUI:onClickGift() - -- 对于首充礼包,有跳转商店和领取2个分支 - if self.actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and self.actId == GConst.ShopConst.FIRST_RECHARGE_ID then - local canGet = DataManager.ShopData:getHasFirstRechargeReward() - if canGet then - PayManager:purchasePackage(self.actId, self.actType) - else - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_SHOP, {page = GConst.ShopConst.PAGE_TYPE.DISCOUNT}) - self:closeUI() - end - else - PayManager:purchasePackage(self.actId, self.actType) - end -end - --- 如果还有需要显示的 则直接刷新而不是关闭本界面 -function GiftPopUI:checkNextPopGiftOrClose() - local actType, actId = DataManager.ShopData:getNextPopGiftData(self.actType, self.actId) - if actType and actId then - -- 更新数据 - self.actType = actType - self.actId = actId - - self:refresh() - -- 移除弹窗列表 - DataManager.ShopData:removePopUpGift(self.actType, self.actId) - else - self:closeUI() - end -end - --- 显示切换相关内容 -function GiftPopUI:showSwitch() - if self.actIds == nil or #self.actIds <= 1 then - self.nodeSwitch:setActive(false) - return - end - - self.nodeSwitch:setActive(true) - local curIdx = table.indexof(self.actIds, self.actId) - self.btnRight:setActive(curIdx < #self.actIds) - self.btnLeft:setActive(curIdx > 1) - - for index, item in ipairs(self.points) do - if self.actIds[index] then - item:setActive(true) - item:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS_GROUP).alpha = self.actIds[index] == self.actId and 1 or 0.5 - else - item:setActive(false) - end - end - self.pointsRoot:RefreshLayout() -end - -return GiftPopUI \ No newline at end of file diff --git a/lua/app/ui/shop/gift_pop_ui.lua.meta b/lua/app/ui/shop/gift_pop_ui.lua.meta deleted file mode 100644 index 9b687bd7..00000000 --- a/lua/app/ui/shop/gift_pop_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 61eca75f20973c44cb9ede981da0583b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/introduct_pop_ui.lua b/lua/app/ui/shop/introduct_pop_ui.lua deleted file mode 100644 index 73c63875..00000000 --- a/lua/app/ui/shop/introduct_pop_ui.lua +++ /dev/null @@ -1,96 +0,0 @@ -local IntroductPopUI = class("IntroductPopUI", BaseUI) -local MAX_ITEM_NUM = 3 - -function IntroductPopUI:ctor(params) - self.showType = params.showType -end - -function IntroductPopUI:isFullScreen() - return false -end - -function IntroductPopUI:getPrefabPath() - return "assets/prefabs/ui/shop/introduct_pop_ui.prefab" -end - -function IntroductPopUI:onPressBackspace() - self:closeUI() -end - -function IntroductPopUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self.uiMap["introduct_pop_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self.titleTx = self.uiMap["introduct_pop_ui.bg.title_bg.title"] - self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_38)) -- 入门礼包 - - self.rewardCellList = {} - for i = 1, MAX_ITEM_NUM do - table.insert(self.rewardCellList, CellManager:addCellComp(self.uiMap["introduct_pop_ui.bg.pop_reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - - self.descText = self.uiMap["introduct_pop_ui.bg.desc_text"] - self.descText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_39)) -- 超值S级英雄,仅此一次! - - self.buyBtn = self.uiMap["introduct_pop_ui.bg.buy_btn"] - self.buyText = self.uiMap["introduct_pop_ui.bg.buy_btn.text"] - - self.buyBtn:addClickListener(function() - self:onClickFuncBtn() - end) - local cfgInfo = PayManager:getGiftConfigInfo(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) - local rechargeId = cfgInfo.recharge_id - self.buyText:setText(GFunc.getFormatPrice(rechargeId)) - - self.timeText = self.uiMap["introduct_pop_ui.bg.time_node.text"] - - self:_bind() - self:scheduleGlobal(function() - self:updateTime() - end, 1) - self:refresh() - - -- 上报 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.INTRODUCTORY_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID, self.showType) -end - -function IntroductPopUI:_bind() - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh() - end) -end - -function IntroductPopUI:refresh() - if DataManager.ShopData:getIntroductGiftRemainBuyCount() <= 0 or DataManager.ShopData:getIntroductGiftRemainTime() <= 0 then - self:closeUI() - end - - local cfgInfo = PayManager:getGiftConfigInfo(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) - local rewards = cfgInfo.reward or {} - for i = 1, MAX_ITEM_NUM do - if i <= #rewards then - self.rewardCellList[i]:setVisible(true, 0.8) - self.rewardCellList[i]:refresh(rewards[i].id, rewards[i].num, true) - else - self.rewardCellList[i]:setVisible(false) - end - end - self:updateTime() -end - -function IntroductPopUI:updateTime() - local remainTime = DataManager.ShopData:getIntroductGiftRemainTime() - if remainTime > 0 then - self.timeText:setText(Time:formatNumTime(remainTime)) - else - self:closeUI() - end -end - -function IntroductPopUI:onClickFuncBtn() - PayManager:purchasePackage(GConst.ShopConst.INTRODUCT_GIFT_ID, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -return IntroductPopUI \ No newline at end of file diff --git a/lua/app/ui/shop/introduct_pop_ui.lua.meta b/lua/app/ui/shop/introduct_pop_ui.lua.meta deleted file mode 100644 index 88aa5bb4..00000000 --- a/lua/app/ui/shop/introduct_pop_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 250463b2c13ef8146bff1f4439207b9a -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/open_box_ui.lua b/lua/app/ui/shop/open_box_ui.lua new file mode 100755 index 00000000..456bac59 --- /dev/null +++ b/lua/app/ui/shop/open_box_ui.lua @@ -0,0 +1,204 @@ +local BoxOpenUI = class("BoxOpenUI", BaseUI) +local AUDIO_DELAY_TIME = 0.4 +local DEFAULT_SPINE_NAME = "ui_core_box_1" -- 默认的展示动画 + +local SUMMON_SPINE_NAME = { + [1] = "ui_core_box_1", + [2] = "ui_core_box_2", +} + +function BoxOpenUI:ctor(params) + self.params = params or {} -- 将信息传递给下一个界面 + self.type = self.params and self.params.type + self.index = self.params.openType + self.rewardIndex = 1 + self.maxRewardIndex = #self.params.rewards +end + +function BoxOpenUI:showCommonBG() + return false +end + +function BoxOpenUI:isFullScreen() + return true +end + +function BoxOpenUI:getOpenSoundId() + -- return AudioManager.CFG_ID.SHOP_BOX_SUMMON +end + +function BoxOpenUI:getPrefabPath() + return "assets/prefabs/ui/shop/box_open_ui.prefab" +end + +function BoxOpenUI:getPreLoadList() + return { + [GConst.TYPEOF_UNITY_CLASS.TEXTURE_2D] = { + "assets/arts/textures/background/core_box/core_box_bg_1.png", + "assets/arts/textures/background/core_box/core_box_bg_1.png" + } + } +end + +function BoxOpenUI:onClose() + if self.spineObj then + self.spineObj:killAniCompleteSeq() + end +end + +function BoxOpenUI:onLoadRootComplete() + self.uiMap = self.root:genAllChildren() + self.bg = self.uiMap["box_open_ui.bg"] + -- 奖励界面打开时 关闭此界面 + self:addEventListener(EventManager.CUSTOM_EVENT.CLOSE_BOX_OPEN_UI, function() + self:closeUI() + end) + + self.vfx = self.uiMap["box_open_ui.vfx_b13_ui_hunxin_b01"] + self:hideVfx() + + self.spineObj = self.uiMap["box_open_ui.ui_spine_obj"] + local spineName + if self.type == GConst.BOX_REWARD_TYPE.SUMMON then + spineName = SUMMON_SPINE_NAME[self.index] + end + if not spineName then + spineName = DEFAULT_SPINE_NAME + end + self.root:addClickListener(nil) + self.spineObj:loadAssetAsync(spineName, function() + self:showNextReward(self.rewardIndex) + end, false) + + self.uiMap["box_open_ui.continue"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CONTINUE_DESC)) + self.uiMap["box_open_ui.skip"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_SKIP)) + self.uiMap["box_open_ui.skip"]:addClickListener(function() + AudioManager:stopEffect(AudioManager.EFFECT_ID.SUMMON) + self.spineObj:killAniCompleteSeq() + ModuleManager.ShopManager:showBoxRewardUI(self.params) + end) +end + +function BoxOpenUI:showNextReward(targetIndex) + if not targetIndex then + self.rewardIndex = self.rewardIndex + 1 + else + self.rewardIndex = targetIndex + end + + if self.rewardIndex > self.maxRewardIndex then -- 容错 + self.spineObj:killAniCompleteSeq() + ModuleManager.ShopManager:showBoxRewardUI(self.params) + return + end + + self.uiMap["box_open_ui.continue"]:setVisible(false) + local reward = self.params.rewards[self.rewardIndex] + if not self.rewardCell then + self.rewardCell = self.uiMap["box_open_ui.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + end + self.rewardCell:refresh(reward) + local nameObj = self.uiMap["box_open_ui.name"] + local qltObj = self.uiMap["box_open_ui.qlt"] + nameObj:setText(GFunc.getServerRewardName(reward)) + local qlt = GFunc.getServerRewardQlt(reward) + local str = GFunc.getQltDesc(qlt, true) + local config = ConfigManager:getConfig("core_soul")[reward.soul.cfg_id] + qltObj:setText(str) + + self.rewardCell:getBaseObject():setVisible(false) + nameObj:setVisible(false) + qltObj:setVisible(false) + self:hideVfx() + + if qlt ~= self.lastQlt then + self.lastQlt = qlt + -- if self.lastQlt >= GConst.SoulConst.QLT_TYPE.PURPLE then + -- -- self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_2.png") + -- else + -- -- self.bg:setTexture("assets/arts/textures/background/shop/shop_bg_1.png") + -- end + end + + AudioManager:playEffect(AudioManager.EFFECT_ID.SUMMON) + -- 播放spine表现 播放完毕后打开奖励UI + + -- local lightObj = self.uiMap["box_open_ui.ui_spine_obj_light"] + -- lightObj:setVisible(false) + -- lightObj:setVisible(false) + -- lightObj:playAnim("born", false, true, false) + self.spineObj:getSkeletonGraphic().enabled = true + + self.aniName = "born02" + if self.type == GConst.BOX_REWARD_TYPE.SUMMON then + self.aniName = "born0" .. (qlt+1) + end + + self.root:addClickListener(function() + AudioManager:stopEffect(AudioManager.EFFECT_ID.SUMMON) + self.root:addClickListener(nil) + self.spineObj:playAnimCompleteOnPer(self.aniName, false, true, function() + self.uiMap["box_open_ui.continue"]:setVisible(true) + + if self.rewardIndex >= self.maxRewardIndex then + self.uiMap["box_open_ui.skip"]:setText(GConst.EMPTY_STRING) + end + + self.root:addClickListener(function() + if self.rewardIndex >= self.maxRewardIndex then + self.spineObj:killAniCompleteSeq() + ModuleManager.ShopManager:showBoxRewardUI(self.params) + else + self:showNextReward() + end + end) + end, true, 0.6, function() + self.rewardCell:getBaseObject():setVisible(true) + nameObj:setVisible(true) + qltObj:setVisible(true) + + if self.lastQlt >= GConst.SoulConst.QLT_TYPE.PURPLE then + self:showVfx() + else + self:hideVfx() + end + end, 0.70) + end) + + self.spineObj:playAnimComplete(self.aniName, false, true, nil, true, 1.8, function() + self.rewardCell:getBaseObject():setVisible(true) + nameObj:setVisible(true) + qltObj:setVisible(true) + + if self.lastQlt >= GConst.SoulConst.QLT_TYPE.PURPLE then + self:showVfx() + else + self:hideVfx() + end + self.uiMap["box_open_ui.continue"]:setVisible(true) + + if self.rewardIndex >= self.maxRewardIndex then + self.uiMap["box_open_ui.skip"]:setText(GConst.EMPTY_STRING) + end + + self.root:addClickListener(function() + if self.rewardIndex >= self.maxRewardIndex then + self.spineObj:killAniCompleteSeq() + ModuleManager.ShopManager:showBoxRewardUI(self.params) + else + self:showNextReward() + end + end) + end) +end + +function BoxOpenUI:showVfx() + self.vfx:setActive(true) + self.vfx:play() +end + +function BoxOpenUI:hideVfx() + self.vfx:setActive(false) +end + +return BoxOpenUI \ No newline at end of file diff --git a/lua/app/ui/shop/open_box_ui.lua.meta b/lua/app/ui/shop/open_box_ui.lua.meta new file mode 100755 index 00000000..71005a27 --- /dev/null +++ b/lua/app/ui/shop/open_box_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 03ee12f5a0e54604ca8fbdfc962e188d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/pay_select_ui.lua b/lua/app/ui/shop/pay_select_ui.lua new file mode 100755 index 00000000..16ada7ef --- /dev/null +++ b/lua/app/ui/shop/pay_select_ui.lua @@ -0,0 +1,105 @@ +local PaySelectUI = class("PaySelectUI", BaseUI) + +function PaySelectUI:isFullScreen() + return false +end + +function PaySelectUI:getPrefabPath() + return "assets/prefabs/ui/shop/pay_select_ui.prefab" +end + +function PaySelectUI:ctor(params) + self.rechrageId = params.rechargeId + self.config = ConfigManager:getConfig("recharge")[self.rechrageId] + self.vouchers = self.config and self.config.vouchers + self.callback = params.callback +end + +function PaySelectUI:onLoadRootComplete() + if not self.config then + self:closeUI() + return + end + self.selectTag = DataManager.PaymentData:getDefaultPayWay() ~= nil + self:_display() +end + +function PaySelectUI:_display() + local uiMap = self.root:genAllChildren() + local selectObj = uiMap["pay_select_ui.content.content.today.check.select"] + selectObj:setVisible(self.selectTag) + + local txContent = uiMap["pay_select_ui.content.content.tx_content"] + txContent:setText(I18N:getGlobalText(I18N.GlobalConst.DAI_JIN_JUAN_DESC_2, self.vouchers.num)) + + local iconToday = uiMap["pay_select_ui.content.content.today.check"] + local txToday = uiMap["pay_select_ui.content.content.today.text"] + + uiMap["pay_select_ui.content.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.MESSAGE_BOX_TITLE)) + txToday:setText(I18N:getGlobalText(I18N.GlobalConst.CONFIRM_IGNORE)) + uiMap["pay_select_ui.content.content.btn_ok.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.DAI_JIN_JUAN_DESC_4)) + uiMap["pay_select_ui.content.content.btn_cancel.tx_cancel"]:setText(GFunc.getFormatPrice(self.rechrageId)) + uiMap["pay_select_ui.content.content.btn_cancel.tx_cancel_tips"]:setText(I18N:getGlobalText(I18N.GlobalConst.DAI_JIN_JUAN_DESC_3)) + GFunc.centerImgAndTx(iconToday, txToday, 3) + + local num = DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_ACT_DAIJINJUAN) + local str = num .. "/" .. self.vouchers.num + local canUseDaiJinJuan = true + if num < self.vouchers.num then + str = "" .. str .. "" + canUseDaiJinJuan = false + end + local txNum = uiMap["pay_select_ui.content.content.btn_ok.cost.tx_cost"] + txNum:setText(str) + local imgIcon = uiMap["pay_select_ui.content.content.btn_ok.cost.img_cost"] + imgIcon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(GConst.ItemConst.ITEM_ID_ACT_DAIJINJUAN)) + + uiMap["pay_select_ui.content.btn_close"]:addClickListener(function() + self:closeUI() + end) + + iconToday:addClickListener(function() + if DataManager.PaymentData:getDefaultPayWay() ~= nil then + DataManager.PaymentData:setDefaultPayWay(nil) + else + DataManager.PaymentData:setDefaultPayWay(DataManager.PaymentData.PAY_WAY.DIRECTE) + end + self.selectTag = DataManager.PaymentData:getDefaultPayWay() ~= nil + selectObj:setVisible(self.selectTag) + end) + + uiMap["pay_select_ui.content.content.btn_cancel"]:addClickListener(function() + self:closeUI() + if self.selectTag then + DataManager.PaymentData:setDefaultPayWay(DataManager.PaymentData.PAY_WAY.DIRECTE) + end + local callback = self.callback + self.callback = nil + if callback then + callback(false) + end + end) + + local daiJinJuanBtn = uiMap["pay_select_ui.content.content.btn_ok"] + if canUseDaiJinJuan then + daiJinJuanBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_3") + daiJinJuanBtn:addClickListener(function() + self:closeUI() + if self.selectTag then + DataManager.PaymentData:setDefaultPayWay(DataManager.PaymentData.PAY_WAY.DAI_JIN_JUAN) + end + local callback = self.callback + self.callback = nil + if callback then + callback(true) + end + end) + else + daiJinJuanBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_gray_3") + daiJinJuanBtn:addClickListener(function() + GFunc.checkCost(GConst.ItemConst.ITEM_ID_ACT_DAIJINJUAN, self.vouchers.num, true) + end) + end +end + +return PaySelectUI \ No newline at end of file diff --git a/lua/app/ui/shop/pay_select_ui.lua.meta b/lua/app/ui/shop/pay_select_ui.lua.meta new file mode 100755 index 00000000..addf044a --- /dev/null +++ b/lua/app/ui/shop/pay_select_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 920c0397c08f3a643a52491a2618e6fd +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 91a3abb7..132aa726 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -1,437 +1,368 @@ local ShopComp = class("ShopComp", LuaComponent) -local TOP_HEIGHT = 136 -local BOTTOM_HEIGHT = 218 -local TITLE_HEIGHT = 54 -local PAGE_DISCOUNT = 1 -local PAGE_MAIN = 2 --- local TITLE_POS = -140 -local PAGE_MAIN_HOT_SELL_CELL = "app/ui/shop/cell/hot_sell_cell" -local PAGE_MAIN_GEM_SELL_CELL = "app/ui/shop/cell/gem_sell_cell" -local PAGE_MAIN_GOLD_SELL_CELL = "app/ui/shop/cell/gold_sell_cell" +local CHAPTER_CELL = "app/ui/shop/cell/chapter_cell" +local CORE_SOUL_MAIN_CELL = "app/ui/shop/cell/core_soul_main_cell" +local DAILY_MAIN_CELL = "app/ui/shop/cell/daily_main_cell" +local GEM_MAIN_CELL = "app/ui/shop/cell/gem_main_cell" +local GOLD_MAIN_CELL = "app/ui/shop/cell/gold_main_cell" +local SKIN_CELL = "app/ui/shop/cell/force_skin_shop_cell" -local PAGE_DISCOUNT_CHAPTER_SELL_CELL = "app/ui/shop/cell/chapter_sell_cell" -- 章节 -local PAGE_DISCOUNT_BEGINNER_SELL_CELL = "app/ui/shop/cell/beginner_sell_cell" -- 新手 -local PAGE_DISCOUNT_LEVEL_SELL_CELL = "app/ui/shop/cell/level_sell_cell" -- 助力 -local PAGE_DISCOUNT_GROW_SELL_CELL = "app/ui/shop/cell/grow_sell_cell" -- 成长 -local PAGE_DISCOUNT_COIN_SELL_CELL = "app/ui/shop/cell/coin_sell_cell" -- 金币 -local PAGE_DISCOUNT_ARENA_SELL_CELL = "app/ui/shop/cell/arena_gift_sell_cell" -- 竞技场 -local PAGE_DISCOUNT_WEAPON_SELL_CELL = "app/ui/shop/cell/weapon_gift_sell_cell" -- 武器 -local PAGE_DISCOUNT_ARMOR_SELL_CELL = "app/ui/shop/cell/armor_gift_sell_cell" -- 防具 +local PAGE_TYPE = { + SHOP = 1, + SKIN = 2, +} function ShopComp:init() - self.uiMap = self.baseObject:genAllChildren() + local uiMap = self.baseObject:genAllChildren() + self.bg = uiMap["shop_comp.bg"] + self.scrollrectNode = uiMap["shop_comp.bg.scrollrect"] + self.chapterTitleBg = uiMap["shop_comp.bg.scrollrect.viewport.content.chapter_title_bg"] + self.coreSoulTitleBg = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg"] + self.dailyTitleBg = uiMap["shop_comp.bg.scrollrect.viewport.content.daily_title_bg"] + self.gemTitleBg = uiMap["shop_comp.bg.scrollrect.viewport.content.gem_title_bg"] + self.goldTitleBg = uiMap["shop_comp.bg.scrollrect.viewport.content.gold_title_bg"] + self.goldCd = uiMap["shop_comp.bg.scrollrect.viewport.content.gold_title_bg.cd"] + self.content = uiMap["shop_comp.bg.scrollrect.viewport.content"] + self.chapterContent = uiMap["shop_comp.bg.scrollrect.viewport.content.chapter_scrollrect.viewport.content"] - self.page = PAGE_MAIN -- 默认展示主要商品 - self.post = false + uiMap["shop_comp.bg.scrollrect.viewport.content.chapter_title_bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_10)) + uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.CORE_SUMMON_DESC_13)) + uiMap["shop_comp.bg.scrollrect.viewport.content.daily_title_bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_28)) + uiMap["shop_comp.bg.scrollrect.viewport.content.gem_title_bg.title"]:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GEM)) + uiMap["shop_comp.bg.scrollrect.viewport.content.gold_title_bg.title"]:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GOLD)) - self:initTitlePage() - self:initMainPage() - self:initDiscountPage() - self:switchPage(self.page) -end + self.chapterScrollrect = uiMap["shop_comp.bg.scrollrect.viewport.content.chapter_scrollrect"] + -- self.coreSoulMainCell = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_main_cell"] + self.dailyCell = uiMap["shop_comp.bg.scrollrect.viewport.content.daily_cell"] + self.gemCell = uiMap["shop_comp.bg.scrollrect.viewport.content.gem_cell"] + self.goldCell = uiMap["shop_comp.bg.scrollrect.viewport.content.gold_cell"] -function ShopComp:initTitlePage() - self.titleNode = self.uiMap["shop_comp.title_node"] - - self.subTitleText1 = self.uiMap["shop_comp.title_node.btn_cell_1.text"] - self.subTitleSelectText1 = self.uiMap["shop_comp.title_node.btn_cell_1.select_text"] - self.subTitleIcon1 = self.uiMap["shop_comp.title_node.btn_cell_1.icon"] - self.subTitleBtn1 = self.uiMap["shop_comp.title_node.btn_cell_1"] - - self.subTitleText2 = self.uiMap["shop_comp.title_node.btn_cell_2.text"] - self.subTitleSelectText2 = self.uiMap["shop_comp.title_node.btn_cell_2.select_text"] - self.subTitleIcon2 = self.uiMap["shop_comp.title_node.btn_cell_2.icon"] - self.subTitleBtn2 = self.uiMap["shop_comp.title_node.btn_cell_2"] - - self.subTitleText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 - self.subTitleSelectText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 - self.subTitleText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 - self.subTitleSelectText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 - - self.subTitleBtn1:addClickListener(function() - self:switchPage(PAGE_DISCOUNT) + local scrollrect = uiMap["shop_comp.bg.scrollrect.viewport.content.chapter_scrollrect"] + self.chapterScrollrectComp = scrollrect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.chapterScrollrectComp:addInitCallback(function() + return CHAPTER_CELL end) - self.subTitleBtn2:addClickListener(function() - self:switchPage(PAGE_MAIN) + self.chapterScrollrectComp:addRefreshCallback(function(idx, cell) + if self.chapterList[idx] then + cell:refresh(self.chapterList[idx], idx, #self.chapterList, function (add) + self.chapterContent:addAnchoredPosition(add * 670) + end) + end end) - self:refreshTitle() + self.chapterScrollrectComp:clearCells() - -- local safeHeight = SafeAreaManager:getNotchScreenHeight() - -- self.titleNode:setAnchoredPositionY(TITLE_POS - safeHeight) - if GFunc.isShenhe() then - self.subTitleBtn2:setAnchoredPositionX(0) - self.subTitleBtn1:setVisible(false) + self.dailyCells = {} + for i = 1, 3 do + self.dailyCells[i] = uiMap["shop_comp.bg.scrollrect.viewport.content.new_cell"] end -end -function ShopComp:refreshTitle() - if self.page == PAGE_DISCOUNT then - self.subTitleText1:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) - self.subTitleSelectText1:setAnchoredPositionY(0) - self.subTitleIcon1:setAnchoredPositionY(0) + self.scrollrectSkinNode = uiMap["shop_comp.bg.scrollrect_skin"] + self.txTitleSkin = uiMap["shop_comp.bg.scrollrect_skin.title.tx_title"] - self.subTitleText2:setAnchoredPositionY(0) - self.subTitleSelectText2:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) - self.subTitleIcon2:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) - else - self.subTitleText1:setAnchoredPositionY(0) - self.subTitleSelectText1:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) - self.subTitleIcon1:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) + -- 页签 + self.tagNode = uiMap["shop_comp.bg.tag"] + self.btnShop = uiMap["shop_comp.bg.tag.btn_shop"] + self.txShop = uiMap["shop_comp.bg.tag.btn_shop.tx_desc"] + self.btnSkin = uiMap["shop_comp.bg.tag.btn_skin"] + self.txSkin = uiMap["shop_comp.bg.tag.btn_skin.tx_desc"] - self.subTitleText2:setAnchoredPositionY(GConst.NOT_VISIBLE_POS) - self.subTitleSelectText2:setAnchoredPositionY(0) - self.subTitleIcon2:setAnchoredPositionY(0) - end -end + self.btnShopSoul = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg.btn_shop_soul"] + self.imgShopIcon = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg.btn_shop_soul.bg.img_shop_icon"] + self.txShopNum = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg.btn_shop_soul.bg.tx_shop_num"] + self.soulSpine = uiMap["shop_comp.bg.scrollrect.viewport.content.core_soul_title_bg.btn_shop_soul.ui_spine_obj"] -function ShopComp:switchPage(page) - if page == PAGE_DISCOUNT and GFunc.isShenhe() then - page = PAGE_MAIN - end - if self.page ~= page then - self.page = page - self.post = false + self.curPage = PAGE_TYPE.SHOP + self.txShop:setText(I18N:getGlobalText(I18N.GlobalConst.MAIN_BTN_1)) + self.txSkin:setText(I18N:getGlobalText(I18N.GlobalConst.SKIN_FORCE_DESC_4)) + self.txTitleSkin:setText(I18N:getGlobalText(I18N.GlobalConst.SKIN_FORCE_DESC_5)) + + self.btnShop:addClickListener(function() + if self.curPage == PAGE_TYPE.SHOP then + return + end + self.curPage = PAGE_TYPE.SHOP self:refresh() - end + end) + self.btnSkin:addClickListener(function() + if self.curPage == PAGE_TYPE.SKIN then + return + end + self.curPage = PAGE_TYPE.SKIN + self:refresh() + end) + + self.btnShopSoul:addClickListener(function() + ModuleManager.SummonManager:showSummonShopCommerceUI(3) + end) + self:bind(DataManager.ShopData, "isDirty", function() + self:refresh(nil, true) + end) + self:bind(DataManager.HeroData, "isDirty", function() + self:refresh(nil, true) + end) + + -- self:bind(DataManager.ForceEquipData, "isDirty", function() + -- self:refresh(nil, true) + -- end) + -- self:bind(DataManager.CollectionData, "isDirty", function() + -- self:refresh(nil, true) + -- end) + -- self:bind(DataManager.BagData.ItemData, "isDirty", function(binder, value) + -- self:refresh(nil, true) + -- end) + self:bind(DataManager.PaymentData, "isDirty", function() + self:refresh(nil, true) + end) + + -- local rect = self.baseObject:getRectSize() + -- local height = rect.height - 390 + -- self.bgHeight = math.max(height, 1015) + -- self.bg:setSizeDeltaY(self.bgHeight) + + -- 审核模式屏蔽皮肤 + -- self.btnSkin:setActive(not GFunc.isShenhe()) end -function ShopComp:goSubType(subType) - local scrollRectObj = self.uiMap["shop_comp.main.scrollrect"] - local contentObj = self.uiMap["shop_comp.main.scrollrect.viewport.content"] - local hotHeight = 0 - if self.hotSellCell and self.hotSellCell:getIsOpen() then - hotHeight = self.hotSellCell:getCellHeight() - end - local gemHeight = 0 - if self.gemSellCell and self.gemSellCell:getIsOpen() then - gemHeight = self.gemSellCell:getCellHeight() - end - local goldHeight = 0 - if self.goldSellCell and self.goldSellCell:getIsOpen() then - goldHeight = self.goldSellCell:getCellHeight() - end - local maxHeight = math.min(hotHeight + gemHeight + goldHeight - scrollRectObj:fastGetSizeDeltaY()) - local height = 0 - if subType == GConst.ShopConst.MAIN_PAGE_TYPE.HOT then - -- 默认在开头 - elseif subType == GConst.ShopConst.MAIN_PAGE_TYPE.GEM then - height = height + hotHeight - elseif subType == GConst.ShopConst.MAIN_PAGE_TYPE.GOLD then - height = height + hotHeight + gemHeight - end - contentObj:setAnchoredPositionY(math.min(height, maxHeight)) -end - -function ShopComp:initMainPage() - self.mainNode = self.uiMap["shop_comp.main"] - local scrollrect = self.uiMap["shop_comp.main.scrollrect"] - local height = self.baseObject:getTransform().rect.height - height = height - TITLE_HEIGHT - TOP_HEIGHT - BOTTOM_HEIGHT - local safeHeight = SafeAreaManager:getNotchScreenHeight() - height = height - safeHeight - scrollrect:setSizeDeltaY(height) - self.mainScrollContent = self.uiMap["shop_comp.main.scrollrect.viewport.content"] - self.hotSellCell = self.uiMap["shop_comp.main.scrollrect.viewport.content.hot_sell_cell"]:addLuaComponent(PAGE_MAIN_HOT_SELL_CELL) - self.gemSellCell = self.uiMap["shop_comp.main.scrollrect.viewport.content.gem_sell_cell"]:addLuaComponent(PAGE_MAIN_GEM_SELL_CELL) - self.goldSellCell = self.uiMap["shop_comp.main.scrollrect.viewport.content.gold_sell_cell"]:addLuaComponent(PAGE_MAIN_GOLD_SELL_CELL) -end - -function ShopComp:initDiscountPage() - self.discountNode = self.uiMap["shop_comp.discount"] - local scrollrect = self.uiMap["shop_comp.discount.scrollrect"] - local height = self.baseObject:getTransform().rect.height - height = height - TITLE_HEIGHT - TOP_HEIGHT - BOTTOM_HEIGHT - local safeHeight = SafeAreaManager:getNotchScreenHeight() - height = height - safeHeight - scrollrect:setSizeDeltaY(height) - self.discountContent = self.uiMap["shop_comp.discount.scrollrect.viewport.content"] - self.chapterSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.chapter_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_CHAPTER_SELL_CELL) - self.beginnerSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.beginner_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_BEGINNER_SELL_CELL) - self.levelSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.level_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_LEVEL_SELL_CELL) - self.growSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.grow_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_GROW_SELL_CELL) - self.coinSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.coin_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_COIN_SELL_CELL) - self.arenaSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.arena_gift_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_ARENA_SELL_CELL) - self.weponSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.weapon_gift_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_WEAPON_SELL_CELL) - self.armorSellCell = self.uiMap["shop_comp.discount.scrollrect.viewport.content.armor_gift_sell_cell"]:addLuaComponent(PAGE_DISCOUNT_ARMOR_SELL_CELL) -end - -function ShopComp:refresh() - if self.page == PAGE_DISCOUNT then - self.mainNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) - self.discountNode:setAnchoredPositionX(0) - DataManager.ShopData:markShopDiscountRedPoint() - self.subTitleBtn1:removeRedPoint() - if DataManager.ShopData:getRp() then - self.subTitleBtn2:addRedPoint(84, 24) +function ShopComp:refresh(showIdx, noShowIdx) + if showIdx ~= nil then + if showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.FORCE_SKIN then + self.curPage = PAGE_TYPE.SKIN else - self.subTitleBtn2:removeRedPoint() - end - else - self.mainNode:setAnchoredPositionX(0) - self.discountNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) - self.subTitleBtn2:removeRedPoint() - if DataManager.ShopData:getShopDiscountRedPoint() then - self.subTitleBtn1:addRedPoint(-84, 24) - else - self.subTitleBtn1:removeRedPoint() + self.curPage = PAGE_TYPE.SHOP end end - - self:refreshTitle() - self:refreshDiscountPage() - self:refreshMainPage() - - -- 如果已经跨天了 需要重新请求每日礼包数据 - if DataManager.ShopData:getMallDailyDirty() then - DataManager.ShopData:markMallDailyDirty(false) - ModuleManager.ShopManager:mallDailyGiftOverDay() + if self.curPage == PAGE_TYPE.SHOP then + self:refreshShop(showIdx, noShowIdx) + elseif self.curPage == PAGE_TYPE.SKIN then + self:refreshSkin() end - self:refreshTime() + self.btnShop:setSprite(GConst.ATLAS_PATH.COMMON, self.curPage == PAGE_TYPE.SHOP and "common_menu_6" or "common_menu_5") + self.btnSkin:setSprite(GConst.ATLAS_PATH.COMMON, self.curPage == PAGE_TYPE.SKIN and "common_menu_6" or "common_menu_5") - -- 上报 - self:postEnterPage() + -- if DataManager.ShopData:showRedPoint() then + -- self.btnShop:addRedPoint(75, 23, 0.9) + -- else + -- self.btnShop:removeRedPoint() + -- end end -function ShopComp:postEnterPage() - if self.post then - return - end - self.post = true +function ShopComp:updateTime() +end - if self.page == PAGE_DISCOUNT then - -- 找到所有的项目 - -- 章节 - local actIdList = DataManager.ShopData:getActChapterStoreCanBuyActIds() - if actIdList and #actIdList > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ACT_CHAPTER_STORE, actIdList[1], BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) -- 约定上报第一个付费项 - end - -- 新手 - if not DataManager.ShopData:getBeginnerGiftHasBuy() then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.BEGINNER_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - -- 助力 - local actIdList = DataManager.ShopData:getLevelUpGiftActIds() - if actIdList and #actIdList > 0 then - for _, id in ipairs(actIdList) do - BIReport:postPayUIShow(BIReport.GIFT_TYPE.LEVEL_UP_GIFT, id, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - end - -- 成长 - local act = DataManager.ShopData:getGrowUpGift() - if act then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GROW_UP_GIFT_NEW, act.current_grow_up_id, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - -- 金币 - local actId = DataManager.ShopData:getValidCoinGiftId() - if actId and actId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.COIN_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - -- 竞技场 - local actId = DataManager.ArenaData:getGiftId() - if actId and actId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARENA_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - -- 武器副本 - local actIdInfo = DataManager.ShopData:getGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT) - if actIdInfo then - local actGiftId = actIdInfo.id - if actGiftId and actGiftId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.WEAPON_GIFT, actGiftId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - end - -- 防具副本 - local actIdInfo = DataManager.ShopData:getGift(PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT) - if actIdInfo then - local actGiftId = actIdInfo.id - if actGiftId and actGiftId > 0 then - BIReport:postPayUIShow(BIReport.GIFT_TYPE.ARMOR_GIFT, actGiftId, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) - end - end +function ShopComp:refreshShop(showIdx, noShowIdx) + self.scrollrectNode:setActive(true) + self.scrollrectSkinNode:setActive(false) + + self.showIdx = showIdx + self:updateList(noShowIdx) + + -- if self.showIdx then -- 指定跳转 + -- if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.CHAPTER_GIFT then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SHOP_CHAPTER) + -- elseif self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.DAILY_STORE then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SHOP_DAILY_STORE) + -- elseif self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.GEM_STORE then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SHOP_GEM_STORE) + -- elseif self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.GOLD_STORE then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SHOP_GOLD_STORE) + -- else + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.MAIN_SHOP) + -- end + -- else + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.MAIN_SHOP) + -- end + self.showIdx = nil +end + +function ShopComp:refreshSkin() + self.scrollrectNode:setActive(false) + self.scrollrectSkinNode:setActive(true) + + local list = DataManager.ForceData:getSkinIdsShopSort() + if self.scrollrectSkinComp == nil then + self.scrollrectSkinComp = self.scrollrectSkinNode:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollrectSkinComp:addInitCallback(function() + return SKIN_CELL + end) + self.scrollrectSkinComp:addRefreshCallback(function(index, cell) + cell:refresh(list[index]) + end) + end + local count = #list + if self.scrollrectSkinComp:getTotalCount() == nil or self.scrollrectSkinComp:getTotalCount() <= 0 then + self.scrollrectSkinComp:refillCells(count) + elseif self.scrollrectSkinComp:getTotalCount() ~= count then + self.scrollrectSkinComp:clearCells() + self.scrollrectSkinComp:refillCells(count) else - -- 找到所有的钻石项目 - BIReport:postPayUIShow(BIReport.GIFT_TYPE.MALL_TREASURE, 2, BIReport.PAY_UI_SHOW_TYPE.SHOP_SHOW) -- 约定上报第一个付费项 + self.scrollrectSkinComp:updateAllCell() end end -function ShopComp:clearPostFlag() - self.post = false +function ShopComp:updateList(noShowIdx) + local height = -80 + height = self:updateChapterList(height) + -- height = self:updateCoreSoulCell(height) + height = self:updateDailyCell(height) + height = self:updateGemCell(height) + height = self:updateGoldCell(height) + height = height - 50 + + self.content:setSizeDeltaY(math.abs(height)) + + local scrollHeight = self.scrollrectNode:getRectHeight() + local maxPosY = math.abs(height) - scrollHeight + + if not noShowIdx and self.beginPosY then + self.content:setAnchoredPositionY(math.min(maxPosY, self.beginPosY)) + elseif not noShowIdx and self.rpPosY then + self.content:setAnchoredPositionY(math.min(maxPosY, self.rpPosY - 80)) + end + self.beginPosY = nil + self.rpPosY = nil end -function ShopComp:refreshTime() - if self.hotSellCell and self.hotSellCell:getIsOpen() then - self.hotSellCell:refreshTime() + +function ShopComp:updateChapterList(offsetY) + -- 没有新手礼包 + if CS.BF.BFMain.IsShenhe then + self.chapterTitleBg:setActive(false) + self.chapterScrollrect:setActive(false) + self.chapterScrollrect:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_SCROLL_RECT).enabled = false + return offsetY end - local coinCellCount = 0 - if self.coinSellCell and self.coinSellCell:getIsOpen() then - coinCellCount = self.coinSellCell:getCellCount() - self.coinSellCell:refreshTime() + + self.chapterList = DataManager.GiftPopData:getPopGiftListByGiftType(PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER) + if #self.chapterList <= 0 then + self.chapterTitleBg:setActive(false) + self.chapterScrollrect:setActive(false) + self.chapterScrollrect:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_SCROLL_RECT).enabled = false + return offsetY + else + self.chapterTitleBg:setActive(true) + self.chapterScrollrect:setActive(true) + self.chapterScrollrect:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_SCROLL_RECT).enabled = true end - if self.coinCellCount ~= coinCellCount then - self.coinCellCount = coinCellCount - DataManager.ShopData:setDirty() + + if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.CHAPTER_GIFT then + self.beginPosY = math.abs(offsetY) end - local growCellCount = 0 - if self.growSellCell and self.growSellCell:getIsOpen() then - growCellCount = self.growSellCell:getCellCount() - self.growSellCell:refreshTime() - end - if self.growCellCount ~= growCellCount then - self.growCellCount = growCellCount - DataManager.ShopData:setDirty() - end - local arenaGiftOpen = false - if self.arenaSellCell and self.arenaSellCell:getIsOpen() then - arenaGiftOpen = true - self.arenaSellCell:refreshTime() - end - if self.arenaGiftOpen ~= arenaGiftOpen then - self.arenaGiftOpen = arenaGiftOpen - DataManager.ShopData:setDirty() - end - local weponGiftOpen = false - if self.weponSellCell and self.weponSellCell:getIsOpen() then - weponGiftOpen = true - self.weponSellCell:refreshTime() - end - if self.weponGiftOpen ~= weponGiftOpen then - self.weponGiftOpen = weponGiftOpen - DataManager.ShopData:setDirty() - end - local armorGiftOpen = false - if self.armorSellCell and self.armorSellCell:getIsOpen() then - armorGiftOpen = true - self.armorSellCell:refreshTime() - end - if self.armorGiftOpen ~= armorGiftOpen then - self.armorGiftOpen = armorGiftOpen - DataManager.ShopData:setDirty() + + self.chapterTitleBg:setAnchoredPositionY(offsetY) + offsetY = offsetY -75 + self.chapterScrollrect:setAnchoredPositionY(offsetY) + offsetY = offsetY - 390 + + local currCount = self.chapterScrollrectComp:getTotalCount() + self.chapterScrollrectComp:refillCells(#self.chapterList) + if currCount == nil or currCount <= 0 then + self.chapterContent:setAnchoredPositionX(-(#self.chapterList-1)*670) end + return offsetY end -function ShopComp:refreshDiscountPage() - -- 同SideBarDiscountCell:getIsOpen()一起修改 - local y = 0 - local cellHeight = 0 - -- 章节 - if self.chapterSellCell:getIsOpen() then - self.chapterSellCell:setVisible(true) - self.chapterSellCell:refresh() - self.chapterSellCell:getBaseObject():setAnchoredPositionY(0) - cellHeight = self.chapterSellCell:getCellHeight() - y = y + cellHeight +function ShopComp:updateCoreSoulCell(offsetY) + -- self.imgShopIcon:setSprite(GConst.ATLAS_PATH.ICON_ITEM, ModuleManager.ItemManager:getItemIcon(GConst.ItemConst.SOUL_SHOP_GOLD)) + -- self.txShopNum:setText(DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.SOUL_SHOP_GOLD)) + self.txShopNum:setText(I18N:getGlobalText(I18N.GlobalConst.CORE_SUMMON_DESC_21)) + self.coreSoulTitleBg:setActive(false) + self.coreSoulMainCell:setActive(false) + + if DataManager.SummonData:getSummonShopSoulUnlock(3) then + self.soulSpine:setActive(true) else - self.chapterSellCell:setVisible(false) + self.soulSpine:setActive(false) end - -- 新手 - if self.beginnerSellCell:getIsOpen() then - self.beginnerSellCell:setVisible(true) - self.beginnerSellCell:refresh() - self.beginnerSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.beginnerSellCell:getCellHeight() - y = y + cellHeight - else - self.beginnerSellCell:setVisible(false) + + if not DataManager.ShopData:isCoreSoulOpen() then + return offsetY end - -- 竞技场 - if self.arenaSellCell:getIsOpen() then - self.arenaSellCell:setVisible(true) - self.arenaSellCell:refresh() - self.arenaSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.arenaSellCell:getCellHeight() - y = y + cellHeight - else - self.arenaSellCell:setVisible(false) + self.coreSoulTitleBg:setActive(true) + self.coreSoulMainCell:setActive(true) + if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.CORE_SOUL_STORE then + self.beginPosY = math.abs(offsetY) end - -- 武器 - if self.weponSellCell:getIsOpen() then - self.weponSellCell:setVisible(true) - self.weponSellCell:refresh() - self.weponSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.weponSellCell:getCellHeight() - y = y + cellHeight - else - self.weponSellCell:setVisible(false) + if self.rpPosY == nil then + self.rpPosY = DataManager.ShopData:hasCoreSoulRedPoint() and math.abs(offsetY) or nil end - -- 防具 - if self.armorSellCell:getIsOpen() then - self.armorSellCell:setVisible(true) - self.armorSellCell:refresh() - self.armorSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.armorSellCell:getCellHeight() - y = y + cellHeight - else - self.armorSellCell:setVisible(false) - end - -- 助力 - if self.levelSellCell:getIsOpen() then - self.levelSellCell:setVisible(true) - self.levelSellCell:refresh() - self.levelSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.levelSellCell:getCellHeight() - y = y + cellHeight - else - self.levelSellCell:setVisible(false) - end - -- 成长 - if self.growSellCell:getIsOpen() then - self.growSellCell:setVisible(true) - self.growSellCell:refresh() - self.growSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.growSellCell:getCellHeight() - y = y + cellHeight - else - self.growSellCell:setVisible(false) - end - -- 金币 - if self.coinSellCell:getIsOpen() then - self.coinSellCell:setVisible(true) - self.coinSellCell:refresh() - self.coinSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.coinSellCell:getCellHeight() - y = y + cellHeight - else - self.coinSellCell:setVisible(false) - end - self.discountContent:setSizeDeltaY(y) + + self.coreSoulTitleBg:setAnchoredPositionY(offsetY) + offsetY = offsetY - 75 + self.coreSoulMainCell:setAnchoredPositionY(offsetY) + offsetY = offsetY - 450 + + local cell = self.coreSoulMainCell:addLuaComponent(CORE_SOUL_MAIN_CELL) + cell:refresh() + + return offsetY end -function ShopComp:refreshMainPage() - local y = 0 - local cellHeight = 0 - -- 每日特惠 - if self.hotSellCell:getIsOpen() then - self.hotSellCell:setVisible(true) - self.hotSellCell:refresh() - self.hotSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.hotSellCell:getCellHeight() - y = y + cellHeight - else - self.hotSellCell:setVisible(false) +function ShopComp:updateDailyCell(offsetY) + self.dailyCell:setActive(false) + self.dailyTitleBg:setActive(false) + if not DataManager.ShopData:isDailyOpen() then + return offsetY end - -- 钻石 - if self.gemSellCell:getIsOpen() then - self.gemSellCell:setVisible(true) - self.gemSellCell:refresh() - self.gemSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.gemSellCell:getCellHeight() - y = y + cellHeight - else - self.gemSellCell:setVisible(false) + self.dailyTitleBg:setActive(true) + self.dailyCell:setActive(true) + if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.DAILY_STORE then + self.beginPosY = math.abs(offsetY) end - -- 金币 - if self.goldSellCell:getIsOpen() then - self.goldSellCell:setVisible(true) - self.goldSellCell:refresh() - self.goldSellCell:getBaseObject():setAnchoredPositionY(-y) - cellHeight = self.goldSellCell:getCellHeight() - y = y + cellHeight - else - self.goldSellCell:setVisible(false) + if self.rpPosY == nil then + self.rpPosY = DataManager.ShopData:hasDailyRedPoint() and math.abs(offsetY) or nil end - self.mainScrollContent:setSizeDeltaY(y) + + self.dailyTitleBg:setAnchoredPositionY(offsetY) + offsetY = offsetY - 96 + self.dailyCell:setAnchoredPositionY(offsetY) + offsetY = offsetY - 670 + + local cell = self.dailyCell:addLuaComponent(DAILY_MAIN_CELL) + cell:refresh() + + return offsetY +end + +function ShopComp:updateGemCell(offsetY) + if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.GEM_STORE then + self.beginPosY = math.abs(offsetY) + end + + self.gemTitleBg:setAnchoredPositionY(offsetY) + offsetY = offsetY - 70 + self.gemCell:setAnchoredPositionY(offsetY) + if CS.BF.BFMain.IsShenhe then + offsetY = offsetY - 1762 + else + offsetY = offsetY - 615 + end + local cell = self.gemCell:addLuaComponent(GEM_MAIN_CELL) + cell:refresh() + + return offsetY +end + +function ShopComp:updateGoldCell(offsetY) + self.goldTitleBg:setActive(true) + self.goldCell:setActive(true) + if self.showIdx == ModuleManager.ShopManager.COMMERCE_TYPE.GOLD_STORE then + self.beginPosY = math.abs(offsetY) + end + if self.rpPosY == nil then + self.rpPosY = DataManager.ShopData:hasGoldRedPoint() and math.abs(offsetY) or nil + end + + self.goldTitleBg:setAnchoredPositionY(offsetY) + offsetY = offsetY - 70 + self.goldCell:setAnchoredPositionY(offsetY) + offsetY = offsetY - 322 + + local cell = self.goldCell:addLuaComponent(GOLD_MAIN_CELL) + cell:refresh() + + return offsetY end return ShopComp \ No newline at end of file diff --git a/lua/app/userdata/gift_pop.meta b/lua/app/userdata/gift_pop.meta new file mode 100644 index 00000000..2c9495bd --- /dev/null +++ b/lua/app/userdata/gift_pop.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d2f79fdbb3456479e9a0293994a64ceb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/gift_pop/gift_pop_data.lua b/lua/app/userdata/gift_pop/gift_pop_data.lua new file mode 100644 index 00000000..a7ad3970 --- /dev/null +++ b/lua/app/userdata/gift_pop/gift_pop_data.lua @@ -0,0 +1,586 @@ +local GiftPopData = class("GiftPopData", BaseData) + +local ActGiftCfg = ConfigManager:getConfig("act_gift") + +local SPECIAL_TYPE = "special" + +function GiftPopData:getGiftConfig(id) + return ActGiftCfg[id] +end + +function GiftPopData:ctor() + self:clear() +end + +function GiftPopData:clear() + self.popGiftMap = {} + self.triggerTimeMap = {} + self.notBuyCountMap = {} -- 距离上次购买后,触发了但是未购买的总次数,用于更新CD + self.typeIds = {} + self.data.isDirty = false + self.carrierUnlockGiftPopFlag = false +end + +function GiftPopData:getBiReportByGiftType(giftId) + return PayManager:getItemGetType(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) +end + +function GiftPopData:initPopCfg() + if self.typeIds and table.nums(self.typeIds) > 0 then + return + end + local popType = {} + for type, _ in pairs(GConst.GiftPopConst.BI_POP_GIFT_TYPE) do + popType[type] = true + end + + self.typeIds = {} + for id, info in pairs(ActGiftCfg) do + local giftType = info.type + if popType[giftType] then + self.typeIds[giftType] = self.typeIds[giftType] or {} + + local parameter = info.parameter or SPECIAL_TYPE + self.typeIds[giftType][parameter] = self.typeIds[giftType][parameter] or {} + + table.insert(self.typeIds[giftType][parameter], id) + end + end +end + +function GiftPopData:initData(data) + self:initPopCfg() + + data = data or {} + self.popGiftMap = {} + self.triggerTimeMap = {} + self.notBuyCountMap = {} + self:refreshPopGift(data.trigger_gifts, data.not_buy_count) + if EDITOR_MODE then + Logger.logHighlight("---------------------------GiftPopData:initData---------------------------") + Logger.printTable(data) + Logger.printTable(self.popGiftMap) + Logger.printTable(self.triggerTimeMap) + Logger.printTable(self.notBuyCountMap) + end +end + +function GiftPopData:refreshPopGift(data, notBuyCountMap) + if not data then + return + end + + self.triggerTimeMap = data or {} + self.notBuyCountMap = notBuyCountMap or {} + + local nowTime = Time:getServerTime() + for id, triggerTime in pairs(data) do + local config = ActGiftCfg[id] + if config then + local giftType = config.type + local endTime = triggerTime + config.limit_time * 3600 + local buyCount = DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) + local notBuyCount = self:getPopGiftNotBuyCount(id) + local cooldown + if config.cd then + if config.max_cd_times then + cooldown = triggerTime + (config.cd or 0) * 3600 * math.max(1, math.min(notBuyCount + 1, config.max_cd_times)) + else + cooldown = triggerTime + (config.cd or 0) * 3600 + end + else + cooldown = triggerTime + end + + local realEndTime = endTime + if buyCount and buyCount > 0 then -- 已购买 + if not config.cd then + cooldown = nowTime + end + endTime = nowTime + end + + local info = { + beginTime = triggerTime, + endTime = endTime, + realEndTime = realEndTime, + cooldown = cooldown, + type = giftType, + id = id, + } + + if EDITOR_MODE then + Logger.logHighlight("初始化礼包冷却 -- giftId:%s notBuyCount:%s triggerTime:%s cooldown:%s", id, notBuyCount, Time:formatTimeYMDHMS2(triggerTime), Time:formatTimeYMDHMS2(cooldown)) + end + + self.popGiftMap[giftType] = self.popGiftMap[giftType] or {} + + local parameter = config.parameter or SPECIAL_TYPE + self.popGiftMap[giftType][parameter] = self.popGiftMap[giftType][parameter] or {} + table.insert(self.popGiftMap[giftType][parameter], info) + end + end + + self:setGiftDirty() +end + +function GiftPopData:getMinPopGiftData() + local nowTime = Time:getServerTime() + local result + local minTime + for type, map in pairs(self.popGiftMap) do + local find = false + for parameter, list in pairs(map) do + for _, info in ipairs(list) do + local endTime = info.endTime + if type == PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER then + endTime = info.beginTime + ActGiftCfg[info.id].limit_time_2 * 3600 + end + if endTime > nowTime and (not minTime or endTime < minTime) then + local boughtCount = self:getGiftBoughtNum(info.id) + if boughtCount <= 0 then + minTime = endTime + result = info + end + end + end + end + end + + return result +end + +function GiftPopData:getCustomGiftList(giftType, parameter) + if not self.popGiftMap[giftType] then + return + end + + return self.popGiftMap[giftType][parameter] +end + +function GiftPopData:getPopGiftMap() + return self.popGiftMap +end + +function GiftPopData:getPopGiftListByGiftType(giftType) + if not self.popGiftMap[giftType] then + return {} + end + local list = {} + for k,v in pairs(self.popGiftMap[giftType]) do + for kk, vv in pairs(v) do + local boughtCount = DataManager.GiftPopData:getGiftBoughtNum(vv.id) + if boughtCount <= 0 then + table.insert(list, vv) + end + end + end + table.sort(list, function(a, b) + return a.id < b.id + end) + return list +end + +function GiftPopData:getPopGiftTriggerTime(giftId) + return self.triggerTimeMap and self.triggerTimeMap[giftId] or 0 +end + +function GiftPopData:getPopGiftNotBuyCount(giftId) + local giftType = ActGiftCfg[giftId].type + return self.notBuyCountMap and self.notBuyCountMap[giftType] or 0 +end + +function GiftPopData:resetNotBuyCount(giftId) + if ActGiftCfg[giftId] then + local giftType = ActGiftCfg[giftId].type + if self.notBuyCountMap and self.notBuyCountMap[giftType] then + self.notBuyCountMap[giftType] = 0 + + -- 本地重置冷却时间 + for giftType, map in pairs(self.popGiftMap) do + for parameter, list in pairs(map) do + for _, info in ipairs(list) do + if info.type == ActGiftCfg[giftId].type then + local triggerTime = self:getPopGiftTriggerTime(info.id) + local oldCoolDown = info.cooldown + info.cooldown = triggerTime + (ActGiftCfg[info.id].cd or 0) * 3600 + + if EDITOR_MODE then + Logger.logHighlight("因购买调整礼包 %s 冷却时间:%s->%s", info.id, Time:formatTimeYMDHMS2(oldCoolDown), Time:formatTimeYMDHMS2(info.cooldown)) + end + end + end + end + end + + -- 同步服务器 + ModuleManager.GiftPopManager:syncActivePopGiftNotBuyCountOnly(self.notBuyCountMap) + end + end +end + +function GiftPopData:setPopGiftType(type, params) + self.data.popGiftType = type + self.params = params +end + +function GiftPopData:getPopGiftType(isFirstEnter) + if self.data.popGiftType then + return self.data.popGiftType, self.params + end + + if isFirstEnter then + if not self.data.popGiftType then + local nowTime = Time:getServerTime() + for type, map in pairs(self.popGiftMap) do + for parameter, list in pairs(map) do + for _, info in ipairs(list) do + if info.endTime > nowTime then + local boughtCount = self:getGiftBoughtNum(info.id) + if boughtCount <= 0 then + self.data.popGiftType = type + return self.data.popGiftType, self.params + end + end + end + end + end + end + end + return self.data.popGiftType, self.params +end + +function GiftPopData:setGiftDirty() + self.data.isDirty = not self.data.isDirty +end + +function GiftPopData:onPopGiftTime() + if not GFunc.IsGotServerTime() then + return false + end + + if not self.lastGiftPopTime then + self.lastGiftPopTime = LocalData:getPopGiftTime() + end + + return Time:getServerTime() > self.lastGiftPopTime +end + +-- 获得自选礼包的所选index +function GiftPopData:getGiftChooseRewardIndex(giftId) + return LocalData:getPopGiftChooseIndex(giftId) +end + +function GiftPopData:setGiftChooseRewardIndex(giftId, index) + LocalData:setPopGiftChooseIndex(giftId, index) + + self:setGiftDirty() +end + +function GiftPopData:getGiftValueStr(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return GConst.EMPTY_STRING + end + if not cfg.value then + return GConst.EMPTY_STRING + end + return cfg.value .. "%" +end + +function GiftPopData:getGiftRewards(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return + end + return cfg.reward +end + +function GiftPopData:getGiftChooseRewards(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return + end + return cfg.choose_reward +end + +function GiftPopData:getGiftPrice(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return + end + return GFunc.getFormatPrice(cfg.recharge_id) +end + +function GiftPopData:getGiftParameter(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return + end + return cfg.parameter +end + +function GiftPopData:getGiftBanner(giftId) + local cfg = self:getGiftConfig(giftId) + if not cfg then + return + end + return cfg.banner or 1 +end + +function GiftPopData:activePopGift(giftType, parameter, parameter2, parameter3) + if EDITOR_MODE then + Logger.logHighlight("----activePopGift---- giftType = %s | parameter = %s | parameter2 = %s" , giftType, parameter, parameter2) + Logger.printTable(self.typeIds[giftType]) + end + + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.GIFT_POPUP, true) then + return + end + + local giftIds + if not self.typeIds[giftType] then + return + end + + giftIds = table.refCopy(self.typeIds[giftType][parameter]) + if not giftIds then + return + end + + local map = {} + -- for _, id in ipairs(giftIds) do + -- map[id] = true + -- end + + local nowTime = Time:getServerTime() + local activingGiftInfos = self.popGiftMap[giftType] and self.popGiftMap[giftType][parameter] + if activingGiftInfos then + for _, info in ipairs(activingGiftInfos) do + -- if map[info.id] then + if info.cooldown > nowTime then -- 冷却或未结束 + map[info.id] = true + end + + if info.endTime > nowTime then -- 冷却或未结束 + map[info.id] = true + end + + if giftType == 19 then + map[info.id] = true + end + -- end + end + end + for i = #giftIds, 1, -1 do + if map[giftIds[i]] then + table.remove(giftIds, i) + end + end + ---- 需要触发了 + self.popGiftMap[giftType] = self.popGiftMap[giftType] or {} + self.popGiftMap[giftType][parameter] = self.popGiftMap[giftType][parameter] or {} + self.triggerTimeMap = self.triggerTimeMap or {} + self.notBuyCountMap = self.notBuyCountMap or {} + -- 记录得该类型礼包得未购买次数,根据购买时间更新 + local notBuyCount = self.notBuyCountMap[giftType] or 0 + local bought = false + for _, giftId in ipairs(giftIds) do + local lastBoughtTime = DataManager.PaymentData:getGiftBoughtTime(giftType, giftId) -- 上次购买时间 + local lastTriggerTime = self:getPopGiftTriggerTime(giftId) + if lastBoughtTime < 0 then + lastBoughtTime = 0 + end + if lastTriggerTime < 0 then + lastTriggerTime = 0 + end + -- 如果上一次的购买时间大于最近一次的触发时间,说明上一次买了 + if lastBoughtTime > lastTriggerTime then + bought = true + break + end + end + if bought then + notBuyCount = 1 + else + notBuyCount = notBuyCount + 1 + end + + local isActiveThisTime = false + local activeMap = {} + local payAverage = DataManager.PaymentData:getPayAverage() + for _, giftId in ipairs(giftIds) do + local isPayConditionValid = false + -- 判断档位有效性,只触发对应档位的 + local payCondition = ActGiftCfg[giftId].pay_condition + if payCondition then + if payCondition[1] <= payAverage and payAverage < payCondition[2] then + isPayConditionValid = true + elseif payCondition[2] >= 9999 and payAverage >= 9999 then + isPayConditionValid = true + end + else + isPayConditionValid = true + end + -- 判断额外参数 + local isParameterProValid = false + local parameterPro = ActGiftCfg[giftId].parameter_pro + if parameterPro then + if giftType == PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_HERO_LV then -- 英雄等级 + local lv = parameterPro[1] or 0 + if parameter2 == lv then + isParameterProValid = true + end + elseif giftType == PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER then -- 章节礼包 + if parameterPro[1] and DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, parameterPro[1]) > 0 then + isParameterProValid = true + end + elseif giftType == PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_EQUIP_RESONANCE then -- 装备共鸣弹窗礼包 + if parameterPro[1] and parameterPro[1] == parameter2 and parameterPro[2] <= parameter3 then + isParameterProValid = true + end + + end + else + isParameterProValid = true + end + + if isPayConditionValid and isParameterProValid then + local cfg = ActGiftCfg[giftId] + local info = { + id = giftId, + type = giftType, + beginTime = nowTime, + endTime = nowTime + cfg.limit_time * 3600, + realEndTime = nowTime + cfg.limit_time * 3600, + } + if cfg.cd then + if cfg.max_cd_times then + info.cooldown = nowTime + cfg.cd * 3600 * math.max(1, math.min(notBuyCount + 1, cfg.max_cd_times)) + else + info.cooldown = nowTime + cfg.cd * 3600 + end + else + info.cooldown = nowTime + end + table.insert(self.popGiftMap[giftType][parameter], info) + self.triggerTimeMap[giftId] = nowTime + self.notBuyCountMap[giftType] = notBuyCount + activeMap[giftId] = nowTime + self:setPopGiftType(giftType, giftId) + self:setGiftDirty() + -- bi日志上报 + local biType = self:getBiReportByGiftType(giftId) + if biType then + BIReport:postPopGift(biType, giftId, cfg.recharge_id, Time:getServerTime()) + end + DataManager.PaymentData:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) + + -- 标记本次触发 + isActiveThisTime = true + + if EDITOR_MODE then + Logger.logHighlight("成功触发礼包 -- giftId:%s notBuyCount:%s cooldown:%s", giftId, notBuyCount, Time:formatTimeYMDHMS2(info.cooldown)) + end + end + end + + if table.nums(activeMap) <= 0 then + return + end + ModuleManager.ActivityPopManager:setGiftPopState(true) + ModuleManager.GiftPopManager:syncActivePopGift(activeMap, self.notBuyCountMap) + + return true, isActiveThisTime, activeMap +end + +function GiftPopData:getGiftBoughtNum(giftId) + return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) or 0 +end + +-- 等级弹窗礼包 +function GiftPopData:activeLvUpPopGift(lv) + local giftType = PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_LV + self:activePopGift(giftType, lv) +end + +function GiftPopData:getActivePopGiftId() + return self.heroLvUpPopGiftId +end + +function GiftPopData:setActivePopGiftId(giftId) + self.heroLvUpPopGiftId = giftId +end + +-- 装备共鸣弹窗礼包 +function GiftPopData:activeEquipResonancePopGift(type, lv) + local giftType = PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_EQUIP_RESONANCE + local _, _, activeMap = self:activePopGift(giftType, SPECIAL_TYPE, type, lv) + if activeMap then + for k,v in pairs(activeMap) do + self:setActivePopGiftId(k) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP_TIMELY) + break + end + end +end + +-- 英雄等级弹窗礼包 +function GiftPopData:activeHeroLvUpPopGift(heroId, lv) + local giftType = PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_HERO_LV + local _, _, activeMap = self:activePopGift(giftType, heroId, lv) + if activeMap then + for k,v in pairs(activeMap) do + self:setActivePopGiftId(k) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP_TIMELY) + break + end + end +end + +-- 章节弹窗礼包 +function GiftPopData:activeChapterPopGift(chapterId) + local giftType = PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER + local _, _, activeMap = self:activePopGift(giftType, chapterId) + if activeMap then + for k,v in pairs(activeMap) do + self:setActivePopGiftId(k) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP_TIMELY) + break + end + end +end + +-- 防线弹窗礼包 +function GiftPopData:activeDefenseLinePopGift(lv) + local giftType = PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_DEFENSE_LINE + local _, _, activeMap = self:activePopGift(giftType, lv) + if activeMap then + for k,v in pairs(activeMap) do + self:setActivePopGiftId(k) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP_TIMELY) + break + end + end +end + +function GiftPopData:checkChapterGiftVersion() + if self.popGiftMap == nil then + return + end + if self.typeIds == nil then + return + end + local popGiftServerMap = self.popGiftMap[PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER] or GConst.EMPTY_TABLE + local maxId = DataManager.ChapterData:getMaxPassId() or 0 + local popGiftCfgMap = self.typeIds[PayManager.PURCHARSE_ACT_TYPE.GIFT_POP_CHAPTER] or GConst.EMPTY_TABLE + for chapterId, v in pairs(popGiftCfgMap) do + if maxId >= chapterId then + if popGiftServerMap[chapterId] == nil or #popGiftServerMap[chapterId] <= 0 then + self:activeChapterPopGift(chapterId) + end + end + end +end + +return GiftPopData \ No newline at end of file diff --git a/lua/app/userdata/gift_pop/gift_pop_data.lua.meta b/lua/app/userdata/gift_pop/gift_pop_data.lua.meta new file mode 100755 index 00000000..6ef45856 --- /dev/null +++ b/lua/app/userdata/gift_pop/gift_pop_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4b0e2d3683765a84da410379dc3356d2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/payment.meta b/lua/app/userdata/payment.meta new file mode 100644 index 00000000..6b9e89cc --- /dev/null +++ b/lua/app/userdata/payment.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67209423a12ba4ac9b79ffd6e9545595 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/payment/payment_data.lua b/lua/app/userdata/payment/payment_data.lua new file mode 100755 index 00000000..a478d924 --- /dev/null +++ b/lua/app/userdata/payment/payment_data.lua @@ -0,0 +1,368 @@ +local PaymentData = class("PaymentData", BaseData) +local RECHARGE_CFG = ConfigManager:getConfig("recharge") + +PaymentData.PAY_WAY = { + DIRECTE = 1, + DAI_JIN_JUAN = 2 +} + +function PaymentData:ctor() + self.data.payTotal = 0 -- 总付费(美元) + self.data.payTotalCount = 0 -- 总付费次数 + self.data.payAverage = 0 -- 总付费/总付费次数 + self.data.thirdPayTotal = 0 + self.payCount = {} + self.data.isDirty = false + self.defalutPayWay = nil +end + +function PaymentData:clear() + self.data.payTotal = 0 + self.data.payTotalCount = 0 + self.data.payAverage = 0 + self.data.thirdPayTotal = 0 + self.payCount = {} + self.giftMap = {} + self.defalutPayWay = nil +end + +function PaymentData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function PaymentData:initData(data) + data = data or {} + local pay_counts = data.pay_counts or {} + if EDITOR_MODE then + Logger.logHighlight("礼包购买数据") + Logger.printTable(data) + end + + self.data.payTotal = 0 + self.data.payTotalCount = 0 + self.data.payAverage = 0 + self.data.thirdPayTotal = data.third_pay_total or 0 + self.payCount = data.pay_counts or {} + + for id, count in pairs(pay_counts) do + if RECHARGE_CFG[id] then + self.data.payTotal = self.data.payTotal + (RECHARGE_CFG[id].price or 0) * count + self.data.payTotalCount = self.data.payTotalCount + count + end + end + if self.data.payTotalCount > 0 then + self.data.payAverage = self.data.payTotal / self.data.payTotalCount + else + self.data.payAverage = 0 + end + + if EDITOR_MODE then + Logger.logHighlight("消费总额:" .. tostring(self:getPayTotal())) + end +end + +function PaymentData:addPayment(rechargeId) + local cfg = ConfigManager:getConfig("recharge")[rechargeId] + if cfg == nil then + return + end + + local beforeCount = self.data.payTotal + self.data.payTotal = self.data.payTotal + cfg.price + self:checkFirebasePurchase(beforeCount) + self.data.payTotalCount = self.data.payTotalCount + 1 + self.data.payAverage = self.data.payTotal / self.data.payTotalCount + self.payCount[rechargeId] = (self.payCount[rechargeId] or 0) + 1 + -- DataManager.PlayerData:addPayScore(cfg.score) + + if EDITOR_MODE then + Logger.logHighlight("消费总额:" .. tostring(self:getPayTotal())) + end +end + +function PaymentData:checkFirebasePurchase(beforeCount) + local beforeCount1 = (beforeCount * 1000) // 1000 + local afterCount = (self.data.payTotal * 1000) // 1000 + local beforeCount5 = beforeCount1 - beforeCount1 % 5 + if EDITOR_MODE then + Logger.logHighlight("afterCount = %s self.data.payTotal = %s", afterCount, self.data.payTotal) + end + if afterCount > beforeCount1 then + for i = beforeCount1 + 1, afterCount do + BIReport:postPurchaseAmountEvent(1) + end + end + local diffCount = (afterCount - beforeCount5) // 5 + if diffCount > 0 then + for i = 1, diffCount do + BIReport:postPurchaseAmountEvent(5) + end + end +end + +function PaymentData:initActGift(gift) + if gift == nil then + return + end + if EDITOR_MODE then + Logger.logHighlight("ActGift礼包购买数据") + Logger.printTable(gift) + end + local gifts = gift.gifts or {} + local refreshAt = gift.refresh_at or {} + -- 转为map结构 + for _, gift in ipairs(gifts) do + local giftType = gift.gift_type + local giftId = gift.id + if not self.giftMap then + self.giftMap = {} + end + if not self.giftMap[giftType] then + self.giftMap[giftType] = {} + end + self.giftMap[giftType][giftId] = gift + end + + self.actGiftRefreshAt = table.clearOrCreate(self.actGiftRefreshAt) + local nowTime = Time:getServerTime() + for id, time in pairs(refreshAt) do -- 针对act_gift + time = GFunc.formatTimeStep(time) + if time > nowTime then + self.actGiftRefreshAt[id] = time + end + end + + self:setDirty() +end + +function PaymentData:getPayTotal() + return self.data.payTotal +end + +function PaymentData:getPayAverage() + return self.data.payAverage +end + +function PaymentData:setThirdPayTotal(thirdPayTotal) + self.data.thirdPayTotal = thirdPayTotal + local data = { + third_pay_money = self.data.thirdPayTotal + } + BIReport:TAUserSet(data) +end + +function PaymentData:getThirdPayTotal() + return self.data.thirdPayTotal +end + +function PaymentData:getPayCount() + return self.payCount +end + +function PaymentData:getAllPayCount() + local num = 0 + for rechargeIdStr, count in pairs(self.payCount) do + num = num + count + end + return num +end + +-- 已购买的礼包 +function PaymentData:getActGiftMap() + return self.giftMap +end + +function PaymentData:getActGiftMapByType(actType) + return self.giftMap and self.giftMap[actType] +end + +function PaymentData:getActGiftDetailData(actType, actId) + if self.giftMap then + if self.giftMap[actType] then + return self.giftMap[actType][actId] + end + end + return nil +end + +function PaymentData:getGiftMapByGiftType(giftType) + if not self.giftMap then + return {} + end + return self.giftMap[giftType] or {} +end + +function PaymentData:updateGiftInfo(gift, rewards) + local giftType = gift.gift_type + local giftId = gift.id + + if not self.giftMap then + self.giftMap = {} + end + if not self.giftMap[giftType] then + self.giftMap[giftType] = {} + end + self.giftMap[giftType][giftId] = gift + + if giftType == PayManager.PURCHARSE_TYPE.SHOP_GEM then + DataManager.ShopData:setDirty() + elseif giftType == PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG then + BIReport:postGoldPigRewardOpt(DataManager.GoldPigData:getCacheInfo()) + DataManager.GoldPigData:setBought() + elseif giftType == PayManager.PURCHARSE_TYPE.GIFT_ROUTINE then + DataManager.GiftRoutineData:setDirty() + elseif giftType == PayManager.PURCHARSE_TYPE.ACT_GIFT then + local config = ConfigManager:getConfig("act_gift")[giftId] + if config and config.type == PayManager.PURCHARSE_ACT_TYPE.ACT_SEVEN_DAY then + local giftType = 1 + if config.item_cost then + giftType = 2 + elseif config.recharge_id then + giftType = 3 + end + if rewards then + BIReport:postSevenDayGift(BIReport.SEVEN_DAY_GIFT_OPT.REWARD, giftId, giftType, GFunc.getRewardsStr(rewards), config.parameter) + end + elseif config and config.type == PayManager.PURCHARSE_ACT_TYPE.FORCE_SKIN then + DataManager.ForceData:onSkinBoughtSuccess() + end + if GConst.ShopConst.PRIVILEGE_CARD_ID_MAP[giftId] then + DataManager.PrivilegeCardData:onGiftBuySuccess(giftId) + end + if giftId == DataManager.SignWeekData:getProRewardGiftId() then + DataManager.SignWeekData:onBountyBuySuccess() + end + -- if giftId == DataManager.ActMagicData:getProRewardGiftId() then + -- DataManager.ActMagicData:onBountyBuySuccess() + -- end + -- if giftId == DataManager.ActIceData:getProRewardGiftId() then + -- DataManager.ActIceData:onBountyBuySuccess() + -- end + -- if giftId == DataManager.ActNewYearData:getProRewardGiftId() then + -- DataManager.ActNewYearData:onBountyBuySuccess() + -- end + -- if giftId == DataManager.ActSailingData:getProRewardGiftId() then + -- DataManager.ActSailingData:onBountyBuySuccess() + -- end + -- if giftId == DataManager.ActDreamData:getProRewardGiftId() then + -- DataManager.ActDreamData:onBountyBuySuccess() + -- end + -- if giftId == DataManager.ActTimeGapData:getProRewardGiftId() then + -- DataManager.ActTimeGapData:onBountyBuySuccess() + -- end + if GConst.ActSprintConst.ACT_ID_MAP[giftId] then + DataManager.ActSprintData:onGiftBuySuccess(giftId) + end + end + + self:setDirty() +end + +-- 获得一个礼包的上次购买时间 +function PaymentData:getGiftBoughtTime(actType, actId) + local data = self:getActGiftDetailData(actType, actId) + if data then + return data.latest_buy_at + end + return 0 +end + +-- 获得一个礼包的已购次数 +function PaymentData:getGiftBoughtNum(actType, actId) + local data = self:getActGiftDetailData(actType, actId) + if data then + return data.buy_count or 0 + end + return 0 +end + +-- 重置一个礼包购买次数 +function PaymentData:resetGiftBoughtNum(actType, actId) + local data = self:getActGiftDetailData(actType, actId) + if data then + data.buy_count = 0 + end +end + +-- 得到act_gift限购礼包的重置时间,为nil则表示不重置 +function PaymentData:getActGiftRefreshAt(actId) + return self.actGiftRefreshAt and self.actGiftRefreshAt[actId] +end + +function PaymentData:clearActGiftRefreshAt(actId) + if not self.actGiftRefreshAt then + return + end + self.actGiftRefreshAt[actId] = nil +end + +function PaymentData:isGemStoreDouble(id) + local cfg = ConfigManager:getConfig("mall_treasure")[id] + if not cfg then + return false + end + local count = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.SHOP_GEM, id) + return count < cfg.limit +end + +function PaymentData:getGemStoreDoubleCount(id) + local cfg = ConfigManager:getConfig("mall_treasure")[id] + if not cfg then + return 0 + end + local count = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.SHOP_GEM, id) + return cfg.limit - count +end + +function PaymentData:isJollyMaxDouble(id) + local count = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.GIFT_JOLLYMAX, id) + return count <= 0 +end + +-- 免广告 +function PaymentData:getIsOpenAdFree() + return false +end + +-- 免广告或者终身卡买了都算 +function PaymentData:getIsSkipAd() + if DataManager.PrivilegeCardData:getIsSkipAd() then + return true + end + return false +end + +function PaymentData:getDefaultPayWay() + return self.defalutPayWay +end + +function PaymentData:setDefaultPayWay(payWay) + self.defalutPayWay = payWay +end + +--@region 俄罗斯JollyMax网页支付处理 +function PaymentData:updateJollyMaxGiftInfo(gift, rewards) + local giftType = PayManager.PURCHARSE_TYPE.ACT_GIFT + local giftId = gift.id + + self.giftMap = self.giftMap or {} + self.giftMap[giftType] = self.giftMap[giftType] or {} + self.giftMap[gift.gift_type] = self.giftMap[gift.gift_type] or {} + + self.giftMap[gift.gift_type][giftId] = table.refCopy(gift) + -- if giftId == 1001 then + -- gift.id = GConst.MonthlyCardConst.CARD_GIFT_ID[GConst.MonthlyCardConst.CARD_TYPE.CARD_1] + -- gift.gift_type = giftType + -- self.giftMap[giftType][gift.id] = gift + -- DataManager.MonthlyCardData:onGiftBuySuccess(gift.id) + -- elseif giftId == 1002 then + -- gift.id = GConst.MonthlyCardConst.CARD_GIFT_ID[GConst.MonthlyCardConst.CARD_TYPE.CARD_2] + -- gift.gift_type = giftType + -- self.giftMap[giftType][gift.id] = gift + -- DataManager.MonthlyCardData:onGiftBuySuccess(gift.id) + -- end + + self:setDirty() +end +--@endregion +return PaymentData \ No newline at end of file diff --git a/lua/app/userdata/payment/payment_data.lua.meta b/lua/app/userdata/payment/payment_data.lua.meta new file mode 100755 index 00000000..3d4dac9f --- /dev/null +++ b/lua/app/userdata/payment/payment_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0a57e9639b9107747a8ad661b309b5b8 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index b36efe41..8513faca 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -1,15 +1,11 @@ local ShopData = class("ShopData", BaseData) - function ShopData:ctor() - self.data.isDirty = false -end - -function ShopData:initBase() - self:initActChapterStoreData() - self:initCrossDay() + self.data.isDirty = true + self.data.isThirdPayGiftDirty = false end function ShopData:clear() + self.firstRechargePoped = nil DataManager:unregisterCrossDayFunc("ShopData") end @@ -17,183 +13,135 @@ function ShopData:setDirty() self.data.isDirty = not self.data.isDirty end -function ShopData:initCrossDay() +function ShopData:init() + -- 章节礼包 + self.chapterInfo = {} + -- 魂芯商店 + self.coreSoulAdTimes = 0 + self.coreSoulNormalRewardTimes = 0 + self.coreSoulEliteRewardTimes = 0 + -- 每日商店 + self.dailyInfo = {} + -- 金币商店 + self.goldInfo = {} + + --@TODO 2025-09-24 15:12:35 + self.goldInfo.count = 0 + DataManager:registerCrossDayFunc("ShopData", function() - self:resetRunesGift() - self:resetMallDaily() - self:resetCommonDailyGemAdCount() - self:resetCommonDailyCoinAdCount() + self.coreSoulAdTimes = 0 + if self.dailyInfo then + self.dailyInfo.refresh_count = 0 + self.dailyInfo.ad_refresh_count = 0 + end + if self.goldInfo then + self.goldInfo.count = 0 + end + if self.emblemInfo then + self.emblemInfo.today_count = {} + end + self.vitAdCount = 0 + self.vitGemCount = 0 self:setDirty() end) end --- 通用礼包部分 ********************************************************************************************** +function ShopData:isOpen(showToast) + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, not showToast) then + return false + end --- 初始化购买的礼包 -function ShopData:initActGift(act) - if EDITOR_MODE then - Logger.logHighlight("初始化 initActGift") - Logger.printTable(act) - end - act = act or {} - local gifts = act.gifts or {} - -- 转为map结构 - for _, gift in ipairs(gifts) do - local giftType = gift.act_type - local giftId = gift.id - if not self.giftMap then - self.giftMap = {} - end - if not self.giftMap[giftType] then - self.giftMap[giftType] = {} - end - self.giftMap[giftType][giftId] = gift - end - self:initFirstRecharge() - self:setDirty() + return true end -function ShopData:getActGiftConfig() - return ConfigManager:getConfig("act_gift") +function ShopData:isCoreSoulOpen(showToast) + if not self:isOpen(showToast) then + return false + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.CORE_BOX, not showToast) then + return false + end + + return true end --- 获取通用礼包配置的所有该类型的礼包 -function ShopData:getGiftsByType(giftType) - local gifts = {} - for id, data in pairs(self:getActGiftConfig()) do - if data.type == giftType then - gifts[id] = data - end +function ShopData:hasCoreSoulRedPoint() + if not self:isCoreSoulOpen() then + return false end - return gifts + -- 广告次数 + local adCount = self:getCoreSoulAdRemainTimes() + if adCount > 0 then + return true + end + -- 普通道具次数 + local normalItemId = self:getCoreSoulCostItemId( GConst.ShopConst.CORE_SOUL_TYPE.NORMAL) + if GFunc.checkCost(normalItemId, 1, false) then + return true + end + -- 史诗道具次数 + local eliteItemId = self:getCoreSoulCostItemId( GConst.ShopConst.CORE_SOUL_TYPE.ELITE) + if GFunc.checkCost(eliteItemId, 1, false) then + return true + end + + return false end --- 已购买的礼包 -function ShopData:getActGiftMap() - return self.giftMap +function ShopData:isDailyOpen(showToast) + if not self:isOpen(showToast) then + return false + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_DAILY, not showToast) then + return false + end + + return true end -function ShopData:getActGiftMapByType(actType) - return self.giftMap and self.giftMap[actType] +function ShopData:showRedPoint() + if not self:isOpen() then + return false + end + return self:hasCoreSoulRedPoint() or self:hasDailyRedPoint() or self:hasGoldRedPoint(true) -- or DataManager.CollectionData:hasSummonRedPoint() end -function ShopData:getActGiftDetailData(actType, actId) - if self.giftMap then - if self.giftMap[actType] then - return self.giftMap[actType][actId] - end - end - return nil -end - --- 获得一个礼包的已购次数 -function ShopData:getGiftBoughtNum(actType, actId) - local data = self:getActGiftDetailData(actType, actId) - if data then - return data.buy_count - end - return 0 -end - --- 重置一个礼包购买次数 -function ShopData:resetGiftBoughtNum(actType, actId) - local data = self:getActGiftDetailData(actType, actId) - if data then - data.buy_count = 0 - end -end - --- 获取通用礼包剩余可购买次数 -function ShopData:getGiftRemainBuyNum(actId) - local bought = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId) - - return self:getActGiftConfig()[actId].limit - bought -end - --- 礼包购买成功更新 -function ShopData:updateGiftInfo(gift) - local giftType = gift.act_type - local giftId = gift.id - - if not self.giftMap then - self.giftMap = {} - end - if not self.giftMap[giftType] then - self.giftMap[giftType] = {} - end - self.giftMap[giftType][giftId] = gift - - if giftType == PayManager.PURCHARSE_TYPE.ACT_GIFT then - local cfgName = PayManager.PURCHARSE_TYPE_CONFIG[giftType] - if cfgName then - local cfg = ConfigManager:getConfig(cfgName) - if cfg and cfg[giftId] then - if cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.GROWTH_FUND then - DataManager.GrowthFundData:onBoughtFund(giftId) - elseif cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT then - DataManager.ArenaData:onBoughtGift(giftId) - elseif cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT or cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT then - self:onGiftBuySuccess(cfg[giftId].type) - elseif cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT or cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT then - DataManager.EquipData:onBuyGiftSuccess(giftId) - elseif cfg[giftId].type == PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER then - DataManager.ActivityData:onBuyBountyGrade(giftId) - end - end - end - elseif giftType == PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW then - self:onUpGiftBuySuccess() +function ShopData:hasDailyRedPoint() + if not self:isDailyOpen() then + return false end - self:setDirty() -end + if not self:getLoginDailyRp() then + return false + end --- 标记一个礼包需要弹出 在条件允许时会弹出 -function ShopData:markPopUpGift(actType, actId) - if not self.needPopUpGift then - self.needPopUpGift = {} - end - if not self.needPopUpGift[actType] then - self.needPopUpGift[actType] = {} - end - -- 如果已经有了 不作处理 - for _, id in ipairs(self.needPopUpGift[actType]) do - if id == actId then - return - end - end - table.insert(self.needPopUpGift[actType], actId) - table.sort(self.needPopUpGift[actType]) -end - -function ShopData:removePopUpGift(actType, actId) - if self.needPopUpGift then - if self.needPopUpGift[actType] then - for index, id in ipairs(self.needPopUpGift[actType]) do - if id == actId then - table.remove(self.needPopUpGift[actType], index) - break - end + for id, cfg in ipairs(self:getDailyConfig()) do + if not cfg.cost then + local remainCount = self:getDailyRemainFreeCount(id) + if remainCount > 0 then + return true end end end + return false end +--是否只包含免费,不包含广告 +function ShopData:hasGoldRedPoint(isOnlyFree) + if not SDKManager:isAdLoaded() then + return false + end --- 获取待处理弹出礼包结构 {type:[id1,id2,...]} -function ShopData:getPopUpGift() - return self.needPopUpGift -end + if not self:getLoginGoldRp() then + return false + end -function ShopData:getPopUpGiftByType(actType) - return self.needPopUpGift and self.needPopUpGift[actType] -end - -function ShopData:checkHasPopUpGift(actType, actId) - local gifts = self:getPopUpGiftByType(actType) - if gifts and #gifts > 0 then - for _, giftId in ipairs(gifts) do - if (giftId == actId) then + for id, info in ipairs(self:getGoldConfig()) do + if self:getGoldBuyRemainCountByFree(id) > 0 then + return true + end + if not isOnlyFree then + if self:getGoldBuyRemainCountByAd(id) > 0 then return true end end @@ -201,864 +149,784 @@ function ShopData:checkHasPopUpGift(actType, actId) return false end --- 获取下一个需要弹出的同类型礼包数据,特别的,如果是主界面部分则多个不同类型的也要考虑进去 -function ShopData:getNextPopGiftData(actType, actId) - if GConst.ShopConst.MAIN_UI_POP_TYPE[actType] then - -- 优先找自己类型的,如果是act类则需要找同类型的 - local popUpGift = self:getPopUpGiftByType(actType) - if popUpGift and #popUpGift > 0 then - if actType == PayManager.PURCHARSE_TYPE.ACT_GIFT then - for _, nextActId in ipairs(popUpGift) do - if self:getActGiftConfig()[nextActId].type == self:getActGiftConfig()[actId].type then - return actType, nextActId +function ShopData:getActGiftConfig(id) + if id then + return ConfigManager:getConfig("act_gift")[id] + else + return ConfigManager:getConfig("act_gift") + end +end + +function ShopData:getActGiftIdsByType(giftType) + local ids = {} + for id, info in pairs(self:getActGiftConfig()) do + if info.type == giftType then + table.insert(ids, id) + end + end + table.sort(ids, function(a, b) return a < b end) + return ids +end + +-- 章节礼包 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:refreshChapterShop(data) + if not data then + return + end + if EDITOR_MODE then + Logger.logHighlight("ShopData 章节礼包") + Logger.printTable(data) + end + + self.chapterInfo = data.bought + self:setDirty() +end + +function ShopData:getChapterGiftConfig(id) + if id then + return ConfigManager:getConfig("mall_chapter")[id] + else + return ConfigManager:getConfig("mall_chapter") + end +end + +-- 获取要展示的章节礼包id +function ShopData:getShowChapterGiftIds() + local ids = {} + + for id, info in ipairs(self:getChapterGiftConfig()) do + if DataManager.ChapterData:getChapterPassed(info.chapter_id) and not self:isBoughtChapterGift(id) then + table.insert(ids, id) + end + end + table.sort(ids, function(a, b) return a < b end) + + return ids +end + +-- 是否购买了章节礼包 +function ShopData:isBoughtChapterGift(id) + return self.chapterInfo[id] and self.chapterInfo[id] > 0 +end + +-- 购买章节礼包成功 +function ShopData:onBuyChapterGiftSuccess(id) + self.chapterInfo[id] = (self.chapterInfo[id] or 0) + 1 + self:setDirty() +end + +-- 魂芯商店 ---------------------------------------------------------------------------------------------------------------------------------------- +function ShopData:refreshCoreSoulShop(data) + if not data then + return + end + if not data.summons then + return + end + if EDITOR_MODE then + Logger.logHighlight("ShopData 魂芯商店") + Logger.printTable(data.summons) + end + + local coreSoulInfo = data.summons or {} + local normalInfo = coreSoulInfo[GConst.ShopConst.CORE_SOUL_TYPE.NORMAL] or {} + local eliteInfo = coreSoulInfo[GConst.ShopConst.CORE_SOUL_TYPE.ELITE] or {} + + self.coreSoulAdTimes = normalInfo.ad_count or 0 + self.coreSoulNormalRewardTimes = normalInfo.trigger_count or 0 -- 普通宝箱大奖累计次数 + self.coreSoulEliteRewardTimes = eliteInfo.trigger_count or 0 -- 史诗宝箱大奖累计次数 + + self:setDirty() +end + +-- 魂芯广告使用次数 +function ShopData:getCoreSoulAdTimes() + return self.coreSoulAdTimes or 0 +end +-- 魂芯广告剩余次数 +function ShopData:getCoreSoulAdRemainTimes() + local remainTimes = self:getCoreSoulAdMaxTimes() - self:getCoreSoulAdTimes() + if remainTimes < 0 then + remainTimes = 0 + end + return remainTimes +end +-- 魂芯广告上限次数 +function ShopData:getCoreSoulAdMaxTimes() + return GFunc.getConstIntValue("summon_core_adtimes_1") +end +-- 魂芯大奖配置需要次数 +function ShopData:getCoreSoulBigRewardConstTimes(idx) + local cfg = ConfigManager:getConfig("summon_core") + return cfg[idx].guarantee_times or 0 +end +-- 魂芯大奖需要次数 +function ShopData:getCoreSoulBigRewardTimes(idx) + local limit = self:getCoreSoulBigRewardConstTimes(idx) + if limit == nil then + limit = 66 + end + if idx == GConst.ShopConst.CORE_SOUL_TYPE.NORMAL then + return limit - (self.coreSoulNormalRewardTimes or 0) + else + return limit - (self.coreSoulEliteRewardTimes or 0) + end +end +--- 魂芯抽奖消耗道具id +function ShopData:getCoreSoulCostItemId(idx) + local cfgInfo = ConfigManager:getConfig("summon_core")[idx] + local cost = cfgInfo.item_cost + return cost and cost.id +end +--- 魂芯抽奖单抽消耗钻石数量 +function ShopData:getCoreSoulSingleCostGemNum(idx) + local cfgInfo = ConfigManager:getConfig("summon_core")[idx] + local cost = cfgInfo.cost + return cost and cost.num +end +--- 魂芯抽奖10连抽消耗钻石数量 +function ShopData:getCoreSoulMultiCostGemNum(idx) + local cfgInfo = ConfigManager:getConfig("summon_core")[idx] + local cost = cfgInfo.cost_ten + return cost and cost.num +end + +function ShopData:onBuyCoreSoulBoxSuccess(idx, free, times, triggerCount) + if idx == GConst.ShopConst.CORE_SOUL_TYPE.NORMAL then + if free then + self.coreSoulAdTimes = self.coreSoulAdTimes + times + end + self.coreSoulNormalRewardTimes = triggerCount + else + self.coreSoulEliteRewardTimes = triggerCount + end + self:setDirty() +end + +-- 每日商店 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:refreshDailyShop(data) + if not data then + return + end + if EDITOR_MODE then + Logger.logHighlight("ShopData 每日商店") + Logger.printTable(data) + end + + self.dailyInfo = data + self:setDirty() +end + +function ShopData:getDailyConfig(id) + if id then + return ConfigManager:getConfig("mall_daily_store")[id] + else + return ConfigManager:getConfig("mall_daily_store") + end +end + +-- 获取每日免费刷新次数 +function ShopData:getDailyRefreshFreeCount() + return GFunc.getConstIntValue("mall_daily_free_refresh") or 0 +end + +-- 获取每日广告刷新次数 +function ShopData:getDailyRefreshAdCount() + return GFunc.getConstIntValue("mall_daily_ad_refresh") or 0 +end + +-- 获取每日道具刷新次数 +function ShopData:getDailyRefreshCostCount() + return GFunc.getConstIntValue("mall_daily_refresh") or 0 +end + +-- 获取刷新道具 +function ShopData:getDailyRefreshCost() + return GFunc.getConstCost("mall_daily_refresh_cost") +end + +-- 获取每日商店今日免费+钻石刷新次数 +function ShopData:getDailyRefreshCount() + return self.dailyInfo.refresh_count or 0 +end + +-- 获取每日商店今日广告刷新次数 +function ShopData:getDailyAdRefreshCount() + return self.dailyInfo.ad_refresh_count or 0 +end + +function ShopData:getDailyFreeRefreshRemainCount() + return math.max(self:getDailyRefreshFreeCount() - self:getDailyRefreshCount(), 0) +end + +function ShopData:getDailyAdRefreshRemainCount() + return math.max(self:getDailyRefreshAdCount() - self:getDailyAdRefreshCount(), 0) +end + +function ShopData:getDailyCostRefreshRemainCount() + if self:getDailyFreeRefreshRemainCount() <= 0 then + return math.max(self:getDailyRefreshCostCount() - (self:getDailyRefreshCount() - self:getDailyRefreshFreeCount()), 0) + else + return self:getDailyRefreshCostCount() + end +end + +-- 获取自动刷新倒计时 +function ShopData:getDailyRefreshAutoTime() + return Time:formatNumTimeStr(Time:getTodaySurplusTime()) +end + +function ShopData:getDailyReward(id) + if self.dailyInfo.grids then + return self.dailyInfo.grids[id] + end +end + +function ShopData:getDailyCost(id) + if self.dailyInfo.grids_cost then + return self.dailyInfo.grids_cost[id] + end +end + +function ShopData:getDailyIdx(id) + if self.dailyInfo.grids_index then + return self.dailyInfo.grids_index[id] + end +end + +-- 剩余次数,包括免费与广告免费 +function ShopData:getDailyRemainCount(id) + local cfg = self:getDailyConfig(id) + if not cfg then + return 0 + end + + local count = 0 + if self.dailyInfo.daily_count then + count = self.dailyInfo.daily_count[id] or 0 + end + + return (cfg.limit or 0) + (cfg.limit_ad or 0) - count +end +-- 剩余次数,只包括免费,不包括广告 +function ShopData:getDailyRemainFreeCount(id) + local cfg = self:getDailyConfig(id) + if not cfg then + return 0 + end + + local count = 0 + if self.dailyInfo.daily_count then + count = self.dailyInfo.daily_count[id] or 0 + end + + return (cfg.limit or 0) - count +end + +function ShopData:getDailyLocked(id) + local cfg = self:getDailyConfig(id) + if not cfg or not cfg.unlock then + return + end + + if DataManager.ChapterData:getChapterPassed(cfg.unlock) then + return + end + + local str = DataManager.ChapterData:getChapterNameXYMode(cfg.unlock) + return I18N:getGlobalText(I18N.GlobalConst.FUNC_OPEN_STAGE, str) +end + +function ShopData:setLoginDailyRp() + self.loginRpDaily = true +end + +function ShopData:getLoginDailyRp() + --@TODO 2025-09-24 15:10:19 + -- if DataManager.PaymentData:getIsSkipAd() then + -- return true + -- end + return not self.loginRpDaily +end + +-- 钻石商店 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:getGemConfig(id) + if id then + return ConfigManager:getConfig("mall_treasure")[id] + else + return ConfigManager:getConfig("mall_treasure") + end +end + +-- 金币商店 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:refreshGoldShop(data) + if not data then + return + end + if EDITOR_MODE then + Logger.logHighlight("ShopData 金币商店") + Logger.printTable(data) + end + + self.goldInfo = data + self:setDirty() +end + +function ShopData:getGoldConfig(id) + if id then + return ConfigManager:getConfig("mall_gold")[id] + else + return ConfigManager:getConfig("mall_gold") + end +end + +-- 广告次数 +function ShopData:getBuyGoldAdCount(id) + local cfg = self:getGoldConfig(id) + return cfg and cfg.daily_ad or 0 +end + +-- 获取剩余免费广告领取次数 +function ShopData:getGoldBuyRemainCountByAd(id) + local freeCount = self:getBuyGoldFreeCount(id) + local adCount = self:getBuyGoldAdCount(id) + return math.max(adCount + freeCount - self.goldInfo.count, 0) +end + +-- 免费次数 +function ShopData:getBuyGoldFreeCount(id) + local cfg = self:getGoldConfig(id) + return cfg and cfg.daily_free or 0 +end + +-- 获取剩余免费领取次数 +function ShopData:getGoldBuyRemainCountByFree(id) + local freeCount = self:getBuyGoldFreeCount(id) + return math.max(freeCount - self.goldInfo.count, 0) +end + +function ShopData:onBuyGoldGiftSuccess(id) + if id == 1 then + -- 今日免费广告次数+1 + self.goldInfo.count = self.goldInfo.count + 1 + end + self:setDirty() +end + +function ShopData:setLoginGoldRp() + self.loginRpGold = true +end + +function ShopData:getLoginGoldRp() + --@TODO 2025-09-24 15:10:19 + -- if DataManager.PaymentData:getIsSkipAd() then + -- return true + -- end + return not self.loginRpGold +end + +-- 神话星辉 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:refreshEmblemShop(data) + if not data then + return + end + if EDITOR_MODE then + Logger.logHighlight("ShopData 星辉商店") + Logger.printTable(data) + end + + self.emblemInfo = data or {} + self:setDirty() +end + +function ShopData:getEmblemConfig(id) + if id then + return ConfigManager:getConfig("mall_mythic_emblem")[id] + else + return ConfigManager:getConfig("mall_mythic_emblem") + end +end + +function ShopData:isEmblemOpen(showToast) + if not self:isOpen(showToast) then + return false + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_EMBLEM, not showToast) then + return false + end + + return true +end + +function ShopData:getEmblemLimitCount(id) + local cfg = self:getEmblemConfig(id) + if not cfg or not cfg.daily_limit then + return 0 + end + return cfg.daily_limit +end + +function ShopData:getEmblemBoughtCount(id) + return self.emblemInfo.today_count[id] or 0 +end + +function ShopData:getEmblemRemainCount(id) + return self:getEmblemLimitCount(id) - self:getEmblemBoughtCount(id) +end + +function ShopData:onBuyEmblemGiftSuccess(id) + self.emblemInfo.total_count[id] = (self.emblemInfo.total_count[id] or 0) + 1 + self.emblemInfo.today_count[id] = (self.emblemInfo.today_count[id] or 0) + 1 + self:setDirty() +end + +-- 首充礼包 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:isFirstRechargeOpen(gear) + if GFunc.isShenhe() then + return false + end + if gear then + local boughtLast = gear > 1 and self:getFirstRechargeRewardDays(gear - 1) > 0 + -- 时间到了 & 没购买上一档 + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY["FIRST_CHARGE_" .. gear], true) and not boughtLast then + return false + end + for day = 1, 3 do + if not self:isBoughtFirstRecharge(gear, day) or self:getFirstRechargeRewardDays(gear) < 3 then + -- 特殊处理一下首充3,正常逻辑如果购买了首充1,那么就开首充2,但是如果购买了首充2,首充3还要额外判断一下配置的等级条件是否达到了 + if gear == 3 and not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.FIRST_CHARGE_3, true) and boughtLast then + local cfg = ConfigManager:getConfig("func_open")[ModuleManager.MODULE_KEY.FIRST_CHARGE_3] + if cfg.level then + local isOpen = DataManager.PlayerData:getLv() >= cfg.level + if not isOpen then + return false + end + elseif cfg.stage then + local isOpen = DataManager.ChapterData:getChapterPassed(cfg.stage) + if not isOpen then + return false + end end end - else - for _, nextActId in ipairs(popUpGift) do - return actType, nextActId - end + return true end end - -- 按顺序找其他类型的 - if actType ~= PayManager.PURCHARSE_TYPE.ACT_GIFT then - local popUpGift = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT) - if popUpGift and #popUpGift > 0 then - for _, nextActId in ipairs(popUpGift) do - -- 新手礼包 - if self:getActGiftConfig()[nextActId].type == PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT then - return PayManager.PURCHARSE_TYPE.ACT_GIFT, nextActId - end - -- 助力礼包 - if self:getActGiftConfig()[nextActId].type == PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT then - return PayManager.PURCHARSE_TYPE.ACT_GIFT, nextActId - end - end + else + for k, gear in pairs(GConst.ShopConst.FIRST_RECHARGE_GEARS) do + if self:isFirstRechargeOpen(gear) then + return true end end - if actType ~= PayManager.PURCHARSE_TYPE.CHAPTER_GIFT then - local popUpGift = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT) - if popUpGift and #popUpGift > 0 then - for _, nextActId in ipairs(popUpGift) do - return PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, nextActId - end + end + + return false +end + +-- 开启了几个首冲档位 +function ShopData:getFirstRechargeOpenCount() + local count = 0 + for k, gear in pairs(GConst.ShopConst.FIRST_RECHARGE_GEARS) do + if self:isFirstRechargeOpen(gear) then + count = count + 1 + end + end + return count +end + +-- 红点 +function ShopData:hasFirstRechargeRedPoint() + for k, gear in pairs(GConst.ShopConst.FIRST_RECHARGE_GEARS) do + local boughtDay = self:getFirstRechargeBoughtDays(gear) + local rewardDay = self:getFirstRechargeRewardDays(gear) + if boughtDay > 0 and rewardDay < 3 and boughtDay > rewardDay then + return true + end + end + + return false +end + +function ShopData:getNeedShowFirstRechargePop() + -- if not self:isFirstRechargeOpen() then + -- return false + -- end + + -- 如果可以领的奖励都领完了也不弹了 + local openCount = 0 + local canGetCount = 0 + for k, gear in pairs(GConst.ShopConst.FIRST_RECHARGE_GEARS) do + if self:isFirstRechargeOpen(gear) then + openCount = openCount + 1 + local boughtDay = self:getFirstRechargeBoughtDays(gear) + local rewardDay = self:getFirstRechargeRewardDays(gear) + if boughtDay > 0 and boughtDay <= rewardDay then -- 已经领取过了不用弹了 + canGetCount = canGetCount + 1 end end - else -- 直接返回同类型的即可 - local popUpGift = self:getPopUpGiftByType(actType) - if popUpGift and #popUpGift > 0 then - for _, nextActId in ipairs(popUpGift) do - return actType, nextActId - end + end + if openCount == canGetCount then -- 功能没开,或者开启了的首充都已经领取完了 + return false + end + return not self.firstRechargePoped +end + +function ShopData:setFirstrechargePoped() + self.firstRechargePoped = true +end + +-- 是否使用新的首充礼包 +-- function ShopData:isNewFirstRechargeGift(gear) +-- if gear == nil then +-- return false +-- end +-- local oldId = GConst.ShopConst.FIRST_RECHARGE_ID[gear][1] +-- return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, oldId) <= 0 +-- end + +-- 获取档位id +function ShopData:getFirstRechargeGiftId(gear, day) + -- if self:isNewFirstRechargeGift(gear) then + -- return GConst.ShopConst.FIRST_RECHARGE_ID_2[gear][day or 1] + -- else + -- return GConst.ShopConst.FIRST_RECHARGE_ID[gear][day or 1] + -- end + return GConst.ShopConst.FIRST_RECHARGE_ID[gear][day or 1] + +end + +-- 获取档位购买状态 +function ShopData:isBoughtFirstRecharge(gear, day) + return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getFirstRechargeGiftId(gear, day)) > 0 +end + +-- 档位奖励领取天数 +function ShopData:getFirstRechargeRewardDays(gear) + if not self:isBoughtFirstRecharge(gear) then + return 0 + end + + local getDay = 0 + for day = 1, 3 do + if DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getFirstRechargeGiftId(gear, day)) > 0 then + getDay = day end end + return getDay +end + +-- 购买天数 +function ShopData:getFirstRechargeBoughtDays(gear) + if not self:isBoughtFirstRecharge(gear) then + return 0 + end + local time = DataManager.PaymentData:getGiftBoughtTime(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getFirstRechargeGiftId(gear)) + if time == nil or time <= 0 then + return 0 + end + local day = Time:getDayBeginTimeStamp(time) + day = (Time:getBeginningOfServerToday() - day) // 86400 + return day + 1 +end + +-- 是否可领取 +function ShopData:canGetFirstRechargeReward(gear, day) + if not self:isBoughtFirstRecharge(gear) then + return false + end + if self:isBoughtFirstRecharge(gear, day) then + return false + end + + local boughtDay = self:getFirstRechargeBoughtDays(gear) + local rewardDay = self:getFirstRechargeRewardDays(gear) + return boughtDay > rewardDay and rewardDay + 1 == day +end + +-- 体力 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:initVit(data) + data = data or {} + if EDITOR_MODE then + Logger.logHighlight("体力数据") + Logger.printTable(data) + end + + self.vitAdCount = data.ad_count or 0 + self.vitGemCount = data.diamond_count or 0 +end + +-- 获取体力购买奖励 +function ShopData:getVitBuyReward(buyType) + if buyType == GConst.VIT_BUY_TYPE.AD then + return GFunc.getConstCost("stamina_ad_buy") + elseif buyType == GConst.VIT_BUY_TYPE.GEM then + return GFunc.getConstCost("stamina_diamond_buy") + end return nil end --- 通用礼包结束 ---------------------------------------------------------------------------------------------- - --- 每日特惠部分 ********************************************************************************************** - -function ShopData:getMallDailyConfig() - return ConfigManager:getConfig("mall_daily") -end - --- 初始化每日特惠 -function ShopData:initMallDaily(mallDaily) - -- if EDITOR_MODE then - -- Logger.logHighlight("初始化 initMallDaily") - -- Logger.printTable(mallDaily) - -- end - - mallDaily = mallDaily or {} - self.mallDailyAdResetCount = mallDaily.ad_reset_Count or 0 - self.mallDailyDiamondResetCount = mallDaily.diamond_reset_Count or 0 - self.mallDailyGoods = mallDaily.goods or {} -- {id,good_index,bought} - - self:markMallDailyDirty(false) - self:setDirty() -end - --- 购买成功后更新数据 -function ShopData:updateMallDailyGoods(info) - local goods = self:getMallDailyGoods() - for _, data in ipairs(goods) do - if data.id == info.id and data.good_index == info.good_index then - data.bought = info.bought - break - end - end - - self:setDirty() -end - --- 每日特惠跨天重置 -function ShopData:resetMallDaily() - self.mallDailyAdResetCount = 0 - self.mallDailyDiamondResetCount = 0 - self:markMallDailyDirty(true) -- 标记需要重新请求数据,在界面/下次打开界面时请求 -end - -function ShopData:getMallDailyDirty() - return self.data.mallDailyDirty -end - -function ShopData:markMallDailyDirty(isDirty) - self.data.mallDailyDirty = isDirty -end - -function ShopData:getMallDailyAdResetCount() - return self.mallDailyAdResetCount -end - -function ShopData:addMallDailyAdResetCount() - self.mallDailyAdResetCount = self.mallDailyAdResetCount + 1 -end - -function ShopData:getMallDailyAdLeftCount() - return 1 - self.mallDailyAdResetCount -- 目前无配置表 -end - -function ShopData:getMallDailyDiamondResetCount() - return self.mallDailyDiamondResetCount -end - -function ShopData:addMallDailyDiamondResetCount() - self.mallDailyDiamondResetCount = self.mallDailyDiamondResetCount + 1 -end - -function ShopData:getMallDailyDiamondLeftCount() - return 1 - self.mallDailyDiamondResetCount -- 目前无配置表 -end - -function ShopData:getMallDailyGoods() - return self.mallDailyGoods -end - -function ShopData:getMallDailyDiamondResetCost() - return 30 -- 目前无配置表 -end - --- 每日特惠 广告商品最大购买次数 -function ShopData:getMallDailyFirstItemAdMaxCount() - return 1 -- 目前无配置表 -end - --- 每日特惠 常规商品最大购买次数 -function ShopData:getMallDailyGoodsLimitCount() - return 1 -- 目前无配置表 -end - --- 每日特惠 是否开启 -function ShopData:getMallDailyIsOpen() - return ModuleManager:getIsOpen() -end - --- 根据商品id获取本日的随机商品数据 -function ShopData:getMallDailyRewardAndCost(id) - local cfg = self:getMallDailyConfig() - local index - for _, info in ipairs(self:getMallDailyGoods()) do - if info.id == id then - index = info.good_index - break - end - end - if index then - return cfg[id].good[index], cfg[id].cost and cfg[id].cost[index] - end -end - --- 每日特惠结束 ---------------------------------------------------------------------------------------------- - --- 常驻金币礼包 ********************************************************************************************** - -function ShopData:getMallGoldConfig() - return ConfigManager:getConfig("mall_gold") -end - -function ShopData:initCommonDailyGoldGift(ad_count) - -- if EDITOR_MODE then - -- Logger.logHighlight("初始化 initCommonDailyGoldGift") - -- Logger.printTable(ad_count) - -- end - - ad_count = ad_count or {} - self.commonDailyGoldBuyCount = ad_count[1] or 0 -- 已购的金币广告礼包次数 - - self:setDirty() -end - -function ShopData:getCommonDailyCoinAdBuyCount() - return self.commonDailyGoldBuyCount -end - -function ShopData:resetCommonDailyCoinAdCount() - self.commonDailyGoldBuyCount = 0 -end - --- 根据时间得到当前挂机金币奖励 -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 cfgInfo.gold.num, cfgInfo.cost - end -end - --- 常驻金币礼包结束 ---------------------------------------------------------------------------------------------- - --- 常驻钻石礼包 ********************************************************************************************** - -function ShopData:resetCommonDailyGemAdCount() - local gift = self:getActGiftDetailData(PayManager.PURCHARSE_TYPE.MALL_TREASURE, 1) - if gift then - gift.buy_count = 0 - end -end - -function ShopData:getMallTreasureConfig() - return ConfigManager:getConfig("mall_treasure") -- 审核模式会去读另一张表,在config_manager中处理的 -end - --- 常驻钻石礼包结束 ---------------------------------------------------------------------------------------------- - --- 章节礼包 act_chapter_store ********************************************************************************************** -function ShopData:initActChapterStoreData() - if not self.actChapterStoreMap then - self.actChapterStoreId2ChapterIdMap = {} - self.actChapterStoreChapterId2IdMap = {} - local cfg = self:getActChapterStoreConfig() - for id, cfgInfo in pairs(cfg) do - self.actChapterStoreId2ChapterIdMap[id] = cfgInfo.chapter - self.actChapterStoreChapterId2IdMap[cfgInfo.chapter] = id - end - end -end - -function ShopData:getActChapterStoreConfig() - return ConfigManager:getConfig("act_chapter_store") -end - --- 特定章节礼包是否已购买 -function ShopData:getActChapterStoreHasBuy(chapterId) - -- 章节礼包的id-chapterId相互对应map - local actId = self.actChapterStoreChapterId2IdMap[chapterId] - if self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, actId) == 0 then - return false - else - return true - end -end - --- 根据当前章节,获取可购买的id数组 -function ShopData:getActChapterStoreCanBuyActIds() - local list = {} - local curChapterId = DataManager.ChapterData:getMaxChapterId() - for id = 1, curChapterId do - if not self:getActChapterStoreHasBuy(id) then - table.insert(list, self.actChapterStoreChapterId2IdMap[id]) - end - end - return list -end - -function ShopData:markPopUpGiftForActChapterStore(chapterId) - local actId = self.actChapterStoreChapterId2IdMap[chapterId] - self:markPopUpGift(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, actId) -end - --- 章节礼包结束 ---------------------------------------------------------------------------------------------- - --- 新手礼包 ********************************************************************************************** - -function ShopData:getIsBeginnerGiftOpen() - return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.BEGINNER_GIFT, true) -end - -function ShopData:markPopUpGiftForBeginnerGift() - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID) -end - -function ShopData:getBeginnerGiftHasBuy() - if self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID) == 0 then - return false - else - return true - end -end - --- 新手礼包侧边栏展示时间 -function ShopData:getBeginnerGiftSideBarDurationTime() - return 3 * 24 * 3600 -- 目前无配置表 -end - --- 已开启 未购买 且 在开服的3天内 -function ShopData:getBeginnerGiftShowSideBar() - return self:getIsBeginnerGiftOpen() and not self:getBeginnerGiftHasBuy() and self:getBeginnerGiftSideBarRemainTime() > 0 -end - --- 展示在侧边栏的剩余时间 -function ShopData:getBeginnerGiftSideBarRemainTime() - local createTime = DataManager.PlayerData:getCreateTime() // 1000 - local durationTime = self:getBeginnerGiftSideBarDurationTime() - return createTime + durationTime - Time:getServerTime() -end - --- 新手礼包结束 ---------------------------------------------------------------------------------------------- - --- 助力与金币礼包(act_gift) ********************************************************************************************** - --- 初始化助力与金币礼包 -function ShopData:initLevelUpGift(levelUpGift) - -- if EDITOR_MODE then - -- Logger.logHighlight("初始化 助力与金币礼包") - -- Logger.printTable(levelUpGift) - -- end - - levelUpGift = levelUpGift or {} - self.levelUpGifts = levelUpGift.gifts or {} -- [{trigger_level,current_level_up_gift,trigger_at}] - -- 金币礼包部分会一直保留 - self:initCoinGift(levelUpGift.gold_gift_id, levelUpGift.gold_gift_trigger_at) - self.data.currentPayAmount = levelUpGift.current_pay_amount or 0 -- 已经计算过降档的付费数额 - - self:setDirty() -end - -function ShopData:initCoinGift(id, triggerTime) - -- if EDITOR_MODE then - -- Logger.logHighlight("初始化 金币礼包 -- id:%s time:%s", id, triggerTime) - -- end - - self.coinGiftId = id or 0 -- 金币礼包触发id - self.coinGiftTriggerTime = triggerTime or 0 -- 金币礼包触发时间 - - self:setDirty() -end - -function ShopData:getPayAmount() - return self.data.currentPayAmount -end - -function ShopData:addPayment(rechargeId) - local cfg = ConfigManager:getConfig("recharge")[rechargeId] - self.data.currentPayAmount = self.data.currentPayAmount + cfg.price -end - -function ShopData:getLevelUpGift() - return self.levelUpGifts -end - -function ShopData:onTriggerLevelUpGift(gift) - table.insert(self.levelUpGifts, gift) - -- 标记弹窗 - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.current_level_up_gift) -end - -function ShopData:removeLevelUpGift(actId) - for index, gift in ipairs(self.levelUpGifts) do - if gift.current_level_up_gift == actId then - table.remove(self.levelUpGifts, index) - break - end - end -end - --- 获得可购买的助力礼包Ids -function ShopData:getLevelUpGiftActIds() - local list = {} - for index, gift in ipairs(self.levelUpGifts) do - -- 剔除已购的助力礼包 这个礼包只会有一次 - if self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.current_level_up_gift) == 0 then - table.insert(list, gift.current_level_up_gift) - end - end - - - table.sort(list) - return list -end - --- 获得当前金币礼包的id -function ShopData:getCoinGiftId() - return self.coinGiftId -end - --- 获得金币礼包的触发时间 -function ShopData:getCoinGiftTriggerTime() - return self.coinGiftTriggerTime // 1000 -end - --- 获得当前可购买的金币礼包id,需要未购买且时间满足 -function ShopData:getValidCoinGiftId() - local actId = self:getCoinGiftId() - if actId > 0 then - local cfgInfo = self:getActGiftConfig()[actId] - local triggerTime = self:getCoinGiftTriggerTime() - local remainTime = triggerTime + (cfgInfo.limit_time or 0) * 3600 - Time:getServerTime() - if remainTime > 0 then - -- 查看最近一次购买时间 - local actGiftDetailData = self:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId) - if actGiftDetailData then - local latestBuyTime = actGiftDetailData.latest_buy_at // 1000 - if latestBuyTime <= 0 then - return actId - else - -- 目前规则上有CD 所以如果购买时间在CD范围内则该礼包无效 - local limitTime = (self:getActGiftConfig()[actId].limit_time or 0) * 3600 - if Time:getServerTime() > latestBuyTime + limitTime then - return actId - end - end - else -- 没有买过,这个肯定可以购买 - return actId - end +-- 获取体力购买消耗 +function ShopData:getVitBuyCost(buyType) + if buyType == GConst.VIT_BUY_TYPE.GEM then + local cost = GFunc.getConstCost("stamina_diamond_cost") + local costAdd = GFunc.getConstCost("stamina_diamond_costadd") + if self._shopVitCost == nil then + self._shopVitCost = { + id = cost.id, + type = cost.type, + } end + self._shopVitCost.num = cost.num + self.vitGemCount * costAdd.num + return self._shopVitCost end return nil end --- 获取金币礼包付款条件cfgInfo数组 从小到大 -function ShopData:_getCoinGiftPayConditionList() - if not self.coinGiftPayConditionList then - self.coinGiftPayConditionList = {} - for id, cfgInfo in pairs(self:getActGiftConfig()) do - if cfgInfo.type == PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT then - local tmpCfgInfo = clone(cfgInfo) - tmpCfgInfo.id = id - table.insert(self.coinGiftPayConditionList, tmpCfgInfo) - end - end - table.sort(self.coinGiftPayConditionList, function (a, b) - return a.pay_condition[1] < b.pay_condition[1] - end) +-- 获取体力每日购买次数 +function ShopData:getVitBuyLimit(buyType) + if buyType == GConst.VIT_BUY_TYPE.AD then + return GFunc.getConstIntValue("stamina_ad_times") + elseif buyType == GConst.VIT_BUY_TYPE.GEM then + return GFunc.getConstIntValue("stamina_diamond_times") end - return self.coinGiftPayConditionList + return 0 end --- 根据当前付费和金币礼包数据 判断并返回合法的金币礼包触发id -function ShopData:checkAndGetCoinGiftTriggerId() - local triggerId - local canTrigger = true - local curActId = self:getCoinGiftId() - if curActId > 0 then - local cfgInfo = self:getActGiftConfig()[curActId] - local cdTime = (cfgInfo.cd or 0) * 3600 - local curTriggerTime = self:getCoinGiftTriggerTime() - -- 是否还在已触发限时内 - if Time:getServerTime() < curTriggerTime + cdTime then - canTrigger = false +-- 获取体力每日购买次数(月卡加成) +function ShopData:getVitBuyPrivateLimit(buyType) + if buyType == GConst.VIT_BUY_TYPE.GEM then + return GFunc.getConstIntValue("stamina_dia_privilege") + end + return 0 +end + +-- 获取体力今日已购买次数 +function ShopData:getVitBoughtCount(buyType) + if buyType == GConst.VIT_BUY_TYPE.AD then + return self.vitAdCount or 0 + elseif buyType == GConst.VIT_BUY_TYPE.GEM then + return self.vitGemCount or 0 + end + return 0 +end + +-- 获取剩余购买次数 +function ShopData:getVitBuyRemainCount(buyType) + if buyType == GConst.VIT_BUY_TYPE.AD then + local total = self:getVitBuyLimit(buyType) + -- if DataManager.MonthlyCardData:getIsCardActive(GConst.MonthlyCardConst.CARD_TYPE.CARD_2) then + -- total = total + self:getVitBuyPrivateLimit(buyType) + -- end + return total - self:getVitBoughtCount(buyType) + elseif buyType == GConst.VIT_BUY_TYPE.GEM then + return 99999 + end + return 0 +end + +function ShopData:onVitBuySuccess(data) + self:initVit(data) + self:setDirty() +end + +-- region 三方直接购买礼包 +function ShopData:onServerPushThirdPay(data) + if data then + self:initThirdPayOrder(data) + self:initThirdPayGiftOrder(data) + if data.third_pay_total then + DataManager.PaymentData:setThirdPayTotal(data.third_pay_total) + end + end +end + +function ShopData:initThirdPayGiftOrder(data) + self.thirdPayGifts = data and data.gifts + if self:getNeedShowGiftReceiveUI() then + self.data.isThirdPayGiftDirty = not self.data.isThirdPayGiftDirty + end +end + +function ShopData:getNeedShowGiftReceiveUI() + if self.thirdPayGifts == nil then + return false + end + return #self.thirdPayGifts > 0 +end + +function ShopData:getThirdPayGiftOrders() + return self.thirdPayGifts or GConst.EMPTY_TABLE +end + +function ShopData:getThirdPayGiftOrderInfo(order) + if self.thirdPayGifts == nil then + return + end + for k, v in ipairs(self.thirdPayGifts) do + if v.order_id == order then + return v + end + end +end + +function ShopData:deleteThirdPayGiftOrders(orders) + for i = #orders, 1, -1 do + for j = #self.thirdPayGifts, 1, -1 do + if orders[i] == self.thirdPayGifts[j].order_id then + table.remove(self.thirdPayGifts, j) + break + end + end + end +end +--@endregion + +-- 代金券 ---------------------------------------------------------------------------------------------------------------------------------------- + +function ShopData:initThirdPayOrder(data) + if EDITOR_MODE then + Logger.logHighlight("ShopData 代金券") + Logger.printTable(data) + end + self.thirdPayOrder = data and data.orders +end + +function ShopData:getNeedShowVoucherReceiveUI() + if self.thirdPayOrder == nil then + return false + end + return #self.thirdPayOrder > 0 +end + +function ShopData:getThirdPayOrders() + return self.thirdPayOrder or GConst.EMPTY_TABLE +end + +function ShopData:getThirdPayOrderInfo(order) + if self.thirdPayOrder == nil then + return + end + for k, v in ipairs(self.thirdPayOrder) do + if v.order_id == order then + return v end end - if canTrigger then - -- 从表中找出符合付费金额的actId - local payAmount = self:getPayAmount() - local payConditionList = self:_getCoinGiftPayConditionList() - for index, info in ipairs(payConditionList) do - local p1 = info.pay_condition[1] - local p2 = info.pay_condition[2] - if p1 <= payAmount and payAmount < p2 then - triggerId = info.id +end + +function ShopData:deleteThirdPayOrders(orders) + for i = #orders, 1, -1 do + for j = #self.thirdPayOrder, 1, -1 do + if orders[i] == self.thirdPayOrder[j].order_id then + table.remove(self.thirdPayOrder, j) break end end - -- 超出上限 - if not triggerId then - local count = #payConditionList - triggerId = payConditionList[count].id - end - end - return triggerId -end - -function ShopData:onTriggerCoinGift(actId) - self:initCoinGift(actId, Time:getServerTime() * 1000) - -- 标记弹窗 - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId) -end - --- 助力礼包结束 ---------------------------------------------------------------------------------------------- - --- 成长礼包 ********************************************************************************************** - -function ShopData:getActGrowUpGiftConfig() - return ConfigManager:getConfig("act_growup_gift_new") -end - --- 初始化成长礼包 -function ShopData:initGrowUpGift(growUpGift) - if EDITOR_MODE then - Logger.logHighlight("初始化成长礼包 growUpGift -- now_ts:%s", Time:getServerTime()) - Logger.printTable(growUpGift) - end - - self.growUpGift = growUpGift - if self:hasGrowUpGift() then - self:markPopUpGiftForGrowUpGift(self.growUpGift.current_grow_up_id) - end - - self:setDirty() -end - --- 当前是否有成长礼包 -function ShopData:hasGrowUpGift() - return self.growUpGift ~= nil and self:getGrowUpGiftRemainTime() > 0 -end - --- 获取当前成长礼包 -function ShopData:getGrowUpGift() - if not self:hasGrowUpGift() then - return nil - end - return self.growUpGift -end - --- 获取成长礼包倒计时 -function ShopData:getGrowUpGiftRemainTime() - if not self.growUpGift then - return -1 - end - return (self.growUpGift.trigger_end_at // 1000) - Time:getServerTime() -end - -function ShopData:markPopUpGiftForGrowUpGift(actId) - self:markPopUpGift(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, actId) -end - --- 成长礼包购买成功 -function ShopData:onUpGiftBuySuccess() - self.growUpGift.trigger_end_at = -1 - self:setDirty() -end - --- 成长礼包结束 ---------------------------------------------------------------------------------------------- - --- 首充(作废) ********************************************************************************************** - -function ShopData:getIsFirstRechargeOpen() - return false -- ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.FIRST_RECHARGE, true) -end - --- 用于标记是否弹窗 要求等级不低于2 未领取该奖励 -function ShopData:initFirstRecharge() - -- local lv = DataManager.PlayerData:getLv() - -- if lv > 1 and not self:getHasGotFirstRechargeReward() then - -- self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID) - -- end -end - --- 是否有首充奖励 有支付且未领取 -function ShopData:getHasFirstRechargeReward() - -- local pay = DataManager.PlayerData:getTotalPayAmount() - -- if pay > 0 and not self:getHasGotFirstRechargeReward() then - -- return true - -- else - -- return false - -- end - return false -end - --- 是否已领取首充奖励 -function ShopData:getHasGotFirstRechargeReward() - -- 通用act礼包中是否有已购 - -- local boughtNum = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID) - -- return boughtNum > 0 - return true -end - --- 侧边栏是否展示 要求功能开启 未领取该奖励 -function ShopData:getShowFirstRechargeSideBar() - -- if not self:getIsFirstRechargeOpen() then - -- return false - -- end - -- if not self:getHasGotFirstRechargeReward() then - -- return true - -- else - -- return false - -- end - return false -end - --- 侧边栏红点 -function ShopData:showFirstRechargeRp() - -- if not self:getIsFirstRechargeOpen() then - -- return false - -- end - - -- return self:getHasFirstRechargeReward() - return false -end - --- 首充结束 ---------------------------------------------------------------------------------------------- - --- 入门礼包 ---------------------------------------------------------------------------------------------- - -function ShopData:initIntroductGift(introductGift) - introductGift = introductGift or {} - self.introductGift = introductGift or {} - self.introductGiftTriggerTime = self.introductGift.trigger_at or 0 - - self:checkPopIntroductGift() -end - - -- 如果可购买则标记可弹窗 -function ShopData:checkPopIntroductGift() - if (self:getIntroductGiftRemainTime() > 0 and self:getIntroductGiftRemainBuyCount() > 0) then - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) - end -end - -function ShopData:getIntroductGiftTriggerTime() - return self.introductGiftTriggerTime // 1000 -end - -function ShopData:setIntroductGiftTriggerTime(time) - self.introductGiftTriggerTime = time -end - --- 入门礼包剩余时间 -function ShopData:getIntroductGiftRemainTime() - local cfgInfo = self:getActGiftConfig()[GConst.ShopConst.INTRODUCT_GIFT_ID] - local triggerTime = self:getIntroductGiftTriggerTime() - local remainTime = triggerTime + (cfgInfo.limit_time or 0) * 3600 - Time:getServerTime() - return remainTime -end - --- 入门礼包剩余可购次数 -function ShopData:getIntroductGiftRemainBuyCount() - local cfgInfo = self:getActGiftConfig()[GConst.ShopConst.INTRODUCT_GIFT_ID] - local buyCount = self:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) - return (cfgInfo.limit or 1) - buyCount -end - --- 触发入门礼包(如果已经触发则不会更新) -function ShopData:onTriggerIntroductGift() - if self:getIntroductGiftTriggerTime() <= 0 then - self:initIntroductGift({trigger_at = Time:getServerTime() * 1000}) - -- 标记弹窗 - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID) - end -end - --- 侧边栏是否展示(时间次数均满足) -function ShopData:getIntroductGiftShowSideBar() - return self:getIntroductGiftRemainBuyCount() > 0 and self:getIntroductGiftRemainTime() > 0 -end - --- 入门礼包结束 -------------------------------------------------------------------------------------------- - --- 武器礼包 -------------------------------------------------------------------------------------------- - --- 初始化礼包(礼包类型1下的礼包,可以直接复用这里的方法) -function ShopData:initGift(giftType, gift, isInit) - if giftType == nil or gift == nil then - return - end - if EDITOR_MODE then - Logger.logHighlight("初始化礼包[%s] -- now_ts:%s", giftType, Time:getServerTime()) - Logger.printTable(gift) - end - if not self.gifts then - self.gifts = {} - end - - local giftStruct = {} - if giftType == PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT or giftType == PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT then - giftStruct.id = gift.gift_id - giftStruct.triggerTime = gift.trigger_at - giftStruct.expireTime = gift.expire_at - giftStruct.cdEndTime = gift.cd_end_at - end - - local tempId = self.gifts[giftType] and self.gifts[giftType].id or 0 - local tempTrigerTime = self.gifts[giftType] and self.gifts[giftType].triggerTime or 0 - self.gifts[giftType] = giftStruct - - if not isInit and self:hasGift(giftType) then - if tempId == self.gifts[giftType].id and tempTrigerTime == self.gifts[giftType].triggerTime then - if EDITOR_MODE then - Logger.logHighlight("重复礼包数据,不处理弹窗:" .. tempId) - end - else - self:markPopUpGift(PayManager.PURCHARSE_TYPE.ACT_GIFT, self.gifts[giftType].id) - end - end - self:setDirty() -end - --- 当前是否有礼包 -function ShopData:hasGift(giftType) - if GFunc.isShenhe() then - return false - end - return self.gifts ~= nil and self:getGiftRemainTime(giftType) > 0 -end - --- 获取当前礼包 -function ShopData:getGift(giftType) - if not self:hasGift(giftType) then - return nil - end - return self.gifts[giftType] -end - --- 获取礼包倒计时 -function ShopData:getGiftRemainTime(giftType) - if not self.gifts or not self.gifts[giftType] then - return -1 - end - return (self.gifts[giftType].expireTime // 1000) - Time:getServerTime() -end - --- 检查是否弹出ACT_GIFT类型的礼包 -function ShopData:checkPopGift(actGiftType) - local gifts = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT) - if gifts and #gifts > 0 then - for _, actId in ipairs(gifts) do - local cfgInfo = self:getActGiftConfig()[actId] - if cfgInfo and cfgInfo.type == actGiftType then - ModuleManager.ShopManager:triggerGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, actId, BIReport.PAY_UI_SHOW_TYPE.TRIGGER_POP) - end - end - end -end - --- 礼包购买成功 -function ShopData:onGiftBuySuccess(giftType) - self.gifts[giftType].expireTime = -1 - self:setDirty() -end - --- 武器礼包结束 ----------------------------------------------------------------------------------------- - --- 底部栏是否有红点 -function ShopData:getRp() - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, true) then - return false - end - if GFunc.isShenhe() then - return false - end - local isHotOpen = ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL_DAILY, true) - -- 主要商品 每日特惠广告道具 - local hotAdGoods = self:getMallDailyGoods() and self:getMallDailyGoods()[1] - local hotAdGoodsBuyCount = hotAdGoods and hotAdGoods.bought or 0 - local hotAdGoodsRp = self:getMallDailyFirstItemAdMaxCount() - hotAdGoodsBuyCount > 0 - -- 主要商品 每日特惠刷新 - local hotRefreshRp = self:getMallDailyAdLeftCount() > 0 - -- 主要商品 钻石广告道具 - local gemAdId = 1 -- 约定首位为免费栏位 - local cfgInfo = self:getMallTreasureConfig()[gemAdId] - local gemAdMaxTimes = cfgInfo and cfgInfo.daily or 0 - local gemAdRp = gemAdMaxTimes - DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.MALL_TREASURE, gemAdId) > 0 - -- 主要商品 金币广告道具 - local coinAdId = 1 -- 约定首位为免费栏位 - local cfgInfo = self:getMallGoldConfig()[coinAdId] - local coinAdMaxTimes = cfgInfo and cfgInfo.daily or 0 - local coinAdRp = coinAdMaxTimes - DataManager.ShopData:getCommonDailyCoinAdBuyCount() > 0 - - return (isHotOpen and (hotAdGoodsRp or hotRefreshRp)) or gemAdRp or coinAdRp or self:getShopDiscountRedPoint() -end - --- 商店界面特惠页签是否有红点 -function ShopData:checkShopDiscountRedPoint() - local discountRedPointTime = LocalData:getShopDiscountRedPointTime() - local today = Time:getBeginningOfServerToday() - if discountRedPointTime == today then - self.shopDiscountRedPoint = false - return - end - local actIds = self:getActChapterStoreCanBuyActIds() - if actIds and #actIds > 0 then - self.shopDiscountRedPoint = true - return - end - if not self:getBeginnerGiftHasBuy() then - self.shopDiscountRedPoint = true - return - end - actIds = self:getLevelUpGiftActIds() - if actIds and #actIds > 0 then - self.shopDiscountRedPoint = true - return - end - if self:hasGrowUpGift() then - self.shopDiscountRedPoint = true - return - end - local id = self:getValidCoinGiftId() - if id and id > 0 then - self.shopDiscountRedPoint = true - return - end - self.shopDiscountRedPoint = false - LocalData:setShopDiscountRedPointTime(today) -end - -function ShopData:getShopDiscountRedPoint() - return self.shopDiscountRedPoint -end - -function ShopData:markShopDiscountRedPoint() - if not self.shopDiscountRedPoint then - return - end - self.shopDiscountRedPoint = false - local today = Time:getBeginningOfServerToday() - LocalData:setShopDiscountRedPointTime(today) -end - -function ShopData:getEntranceDiscountRedPoint() - return not self.isClickedDiscount -end - -function ShopData:markEntranceDiscountRedPoint() - self.isClickedDiscount = true -end - -function ShopData:checkLoginPopInfo() - -- 初始化礼包弹出逻辑 - local actPopUpGifts = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.ACT_GIFT) - if not actPopUpGifts or #actPopUpGifts <= 0 then - self:markPopLastChapterActGift() - end -end - -function ShopData:markPopLastChapterActGift() - local chapterPopUpGifts = self:getPopUpGiftByType(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT) - if not chapterPopUpGifts or #chapterPopUpGifts <= 0 then - local list = self:getActChapterStoreCanBuyActIds() - if list and list[1] then - self:markPopUpGift(PayManager.PURCHARSE_TYPE.CHAPTER_GIFT, list[#list]) - end - end -end - --- 重置符文每日礼包次数 -function ShopData:resetRunesGift() - for index, id in ipairs(GConst.RunesConst.GIFT_IDS) do - self:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) - end -end - --- 重置波次锦标赛礼包次数 -function ShopData:resetTournWaveGift() - local ids = GConst.TournWaveConst.GIFT_IDS - for index, id in ipairs(ids) do - self:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) - end -end - --- 重置竞技场锦标赛礼包次数 -function ShopData:resetTournArenaGift() - local ids = GConst.TournArenaConst.GIFT_IDS - for index, id in ipairs(ids) do - self:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) end end