diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index 575c01d9..db4ac76f 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -29,7 +29,6 @@ function DataManager:init() self:initManager("TaskData", "app/userdata/task/task_data") self:initManager("DailyTaskData", "app/userdata/task/daily_task_data") self:initManager("IdleData", "app/userdata/idle/idle_data") - self:initManager("GrowthFundData", "app/userdata/fund/growth_fund_data") self:initManager("SevenDayData", "app/userdata/activity/seven_day/seven_day_data") self:initManager("ShopData", "app/userdata/shop/shop_data") self:initManager("SummonData", "app/userdata/summon/summon_data") @@ -44,6 +43,11 @@ function DataManager:init() 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") + + self:initManager("FundLevelData", "app/userdata/fund_level/fund_level_data") + self:initManager("SignWeekData", "app/userdata/sign/sign_week_data") + self:initManager("SignMonthData", "app/userdata/sign/sign_month_data") + self:initManager("ChapterFundData", "app/userdata/chapter_fund/chapter_fund_data") end function DataManager:initManager(name, path) @@ -104,39 +108,9 @@ function DataManager:clear() self.cacheTimer = nil end self.cdCallBack = {} - self.PlayerData:clear() - self.ChapterData:clear() - self.DailyChallengeData:clear() - self.DungeonData:clear() - self.ArenaData:clear() - self.CollectionData:clear() - self.HeroData:clear() - self.BagData:clear() - self.EquipData:clear() - self.SkinData:clear() - self.FormationData:clear() - self.ActivityData:clear() - self.MailData:clear() - self.GoldPigData:clear() - self.BountyData:clear() - self.ArenaBountyData:clear() - self.DailyTaskData:clear() - self.IdleData:clear() - self.GrowthFundData:clear() - self.SevenDayData:clear() - self.ShopData:clear() - self.SummonData:clear() - self.FullMoonData:clear() - self.TournWaveData:clear() - self.TournArenaData:clear() - -- 任务数据最后清理 - self.TaskData:clear() - self.AIHelperData:clear() - self.HeroFundData:clear() - self.ActBossRushData:clear() - self.FourteenDayData:clear() - self.ActPvpData:clear() - self.TalentData:clear() + for _, v in pairs(self._cacheManager) do + v:clear() + end ModuleManager.TaskManager:clear() self:clearTryOpenFunc() self.activityBountyLevelMap = nil @@ -180,7 +154,6 @@ function DataManager:initWithServerData(data) -- 任务要在BountyData之后初始化,依赖BountyData的数据 self.DailyTaskData:init(data.task_daily, data.task_achievement) self.IdleData:init(data.idle) - self.SevenDayData:init(data.seven_day) self.ShopData:init() -- self.ShopData:refreshChapterShop(data.mall_chapter) -- self.ShopData:refreshCoreSoulShop(data.soul) @@ -197,6 +170,11 @@ function DataManager:initWithServerData(data) -- self.ShopData:initGrowUpGift(data.act_grow_up_gift2) -- 成长礼包 -- self.ShopData:initLevelUpGift(data.act_level_up_gift) -- 助力/金币礼包 -- self.ShopData:initIntroductGift(data.act_introductory_gift) -- 入门礼包 + -- 基金 + self.FundLevelData:initData(data.fund) -- levelGiftData要放到PaymentData后面,因为要处理数据 + self.ChapterFundData:initData(data.chapter_fund) + self.SignWeekData:initData(data.sign) + self.SignMonthData:initData(data.sign_30) -- 活动要在礼包后初始化 self.ActivityData:init() -- 商店礼包都初始化完了后检查一下每日红点 @@ -332,6 +310,7 @@ function DataManager:scheduleGlobal() end end ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_LOGIN_DAY) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.CROSS_DAY) end end, 1) end diff --git a/lua/app/common/event_manager.lua b/lua/app/common/event_manager.lua index 51d3e4de..f4a358dd 100644 --- a/lua/app/common/event_manager.lua +++ b/lua/app/common/event_manager.lua @@ -79,6 +79,8 @@ EventManager.CUSTOM_EVENT = { FORCE_SUMMON_NEXT_FINISH = "FORCE_SUMMON_NEXT_FINISH", FORCE_SUMMON_CHECK_PATH = "FORCE_SUMMON_CHECK_PATH", FORCE_SUMMON_CHECK_PATH_GM = "FORCE_SUMMON_CHECK_PATH_GM", + + CROSS_DAY = "CROSS_DAY",-- 跨天 } -- 此方法不能直接在外部调用,请使用例如BaseUI,BaseModule等封装好的接口 diff --git a/lua/app/common/module_manager.lua b/lua/app/common/module_manager.lua index a1bb5f8e..9a174770 100644 --- a/lua/app/common/module_manager.lua +++ b/lua/app/common/module_manager.lua @@ -92,6 +92,12 @@ local MODULE_PATHS = { BagManager = "app/module/bag/bag_manager", -- 战力/攻击力toast PowerToastManager = "app/ui/common/power_toast_manager", + -- 成长基金 + FundLevelManager = "app/module/fund_level/fund_level_manager", + -- 关卡基金 + FundChapterManager = "app/module/fund_chapter/fund_chapter_manager", + -- 签到 + SignManager = "app/module/sign/sign_manager", } -- 这里的key对应func_open里的id @@ -107,7 +113,6 @@ ModuleManager.MODULE_KEY = { MALL = "mall", -- 商城 MALL_DAILY = "mall_daily", -- 每日商城 DAILY_CHALLENGE = "daily_challenge", -- 每日挑战 - FUND = "act_level_gift", -- 成长基金 ACT_GIFT_SHOW_OPEN = "act_gift_show_open", -- 弹窗礼包通用开启条件 FIRST_RECHARGE = "first_charge", -- 首充礼包 BEGINNER_GIFT = "new_player_gift", -- 新手礼包 @@ -128,8 +133,13 @@ ModuleManager.MODULE_KEY = { TALENT_OPEN = "talent_open", -- 天赋功能开启条件 DUNGEON_OPEN = "dungeon_open", -- 玩法入口页签开启条件 SUMMON_OPEN = "summon_open", -- 英雄抽卡功能开启条件(包括普通和高级抽) - -- 战力/攻击力toast - PowerToastManager = "app/ui/common/power_toast_manager", + BOUNTY = "bounty", + -- 基金 + ACT_LEVEL_GIFT = "act_level_gift", -- 成长基金 + CHAPTER_FUND = "fund_chapter", -- 关卡基金 + -- 签到 + SIGN_BOUNTY = "signin_bounty", + SIGN_MONTH = "signin_30", } local _moduleMgrs = {} diff --git a/lua/app/config/act_level_gift.lua b/lua/app/config/act_level_gift.lua new file mode 100755 index 00000000..7ea159c9 --- /dev/null +++ b/lua/app/config/act_level_gift.lua @@ -0,0 +1,2606 @@ +local act_level_gift = { + [1]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=1, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [2]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=2, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [3]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=3, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [4]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=4, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [5]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=5, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [6]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=6, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [7]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=7, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [8]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=8, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [9]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=9, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [10]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=10, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [11]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=11, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [12]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=12, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [13]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=13, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [14]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=14, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [15]={ + ["season"]=1, + ["stage"]=1, + ["act_gift"]=40102, + ["level"]=15, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=800, + ["num_for_nothing"]="Xghc" + } + } + }, + [16]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=16, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [17]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=17, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [18]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=18, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [19]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=19, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [20]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=20, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [21]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=21, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [22]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=22, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [23]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=23, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [24]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=24, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [25]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=25, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [26]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=26, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [27]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=27, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [28]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=28, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [29]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=29, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [30]={ + ["season"]=1, + ["stage"]=2, + ["act_gift"]=40202, + ["level"]=30, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1600, + ["num_for_nothing"]="Vw5cAw==" + } + } + }, + [31]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=31, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [32]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=32, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [33]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=33, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [34]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=34, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [35]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=35, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [36]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=36, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [37]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=37, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [38]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=38, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [39]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=39, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [40]={ + ["season"]=1, + ["stage"]=3, + ["act_gift"]=40302, + ["level"]=40, + ["reward_free"]={ + { + ["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"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2400, + ["num_for_nothing"]="VAxcAw==" + } + } + }, + [41]={ + ["season"]=1, + ["stage"]=4, + ["act_gift"]=40402, + ["level"]=41, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [42]={ + ["season"]=1, + ["stage"]=4, + ["act_gift"]=40402, + ["level"]=42, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [43]={ + ["season"]=1, + ["stage"]=4, + ["act_gift"]=40402, + ["level"]=43, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [44]={ + ["season"]=1, + ["stage"]=4, + ["act_gift"]=40402, + ["level"]=44, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [45]={ + ["season"]=1, + ["stage"]=4, + ["act_gift"]=40402, + ["level"]=45, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [46]={ + ["season"]=1, + ["stage"]=5, + ["act_gift"]=40502, + ["level"]=46, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [47]={ + ["season"]=1, + ["stage"]=5, + ["act_gift"]=40502, + ["level"]=47, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [48]={ + ["season"]=1, + ["stage"]=5, + ["act_gift"]=40502, + ["level"]=48, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [49]={ + ["season"]=1, + ["stage"]=5, + ["act_gift"]=40502, + ["level"]=49, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [50]={ + ["season"]=1, + ["stage"]=5, + ["act_gift"]=40502, + ["level"]=50, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=400, + ["num_for_nothing"]="Ughc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=4800, + ["num_for_nothing"]="UgBcAw==" + } + } + }, + [51]={ + ["season"]=1, + ["stage"]=6, + ["act_gift"]=40602, + ["level"]=51, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [52]={ + ["season"]=1, + ["stage"]=6, + ["act_gift"]=40602, + ["level"]=52, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [53]={ + ["season"]=1, + ["stage"]=6, + ["act_gift"]=40602, + ["level"]=53, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [54]={ + ["season"]=1, + ["stage"]=6, + ["act_gift"]=40602, + ["level"]=54, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [55]={ + ["season"]=1, + ["stage"]=6, + ["act_gift"]=40602, + ["level"]=55, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [56]={ + ["season"]=1, + ["stage"]=7, + ["act_gift"]=40702, + ["level"]=56, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [57]={ + ["season"]=1, + ["stage"]=7, + ["act_gift"]=40702, + ["level"]=57, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [58]={ + ["season"]=1, + ["stage"]=7, + ["act_gift"]=40702, + ["level"]=58, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [59]={ + ["season"]=1, + ["stage"]=7, + ["act_gift"]=40702, + ["level"]=59, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [60]={ + ["season"]=1, + ["stage"]=7, + ["act_gift"]=40702, + ["level"]=60, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [61]={ + ["season"]=1, + ["stage"]=8, + ["act_gift"]=40802, + ["level"]=61, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [62]={ + ["season"]=1, + ["stage"]=8, + ["act_gift"]=40802, + ["level"]=62, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [63]={ + ["season"]=1, + ["stage"]=8, + ["act_gift"]=40802, + ["level"]=63, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [64]={ + ["season"]=1, + ["stage"]=8, + ["act_gift"]=40802, + ["level"]=64, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [65]={ + ["season"]=1, + ["stage"]=8, + ["act_gift"]=40802, + ["level"]=65, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [66]={ + ["season"]=1, + ["stage"]=9, + ["act_gift"]=40902, + ["level"]=66, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [67]={ + ["season"]=1, + ["stage"]=9, + ["act_gift"]=40902, + ["level"]=67, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [68]={ + ["season"]=1, + ["stage"]=9, + ["act_gift"]=40902, + ["level"]=68, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [69]={ + ["season"]=1, + ["stage"]=9, + ["act_gift"]=40902, + ["level"]=69, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [70]={ + ["season"]=1, + ["stage"]=9, + ["act_gift"]=40902, + ["level"]=70, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [71]={ + ["season"]=1, + ["stage"]=10, + ["act_gift"]=41002, + ["level"]=71, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [72]={ + ["season"]=1, + ["stage"]=10, + ["act_gift"]=41002, + ["level"]=72, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [73]={ + ["season"]=1, + ["stage"]=10, + ["act_gift"]=41002, + ["level"]=73, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [74]={ + ["season"]=1, + ["stage"]=10, + ["act_gift"]=41002, + ["level"]=74, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [75]={ + ["season"]=1, + ["stage"]=10, + ["act_gift"]=41002, + ["level"]=75, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [76]={ + ["season"]=1, + ["stage"]=11, + ["act_gift"]=41102, + ["level"]=76, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [77]={ + ["season"]=1, + ["stage"]=11, + ["act_gift"]=41102, + ["level"]=77, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [78]={ + ["season"]=1, + ["stage"]=11, + ["act_gift"]=41102, + ["level"]=78, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [79]={ + ["season"]=1, + ["stage"]=11, + ["act_gift"]=41102, + ["level"]=79, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [80]={ + ["season"]=1, + ["stage"]=11, + ["act_gift"]=41102, + ["level"]=80, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [81]={ + ["season"]=1, + ["stage"]=12, + ["act_gift"]=41202, + ["level"]=81, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [82]={ + ["season"]=1, + ["stage"]=12, + ["act_gift"]=41202, + ["level"]=82, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [83]={ + ["season"]=1, + ["stage"]=12, + ["act_gift"]=41202, + ["level"]=83, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [84]={ + ["season"]=1, + ["stage"]=12, + ["act_gift"]=41202, + ["level"]=84, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [85]={ + ["season"]=1, + ["stage"]=12, + ["act_gift"]=41202, + ["level"]=85, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [86]={ + ["season"]=1, + ["stage"]=13, + ["act_gift"]=41302, + ["level"]=86, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [87]={ + ["season"]=1, + ["stage"]=13, + ["act_gift"]=41302, + ["level"]=87, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [88]={ + ["season"]=1, + ["stage"]=13, + ["act_gift"]=41302, + ["level"]=88, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [89]={ + ["season"]=1, + ["stage"]=13, + ["act_gift"]=41302, + ["level"]=89, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [90]={ + ["season"]=1, + ["stage"]=13, + ["act_gift"]=41302, + ["level"]=90, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [91]={ + ["season"]=1, + ["stage"]=14, + ["act_gift"]=41402, + ["level"]=91, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [92]={ + ["season"]=1, + ["stage"]=14, + ["act_gift"]=41402, + ["level"]=92, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [93]={ + ["season"]=1, + ["stage"]=14, + ["act_gift"]=41402, + ["level"]=93, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [94]={ + ["season"]=1, + ["stage"]=14, + ["act_gift"]=41402, + ["level"]=94, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [95]={ + ["season"]=1, + ["stage"]=14, + ["act_gift"]=41402, + ["level"]=95, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [96]={ + ["season"]=1, + ["stage"]=15, + ["act_gift"]=41502, + ["level"]=96, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [97]={ + ["season"]=1, + ["stage"]=15, + ["act_gift"]=41502, + ["level"]=97, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [98]={ + ["season"]=1, + ["stage"]=15, + ["act_gift"]=41502, + ["level"]=98, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [99]={ + ["season"]=1, + ["stage"]=15, + ["act_gift"]=41502, + ["level"]=99, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + }, + [100]={ + ["season"]=1, + ["stage"]=15, + ["act_gift"]=41502, + ["level"]=100, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=7200, + ["num_for_nothing"]="UQpcAw==" + } + } + } +} +local config = { +data=act_level_gift,count=100 +} +return config \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_activity_cell.lua.meta b/lua/app/config/act_level_gift.lua.meta similarity index 86% rename from lua/app/ui/main_city/cell/side_bar_activity_cell.lua.meta rename to lua/app/config/act_level_gift.lua.meta index 04e4b7bd..4768cbd6 100644 --- a/lua/app/ui/main_city/cell/side_bar_activity_cell.lua.meta +++ b/lua/app/config/act_level_gift.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 17647bcfe606b834e9aca8d6c64249aa +guid: ce80dee30975f4877bfe3c876f16cbe5 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/config/act_month_signin.lua b/lua/app/config/act_month_signin.lua new file mode 100755 index 00000000..b8f54a4a --- /dev/null +++ b/lua/app/config/act_month_signin.lua @@ -0,0 +1,338 @@ +local act_month_signin = { + [1]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [2]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + }, + [3]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=16, + ["id_for_nothing"]="Vw4=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [4]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [5]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [6]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [7]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["count_reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + [8]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=16, + ["id_for_nothing"]="Vw4=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [9]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [10]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [11]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [12]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=150, + ["num_for_nothing"]="Vw1c" + } + }, + [13]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=17, + ["id_for_nothing"]="Vw8=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [14]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + ["count_reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [15]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [16]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + [17]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + } + }, + [18]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=17, + ["id_for_nothing"]="Vw8=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [19]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + [20]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [21]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + }, + ["count_reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + [22]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=250, + ["num_for_nothing"]="VA1c" + } + }, + [23]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [24]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + [25]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [26]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + [27]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + [28]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=49, + ["id_for_nothing"]="UgE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [29]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=67, + ["id_for_nothing"]="UA8=", + ["num"]=6, + ["num_for_nothing"]="UA==" + } + }, + [30]={ + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + ["count_reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } +} +local config = { +data=act_month_signin,count=30 +} +return config \ No newline at end of file diff --git a/lua/app/ui/fund/cell/fund_tower_cell.lua.meta b/lua/app/config/act_month_signin.lua.meta similarity index 86% rename from lua/app/ui/fund/cell/fund_tower_cell.lua.meta rename to lua/app/config/act_month_signin.lua.meta index 12f3d42e..333055e4 100644 --- a/lua/app/ui/fund/cell/fund_tower_cell.lua.meta +++ b/lua/app/config/act_month_signin.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cb54eb5ca6d0d4fcdbd53a0bd5f8abac +guid: 511ad595efd404f33972f2647e5b5d59 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/config/act_week_signin.lua b/lua/app/config/act_week_signin.lua new file mode 100755 index 00000000..df303a2b --- /dev/null +++ b/lua/app/config/act_week_signin.lua @@ -0,0 +1,286 @@ +local act_week_signin = { + [101]={ + ["season"]=1, + ["day"]=1, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + [102]={ + ["season"]=1, + ["day"]=2, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=60, + ["num_for_nothing"]="UAg=" + } + }, + [103]={ + ["season"]=1, + ["day"]=3, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=8, + ["num_for_nothing"]="Xg==" + } + }, + [104]={ + ["season"]=1, + ["day"]=4, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=300, + ["num_for_nothing"]="VQhc" + } + }, + [105]={ + ["season"]=1, + ["day"]=5, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=600, + ["num_for_nothing"]="UAhc" + } + }, + [106]={ + ["season"]=1, + ["day"]=6, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=20000, + ["num_for_nothing"]="VAhcA2U=" + } + }, + [107]={ + ["season"]=1, + ["day"]=7, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=8, + ["num_for_nothing"]="Xg==" + } + }, + [201]={ + ["season"]=2, + ["day"]=1, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + [202]={ + ["season"]=2, + ["day"]=2, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + [203]={ + ["season"]=2, + ["day"]=3, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + [204]={ + ["season"]=2, + ["day"]=4, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + [205]={ + ["season"]=2, + ["day"]=5, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=2000, + ["num_for_nothing"]="VAhcAw==" + } + }, + [206]={ + ["season"]=2, + ["day"]=6, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + [207]={ + ["season"]=2, + ["day"]=7, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=300, + ["num_for_nothing"]="VQhc" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + } +} +local config = { +data=act_week_signin,count=14 +} +return config \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua.meta b/lua/app/config/act_week_signin.lua.meta similarity index 86% rename from lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua.meta rename to lua/app/config/act_week_signin.lua.meta index 6015e8d5..6b532885 100644 --- a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua.meta +++ b/lua/app/config/act_week_signin.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: aa3c399f1f548114d8da14ef274abaec +guid: 73141c97e37c640d7932768309e31c32 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua index e0db8336..3704bbc3 100644 --- a/lua/app/config/const.lua +++ b/lua/app/config/const.lua @@ -491,6 +491,18 @@ local const = { } } }, + ["act_bounty_buy_cost"]={ + ["cost"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, ["dungeon_rune_buylimit"]={ ["value"]=5 }, @@ -605,6 +617,12 @@ local const = { ["dungeon_gold_times"]={ ["value"]=2 }, + ["bounty_duration"]={ + ["value"]=30.0 + }, + ["bounty_point"]={ + ["value"]=1.0 + }, ["dungeon_res_times"]={ ["value"]=2 } diff --git a/lua/app/config/func_open.lua b/lua/app/config/func_open.lua index 2a274de2..cea6a2d6 100644 --- a/lua/app/config/func_open.lua +++ b/lua/app/config/func_open.lua @@ -7,12 +7,24 @@ local func_open = { ["stage"]=3, ["pop_ups"]=1 }, + ["bounty"]={ + ["stage"]=3, + ["pop_ups"]=1 + }, + ["signin_bounty"]={ + ["stage"]=3, + ["pop_ups"]=1 + }, ["task"]={ ["stage"]=3, ["icon"]="module_unlock_task" }, ["act_level_gift"]={ - ["level"]=999, + ["level"]=1, + ["icon"]="module_unlock_fund" + }, + ["fund_chapter"]={ + ["level"]=1, ["icon"]="module_unlock_fund" }, ["idle_drop"]={ diff --git a/lua/app/config/fund_chapter.lua b/lua/app/config/fund_chapter.lua new file mode 100755 index 00000000..e2504eff --- /dev/null +++ b/lua/app/config/fund_chapter.lua @@ -0,0 +1,3706 @@ +local fund_chapter = { + [1001]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=1, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1002]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=2, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1003]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=3, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1004]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=4, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1005]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=5, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1006]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=6, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1007]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=7, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1008]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=8, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1009]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=9, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1010]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=10, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1011]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=11, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1012]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=12, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1013]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=13, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1014]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=14, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1015]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=15, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1016]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=16, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1017]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=17, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1018]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=18, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1019]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=19, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1020]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=20, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1021]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=21, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1022]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=22, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1023]={ + ["stage"]=1, + ["act_gift"]=41602, + ["chapter"]=23, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1024]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=24, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1025]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=25, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1026]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=26, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1027]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=27, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1028]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=28, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1029]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=29, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1030]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=30, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1031]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=31, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1032]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=32, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1033]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=33, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1034]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=34, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1035]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=35, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1036]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=36, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1037]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=37, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1038]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=38, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1039]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=39, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1040]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=40, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1041]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=41, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1042]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=42, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1043]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=43, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + } + } + }, + [1044]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=44, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1045]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=45, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1046]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=46, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1047]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=47, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1048]={ + ["stage"]=2, + ["act_gift"]=41702, + ["chapter"]=48, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1049]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=49, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1050]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=50, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1051]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=51, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1052]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=52, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1053]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=53, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1054]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=54, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1055]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=55, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1056]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=56, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1057]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=57, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1058]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=58, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1059]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=59, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1060]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=60, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1061]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=61, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1062]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=62, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1063]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=63, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1064]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=64, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1065]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=65, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1066]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=66, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1067]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=67, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1068]={ + ["stage"]=3, + ["act_gift"]=41802, + ["chapter"]=68, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=4, + ["num_for_nothing"]="Ug==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [1069]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=69, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1070]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=70, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1071]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=71, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1072]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=72, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1073]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=73, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1074]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=74, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1075]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=75, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1076]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=76, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1077]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=77, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1078]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=78, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1079]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=79, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1080]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=80, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1081]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=81, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1082]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=82, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1083]={ + ["stage"]=4, + ["act_gift"]=41902, + ["chapter"]=83, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1084]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=84, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1085]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=85, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1086]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=86, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1087]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=87, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1088]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=88, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1089]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=89, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1090]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=90, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1091]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=91, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1092]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=92, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1093]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=93, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1094]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=94, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1095]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=95, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1096]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=96, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1097]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=97, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [1098]={ + ["stage"]=5, + ["act_gift"]=42002, + ["chapter"]=98, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [1099]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=99, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1100]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=100, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1101]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=101, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1102]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=102, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1103]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=103, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1104]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=104, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1105]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=105, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1106]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=106, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1107]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=107, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1108]={ + ["stage"]=6, + ["act_gift"]=42102, + ["chapter"]=108, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1109]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=109, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1110]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=110, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1111]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=111, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1112]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=112, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1113]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=113, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1114]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=114, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1115]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=115, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1116]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=116, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1117]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=117, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1118]={ + ["stage"]=7, + ["act_gift"]=42202, + ["chapter"]=118, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1119]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=119, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1120]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=120, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1121]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=121, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1122]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=122, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1123]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=123, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1124]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=124, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1125]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=125, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1126]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=126, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1127]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=127, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1128]={ + ["stage"]=8, + ["act_gift"]=42302, + ["chapter"]=128, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1129]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=129, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1130]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=130, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1131]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=131, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1132]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=132, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1133]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=133, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1134]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=134, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1135]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=135, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1136]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=136, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1137]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=137, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1138]={ + ["stage"]=9, + ["act_gift"]=42402, + ["chapter"]=138, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1139]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=139, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1140]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=140, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1141]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=141, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1142]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=142, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1143]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=143, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [1144]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=144, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1145]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=145, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1146]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=146, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1147]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=147, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [1148]={ + ["stage"]=10, + ["act_gift"]=43502, + ["chapter"]=148, + ["reward_free"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + } +} +local config = { +data=fund_chapter,count=148 +} +return config \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_act_pvp_cell.lua.meta b/lua/app/config/fund_chapter.lua.meta similarity index 86% rename from lua/app/ui/main_city/cell/side_bar_act_pvp_cell.lua.meta rename to lua/app/config/fund_chapter.lua.meta index 3d08535b..ddc158c4 100644 --- a/lua/app/ui/main_city/cell/side_bar_act_pvp_cell.lua.meta +++ b/lua/app/config/fund_chapter.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8dd7055ab84edb943bc20cde80b80559 +guid: c8874bc88e9fc468496eb86760de9381 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 9a99f2db..ff63d16b 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -753,6 +753,60 @@ local LocalizationGlobalConst = EQUIP_QLT_SELECT_ALL_2 = "EQUIP_QLT_SELECT_ALL_2", REBACK_MATERIAL_DESC = "REBACK_MATERIAL_DESC", DAILY_CHALLENGE_DESC_9 = "DAILY_CHALLENGE_DESC_9", + FIRST_CHARGE_TITLE_1 = "FIRST_CHARGE_TITLE_1", + FIRST_CHARGE_TITLE_2 = "FIRST_CHARGE_TITLE_2", + FIRST_CHARGE_TITLE_3 = "FIRST_CHARGE_TITLE_3", + FIRST_CHARGE_TIPS_1 = "FIRST_CHARGE_TIPS_1", + FIRST_CHARGE_TIPS_2 = "FIRST_CHARGE_TIPS_2", + FIRST_CHARGE_TIPS_3 = "FIRST_CHARGE_TIPS_3", + FIRST_CHARGE_1 = "FIRST_CHARGE_1", + FIRST_CHARGE_2 = "FIRST_CHARGE_2", + FIRST_CHARGE_3 = "FIRST_CHARGE_3", + FIRST_CHARGE_4 = "FIRST_CHARGE_4", + FUND_DESC_1 = "FUND_DESC_1", + FUND_CHAPTER_DESC_1 = "FUND_CHAPTER_DESC_1", + FUND_CHAPTER_DESC_2 = "FUND_CHAPTER_DESC_2", + FUND_CHAPTER_DESC_3 = "FUND_CHAPTER_DESC_3", + FUND_CHAPTER_DESC_4 = "FUND_CHAPTER_DESC_4", + FUND_CHAPTER_DESC_5 = "FUND_CHAPTER_DESC_5", + FUND_CHAPTER_DESC_6 = "FUND_CHAPTER_DESC_6", + FUND_DESC_2 = "FUND_DESC_2", + FUND_DESC_3 = "FUND_DESC_3", + FUND_DESC_4 = "FUND_DESC_4", + FUND_DESC_5 = "FUND_DESC_5", + FUND_DESC_6 = "FUND_DESC_6", + FUND_DESC_7 = "FUND_DESC_7", + FUND_TAG_DESC_1 = "FUND_TAG_DESC_1", + FUND_TAG_DESC_2 = "FUND_TAG_DESC_2", + FUND_TAG_DESC_3 = "FUND_TAG_DESC_3", + FUND_TAG_DESC_4 = "FUND_TAG_DESC_4", + FUND_TAG_DESC_5 = "FUND_TAG_DESC_5", + FUND_TAG_DESC_6 = "FUND_TAG_DESC_6", + FUND_TAG_DESC_7 = "FUND_TAG_DESC_7", + FUND_TAG_DESC_8 = "FUND_TAG_DESC_8", + FUND_TAG_DESC_9 = "FUND_TAG_DESC_9", + FUND_TAG_DESC_10 = "FUND_TAG_DESC_10", + FUND_TAG_DESC_11 = "FUND_TAG_DESC_11", + FUND_TAG_DESC_12 = "FUND_TAG_DESC_12", + FUND_TAG_DESC_13 = "FUND_TAG_DESC_13", + FUND_TAG_DESC_14 = "FUND_TAG_DESC_14", + FUND_TAG_DESC_15 = "FUND_TAG_DESC_15", + CHAPTER_TEAM_DESC_2 = "CHAPTER_TEAM_DESC_2", + ACT_BOUNTY_SIGNIN_DESC_1 = "ACT_BOUNTY_SIGNIN_DESC_1", + ACT_BOUNTY_SIGNIN_DESC_2 = "ACT_BOUNTY_SIGNIN_DESC_2", + ACT_BOUNTY_SIGNIN_DESC_3 = "ACT_BOUNTY_SIGNIN_DESC_3", + ACT_BOUNTY_SIGNIN_DESC_4 = "ACT_BOUNTY_SIGNIN_DESC_4", + ACT_BOUNTY_SIGNIN_DESC_5 = "ACT_BOUNTY_SIGNIN_DESC_5", + ACT_BOUNTY_SIGNIN_DESC_6 = "ACT_BOUNTY_SIGNIN_DESC_6", + ACT_BOUNTY_SIGNIN_DESC_7 = "ACT_BOUNTY_SIGNIN_DESC_7", + ACT_BOUNTY_SIGNIN_DESC_8 = "ACT_BOUNTY_SIGNIN_DESC_8", + ACT_BOUNTY_SIGNIN_DESC_9 = "ACT_BOUNTY_SIGNIN_DESC_9", + ACT_BOUNTY_SIGNIN_DESC_10 = "ACT_BOUNTY_SIGNIN_DESC_10", + ACT_30SIGNIN_1 = "ACT_30SIGNIN_1", + ACT_30SIGNIN_2 = "ACT_30SIGNIN_2", + ACT_30SIGNIN_3 = "ACT_30SIGNIN_3", + ACT_30SIGNIN_4 = "ACT_30SIGNIN_4", + ACT_30SIGNIN_5 = "ACT_30SIGNIN_5", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index ff7f78fe..ac17d320 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -753,6 +753,59 @@ local localization_global = ["EQUIP_QLT_SELECT_ALL_2"] = "所有部位", ["REBACK_MATERIAL_DESC"] = "分解获得", ["DAILY_CHALLENGE_DESC_9"] = "难度:{0}", + ["FIRST_CHARGE_TITLE_1"] = "启程助力", + ["FIRST_CHARGE_TITLE_2"] = "特惠臻选", + ["FIRST_CHARGE_TITLE_3"] = "超值尊享", + ["FIRST_CHARGE_TIPS_1"] = "购买获得强力输出雷神鼠尔,连续3天领好礼", + ["FIRST_CHARGE_TIPS_2"] = "购买获得闪电树懒,解锁电系合体英雄", + ["FIRST_CHARGE_TIPS_3"] = "购买获得神话宝物-许愿神灯,连续3天领好礼。", + ["FIRST_CHARGE_1"] = "第{0}天", + ["FIRST_CHARGE_2"] = "{0}首充", + ["FIRST_CHARGE_3"] = "明日再来", + ["FIRST_CHARGE_4"] = "首充", + ["FUND_CHAPTER_DESC_1"] = "关卡基金", + ["FUND_CHAPTER_DESC_2"] = "购买关卡基金后,可通过通关主线章节获得超值奖励。", + ["FUND_CHAPTER_DESC_3"] = "2200%返利比", + ["FUND_CHAPTER_DESC_4"] = "通关主线海量奖励", + ["FUND_CHAPTER_DESC_5"] = "免费基金", + ["FUND_CHAPTER_DESC_6"] = "高级基金", + ["FUND_DESC_1"] = "成长基金", + ["FUND_DESC_2"] = "购买成长基金后,可通过提升等级获得超值奖励。", + ["FUND_DESC_3"] = "2000%返利比", + ["FUND_DESC_4"] = "升级获得海量奖励", + ["FUND_DESC_5"] = "免费基金", + ["FUND_DESC_6"] = "高级基金", + ["FUND_TAG_DESC_1"] = "成长基金", + ["FUND_TAG_DESC_2"] = "成长基金2", + ["FUND_TAG_DESC_3"] = "成长基金3", + ["FUND_TAG_DESC_4"] = "成长基金4", + ["FUND_TAG_DESC_5"] = "成长基金5", + ["FUND_TAG_DESC_6"] = "成长基金6", + ["FUND_TAG_DESC_7"] = "成长基金7", + ["FUND_TAG_DESC_8"] = "成长基金8", + ["FUND_TAG_DESC_9"] = "成长基金9", + ["FUND_TAG_DESC_10"] = "成长基金10", + ["FUND_TAG_DESC_11"] = "成长基金11", + ["FUND_TAG_DESC_12"] = "成长基金12", + ["FUND_TAG_DESC_13"] = "成长基金13", + ["FUND_TAG_DESC_14"] = "成长基金14", + ["FUND_TAG_DESC_15"] = "成长基金15", + ["CHAPTER_TEAM_DESC_2"] = "主线关卡", + ["ACT_BOUNTY_SIGNIN_DESC_1"] = "7日签到", + ["ACT_BOUNTY_SIGNIN_DESC_2"] = "每日签到,领取奖励!", + ["ACT_BOUNTY_SIGNIN_DESC_3"] = "返利 1350%", + ["ACT_BOUNTY_SIGNIN_DESC_4"] = "签到天数:{0}", + ["ACT_BOUNTY_SIGNIN_DESC_5"] = "解锁高级签到奖励!", + ["ACT_BOUNTY_SIGNIN_DESC_6"] = "已解锁高级签到奖励!", + ["ACT_BOUNTY_SIGNIN_DESC_7"] = "第{0}天", + ["ACT_BOUNTY_SIGNIN_DESC_8"] = "签到", + ["ACT_BOUNTY_SIGNIN_DESC_9"] = "可补签", + ["ACT_BOUNTY_SIGNIN_DESC_10"] = "已签到", + ["ACT_30SIGNIN_1"] = "30日签到", + ["ACT_30SIGNIN_2"] = "7日签到", + ["ACT_30SIGNIN_3"] = "领取完所有奖励后重置", + ["ACT_30SIGNIN_4"] = "{0}天累计", + ["ACT_30SIGNIN_5"] = "再领一次", } return localization_global \ No newline at end of file diff --git a/lua/app/game.lua b/lua/app/game.lua index cf0d6d7f..13ac3121 100644 --- a/lua/app/game.lua +++ b/lua/app/game.lua @@ -57,6 +57,7 @@ function Game:initOther() BF.exports.LuaComponent = require "app/bf/component/lua_component" BF.exports.BaseCell = require "app/ui/common/cell/base_cell" + BF.exports.SideBarBaseCell = require "app/ui/main_city/cell/side_bar_base_cell" BF.exports.VersionCompatible = require "app/common/version_compatible" BF.exports.Platform = require "app/common/platform" BF.exports.ConfigManager = require "app/common/config_manager" diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index a49ca646..da3c7104 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -27,6 +27,8 @@ local CONST_PATHS = { FullMoonConst = "app/module/activity/full_moon/full_moon_const", TournWaveConst = "app/module/activity/tourn_wave/tourn_wave_const", TournArenaConst = "app/module/activity/tourn_arena/tourn_arena_const", + BountyConst = "app/module/bounty/bounty_const", + SignConst = "app/module/sign/sign_const", } if EDITOR_MODE then diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index 6f351a5d..cc264681 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -507,6 +507,16 @@ function GFunc.getConstReward(key) return ConstCfg[key].reward[1] end +--isGetList 为true时返回列表,反之返回第一个元素 +function GFunc.getConstCost(key, isGetList) + local ConstCfg = ConfigManager:getConfig("const") + if ConstCfg[key] == nil or ConstCfg[key].cost == nil or #ConstCfg[key].cost <= 0 then + return nil + end + + return isGetList and ConstCfg[key].cost or ConstCfg[key].cost[1] +end + function GFunc.getTargetAnchoredPosition(targetGo, parent) local rectTransform = targetGo:getComponent(GConst.TYPEOF_UNITY_CLASS.RECTTRANSFORM) local rect = rectTransform.rect diff --git a/lua/app/module/bounty/bounty_const.lua b/lua/app/module/bounty/bounty_const.lua new file mode 100755 index 00000000..c647ae88 --- /dev/null +++ b/lua/app/module/bounty/bounty_const.lua @@ -0,0 +1,15 @@ +local BountyConst = {} + +BountyConst.ACT_GIFT_IDS = { + 30102, + 30202, +} + +-- 奖励档位 +BountyConst.REWARD_GEAR = { + FREE = 0, + PRO_1 = 1, + PRO_2 = 2, +} + +return BountyConst \ No newline at end of file diff --git a/lua/app/module/bounty/bounty_const.lua.meta b/lua/app/module/bounty/bounty_const.lua.meta new file mode 100644 index 00000000..bebbc27b --- /dev/null +++ b/lua/app/module/bounty/bounty_const.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b6d6d1787d02348fd8675b49e23f48b7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/bounty/bounty_manager.lua b/lua/app/module/bounty/bounty_manager.lua old mode 100644 new mode 100755 index 7a1fb3df..639839f6 --- a/lua/app/module/bounty/bounty_manager.lua +++ b/lua/app/module/bounty/bounty_manager.lua @@ -1,116 +1,59 @@ local BountyManager = class("BountyManager", BaseModule) -function BountyManager:showBountyMainUI() - UIManager:showUI("app/ui/bounty/bounty_main_ui") +function BountyManager:showMainUI() end -function BountyManager:showBountyBuyUI() - DataManager.BountyData:markPopBought() - UIManager:showUI("app/ui/bounty/bounty_buy_ui") -end - -function BountyManager:claimReward(index, isPro) - local args = { - level = index, - is_pro = isPro, - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BountyRewardReq, args, {}, self.onClaimReward, BIReport.ITEM_GET_TYPE.BOUNTY_REWARD) -end - -function BountyManager:onClaimReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.rewards then - -- 读表获取该层奖励 如果是箱子走单独奖励展示接口 - local isOneKeyGet = false - local isSpecialBox = false - local index = result.reqData.level - local rewardId - if index == 0 then -- 一键领取 - isOneKeyGet = true - else - local isPro = result.reqData.is_pro - local info = DataManager.BountyData:getSeasonInfoByLevel(index) - local rewardType - if info then - local reward = isPro and info.reward_pro or info.reward - rewardType = reward and reward.type - rewardId = reward and reward.id - if rewardType == GConst.REWARD_TYPE.ITEM then - local itemCfgInfo = ConfigManager:getConfig("item")[rewardId] - if itemCfgInfo and itemCfgInfo.type == GConst.ItemConst.ITEM_TYPE.BOX then - isSpecialBox = true - end - end - end - end - - if isSpecialBox and not isOneKeyGet then - ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY, params = rewardId, rewards = result.rewards}) - local openType = BIReport.BOX_OPEN_OPEN_TYPE.BOUNTY - BIReport:postBoxOpen(rewardId, BIReport.BOX_OPEN_BOX_TYPE.ACTIVITY, openType, 0, result.rewards) - else - GFunc.showRewardBox(result.rewards) - end - end - if result.reqData.is_pro ~= nil then - local BountyData = DataManager.BountyData - local index = result.reqData.level - if index ~= 0 then - if result.reqData.is_pro then - BountyData:onClaimProReward(result.reqData.level) - else - BountyData:onClaimReward(result.reqData.level) - end - else - BountyData:onOneKeyClaimReward() - end - - BIReport:postBountyReward(BountyData:getBountyReportType(), BountyData:getLevel(), BountyData:getExp(), BountyData:getSeason(), result.reqData.level, result.reqData.is_pro) - end - end -end - -function BountyManager:buyBountyLevel() - if not DataManager.BountyData:getIfCanBuyLevel() then +-- 领取战令奖励 +function BountyManager:reqGetAllRewards() + if not DataManager.BountyData:canGetRewards() then return end - local cost = DataManager.BountyData:getBuyBountyLevelCost() - local costId = GFunc.getRewardId(cost) - local costNum = GFunc.getRewardNum(cost) - if not GFunc.checkCost(costId, costNum, true) then - return - end - local params ={ - titleTx = I18N:getGlobalText(I18N.GlobalConst.BOUNTY_BUY_LEVEL_TITLE), - content = I18N:getGlobalText(I18N.GlobalConst.BOUNTY_BUY_LEVEL_COUNTENT), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - showToday = GConst.MESSAGE_BOX_SHOW_TODAY.BOUNTY_BUY_LEVEL, - costId = costId, - costNum = costNum, - okFunc = function() - self:sendMessage(ProtoMsgType.FromMsgEnum.BountyLevelUnlockReq, {}, {}, self.onBoughtBountyLevel, BIReport.ITEM_GET_TYPE.BOUNTY_UNLOCK_LEVEL) - end, - } - GFunc.showMessageBox(params) + self:sendMessage(ProtoMsgType.FromMsgEnum.BountyRewardReq, {season = DataManager.BountyData:getSeason()}, self.rspGetAllRewards, BIReport.ITEM_GET_TYPE.BOUNTY_REWARD) end -function BountyManager:onBoughtBountyLevel(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.BountyData:onBoughtLevel() - end -end - -function BountyManager:buyBounty(advanced) - if not DataManager.BountyData:getIsOpen() then +function BountyManager:rspGetAllRewards(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + local params = { + content = I18N:getGlobalText(I18N.GlobalConst.SERVER_DEC_16), + boxType = GConst.MESSAGE_BOX_TYPE.MB_OK, + okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK), + } + GFunc.showMessageBox(params) return end - PayManager:purchasePackage(DataManager.BountyData:getGiftId(advanced), PayManager.PURCHARSE_TYPE.ACT_GIFT) + + GFunc.showRewardBox(result.rewards) + + DataManager.BountyData:onClaimAllRewards() + BIReport:postBountyOpt(BIReport.BOUNTY_OPT.REWARD) end -function BountyManager:onBoughtBountyFinish(result) - if result.status == 0 then - DataManager.BountyData:setBought(result.season, result.level) +-- 领取遗留奖励 +function BountyManager:reqGetPreviousAllRewards() + if not DataManager.BountyData:canGetPreviousRewards() then + return end + self:sendMessage(ProtoMsgType.FromMsgEnum.BountyPreviousRewardReq, {}, self.rspGetPreviousAllRewards, BIReport.ITEM_GET_TYPE.BOUNTY_PREVIOUS_REWARD) +end +function BountyManager:rspGetPreviousAllRewards(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + + DataManager.BountyData:onGotBountyPreviousReward() + BIReport:postBountyOpt(BIReport.BOUNTY_OPT.REWARD) +end + +-- 解锁高级奖励 +function BountyManager:onUnlockPro(type) + local id = DataManager.BountyData:getProRewardGiftId(type) + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) +end + +function BountyManager:rspBountyBoughtNtf(result) + DataManager.BountyData:onUnlockPro(result.season, result.bought) end return BountyManager \ No newline at end of file diff --git a/lua/app/module/fund_chapter.meta b/lua/app/module/fund_chapter.meta new file mode 100644 index 00000000..3871b080 --- /dev/null +++ b/lua/app/module/fund_chapter.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 76093185a33754ea0aa979969327a894 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/module/fund_chapter/fund_chapter_manager.lua b/lua/app/module/fund_chapter/fund_chapter_manager.lua new file mode 100755 index 00000000..dba1470a --- /dev/null +++ b/lua/app/module/fund_chapter/fund_chapter_manager.lua @@ -0,0 +1,43 @@ +local FundChapterManager = class("FundChapterManager", BaseModule) + +function FundChapterManager:getReward(stage) + if not DataManager.ChapterFundData:canGetRewards(stage) then + return + end + self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterFundClaimedReq, {id = 0, grade = 0, stage = stage}, self.onGetReward, BIReport.ITEM_GET_TYPE.ACT_CHAPTER_FUND_REWARD) +end + +function FundChapterManager:onGetReward(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + local currStage = result.reqData.stage + local minId = DataManager.ChapterFundData:getMinUnclaimedRewardIndex(currStage) + local maxId = DataManager.ChapterFundData:getMaxUnclaimedRewardIndex(currStage) + minId = DataManager.ChapterFundData:getConfigIdByIndex(currStage, minId) + maxId = DataManager.ChapterFundData:getConfigIdByIndex(currStage, maxId) + local cur = DataManager.ChapterFundData:getMaxUnclaimedId() + + GFunc.showRewardBox(result.rewards) + DataManager.ChapterFundData:initData(result.info) + BIReport:postChapterFund(currStage, minId, maxId, cur, result.rewards) +end + +function FundChapterManager:onBuyLevelGift(id) + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) +end + +function BIReport:postChapterFund(stage, minId, maxId, curChapter, rewards) + local args = { + opt_type = "Reward", + fund_stage = stage, + min_id = minId, + max_id = maxId, + cur_chapter = curChapter, + reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, + } + self:report(BIReport.EVENT_NAME_CHAPTER_FUND, args) +end + +return FundChapterManager \ No newline at end of file diff --git a/lua/app/module/fund_chapter/fund_chapter_manager.lua.meta b/lua/app/module/fund_chapter/fund_chapter_manager.lua.meta new file mode 100755 index 00000000..396b2c28 --- /dev/null +++ b/lua/app/module/fund_chapter/fund_chapter_manager.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 699d60a9e499adc4c86782594b434cf0 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/maincity/maincity_const.lua b/lua/app/module/maincity/maincity_const.lua index 878403c2..f6a49025 100644 --- a/lua/app/module/maincity/maincity_const.lua +++ b/lua/app/module/maincity/maincity_const.lua @@ -17,30 +17,14 @@ MainCityConst.BOTTOM_CLOSE_ICON = { } MainCityConst.LEFT_SIDE_BARS = { - -- "app/ui/main_city/cell/side_bar_idle_cell", - -- "app/ui/main_city/cell/side_bar_growth_fund_cell", - -- "app/ui/main_city/cell/side_bar_act_pvp_cell", - -- "app/ui/main_city/cell/side_bar_boss_rush_cell", - -- "app/ui/main_city/cell/side_bar_fourteen_day_cell", - -- "app/ui/main_city/cell/side_bar_hero_fund_cell", - -- "app/ui/main_city/cell/side_bar_seven_days_cell", - -- "app/ui/main_city/cell/side_bar_activity_cell", - -- "app/ui/main_city/cell/side_bar_full_moon_cell", - -- "app/ui/main_city/cell/side_bar_tourn_wave_cell", - -- "app/ui/main_city/cell/side_bar_tourn_arena_cell", - -- gm放最后一个 - -- "app/ui/main_city/cell/side_bar_gm_cell" + -- "app/ui/main_city/cell/side_bar_gift_routine_cell", -- 礼包 + -- "app/ui/main_city/cell/side_bar_privilege_cell", -- 特权 + "app/ui/main_city/cell/side_bar_fund_cell", -- 基金 + "app/ui/main_city/cell/side_bar_first_recharge_cell", -- 首充 } MainCityConst.RIGHT_SIDE_BARS = { - -- "app/ui/main_city/cell/side_bar_gold_pig_cell", - -- "app/ui/main_city/cell/side_bar_first_recharge_cell", 已作废 - -- "app/ui/main_city/cell/side_bar_introduct_gift_cell", - -- "app/ui/main_city/cell/side_bar_beginner_gift_cell", - -- "app/ui/main_city/cell/side_bar_discount_cell", - -- "app/ui/main_city/cell/side_bar_weapon_gift_cell", - -- "app/ui/main_city/cell/side_bar_armor_gift_cell", - -- "app/ui/main_city/cell/side_bar_grow_up_gift_cell", + "app/ui/main_city/cell/side_bar_sign_cell", -- 签到 } return MainCityConst \ No newline at end of file diff --git a/lua/app/module/shop/shop_const.lua b/lua/app/module/shop/shop_const.lua index 68a43734..6a958360 100644 --- a/lua/app/module/shop/shop_const.lua +++ b/lua/app/module/shop/shop_const.lua @@ -71,7 +71,6 @@ ShopConst.FUND_SHOW_PAGE = { BOUNTY = 3, BOUNTY_COLLECTION = 4, TOWER_BOUNTY = 5, - BOUNTY_GROWTH = 6, } -- 脚本路径 ShopConst.FUND_COMP = { @@ -80,7 +79,6 @@ ShopConst.FUND_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 = { @@ -89,7 +87,6 @@ ShopConst.FUND_COMP_NAME = { [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 = { @@ -103,7 +100,6 @@ ShopConst.FUND_PAGE_BTN_ICON_ATLAS = { [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", @@ -111,7 +107,6 @@ ShopConst.FUND_PAGE_BTN_ICON_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", @@ -119,7 +114,6 @@ ShopConst.FUND_PAGE_BTN_ICON_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", @@ -127,7 +121,6 @@ ShopConst.FUND_PAGE_BTN_DESC = { [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 = { diff --git a/lua/app/module/sign.meta b/lua/app/module/sign.meta new file mode 100644 index 00000000..51025f30 --- /dev/null +++ b/lua/app/module/sign.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96044fcbf66ac42388523c45e0758252 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/module/sign/sign_const.lua b/lua/app/module/sign/sign_const.lua new file mode 100755 index 00000000..f6d00807 --- /dev/null +++ b/lua/app/module/sign/sign_const.lua @@ -0,0 +1,65 @@ +local SignConst = {} + +SignConst.GIFT_ID = { + [1] = 50102, + [2] = 50202, +} + +SignConst.REWARD_TYPE = { + FREE = 1, + PRO = 2, +} +SignConst.MONTH_REWARD_TYPE = { + BOX = 1, + SIGN = 2, +} +SignConst.SIGN_SHOW_PAGE = { + WEEK = 1, + MONTH = 2, +} +SignConst.SIGN_STATE = { + CAN_SIGN = 1, -- 可签到 + CAN_SIGN_AD = 2, -- 可再次签到 + SIGNEDIN = 3, -- 已签到 + UNABLE_SIGN = 4, -- 不可签到 +} + +SignConst.BOX_STATE = { + UNABLE_CLAIM = 0, -- 不能领取 + CAN_CLAIM = 1, -- 可以领取 + CLAIMED = 2, -- 已经领取 +} + +SignConst.SIGN_MONTH_SLIDER_RANG ={ + {0, 0.135}, + {0.305,0.413}, + {0.582,0.689}, + {0.858,0.969} +} +-- 签到预制体挂载的组件 +SignConst.SIGN_COMP = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = "app/ui/sign/comp/sign_week_comp", + [SignConst.SIGN_SHOW_PAGE.MONTH] = "app/ui/sign/comp/sign_month_comp", +} +SignConst.SIGN_COMP_NAME = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = "sign_main_ui.sign_week_comp", + [SignConst.SIGN_SHOW_PAGE.MONTH] = "sign_main_ui.sign_month_comp", +} + +SignConst.SIGN_PAGE_BTN_ICON_ATLAS = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = GConst.ATLAS_PATH.UI_ACT_COMMON, + [SignConst.SIGN_SHOW_PAGE.MONTH] = GConst.ATLAS_PATH.UI_ACT_COMMON, +} +SignConst.SIGN_PAGE_BTN_ICON_1 = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = "act_common_btn_8_1", + [SignConst.SIGN_SHOW_PAGE.MONTH] = "act_common_btn_9_1", +} +SignConst.SIGN_PAGE_BTN_ICON_2 = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = "act_common_btn_8_2", + [SignConst.SIGN_SHOW_PAGE.MONTH] = "act_common_btn_9_2", +} +SignConst.SIGN_PAGE_BTN_DESC = { + [SignConst.SIGN_SHOW_PAGE.WEEK] = I18N.GlobalConst.ACT_30SIGNIN_2, + [SignConst.SIGN_SHOW_PAGE.MONTH] = I18N.GlobalConst.ACT_30SIGNIN_1, +} +return SignConst \ No newline at end of file diff --git a/lua/app/module/sign/sign_const.lua.meta b/lua/app/module/sign/sign_const.lua.meta new file mode 100644 index 00000000..b9c43ab9 --- /dev/null +++ b/lua/app/module/sign/sign_const.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3c4ed88b9ef5744a5804f4d0708de35d +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/sign/sign_manager.lua b/lua/app/module/sign/sign_manager.lua new file mode 100755 index 00000000..b12d1fee --- /dev/null +++ b/lua/app/module/sign/sign_manager.lua @@ -0,0 +1,95 @@ +local SignManager = class("SignManager", BaseModule) + +-- 领取遗留奖励 +function SignManager:reqSignAutoRewardsClaimed() + self:sendMessage(ProtoMsgType.FromMsgEnum.SignAutoRewardsClaimedReq, {}, {}, self.rspSignAutoRewardsClaimed, BIReport.ITEM_GET_TYPE.SIGN_BOUNTY_REWARD) +end + +function SignManager:rspSignAutoRewardsClaimed(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + + if result.rewards and #result.rewards > 0 then + BIReport:postSignBountyOpt(BIReport.SIGN_WEEK_OPT_TYPE.REWARD) + end +end +function SignManager:showSignUI(showPage, onlyShowPage, callback) + local params = { + showPage = showPage, + onlyShowPage = onlyShowPage, + callback = callback + } + UIManager:showUI("app/ui/sign/sign_main_ui", params) +end +-- 签到 +function SignManager:reqSignClaimed(day, isAll) + local isUnlock = DataManager.SignWeekData:isUnlockPro(day) + self:sendMessage(ProtoMsgType.FromMsgEnum.SignClaimedReq, {day = day, pay = isUnlock, all = isAll}, self.rspSignClaimed, BIReport.ITEM_GET_TYPE.SIGN_BOUNTY_SIGH) +end +function SignManager:rspSignClaimed(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + + DataManager.SignWeekData:initData(result.info) + + BIReport:postSignBountyOpt(BIReport.SIGN_WEEK_OPT_TYPE.SIGN) +end + +-- 补签 +function SignManager:reqSignReCheckin(day) + self:sendMessage(ProtoMsgType.FromMsgEnum.SignReCheckinReq, {day = day}, self.rspSignReCheckin, BIReport.ITEM_GET_TYPE.SIGN_BOUNTY_RESIGH) +end +function SignManager:rspSignReCheckin(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + GFunc.showRewardBox(result.rewards) + + DataManager.SignWeekData:initData(result.info) + + BIReport:postSignBountyOpt(BIReport.SIGN_WEEK_OPT_TYPE.RESIGN) +end + + +function SignManager:reqMonthSign(day) + self:sendMessage(ProtoMsgType.FromMsgEnum.Sign30ClaimReq, {day = day}, self.rspMonthSign, BIReport.ITEM_GET_TYPE.SIGN_MONTH) +end +function SignManager:rspMonthSign(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + BIReport:postSignBountyOpt(BIReport.SIGN_MONTH_OPT_TYPE.SIGN) + GFunc.showRewardBox(result.rewards) + DataManager.SignMonthData:setSignSucceed() +end +function SignManager:reqMonthSignAgain() + self:sendMessage(ProtoMsgType.FromMsgEnum.Sign30ClaimReq, {again = true}, self.rspSignMonthAgain, BIReport.ITEM_GET_TYPE.SIGN_MONTH_AGAIN) +end +function SignManager:rspSignMonthAgain(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + GFunc.showRewardBox(result.rewards) + DataManager.SignMonthData:setSignAgainSucceed() + BIReport:postSignBountyOpt(BIReport.SIGN_MONTH_OPT_TYPE.SIGN_AGAIN) +end +function SignManager:reqMonthAccumClaim(day) + self:sendMessage(ProtoMsgType.FromMsgEnum.Sign30AccumClaimReq, {id = day}, self.rspMonthAccumClaim, BIReport.ITEM_GET_TYPE.SIGN_MONTH_ACCUM_CLAIM) +end +function SignManager:rspMonthAccumClaim(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + GFunc.showRewardBox(result.rewards) + DataManager.SignMonthData:setAccumClaimSucceed(result.reqData.id) + BIReport:postSignBountyOpt(BIReport.SIGN_MONTH_OPT_TYPE.ACCUM_CLAIM) +end + +return SignManager \ No newline at end of file diff --git a/lua/app/module/sign/sign_manager.lua.meta b/lua/app/module/sign/sign_manager.lua.meta new file mode 100644 index 00000000..bd4dff9a --- /dev/null +++ b/lua/app/module/sign/sign_manager.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e1fc1712ff9324f1dae2872752b00e0a +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/common/common_box_ui.lua b/lua/app/ui/common/common_box_ui.lua index 73bfccce..8fabe1b2 100755 --- a/lua/app/ui/common/common_box_ui.lua +++ b/lua/app/ui/common/common_box_ui.lua @@ -128,8 +128,8 @@ function CommonBoxUI:onRefresh() cell:addClickListener(function() self:onClickReward(index) end) - else - cell:setClickShowTips() + -- else + -- cell:setClickShowTips() end end) end diff --git a/lua/app/ui/fund/bounty_collection_comp.lua b/lua/app/ui/fund/bounty_collection_comp.lua index 8b718fe3..f5287712 100755 --- a/lua/app/ui/fund/bounty_collection_comp.lua +++ b/lua/app/ui/fund/bounty_collection_comp.lua @@ -20,179 +20,144 @@ function BountyCollectionComp:init() - 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.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.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 = 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)) + -- 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 + -- 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.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) + -- 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()))) + -- 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 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 .. "%") + -- 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)) + -- 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) + -- 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 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) + -- 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()) + + -- 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/fund_chapter_cell.lua b/lua/app/ui/fund/cell/fund_chapter_cell.lua new file mode 100755 index 00000000..5e951ea6 --- /dev/null +++ b/lua/app/ui/fund/cell/fund_chapter_cell.lua @@ -0,0 +1,96 @@ +local FundChapterCell = class("FundChapterCell", BaseCell) + +function FundChapterCell:init() + local uiMap = self:getUIMap() + self.progNode = uiMap["fund_chapter_cell.prog"] + self.imgProg = uiMap["fund_chapter_cell.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.lvNode = uiMap["fund_chapter_cell.level"] + self.txLv = uiMap["fund_chapter_cell.level.tx_lv"] + self.freeRewardCells = {} + for i = 1, 2 do + table.insert(self.freeRewardCells, uiMap["fund_chapter_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_chapter_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 FundChapterCell:refresh(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.ChapterFundData:getNeedChapter(id) + local chapterId = DataManager.ChapterData:getChapterPage(needChapter) + local stageNum = DataManager.ChapterData:getChapterStage(needChapter) + + local stage = DataManager.ChapterFundData:getStageById(id) + local value = DataManager.ChapterData:getChapterPassed(needChapter) and 1 or 0 + + self.imgProg.value = value + self.txLv:setText(chapterId .. "-" .. stageNum) + if value == 1 then + self.lvNode:setSprite(GConst.ATLAS_PATH.UI_CHAPTER_FUND, "fund_chapter_bg_2") + self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorLight + else + self.lvNode:setSprite(GConst.ATLAS_PATH.UI_CHAPTER_FUND, "fund_chapter_bg_3") + self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorGray + end + + local freeRewards = DataManager.ChapterFundData:getFreeRewards(id) + local freeReceived = DataManager.ChapterFundData:getFreeGot(id) + local canGet = DataManager.ChapterFundData:getFreeCanGet(id) + for i, cell in ipairs(self.freeRewardCells) do + if freeRewards and freeRewards[i] then + cell:setActive(true) + cell:refreshByConfig(freeRewards[i], freeReceived, freeReceived) + if canGet then + cell:addClickListener(function() + ModuleManager.FundChapterManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:setActive(false) + end + end + + local proRewards = DataManager.ChapterFundData:getProRewards(id) + local proReceived = DataManager.ChapterFundData:getProGot(id) + local locked = not DataManager.ChapterFundData:getProBought(stage) + local canGet = DataManager.ChapterFundData:getProCanGet(id) + for i, cell in ipairs(self.proRewardCells) do + if proRewards and proRewards[i] then + cell:setActive(true) + cell:refreshByConfig(proRewards[i], proReceived, proReceived) + cell:showLock(locked) + if canGet then + cell:addClickListener(function() + ModuleManager.FundChapterManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:setActive(false) + end + end +end + +return FundChapterCell diff --git a/lua/app/ui/fund/cell/fund_chapter_cell.lua.meta b/lua/app/ui/fund/cell/fund_chapter_cell.lua.meta new file mode 100644 index 00000000..cb155b92 --- /dev/null +++ b/lua/app/ui/fund/cell/fund_chapter_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 19699333224224ab391bc3e8461b9081 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/cell/fund_level_cell.lua b/lua/app/ui/fund/cell/fund_level_cell.lua new file mode 100755 index 00000000..e7f3e7fb --- /dev/null +++ b/lua/app/ui/fund/cell/fund_level_cell.lua @@ -0,0 +1,91 @@ +local FundLevelCell = class("FundLevelCell", BaseCell) + +function FundLevelCell:init() + local uiMap = self:getUIMap() + self.progNode = uiMap["fund_level_cell.prog"] + self.imgProg = uiMap["fund_level_cell.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.lvNode = uiMap["fund_level_cell.level"] + self.txLv = uiMap["fund_level_cell.level.tx_lv"] + self.freeRewardCells = {} + for i = 1, 2 do + table.insert(self.freeRewardCells, uiMap["fund_level_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_level_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 FundLevelCell:refresh(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 needLevel = DataManager.FundLevelData:getNeedLevel(id) + local stage = DataManager.FundLevelData:getStageById(id) + local value = DataManager.PlayerData:getLv() >= needLevel and 1 or 0 + + self.imgProg.value = value + self.txLv:setText(needLevel) + if value == 1 then + self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorLight + else + self.txLv:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).color = self.colorGray + end + + local freeRewards = DataManager.FundLevelData:getFreeRewards(id) + local freeReceived = DataManager.FundLevelData:getFreeGot(id) + local canGet = DataManager.FundLevelData:getFreeCanGet(id) + for i, cell in ipairs(self.freeRewardCells) do + if freeRewards and freeRewards[i] then + cell:setActive(true) + cell:refreshByConfig(freeRewards[i], freeReceived, freeReceived) + if canGet then + cell:addClickListener(function() + ModuleManager.FundLevelManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:setActive(false) + end + end + + local proRewards = DataManager.FundLevelData:getProRewards(id) + local proReceived = DataManager.FundLevelData:getProGot(id) + local locked = not DataManager.FundLevelData:getProBought(stage) + local canGet = DataManager.FundLevelData:getProCanGet(id) + for i, cell in ipairs(self.proRewardCells) do + if proRewards and proRewards[i] then + cell:setActive(true) + cell:refreshByConfig(proRewards[i], proReceived, proReceived) + cell:showLock(locked) + if canGet then + cell:addClickListener(function() + ModuleManager.FundLevelManager:getReward(stage) + end) + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:setActive(false) + end + end +end + +return FundLevelCell \ No newline at end of file diff --git a/lua/app/ui/fund/cell/fund_level_cell.lua.meta b/lua/app/ui/fund/cell/fund_level_cell.lua.meta new file mode 100644 index 00000000..52844f3e --- /dev/null +++ b/lua/app/ui/fund/cell/fund_level_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3bcf05e681b0c4117b62c6b2a2cd7e20 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/fund/cell/fund_tower_cell.lua b/lua/app/ui/fund/cell/fund_tower_cell.lua deleted file mode 100755 index bded5aa0..00000000 --- a/lua/app/ui/fund/cell/fund_tower_cell.lua +++ /dev/null @@ -1,95 +0,0 @@ -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/fund_chapter_comp.lua b/lua/app/ui/fund/fund_chapter_comp.lua index 9109bb12..f7d0931b 100755 --- a/lua/app/ui/fund/fund_chapter_comp.lua +++ b/lua/app/ui/fund/fund_chapter_comp.lua @@ -1,6 +1,6 @@ local FundChapterComp = class("FundChapterComp", LuaComponent) -local CELL = "app/ui/privilege/cell/fund_chapter_cell" +local CELL = "app/ui/fund/cell/fund_chapter_cell" local TAG_COMMON_TOTAL_SIZE = 640 local TAG_SIZE = 178 @@ -31,7 +31,14 @@ function FundChapterComp:init() self.tags = {} self.tagImgs = {} self.tagDescs = {} - for i = 1, 20 do + self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_1)) + self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_3)) + self.txDesc2:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_4)) + self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_TEAM_DESC_2)) + self.txCommon:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_5)) + self.txPro:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_CHAPTER_DESC_6)) + self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.ONE_KEY_GET_DESC)) + 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"]) @@ -132,7 +139,7 @@ function FundChapterComp:refresh(isAuto) end self.scrollRect:moveToIndex(self.minIndex) if self.curStage then - BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_LEVEL .. self.curStage) + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_LEVEL .. self.curStage) end end diff --git a/lua/app/ui/fund/fund_level_comp.lua b/lua/app/ui/fund/fund_level_comp.lua index cc6442be..b890192a 100755 --- a/lua/app/ui/fund/fund_level_comp.lua +++ b/lua/app/ui/fund/fund_level_comp.lua @@ -1,6 +1,6 @@ local FundLevelComp = class("FundLevelComp", LuaComponent) -local CELL = "app/ui/privilege/cell/fund_level_cell" +local CELL = "app/ui/fund/cell/fund_level_cell" local TAG_COMMON_TOTAL_SIZE = 640 local TAG_SIZE = 178 @@ -45,7 +45,7 @@ function FundLevelComp:init() 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.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM_ALL)) self.btnBuy:addClickListener(function() local giftId = DataManager.FundLevelData:getProActId(self.curStage) @@ -144,7 +144,7 @@ function FundLevelComp:refresh(isAuto) self.scrollRect:moveToIndex(self.minIndex) if self.curStage then - BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_CHAPTER .. self.curStage) + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.FUND_CHAPTER .. self.curStage) end local count = 0 for i,id in ipairs(self.cfgList) do diff --git a/lua/app/ui/fund/fund_main_ui.lua b/lua/app/ui/fund/fund_main_ui.lua index 68648d06..dd3c03de 100755 --- a/lua/app/ui/fund/fund_main_ui.lua +++ b/lua/app/ui/fund/fund_main_ui.lua @@ -85,21 +85,21 @@ function FundMainUI:onLoadRootComplete() 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.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) @@ -116,7 +116,7 @@ function FundMainUI:initComps() if GConst.ShopConst.FUND_COMP_NAME[id] then -- 预制体挂载 local obj = uiMap[GConst.ShopConst.FUND_COMP_NAME[id]] - self:initGlobalHelp(obj) + -- self:initGlobalHelp(obj) obj:initPrefabHelper() obj:genAllChildren() local comp = obj:addLuaComponent(GConst.ShopConst.FUND_COMP[id]) @@ -162,18 +162,21 @@ function FundMainUI:onChangePage(page) 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 + -- 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.BountyGrowthData:getIsOpen() then + -- self.curPage = GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH + -- end + if 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 @@ -257,33 +260,41 @@ end function FundMainUI:isOpen(type) if type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY then - return DataManager.BountyData:isOpen() + -- return DataManager.BountyData:isOpen() + return false elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION then - return DataManager.BountyCollectionData:isOpen() + -- return DataManager.BountyCollectionData:isOpen() + return false 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() + -- return DataManager.TowerData:isOpen() + return false elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH then - return DataManager.BountyGrowthData:getIsOpen() + -- return DataManager.BountyGrowthData:getIsOpen() + return false end end function FundMainUI:hasRedPoint(type) if type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY then - return DataManager.BountyData:showRedPoint() + -- return DataManager.BountyData:showRedPoint() + return false elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_COLLECTION then - return DataManager.BountyCollectionData:showRedPoint() + -- return DataManager.BountyCollectionData:showRedPoint() + return false 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() + -- return DataManager.TowerFundData:getRedPoint() + return false elseif type == GConst.ShopConst.FUND_SHOW_PAGE.BOUNTY_GROWTH then - return DataManager.BountyGrowthData:getRedPoint() + -- return DataManager.BountyGrowthData:getRedPoint() + return false end end diff --git a/lua/app/ui/fund/tower_bounty_comp.lua b/lua/app/ui/fund/tower_bounty_comp.lua index b432f184..8cf37003 100755 --- a/lua/app/ui/fund/tower_bounty_comp.lua +++ b/lua/app/ui/fund/tower_bounty_comp.lua @@ -11,115 +11,115 @@ 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.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) + -- 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 + -- 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 + -- 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 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 + -- if self.curStage then + -- -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.TOWER_BOUNTY .. self.curStage) + -- end end function TowerBountyComp:updateData(stage) @@ -137,41 +137,41 @@ function TowerBountyComp:onClickStageTag(stage) 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) + -- 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])) + -- 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 + -- 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 + -- 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/main_city/cell/side_bar_act_pvp_cell.lua b/lua/app/ui/main_city/cell/side_bar_act_pvp_cell.lua deleted file mode 100644 index 5fc44325..00000000 --- a/lua/app/ui/main_city/cell/side_bar_act_pvp_cell.lua +++ /dev/null @@ -1,50 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarActPvpCell = class("SideBarActPvpCell", SideBarBaseCellComp) - -function SideBarActPvpCell:getModuleKey() - return nil -end - -function SideBarActPvpCell:getHasPurchase() - return true -end - -function SideBarActPvpCell:getIsOpen() - return DataManager.ActPvpData:getIsOpen() -end - -function SideBarActPvpCell:getSpineName() - return "ui_main_btn_act_pvp" -end - -function SideBarActPvpCell:onClick() - ModuleManager.ActPvpManager:showMainUI() -end - -function SideBarActPvpCell:getIsShowRedPoint() - return DataManager.ActBossRushData:getRp() -end - -function SideBarActPvpCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarActPvpCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarActPvpCell:_refreshTime() - local remainTime = DataManager.ActPvpData:getRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarActPvpCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_activity_cell.lua b/lua/app/ui/main_city/cell/side_bar_activity_cell.lua deleted file mode 100644 index ea49ca96..00000000 --- a/lua/app/ui/main_city/cell/side_bar_activity_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarActivityCell = class("SideBarActivityCell", SideBarBaseCellComp) - -function SideBarActivityCell:getModuleKey() - return ModuleManager.MODULE_KEY.ACTIVITY -end - -function SideBarActivityCell:getIsOpen() - return DataManager.ActivityData:isOpen() and DataManager.ActivityData:isActive() -end - -function SideBarActivityCell:getSpineName() - return "ui_main_btn_act_summer" -end - -function SideBarActivityCell:onClick() - ModuleManager.ActivityManager:showActivityUI() -end - -function SideBarActivityCell:getIsShowRedPoint() - return DataManager.ActivityData:hasEntryRedPoint() -end - -function SideBarActivityCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarActivityCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarActivityCell:_refreshTime() - local remainTime = DataManager.ActivityData:getEndRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarActivityCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua deleted file mode 100644 index 809877a3..00000000 --- a/lua/app/ui/main_city/cell/side_bar_arena_gift_cell.lua +++ /dev/null @@ -1,50 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarArenaGiftCell = class("SideBarArenaGiftCell", SideBarBaseCellComp) - -function SideBarArenaGiftCell:getModuleKey() - return ModuleManager.MODULE_KEY.ARENA_GIFT -end - -function SideBarArenaGiftCell:getHasPurchase() - return true -end - -function SideBarArenaGiftCell:getIsOpen() - return DataManager.ArenaData:getGiftId() -end - -function SideBarArenaGiftCell:getSpineName() - return "ui_main_gift_arena" -end - -function SideBarArenaGiftCell:onClick() - ModuleManager.ArenaManager:showGiftPopUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -function SideBarArenaGiftCell:getIsShowRedPoint() - return false -end - -function SideBarArenaGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarArenaGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarArenaGiftCell:_refreshTime() - local remainTime = DataManager.ArenaData:getGiftRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarArenaGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua deleted file mode 100644 index a07a9613..00000000 --- a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua +++ /dev/null @@ -1,73 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarArmorGiftCell = class("SideBarArmorGiftCell", SideBarBaseCellComp) -local GIFT_TYPE = PayManager.PURCHARSE_ACT_TYPE.ARMOR_UPGRADE_GIFT - -function SideBarArmorGiftCell:getIsOpen() - -- return DataManager.ShopData:hasGift(GIFT_TYPE) - return #DataManager.EquipData:getGiftIdsByType(GIFT_TYPE) > 0 -end - -function SideBarArmorGiftCell:getSpineName() - return "ui_main_equipgift" -end - -function SideBarArmorGiftCell:getSpineAnimationName() - return "animation" -end - -function SideBarArmorGiftCell:onClick() - -- local gift = DataManager.ShopData:getGift(GIFT_TYPE) - -- if gift then - -- ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) - -- end - - local ids = DataManager.EquipData:getGiftIdsByType(GIFT_TYPE) - if #ids > 0 then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, ids, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) - end -end - -function SideBarArmorGiftCell:getIsShowRedPoint() - return false -end - -function SideBarArmorGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarArmorGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarArmorGiftCell:_refreshTime() - -- local gift = DataManager.ShopData:getGift(GIFT_TYPE) - -- if gift then - -- local cfgInfo = DataManager.ShopData:getActGiftConfig()[gift.id] - -- if cfgInfo then - -- local remainTime = DataManager.ShopData:getGiftRemainTime(GIFT_TYPE) - -- if remainTime >= 0 then - -- self.timeTx:setText(GFunc.getTimeStr(remainTime)) - -- else - -- self.timeTx:setText("00:00:00") - -- end - -- else - -- self.timeTx:setText("00:00:00") - -- end - -- else - -- self.timeTx:setText("00:00:00") - -- end - - local remainTime = DataManager.EquipData:getGiftNearestRemainTime(GIFT_TYPE) - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarArmorGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua.meta deleted file mode 100644 index 47d3fc48..00000000 --- a/lua/app/ui/main_city/cell/side_bar_armor_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8da62da4b2631db44bc8d29cb2292794 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_base_cell.lua b/lua/app/ui/main_city/cell/side_bar_base_cell.lua old mode 100644 new mode 100755 index d6c7e940..e5844952 --- a/lua/app/ui/main_city/cell/side_bar_base_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_base_cell.lua @@ -1,243 +1,197 @@ -local SideBarBaseCellComp = class("SideBarBaseCellComp", BaseCell) +local SideBarBaseCell = class("SideBarBaseCell", BaseCell) local DEFAULT_RED_POINT_POS_X = 30 local DEFAULT_RED_POINT_POS_Y = 30 -local DEFAULT_RED_POINT_SCALE = 0.6 +local DEFAULT_RED_POINT_SCALE = 1 -- 需要继承重写的部分 *********************************************************** -- 模块key值,对应ModuleManager.MODULE_KEY -function SideBarBaseCellComp:getModuleKey() +function SideBarBaseCell:getModuleKey() return nil end -function SideBarBaseCellComp:getHasPurchase() - return true -end - -function SideBarBaseCellComp:getIsOpen() +function SideBarBaseCell:getIsOpen() return false end +-- 是否有内购 +function SideBarBaseCell:getHasPurchase() + return true +end + +function SideBarBaseCell:onClick() +end + +function SideBarBaseCell:updateTime() +end + +function SideBarBaseCell:onRefresh() +end + -- icon图标资源路径,为空时不显示 -function SideBarBaseCellComp:getIconRes() - -- return nil - return "maincity_gm" +function SideBarBaseCell:getIconRes() + return nil +end + +function SideBarBaseCell:getIconSize() + return nil end -- 图标动画资源路径,为空时不显示 -function SideBarBaseCellComp:getSpineName() +function SideBarBaseCell:getSpineName() return nil end -- 图标动画资源默认名称 -function SideBarBaseCellComp:getSpineAnimationName() +function SideBarBaseCell:getSpineAnimationName() return "idle" end -- 图标动画默认位置 -function SideBarBaseCellComp:getSpinePositionY() +function SideBarBaseCell:getSpinePositionY() return 0 end --- 特效资源路径,为空时不显示 -function SideBarBaseCellComp:getVfxRes() - return nil -end - -- 是否有shake效果 -function SideBarBaseCellComp:getHasShake() +function SideBarBaseCell:getHasShake() return false end -function SideBarBaseCellComp:getIsShowRedPoint() +function SideBarBaseCell:getIsShowRedPoint() return false end -- 红点偏移位置 -function SideBarBaseCellComp:getRedPointPosition() +function SideBarBaseCell:getRedPointPosition() return DEFAULT_RED_POINT_POS_X, DEFAULT_RED_POINT_POS_Y end -- 红点大小 -function SideBarBaseCellComp:getRedPointScale() +function SideBarBaseCell:getRedPointScale() return DEFAULT_RED_POINT_SCALE end -- 广告红点偏移位置 -function SideBarBaseCellComp:getAdPointPosition() +function SideBarBaseCell:getAdPointPosition() return DEFAULT_RED_POINT_POS_X, DEFAULT_RED_POINT_POS_Y end -- 广告红点大小 -function SideBarBaseCellComp:getAdPointScale() +function SideBarBaseCell:getAdPointScale() return DEFAULT_RED_POINT_SCALE end -function SideBarBaseCellComp:refreshIcon() - if not self:getIconRes() then - self.icon:setVisible(false) - return - end - self.icon:setVisible(true) - self.icon:setSprite(GConst.ATLAS_PATH.MAIN, self:getIconRes()) -end - -function SideBarBaseCellComp:refreshSpine() - -- if not self:getSpineName() then - if true then - self.spine:getSkeletonGraphic().enabled = false - return - end - self.spine:setAnchoredPositionY(self:getSpinePositionY()) - if not self.isInitSpine then - self.isInitSpine = true - self.spine:loadAssetAsync(self:getSpineName(), function() - self.spine:playAnim(self:getSpineAnimationName(), true, true, true) - if self.isActive then - self.spine:setActive(true) - else - self.spine:setActive(false) - end - if self.visible then - self.spine:getSkeletonGraphic().enabled = true - else - self.spine:getSkeletonGraphic().enabled = false - end - end, false) - else - if not self.spine:getIsLoadingAsset() then - self.spine:getSkeletonGraphic().enabled = true - end - end -end - -function SideBarBaseCellComp:onClick() -end - -function SideBarBaseCellComp:updateTime() -end - -function SideBarBaseCellComp:onRefresh() +function SideBarBaseCell:getCellName() end -- 常规逻辑 *********************************************************** -function SideBarBaseCellComp:init() +function SideBarBaseCell:init() local uiMap = self.baseObject:genAllChildren() - self.icon = uiMap["side_bar_cell.icon"] - self.spine = uiMap["side_bar_cell.ui_spine_obj"] - self.descBg = uiMap["side_bar_cell.desc_bg"] - self.descIcon = uiMap["side_bar_cell.desc_bg.icon"] - self.descTx = uiMap["side_bar_cell.desc_bg.text"] - self.timeBg = uiMap["side_bar_cell.time_bg"] - self.timeTx = uiMap["side_bar_cell.time_bg.text"] - self.descBg:setVisible(false) - self.timeBg:setVisible(false) + self.imgIcon = uiMap["side_bar_base_cell.img_icon"] + self.spineIcon = uiMap["side_bar_base_cell.spine_icon"] + self.timeBg = uiMap["side_bar_base_cell.time"] + self.txTime = uiMap["side_bar_base_cell.time.tx_time"] + self.txName = uiMap["side_bar_base_cell.tx_name"] + -- -- 金猪 + -- self.nodePig = uiMap["side_bar_base_cell.node_pig"] + -- self.nodePigIcon = uiMap["side_bar_base_cell.node_pig.icon"] + -- self.nodePigDesc = uiMap["side_bar_base_cell.node_pig.desc"] + -- -- 功能预览 + -- self.nodeFuncForeshow = uiMap["side_bar_base_cell.node_func_foreshow"] + -- self.nodeFuncForeshowLock = uiMap["side_bar_base_cell.node_func_foreshow.img_lock"] + -- self.nodeFuncForeshowName = uiMap["side_bar_base_cell.node_func_foreshow.tx_name"] + -- self.nodeFuncForeshowDesc = uiMap["side_bar_base_cell.node_func_foreshow.tx_desc"] + + self.timeBg:setActive(false) self.baseObject:addClickListener(function() self:onClick() end) + self:bindData() end -function SideBarBaseCellComp:refresh() +function SideBarBaseCell:bindData() +end + +function SideBarBaseCell:refresh() self:refreshIcon() + self:refreshName() self:refreshSpine() + self:refreshShake() + self:onRefresh() + + -- 额外 + -- self:refreshNodePig() + -- self:refreshNodeFuncForeshow() +end + +-- function SideBarBaseCell:refreshNodePig() +-- self.nodePig:setActive(false) +-- end + +-- function SideBarBaseCell:refreshNodeFuncForeshow() +-- self.nodeFuncForeshow:setActive(false) +-- end + +function SideBarBaseCell:refreshIcon() + if not self:getIconRes() then + self.imgIcon:setActive(false) + return + end + self.imgIcon:setActive(true) + self.imgIcon:setSprite(GConst.ATLAS_PATH.UI_MAIN, self:getIconRes()) + local width = self:getIconSize() + if width then + self.imgIcon:setSizeDelta(width, width) + end +end + +function SideBarBaseCell:refreshName() + if self:getCellName() then + self.txName:setText(self:getCellName()) + else + self.txName:setText(GConst.EMPTY_STRING) + end +end + +function SideBarBaseCell:refreshSpine() + if not self:getSpineName() then + self.spineIcon:getSkeletonGraphic().enabled = false + return + end + self.spineIcon:setAnchoredPositionY(self:getSpinePositionY()) + if not self.isInitSpine then + self.isInitSpine = true + self.spineIcon:loadAssetAsync(self:getSpineName(), function() + self.spineIcon:playAnim(self:getSpineAnimationName(), true, true, true) + if self.isActive then + self.spineIcon:setActive(true) + else + self.spineIcon:setActive(false) + end + if self.isVisible then + self.spineIcon:getSkeletonGraphic().enabled = true + else + self.spineIcon:getSkeletonGraphic().enabled = false + end + end, false) + else + if not self.spineIcon:getIsLoadingAsset() then + self.spineIcon:getSkeletonGraphic().enabled = true + end + end +end + +function SideBarBaseCell:refreshShake() if self:getHasShake() then self:doShake() else self:stopShake() end - self:onRefresh() end -function SideBarBaseCellComp:setAnchoredPositionY(y) - self.baseObject:setAnchoredPositionY(y) -end - -function SideBarBaseCellComp:setAnchoredPositionX(x) - self.baseObject:setAnchoredPositionX(x) -end - -function SideBarBaseCellComp:setVisible(visible) - self.visible = visible - self.baseObject:setVisible(visible) - if not visible then - self:stopShake() - end - if self.isInitSpine and self:getSpineName() and not self.spine:getIsLoadingAsset() then - self.spine:getSkeletonGraphic().enabled = visible - end -end - -function SideBarBaseCellComp:checkIsOpen() - -- 审核模式下大多数的带内购的侧边栏入口都不显示 - if self:getHasPurchase() and GFunc.isShenhe() then - return false - end - return self:getIsOpen() -end - -function SideBarBaseCellComp:getIsVisible() - return self.visible -end - -function SideBarBaseCellComp:getEntrancePos() - if self:getIconRes() then - return self.icon:getPosition() - elseif self:getSpineName() then - return self.spine:getPosition() - end - return nil -end - -function SideBarBaseCellComp:getCellPath() - return self.cellPath -end - -function SideBarBaseCellComp:showRedPoint() - if self.redPoint then - return - end - self.redPoint = true - local x, y = self:getRedPointPosition() - self.baseObject:addRedPoint(x, y, self:getRedPointScale()) -end - -function SideBarBaseCellComp:hideRedPoint() - if self.redPoint == false then - return - end - self.redPoint = false - self.baseObject:removeRedPoint() -end - -function SideBarBaseCellComp:initWithParentUI(parentUI, cellPath, isLeftSide) - self.parentUI = parentUI - self.cellPath = cellPath - self.isLeftSide = isLeftSide -end - -function SideBarBaseCellComp:closeBtn() - if self.parentUI then - self.parentUI:closeSideBarBtn(self.isLeftSide) - end -end - -function SideBarBaseCellComp:setActive(isActive) - if self.isActive == isActive then - return - end - self.isActive = isActive - if self.isInitSpine and self:getSpineName() and not self.spine:getIsLoadingAsset() then - self.spine:setActive(isActive) - end -end - -function SideBarBaseCellComp:getIsActive() - return self.isActive -end - -function SideBarBaseCellComp:doShake() +function SideBarBaseCell:doShake() if self.shakeSeq then self.shakeSeq:Restart() return @@ -256,17 +210,114 @@ function SideBarBaseCellComp:doShake() self.shakeSeq:SetLoops(-1) end -function SideBarBaseCellComp:stopShake() +function SideBarBaseCell:stopShake() if self.shakeSeq then self.shakeSeq:Pause() end end -function SideBarBaseCellComp:onDestroy() +function SideBarBaseCell:refreshRedPoint() + if self:getIsShowRedPoint() then + self:showRedPoint() + else + self:hideRedPoint() + end +end + +function SideBarBaseCell:showRedPoint() + if self.redPoint then + return + end + self.redPoint = true + local x, y = self:getRedPointPosition() + self.baseObject:addRedPoint(x, y, self:getRedPointScale()) +end + +function SideBarBaseCell:hideRedPoint() + if self.redPoint == false then + return + end + self.redPoint = false + self.baseObject:removeRedPoint() +end + +function SideBarBaseCell:checkIsOpen() + -- 审核模式下大多数的带内购的侧边栏入口都不显示 + if self:getHasPurchase() and GFunc.isShenhe() then + return false + end + return self:getIsOpen() +end + +function SideBarBaseCell:getEntrancePos() + if self:getIconRes() then + return self.imgIcon:getPosition() + elseif self:getSpineName() then + return self.spineIcon:getPosition() + end + return nil +end + +function SideBarBaseCell:getCellPath() + return self.cellPath +end + +-- 额外设置的部分 *********************************************************** + +function SideBarBaseCell:setAnchoredPositionY(y) + self.baseObject:setAnchoredPositionY(y) +end + +function SideBarBaseCell:setAnchoredPositionX(x) + self.baseObject:setAnchoredPositionX(x) +end + +function SideBarBaseCell:getIsVisible() + return self.isVisible +end + +function SideBarBaseCell:setVisible(visible) + self.isVisible = visible + self.baseObject:setActive(visible) + if not visible then + self:stopShake() + end + if self.isInitSpine and self:getSpineName() and not self.spineIcon:getIsLoadingAsset() then + self.spineIcon:getSkeletonGraphic().enabled = visible + end +end + +function SideBarBaseCell:getIsActive() + return self.isActive +end + +function SideBarBaseCell:setActive(isActive) + if self.isActive == isActive then + return + end + self.isActive = isActive + if self.isInitSpine and self:getSpineName() and not self.spineIcon:getIsLoadingAsset() then + self.spineIcon:setActive(isActive) + end +end + +function SideBarBaseCell:initWithParentUI(parentUI, cellPath, isLeftSide) + self.parentUI = parentUI + self.cellPath = cellPath + self.isLeftSide = isLeftSide +end + +function SideBarBaseCell:closeBtn() + if self.parentUI then + self.parentUI:closeSideBarBtn(self.isLeftSide) + end +end + +function SideBarBaseCell:onDestroy() if self.shakeSeq then self.shakeSeq:Kill() self.shakeSeq = nil end end -return SideBarBaseCellComp \ No newline at end of file +return SideBarBaseCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua deleted file mode 100644 index 7388fb47..00000000 --- a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarBeginnerGiftCell = class("SideBarBeginnerGiftCell", SideBarBaseCellComp) - -function SideBarBeginnerGiftCell:getModuleKey() - return ModuleManager.MODULE_KEY.BEGINNER_GIFT -end - -function SideBarBeginnerGiftCell:getIsOpen() - return DataManager.ShopData:getBeginnerGiftShowSideBar() -end - -function SideBarBeginnerGiftCell:getSpineName() - return "main_btn_gift_new" -end - -function SideBarBeginnerGiftCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.BEGINNER_GIFT_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -function SideBarBeginnerGiftCell:getIsShowRedPoint() - return false -end - -function SideBarBeginnerGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarBeginnerGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarBeginnerGiftCell:_refreshTime() - local remainTime = DataManager.ShopData:getBeginnerGiftSideBarRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarBeginnerGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua.meta deleted file mode 100644 index 9b4bba88..00000000 --- a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b43a4c18aa3ff764691d1792e98936e2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua b/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua deleted file mode 100644 index f9e871ee..00000000 --- a/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua +++ /dev/null @@ -1,50 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarBossRushCell = class("SideBarBossRushCell", SideBarBaseCellComp) - -function SideBarBossRushCell:getModuleKey() - return nil -end - -function SideBarBossRushCell:getHasPurchase() - return true -end - -function SideBarBossRushCell:getIsOpen() - return DataManager.ActBossRushData:getIsOpen() -end - -function SideBarBossRushCell:getSpineName() - return "ui_act_bossrush_mainbtn" -end - -function SideBarBossRushCell:onClick() - ModuleManager.ActBossRushManager:showMainUI() -end - -function SideBarBossRushCell:getIsShowRedPoint() - return DataManager.ActBossRushData:getRp() -end - -function SideBarBossRushCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarBossRushCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarBossRushCell:_refreshTime() - local remainTime = DataManager.ActBossRushData:getRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarBossRushCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua.meta deleted file mode 100644 index de16c931..00000000 --- a/lua/app/ui/main_city/cell/side_bar_boss_rush_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7f46400ca989c054594fb980979f5e8b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_discount_cell.lua b/lua/app/ui/main_city/cell/side_bar_discount_cell.lua deleted file mode 100644 index a0ea6393..00000000 --- a/lua/app/ui/main_city/cell/side_bar_discount_cell.lua +++ /dev/null @@ -1,64 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarDiscountCell = class("SideBarDiscountCell", SideBarBaseCellComp) - -function SideBarDiscountCell:getModuleKey() - return nil -end - -function SideBarDiscountCell:getHasPurchase() - return true -end - -function SideBarDiscountCell:getIsOpen() - -- 同ShopComp:refreshDiscountPage() 一起修改 - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.MALL, true) then - return false - end - - -- 章节礼包 - if #DataManager.ShopData:getActChapterStoreCanBuyActIds() > 0 then - return true - end - - -- 新手礼包 - if not DataManager.ShopData:getBeginnerGiftHasBuy() then - return true - end - - -- 竞技场 - if DataManager.ArenaData:getGiftId() ~= nil then - return true - end - - -- 助力礼包 - if #DataManager.ShopData:getLevelUpGiftActIds() > 0 then - return true - end - - -- 成长礼包 - if DataManager.ShopData:hasGrowUpGift() then - return true - end - - -- 金币 - if DataManager.ShopData:getValidCoinGiftId() ~= nil then - return true - end - - return false -end - -function SideBarDiscountCell:getSpineName() - return "ui_main_btn_indulgencegift" -end - -function SideBarDiscountCell:onClick() - DataManager.ShopData:markEntranceDiscountRedPoint() - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_SHOP, {page = GConst.ShopConst.PAGE_TYPE.DISCOUNT}) -end - -function SideBarDiscountCell:getIsShowRedPoint() - return DataManager.ShopData:getEntranceDiscountRedPoint() -end - -return SideBarDiscountCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_discount_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_discount_cell.lua.meta deleted file mode 100644 index 669118c4..00000000 --- a/lua/app/ui/main_city/cell/side_bar_discount_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 61356e1192048c44aaa97e5f210a046e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua old mode 100644 new mode 100755 index f56e887e..8097140c --- a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua @@ -1,24 +1,32 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarFirstRechargeCell = class("SideBarFirstRechargeCell", SideBarBaseCellComp) +local SideBarFirstRechargeCell = class("SideBarFirstRechargeCell", SideBarBaseCell) function SideBarFirstRechargeCell:getModuleKey() - return ModuleManager.MODULE_KEY.FIRST_RECHARGE + return ModuleManager.MODULE_KEY.FIRST_CHARGE end function SideBarFirstRechargeCell:getIsOpen() - return DataManager.ShopData:getShowFirstRechargeSideBar() + return DataManager.ShopData:isFirstRechargeOpen() end function SideBarFirstRechargeCell:getSpineName() - return "ui_main_btn_gift_first" -end - -function SideBarFirstRechargeCell:getIsShowRedPoint() - return DataManager.ShopData:showFirstRechargeRp() + -- if DataManager.ShopData:isNewFirstRechargeGift(GConst.ShopConst.FIRST_RECHARGE_GEARS.GEAR_1) then + -- return "ui_mainbtn_first" + -- else + -- return "ui_mainbtn_first" + -- end + return "ui_main_btn_shop" end function SideBarFirstRechargeCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.FIRST_RECHARGE_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) + ModuleManager.ShopManager:showFirstRechargeUI() +end + +function SideBarFirstRechargeCell:getIsShowRedPoint() + return DataManager.ShopData:hasFirstRechargeRedPoint() +end + +function SideBarFirstRechargeCell:getCellName() + return I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_4) end return SideBarFirstRechargeCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua b/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua deleted file mode 100644 index 7c03a0f0..00000000 --- a/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua +++ /dev/null @@ -1,43 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarFourteenDayCell = class("SideBarFourteenDayCell", SideBarBaseCellComp) - -function SideBarFourteenDayCell:getIsOpen() - return DataManager.FourteenDayData:isOpen() and DataManager.FourteenDayData:isActiveTime() -end - -function SideBarFourteenDayCell:getSpineName() - return "ui_act_fourteen_mainbtn" -end - -function SideBarFourteenDayCell:onClick() - ModuleManager.FourteenDayManager:showFourteenDayUI() -end - -function SideBarFourteenDayCell:getIsShowRedPoint() - return DataManager.FourteenDayData:hasRedPoint() -end - -function SideBarFourteenDayCell:onRefresh() - self:_refreshTime() -end - -function SideBarFourteenDayCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarFourteenDayCell:_refreshTime() - local remainTime = DataManager.FourteenDayData:getEndRemainTime() - if remainTime >= 0 then - self.timeBg:setVisible(true) - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeBg:setVisible(false) - self.timeTx:setText("00:00:00") - end -end - -return SideBarFourteenDayCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua.meta deleted file mode 100644 index 54ee3446..00000000 --- a/lua/app/ui/main_city/cell/side_bar_fourteen_day_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 51bd15e742f644046a5d918498f2a4c2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua b/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua deleted file mode 100644 index cc3448aa..00000000 --- a/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarFullMoonCell = class("SideBarFullMoonCell", SideBarBaseCellComp) - -function SideBarFullMoonCell:getModuleKey() - return ModuleManager.MODULE_KEY.ACTIVITY -end - -function SideBarFullMoonCell:getIsOpen() - return DataManager.FullMoonData:isOpen() and DataManager.FullMoonData:isOpenTime() -end - -function SideBarFullMoonCell:getSpineName() - return "ui_main_btn_act_fullmoon" -end - -function SideBarFullMoonCell:onClick() - ModuleManager.FullMoonManager:showActMainUI() -end - -function SideBarFullMoonCell:getIsShowRedPoint() - return DataManager.FullMoonData:hasEntryRedPoint() -end - -function SideBarFullMoonCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarFullMoonCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarFullMoonCell:_refreshTime() - local remainTime = DataManager.FullMoonData:getEndRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarFullMoonCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua.meta deleted file mode 100644 index 939749f3..00000000 --- a/lua/app/ui/main_city/cell/side_bar_full_moon_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4ba87a7695be4af42842b7637db142ae -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_fund_cell.lua b/lua/app/ui/main_city/cell/side_bar_fund_cell.lua new file mode 100755 index 00000000..e939806f --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_fund_cell.lua @@ -0,0 +1,34 @@ +local SideBarFundCell = class("SideBarFundCell", SideBarBaseCell) + +function SideBarFundCell:getModuleKey() + -- return ModuleManager.MODULE_KEY.TASK +end + +function SideBarFundCell:getIsOpen() + local isOpenFundLevel = DataManager.FundLevelData:getIsOpen() and not DataManager.FundLevelData:getIsAllClaimed() + local isOpenFundChapter = DataManager.ChapterFundData:getIsOpen() + -- local isOpenBounty = DataManager.BountyData:isOpen() + -- local isOpenBountyCollertion = DataManager.BountyCollectionData:isOpen() + -- local isOpenBounryTower = DataManager.TowerData:isOpen() + + return isOpenFundLevel or isOpenFundChapter-- or isOpenBounty or isOpenBountyCollertion or isOpenBounryTower +end + +function SideBarFundCell:getSpineName() + return "ui_main_btn_shop" +end + +function SideBarFundCell:onClick() + ModuleManager.ShopManager:showFundUI() +end + +function SideBarFundCell:getIsShowRedPoint() + return DataManager.FundLevelData:getRedPoint() or + DataManager.ChapterFundData:getRedPoint() +end + +function SideBarFundCell:getCellName() + return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_12) +end + +return SideBarFundCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_fund_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_fund_cell.lua.meta new file mode 100644 index 00000000..44fcb3d4 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_fund_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: dca9fbcf8eb654ffeb90a7e09f574ae7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_gm_cell.lua b/lua/app/ui/main_city/cell/side_bar_gm_cell.lua deleted file mode 100644 index 51b7ece1..00000000 --- a/lua/app/ui/main_city/cell/side_bar_gm_cell.lua +++ /dev/null @@ -1,16 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarGMCell = class("SideBarGMCell", SideBarBaseCellComp) - -function SideBarGMCell:getIsOpen() - return Platform:getIsDevChannel() -end - -function SideBarGMCell:getIconRes() - return "maincity_gm" -end - -function SideBarGMCell:onClick() - ModuleManager.DevToolManager:showOrHideDevListUI() -end - -return SideBarGMCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_gm_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_gm_cell.lua.meta deleted file mode 100644 index 87e0373d..00000000 --- a/lua/app/ui/main_city/cell/side_bar_gm_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dd053010d0d30b9409b0f34246c925b4 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua b/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua deleted file mode 100644 index 00c26405..00000000 --- a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua +++ /dev/null @@ -1,78 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarGoldPigCell = class("SideBarGoldPigCell", SideBarBaseCellComp) - -function SideBarGoldPigCell:getModuleKey() - return ModuleManager.MODULE_KEY.GOLD_PIG -end - -function SideBarGoldPigCell:getIsOpen() - return DataManager.GoldPigData:getIsOpen() -end - -function SideBarGoldPigCell:getSpineName() - return "ui_main_btn_pig" -end - -function SideBarGoldPigCell:onClick() - ModuleManager.ActivityManager:showGoldPigUI(BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -function SideBarGoldPigCell:onRefresh() - local isFull = DataManager.GoldPigData:getIsFull() - if isFull then - self:showGoldPigDesc() - else - self:hideGoldPigDesc() - end -end - -function SideBarGoldPigCell:showGoldPigDesc() - if self.descBgVisible then - return - end - self.descBgVisible = true - self.descBg:setVisible(true) - self.timeBg:setVisible(true) - - local gemEntity = DataManager.BagData.ItemData:getItemById(GConst.ItemConst.ITEM_ID_GEM) - self.descIcon:setSprite(gemEntity:getIconRes()) - self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SIDE_BAR_FULL)) - GFunc.centerImgAndTx(self.descIcon, self.descTx, 0, -3) - - local endTime = DataManager.GoldPigData:getEndTime() - local remainTime = endTime - Time:getServerTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStrWithHMS(remainTime)) - else - self.timeTx:setText(GConst.EMPTY_STRING) - end -end - -function SideBarGoldPigCell:hideGoldPigDesc() - if self.descBgVisible == false then - return - end - self.descBgVisible = false - self.descBg:setVisible(false) - self.timeBg:setVisible(false) -end - -function SideBarGoldPigCell:updateTime() - if self:getIsOpen() then - local isFull = DataManager.GoldPigData:getIsFull() - if isFull then - self:showGoldPigDesc() - local endTime = DataManager.GoldPigData:getEndTime() - local remainTime = endTime - Time:getServerTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStrWithHMS(remainTime)) - end - else - self:hideGoldPigDesc() - end - else - self:closeBtn() - end -end - -return SideBarGoldPigCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua.meta deleted file mode 100644 index e9ff715d..00000000 --- a/lua/app/ui/main_city/cell/side_bar_gold_pig_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 93980678bfb82024380ec443e5da7099 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua deleted file mode 100644 index c3beb0f0..00000000 --- a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua +++ /dev/null @@ -1,55 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarGrowUpGiftCell = class("SideBarGrowUpGiftCell", SideBarBaseCellComp) - -function SideBarGrowUpGiftCell:getIsOpen() - return DataManager.ShopData:hasGrowUpGift() -end - -function SideBarGrowUpGiftCell:getSpineName() - return "ui_main_btn_gift_grow" -end - -function SideBarGrowUpGiftCell:onClick() - local gift = DataManager.ShopData:getGrowUpGift() - if gift then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.GROW_UP_GIFT_NEW, gift.current_grow_up_id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) - end -end - -function SideBarGrowUpGiftCell:getIsShowRedPoint() - return false -end - -function SideBarGrowUpGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarGrowUpGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarGrowUpGiftCell:_refreshTime() - local gift = DataManager.ShopData:getGrowUpGift() - if gift then - local cfgInfo = DataManager.ShopData:getActGrowUpGiftConfig()[gift.current_grow_up_id] - if cfgInfo then - local remainTime = DataManager.ShopData:getGrowUpGiftRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end - else - self.timeTx:setText("00:00:00") - end - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarGrowUpGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua.meta deleted file mode 100644 index c794d612..00000000 --- a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e2737cd4780030247b51d4483700bda6 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua b/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua deleted file mode 100644 index bbcaf60b..00000000 --- a/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua +++ /dev/null @@ -1,28 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarGrowthFundCell = class("SideBarGrowthFundCell", SideBarBaseCellComp) - -function SideBarGrowthFundCell:getModuleKey() - return ModuleManager.MODULE_KEY.FUND -end - -function SideBarGrowthFundCell:getIsOpen() - return DataManager.GrowthFundData:getIsOpen() -end - -function SideBarGrowthFundCell:getSpineName() - return "ui_main_btn_fund" -end - -function SideBarGrowthFundCell:onClick() - ModuleManager.FundManager:showLevelFundUI() -end - -function SideBarGrowthFundCell:getIsShowRedPoint() - return DataManager.GrowthFundData:getIfCanClaimReward() -end - -function SideBarGrowthFundCell:getHasShake() - return true -end - -return SideBarGrowthFundCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua.meta deleted file mode 100644 index da3aa0f0..00000000 --- a/lua/app/ui/main_city/cell/side_bar_growth_fund_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 89fd1069c28a504499e23bd0718b4d8a -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua deleted file mode 100644 index d43ef0d8..00000000 --- a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua +++ /dev/null @@ -1,50 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarHeroFundCell = class("SideBarHeroFundCell", SideBarBaseCellComp) - -function SideBarHeroFundCell:getModuleKey() - return ModuleManager.MODULE_KEY.SEVEN_DAY -end - -function SideBarHeroFundCell:getHasPurchase() - return true -end - -function SideBarHeroFundCell:getIsOpen() - return DataManager.HeroFundData:getIsOpen() -end - -function SideBarHeroFundCell:getSpineName() - return "ui_main_herofund" -end - -function SideBarHeroFundCell:onClick() - ModuleManager.HeroFundManager:showMainUI() -end - -function SideBarHeroFundCell:getIsShowRedPoint() - return DataManager.HeroFundData:getHaveReward() -end - -function SideBarHeroFundCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarHeroFundCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarHeroFundCell:_refreshTime() - local remainTime = DataManager.HeroFundData:getRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarHeroFundCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta deleted file mode 100644 index bf07cd80..00000000 --- a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 07f3f4c6518d616448dfb3093dbe841c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua deleted file mode 100644 index 6d45cd95..00000000 --- a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua +++ /dev/null @@ -1,33 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarIdleCell = class("SideBarIdleCell", SideBarBaseCellComp) - -function SideBarIdleCell:getModuleKey() - return ModuleManager.MODULE_KEY.IDLE_DROP -end - -function SideBarIdleCell:getHasPurchase() - return false -end - -function SideBarIdleCell:getIsOpen() - return DataManager.IdleData:getIsOpen() -end - -function SideBarIdleCell:getSpineName() - return "ui_main_btn_hang" -end - -function SideBarIdleCell:onClick() - ModuleManager.IdleManager:showIdleDropUI() -end - -function SideBarIdleCell:getIsShowRedPoint() - local time = Time:getServerTime() - DataManager.IdleData:getLastDropTime() - local idleMaxTime = DataManager.IdleData:getIdleMaxTime() - if time >= idleMaxTime then - return true - end - return DataManager.IdleData:getQuickIdleRemainTimes() > 0 -end - -return SideBarIdleCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_idle_cell.lua.meta deleted file mode 100644 index d1b60fa9..00000000 --- a/lua/app/ui/main_city/cell/side_bar_idle_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: af866bdef8f75d049a6652d80e4d8fd1 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua deleted file mode 100644 index 0784f4d4..00000000 --- a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarIntroductGiftCell = class("SideBarIntroductGiftCell", SideBarBaseCellComp) - -function SideBarIntroductGiftCell:getModuleKey() - return ModuleManager.MODULE_KEY.INTRODUCT_GIFT -end - -function SideBarIntroductGiftCell:getIsOpen() - return DataManager.ShopData:getIntroductGiftShowSideBar() -end - -function SideBarIntroductGiftCell:getSpineName() - return "ui_main_btn_gift_first" -end - -function SideBarIntroductGiftCell:onClick() - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.ShopConst.INTRODUCT_GIFT_ID, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) -end - -function SideBarIntroductGiftCell:getIsShowRedPoint() - return false -end - -function SideBarIntroductGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarIntroductGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarIntroductGiftCell:_refreshTime() - local remainTime = DataManager.ShopData:getIntroductGiftRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarIntroductGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua.meta deleted file mode 100644 index 3914613c..00000000 --- a/lua/app/ui/main_city/cell/side_bar_introduct_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c8bc1461168b10444b874ff8cdd0c025 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua deleted file mode 100644 index 28413b52..00000000 --- a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua +++ /dev/null @@ -1,50 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarSevenDaysCell = class("SideBarSevenDaysCell", SideBarBaseCellComp) - -function SideBarSevenDaysCell:getModuleKey() - return ModuleManager.MODULE_KEY.SEVEN_DAY -end - -function SideBarSevenDaysCell:getHasPurchase() - return false -end - -function SideBarSevenDaysCell:getIsOpen() - return DataManager.SevenDayData:getIsOpen() -end - -function SideBarSevenDaysCell:getSpineName() - return "ui_main_btn_sevenday" -end - -function SideBarSevenDaysCell:onClick() - ModuleManager.SevenDayManager:showUI() -end - -function SideBarSevenDaysCell:getIsShowRedPoint() - return DataManager.SevenDayData:showRedPoint() -end - -function SideBarSevenDaysCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarSevenDaysCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarSevenDaysCell:_refreshTime() - local remainTime = DataManager.SevenDayData:getEndTime() - Time:getServerTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarSevenDaysCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua.meta deleted file mode 100644 index 2e41a42e..00000000 --- a/lua/app/ui/main_city/cell/side_bar_seven_days_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c2ea2cd63c0189a46b808d14b397a1d1 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_sign_cell.lua b/lua/app/ui/main_city/cell/side_bar_sign_cell.lua new file mode 100755 index 00000000..ca8b0837 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_sign_cell.lua @@ -0,0 +1,28 @@ +local SideBarSignCell = class("SideBarSignCell", SideBarBaseCell) + +function SideBarSignCell:getModuleKey() + -- return ModuleManager.MODULE_KEY.TASK +end + +function SideBarSignCell:getIsOpen() + return DataManager.SignWeekData:isOpen()-- or DataManager.SignMonthData:isOpen() +end + +function SideBarSignCell:getSpineName() + -- return "ui_mainbtn_signin" + return "ui_main_btn_shop" +end + +function SideBarSignCell:onClick() + ModuleManager.SignManager:showSignUI() +end + +function SideBarSignCell:getIsShowRedPoint() + return DataManager.SignMonthData:showRedPoint()-- or DataManager.SignWeekData:showRedPoint() +end + +function SideBarSignCell:getCellName() + return I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_8) +end + +return SideBarSignCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_sign_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_sign_cell.lua.meta new file mode 100644 index 00000000..586949a8 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_sign_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9365522a1943044459f9511522195467 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua b/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua deleted file mode 100644 index 72c533c6..00000000 --- a/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarTournArenaCell = class("SideBarTournArenaCell", SideBarBaseCellComp) - -function SideBarTournArenaCell:getModuleKey() - return ModuleManager.MODULE_KEY.ACTIVITY -end - -function SideBarTournArenaCell:getIsOpen() - return DataManager.TournArenaData:isOpen() and DataManager.TournArenaData:isActiveTime() -end - -function SideBarTournArenaCell:getSpineName() - return "ui_act_tournarena_main_btn" -end - -function SideBarTournArenaCell:onClick() - ModuleManager.TournArenaManager:showActMainUI() -end - -function SideBarTournArenaCell:getIsShowRedPoint() - return DataManager.TournArenaData:hasEntryRedPoint() -end - -function SideBarTournArenaCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarTournArenaCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarTournArenaCell:_refreshTime() - local remainTime = DataManager.TournArenaData:getEndRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarTournArenaCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua.meta deleted file mode 100644 index 32cc2986..00000000 --- a/lua/app/ui/main_city/cell/side_bar_tourn_arena_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fbea87ac611b43747bf41d2ca95b29cd -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua b/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua deleted file mode 100644 index 9e9ff16b..00000000 --- a/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua +++ /dev/null @@ -1,46 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarTournWaveCell = class("SideBarTournWaveCell", SideBarBaseCellComp) - -function SideBarTournWaveCell:getModuleKey() - return ModuleManager.MODULE_KEY.ACTIVITY -end - -function SideBarTournWaveCell:getIsOpen() - return DataManager.TournWaveData:isOpen() and DataManager.TournWaveData:isActiveTime() -end - -function SideBarTournWaveCell:getSpineName() - return "ui_act_tournwave_main_btn" -end - -function SideBarTournWaveCell:onClick() - ModuleManager.TournWaveManager:showActMainUI() -end - -function SideBarTournWaveCell:getIsShowRedPoint() - return DataManager.TournWaveData:hasEntryRedPoint() -end - -function SideBarTournWaveCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarTournWaveCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarTournWaveCell:_refreshTime() - local remainTime = DataManager.TournWaveData:getEndRemainTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarTournWaveCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua.meta deleted file mode 100644 index 22d57ac9..00000000 --- a/lua/app/ui/main_city/cell/side_bar_tourn_wave_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2a27a3856b8ae854a867d2264ee54a70 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua deleted file mode 100644 index a98ce591..00000000 --- a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua +++ /dev/null @@ -1,69 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarWeaponGiftCell = class("SideBarWeaponGiftCell", SideBarBaseCellComp) -local GIFT_TYPE = PayManager.PURCHARSE_ACT_TYPE.WEAPON_UPGRADE_GIFT - -function SideBarWeaponGiftCell:getIsOpen() - -- return DataManager.ShopData:hasGift(GIFT_TYPE) - return #DataManager.EquipData:getGiftIdsByType(GIFT_TYPE) > 0 -end - -function SideBarWeaponGiftCell:getSpineName() - return "ui_main_weapon" -end - -function SideBarWeaponGiftCell:onClick() - -- local gift = DataManager.ShopData:getGift(GIFT_TYPE) - -- if gift then - -- ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, gift.id, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) - -- end - - local ids = DataManager.EquipData:getGiftIdsByType(GIFT_TYPE) - if #ids > 0 then - ModuleManager.ShopManager:showGiftPopUI(PayManager.PURCHARSE_TYPE.ACT_GIFT, ids, true, BIReport.PAY_UI_SHOW_TYPE.CLICK_SHOW) - end -end - -function SideBarWeaponGiftCell:getIsShowRedPoint() - return false -end - -function SideBarWeaponGiftCell:onRefresh() - self.timeBg:setVisible(true) - self:_refreshTime() -end - -function SideBarWeaponGiftCell:updateTime() - if self:getIsOpen() then - self:_refreshTime() - else - self:closeBtn() - end -end - -function SideBarWeaponGiftCell:_refreshTime() - -- local gift = DataManager.ShopData:getGift(GIFT_TYPE) - -- if gift then - -- local cfgInfo = DataManager.ShopData:getActGiftConfig()[gift.id] - -- if cfgInfo then - -- local remainTime = DataManager.ShopData:getGiftRemainTime(GIFT_TYPE) - -- if remainTime >= 0 then - -- self.timeTx:setText(GFunc.getTimeStr(remainTime)) - -- else - -- self.timeTx:setText("00:00:00") - -- end - -- else - -- self.timeTx:setText("00:00:00") - -- end - -- else - -- self.timeTx:setText("00:00:00") - -- end - - local remainTime = DataManager.EquipData:getGiftNearestRemainTime(GIFT_TYPE) - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - else - self.timeTx:setText("00:00:00") - end -end - -return SideBarWeaponGiftCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua.meta deleted file mode 100644 index 72b27dd6..00000000 --- a/lua/app/ui/main_city/cell/side_bar_weapon_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9a84c4b0533866243a700f9106a12593 -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 e209f904..44f6bfaf 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -190,6 +190,9 @@ function MainCityUI:_addListeners() self:addEventListener(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR, function(module) self:checkSideBarOpenStatus() end) + self:addEventListener(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP, function() + self:checkMainPop() + end) self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, function(params) params = params or {} local page = params.page or self.selectedInedx @@ -433,7 +436,7 @@ function MainCityUI:initLeftRightBtns() end) self.rightArrowImg = self.uiMap["main_ui.right_node.arrow_node.arrow"] - self.sideBarCellObject = self.uiMap["main_ui.cache_node.side_bar_cell"] + self.sideBarCellObject = self.uiMap["main_ui.cache_node.side_bar_base_cell"] local w, h = self.sideBarCellObject:fastGetSizeDelta() self.sideBarHeight = h self.sideBarMaxCount = 4 @@ -786,38 +789,38 @@ function MainCityUI:refreshTopNode() end function MainCityUI:refreshBounty() - local isOpen = DataManager.BountyData:getIsOpen() - if not isOpen or GFunc.isShenhe() then - self.bountyNode:setVisible(false) - self.bountyRewardSpine:getSkeletonGraphic().enabled = false - return - end - self.bountyNode:setVisible(true) - if DataManager.BountyData:getIfCanClaimReward() then - self.bountyRewardSpine:setVisible(true) - self.bountyRewardSpine:playAnim("idle", true) - self.bountyRewardSpine:getSkeletonGraphic().enabled = true - self.bountyBannerInfo:setVisible(false) - self.bountyBannerDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.COLLET_REWARDS)) - else - self.bountyRewardSpine:setVisible(false) - self.bountyRewardSpine:getSkeletonGraphic().enabled = false - local bannerName = DataManager.BountyData:getBannerName() - self.bountyBanner:setSprite(GConst.ATLAS_PATH.BOUNTY, bannerName) - self.bountyBannerInfo:setVisible(true) - self.bountyBannerDescTx:setText(GConst.EMPTY_STRING) - local exp = DataManager.BountyData:getExp() - local lvUpExp = DataManager.BountyData:getLvUpExp() - local level = DataManager.BountyData:getLevel() - local maxLevel = DataManager.BountyData:getMaxLevel() - self.bountyBannerSliderTx:setText(exp .. "/" .. lvUpExp) - self.bountyBannerSlider:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = exp / lvUpExp - if level >= maxLevel then - self.bountyBannerLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) - else - self.bountyBannerLvTx:setText(tostring(level)) - end - end + -- local isOpen = DataManager.BountyData:isOpen() + -- if not isOpen or GFunc.isShenhe() then + -- self.bountyNode:setVisible(false) + -- self.bountyRewardSpine:getSkeletonGraphic().enabled = false + -- return + -- end + -- self.bountyNode:setVisible(true) + -- if DataManager.BountyData:getIfCanClaimReward() then + -- self.bountyRewardSpine:setVisible(true) + -- self.bountyRewardSpine:playAnim("idle", true) + -- self.bountyRewardSpine:getSkeletonGraphic().enabled = true + -- self.bountyBannerInfo:setVisible(false) + -- self.bountyBannerDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.COLLET_REWARDS)) + -- else + -- self.bountyRewardSpine:setVisible(false) + -- self.bountyRewardSpine:getSkeletonGraphic().enabled = false + -- local bannerName = DataManager.BountyData:getBannerName() + -- self.bountyBanner:setSprite(GConst.ATLAS_PATH.BOUNTY, bannerName) + -- self.bountyBannerInfo:setVisible(true) + -- self.bountyBannerDescTx:setText(GConst.EMPTY_STRING) + -- local exp = DataManager.BountyData:getExp() + -- local lvUpExp = DataManager.BountyData:getLvUpExp() + -- local level = DataManager.BountyData:getLevel() + -- local maxLevel = DataManager.BountyData:getMaxLevel() + -- self.bountyBannerSliderTx:setText(exp .. "/" .. lvUpExp) + -- self.bountyBannerSlider:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = exp / lvUpExp + -- if level >= maxLevel then + -- self.bountyBannerLvTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) + -- else + -- self.bountyBannerLvTx:setText(tostring(level)) + -- end + -- end end function MainCityUI:refreshArenaBounty() diff --git a/lua/app/ui/shop/first_recharge_ui.lua b/lua/app/ui/shop/first_recharge_ui.lua index bfa2a21a..1c7f4472 100755 --- a/lua/app/ui/shop/first_recharge_ui.lua +++ b/lua/app/ui/shop/first_recharge_ui.lua @@ -1,11 +1,11 @@ local FirstRechargeUI = class("FirstRechargeUI", BaseUI) function FirstRechargeUI:isFullScreen() - return false + return false end function FirstRechargeUI:getPrefabPath() - return "assets/prefabs/ui/shop/first_recharge_ui.prefab" + return "assets/prefabs/ui/shop/first_recharge_ui.prefab" end function FirstRechargeUI:onPressBackspace() @@ -13,208 +13,196 @@ function FirstRechargeUI:onPressBackspace() end function FirstRechargeUI:onClose() - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP) + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP) end function FirstRechargeUI:ctor(params) - self:initData() + 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 + 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 + 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() + 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() + 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 + 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:bind(DataManager.PaymentData, "isDirty", function() + if not DataManager.ShopData:isFirstRechargeOpen(self.curGear) then + self:initData() + end self:onRefresh() - end) + 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 + -- 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 + 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) + 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])) + 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) + local tips + local spineName + tips = I18N:getGlobalText(I18N.GlobalConst["FIRST_CHARGE_TIPS_" .. self.curGear], price) + spineName = "ui_first_dec_" .. self.curGear + spineName = "ui_first_dec_1" + 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) + 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 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) + 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) + 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 + -- 奖励相关 + 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:setActive(true) + cell:refreshByConfig(rewards[i], received, received) + if canGet then + cell:showFrameAnimation() + else + cell:hideFrameAnimation() + end + else + cell:setActive(false) + end + end + 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 + -- 购买领取按钮 + if boughtDay > 0 then + -- 已购买 + if boughtDay > rewardDay then + self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_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/sign.meta b/lua/app/ui/sign.meta new file mode 100644 index 00000000..a324bae3 --- /dev/null +++ b/lua/app/ui/sign.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c8f91806e05cd44d4907a367efbcda77 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/ui/sign/cell.meta b/lua/app/ui/sign/cell.meta new file mode 100644 index 00000000..5de0dbd7 --- /dev/null +++ b/lua/app/ui/sign/cell.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1cd78dd2f30e04a44960e1db5295842d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/ui/sign/cell/sign_month_cell.lua b/lua/app/ui/sign/cell/sign_month_cell.lua new file mode 100755 index 00000000..3d8a4f77 --- /dev/null +++ b/lua/app/ui/sign/cell/sign_month_cell.lua @@ -0,0 +1,89 @@ +local SignMonthCell = class("sign_month_cell", BaseCell) + +function SignMonthCell:init() + local uiMap = self:getUIMap() + self.txDay = uiMap["sign_month_cell.tx_day"] + self.bg = uiMap["sign_month_cell.bg"] + self.imgAd = uiMap["sign_month_cell.btn_ad.check"] + if DataManager.PaymentData:getIsSkipAd() then + self.imgAd:setSprite(GConst.ATLAS_PATH.COMMON, "common_ad_2") + else + self.imgAd:setSprite(GConst.ATLAS_PATH.COMMON, "common_ad_1") + end + self.rewardCell = uiMap["sign_month_cell.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.btn_ad = uiMap["sign_month_cell.reward_cell.btn_ad"] + self.btn_ad:addClickListener(function() + local signState = DataManager.SignMonthData:getSignState(self.day) + if signState == GConst.SignConst.SIGN_STATE.CAN_SIGN_AD then + self:OnClickSignAgain() + end + end) + self:addClickListener(function() + local signState = DataManager.SignMonthData:getSignState(self.day) + if signState == GConst.SignConst.SIGN_STATE.CAN_SIGN then + self:OnClickSign() + end + end) +end + +function SignMonthCell:OnClickSignAgain() + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_SIGN_MONTH_AGAIN, function () + ModuleManager.SignManager:reqMonthSignAgain() + end) +end + +function SignMonthCell:OnClickSign() + ModuleManager.SignManager:reqMonthSign(self.day) +end + +function SignMonthCell:refresh(day) + self.day = day + local showCheck = false + local showFrame = false + local reward = DataManager.SignMonthData:getReward(GConst.SignConst.MONTH_REWARD_TYPE.SIGN, day) + local signState = DataManager.SignMonthData:getSignState(day) + self.rewardCell:refreshByConfig(reward, showCheck, showCheck) + + self.txDay:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_CHARGE_1,day)) + if signState == GConst.SignConst.SIGN_STATE.CAN_SIGN then + --可以领取状态 + self.btn_ad:setActive(false) + self.rewardCell:addClickListener(function() + local signState = DataManager.SignMonthData:getSignState(self.day) + if signState == GConst.SignConst.SIGN_STATE.CAN_SIGN then + self:OnClickSign() + end + end) + showFrame = true + self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_4") + elseif signState == GConst.SignConst.SIGN_STATE.CAN_SIGN_AD then + --可以领取广告 + self.btn_ad:setActive(true) + self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_4") + self.rewardCell:addClickListener(function() + local signState = DataManager.SignMonthData:getSignState(self.day) + if signState == GConst.SignConst.SIGN_STATE.CAN_SIGN_AD then + self:OnClickSignAgain() + end + end) + elseif signState == GConst.SignConst.SIGN_STATE.UNABLE_SIGN then + --不可领取 + self.btn_ad:setActive(false) + self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_3") + -- self.rewardCell:setClickShowTips(true) + elseif signState == GConst.SignConst.SIGN_STATE.SIGNEDIN then + --已签到 + showCheck = true + self.btn_ad:setActive(false) + self.bg:setSprite(GConst.ATLAS_PATH.UI_ACT_MONTH_SIGNIN, "act_month_signin_bg_5") + -- self.rewardCell:setClickShowTips(true) + end + if showFrame then + self.rewardCell:showFrameAnimation() + else + self.rewardCell:hideFrameAnimation() + end + self.rewardCell:showMask(showCheck, showCheck) +end + +return SignMonthCell \ No newline at end of file diff --git a/lua/app/ui/sign/cell/sign_month_cell.lua.meta b/lua/app/ui/sign/cell/sign_month_cell.lua.meta new file mode 100644 index 00000000..29cd67a7 --- /dev/null +++ b/lua/app/ui/sign/cell/sign_month_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 69c961967265e4c10815d702c99c2168 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/sign/cell/sign_week_cell.lua b/lua/app/ui/sign/cell/sign_week_cell.lua new file mode 100755 index 00000000..d5aaf17b --- /dev/null +++ b/lua/app/ui/sign/cell/sign_week_cell.lua @@ -0,0 +1,137 @@ +local SignWeekCell = class("SignWeekCell", BaseCell) + +function SignWeekCell:init() + local uiMap = self:getUIMap() + self.upSlider = uiMap["bounty_cell.up_slider"] + self.upIcon = uiMap["bounty_cell.up_slider.icon"] + self.downSlider = uiMap["bounty_cell.down_slider"] + self.downIcon = uiMap["bounty_cell.down_slider.icon"] + self.downSliderCanvas = self.downSlider:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS) + self.dayIconCanvas = uiMap["bounty_cell.day_icon"]:getComponent(GConst.TYPEOF_UNITY_CLASS.CANVAS) + self.dayTx = uiMap["bounty_cell.day_icon.day_tx"] + self.freeRewardCell = uiMap["bounty_cell.reward_free.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.proRewardCells = {} + for i = 1, 2 do + self.proRewardCells[i] = uiMap["bounty_cell.reward_pro.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + end + self.resignFlagTx = uiMap["bounty_cell.resign_tx"] + self.funcBtn = uiMap["bounty_cell.func_btn"] + self.funcBtnCostIcon = uiMap["bounty_cell.func_btn.icon"] + self.funcBtnCostTx = uiMap["bounty_cell.func_btn.resign_tx"] + self.funcBtnCenterTx = uiMap["bounty_cell.func_btn.center_tx"] + self.rp = uiMap["bounty_cell.func_btn.rp"] + self.signFlag = uiMap["bounty_cell.has_sign_flag"] + self.signFlagTx = uiMap["bounty_cell.has_sign_flag.desc_tx"] +end + +function SignWeekCell:refresh(day) + local curDay = DataManager.SignWeekData:calculateDay() + local freeGot = DataManager.SignWeekData:getHasGotReward(GConst.SignConst.REWARD_TYPE.FREE, day) + local proGot = DataManager.SignWeekData:getHasGotReward(GConst.SignConst.REWARD_TYPE.PRO, day) + local freeCanGet = DataManager.SignWeekData:getCanGetReward(GConst.SignConst.REWARD_TYPE.FREE, day) + local rewardFree = DataManager.SignWeekData:getReward(GConst.SignConst.REWARD_TYPE.FREE, day) + local rewardPro1, rewardPro2 = DataManager.SignWeekData:getReward(GConst.SignConst.REWARD_TYPE.PRO, day) + local cost = DataManager.SignWeekData:getReSignCost() + local isUnlockPro = DataManager.SignWeekData:isUnlockPro() + + self.dayTx:setText(day) + self.resignFlagTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_9)) + self.signFlagTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_10)) + self.funcBtnCostTx:setText(cost.num) + + if curDay >= day then -- 处于可领取天数 + if freeGot then -- 已经领过了 + self.funcBtn:setActive(false) + self.resignFlagTx:setVisible(false) + self.signFlag:setVisible(true) + elseif freeCanGet then -- 可领取 + self.funcBtn:setActive(true) + self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_5") + self.funcBtnCostIcon:setVisible(false) + self.funcBtnCostTx:setVisible(false) + self.funcBtnCenterTx:setVisible(true) + self.funcBtnCenterTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_8)) + self.resignFlagTx:setVisible(false) + self.signFlag:setVisible(false) + self.rp:setVisible(true) + else + self.funcBtn:setActive(true) + self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1") + self.funcBtnCostIcon:setVisible(true) + self.funcBtnCostTx:setVisible(true) + GFunc.centerImgAndTx(self.funcBtnCostIcon, self.funcBtnCostTx, 0, nil, -6) + self.funcBtnCenterTx:setVisible(false) + self.resignFlagTx:setVisible(true) + self.signFlag:setVisible(false) + self.rp:setVisible(false) + end + else -- 还未到达可领取天数 + self.funcBtn:setActive(true) + self.funcBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_5") + self.funcBtnCostIcon:setVisible(false) + self.funcBtnCostTx:setVisible(false) + self.funcBtnCenterTx:setVisible(true) + self.funcBtnCenterTx:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_11)) + self.resignFlagTx:setVisible(false) + self.signFlag:setVisible(false) + self.rp:setVisible(false) + end + + -- 刷新slider部分 + self.upSlider:setVisible(day ~= 1) + self.downSlider:setVisible(day ~= 7) + self.upIcon:setVisible(day <= curDay) + self.downIcon:setVisible(day < curDay) + + -- 奖励 + self.freeRewardCell:refreshByConfig(rewardFree, freeGot, freeGot) + self.proRewardCells[1]:refreshByConfig(rewardPro1, proGot, proGot) + if rewardPro2 then + self.proRewardCells[2]:setActive(true) + self.proRewardCells[2]:refreshByConfig(rewardPro2, proGot, proGot) + else + self.proRewardCells[2]:setActive(false) + end + self.proRewardCells[1]:showLock(not isUnlockPro) + self.proRewardCells[2]:showLock(not isUnlockPro) + + if freeGot and isUnlockPro and not proGot then + self.proRewardCells[1]:showFrameAnimation() + self.proRewardCells[2]:showFrameAnimation() + self.proRewardCells[1]:addClickListener(function() + ModuleManager.SignManager:reqSignClaimed(day, true) + end) + self.proRewardCells[2]:addClickListener(function() + ModuleManager.SignManager:reqSignClaimed(day, true) + end) + else + self.proRewardCells[1]:hideFrameAnimation() + self.proRewardCells[2]:hideFrameAnimation() + -- self.proRewardCells[1]:setClickShowTips() + -- self.proRewardCells[2]:setClickShowTips() + end + + self.funcBtn:addClickListener(function() + local curDay = DataManager.SignWeekData:calculateDay() + local freeGot = DataManager.SignWeekData:getHasGotReward(GConst.SignConst.REWARD_TYPE.FREE, day) + local proGot = DataManager.SignWeekData:getHasGotReward(GConst.SignConst.REWARD_TYPE.PRO, day) + local freeCanGet = DataManager.SignWeekData:getCanGetReward(GConst.SignConst.REWARD_TYPE.FREE, day) + + if curDay >= day then -- 处于可领取天数 + if freeGot then -- 已经领过了 + -- 不作处理 + elseif freeCanGet then -- 可领取 + ModuleManager.SignManager:reqSignClaimed(day, false) + else -- 补签 + local cost = DataManager.SignWeekData:getReSignCost() + if GFunc.checkCost(cost.id, cost.num, true) then + ModuleManager.SignManager:reqSignReCheckin(day) + end + end + else -- 还未到达可领取天数 + -- 不作处理 + end + end) +end + +return SignWeekCell \ No newline at end of file diff --git a/lua/app/ui/sign/cell/sign_week_cell.lua.meta b/lua/app/ui/sign/cell/sign_week_cell.lua.meta new file mode 100644 index 00000000..82cb6074 --- /dev/null +++ b/lua/app/ui/sign/cell/sign_week_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 78c33d74c892a4f308c84029c6334f51 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/sign/comp.meta b/lua/app/ui/sign/comp.meta new file mode 100644 index 00000000..6d6218cd --- /dev/null +++ b/lua/app/ui/sign/comp.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3cc0d987e63c54a0dafc4bf844d1942a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/ui/sign/comp/sign_month_comp.lua b/lua/app/ui/sign/comp/sign_month_comp.lua new file mode 100755 index 00000000..17a53664 --- /dev/null +++ b/lua/app/ui/sign/comp/sign_month_comp.lua @@ -0,0 +1,144 @@ +local SignMonthComp = class("SignMonthComp", LuaComponent) + +function SignMonthComp:init() + local uiMap = self:getBaseObject():genAllChildren() + if not self.boxObjs then + self.boxObjs = {} + for i = 1, 4 do + self.boxObjs[i] = { + box = uiMap["sign_month_comp.top_node.bg_2.progress_bg.box_" .. i], + btnGet = uiMap["sign_month_comp.top_node.bg_2.progress_bg.box_" .. i .. ".btn_get"], + desc = uiMap["sign_month_comp.top_node.bg_2.progress_bg.box_" .. i .. ".bg.box_desc"], + rewardCell = uiMap["sign_month_comp.top_node.bg_2.progress_bg.box_" .. i .. ".reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL), + } + self.boxObjs[i].btnGet:addClickListener(function() + ModuleManager.SignManager:reqMonthAccumClaim(DataManager.SignMonthData:getAccumClaimID(i)) + end) + end + end + self.boxObjs[1].desc:setText(7) + self.boxObjs[2].desc:setText(14) + self.boxObjs[3].desc:setText(21) + self.boxObjs[4].desc:setText(30) + + self.slider = uiMap["sign_month_comp.top_node.bg_2.progress_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + self.scrollRectPrefab = uiMap["sign_month_comp.bg_2.scroll_rect"] + self.txAccum = uiMap["sign_month_comp.top_node.bg_2.progress_bg.bg.tx_accum"] + self.btnSign = uiMap["sign_month_comp.btn_sign"] + self.btnAdSign = uiMap["sign_month_comp.btn_ad_sign"] + self.btnNo = uiMap["sign_month_comp.btn_no"] + self.imgAd = uiMap["sign_month_comp.bg_2.img_bg.btn_ad_sign.img_ad"] + self.timeBg = uiMap["sign_month_comp.top_node.time_bg"] + + self.titleTx = uiMap["sign_month_comp.top_node.title_tx"] + self.txTips = uiMap["sign_month_comp.top_node.time_bg.tx_tips"] + self.txSign = uiMap["sign_month_comp.btn_sign.tx_sign"] + self.txAdSign = uiMap["sign_month_comp.btn_ad_sign.tx_ad_sign"] + self.txNo = uiMap["sign_month_comp.btn_no.tx_no"] + self.txTips2 = uiMap["sign_month_comp.bg_2.scroll_rect.view_port.content.sign_month_cell.btn_ad.tx_tips"] + + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_30SIGNIN_1)) + self.txTips:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_30SIGNIN_3)) + self.txSign:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_8)) + self.txAdSign:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_30SIGNIN_5)) + self.txNo:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_10)) + self.txTips2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_30SIGNIN_5)) + + local meshProComp = self.txTips:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + self.timeBg:setSizeDeltaX(meshProComp + 55) + + self.count = DataManager.SignMonthData:getConfigCount() + + self.btnAdSign:addClickListener(function() + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_SIGN_MONTH_AGAIN, function () + ModuleManager.SignManager:reqMonthSignAgain() + end) + end) + self.btnSign:addClickListener(function() + ModuleManager.SignManager:reqMonthSign(1) + end) + self:bind(DataManager.SignMonthData, "isDirty", function() + self:refresh() + end) +end + +function SignMonthComp:refresh() + self:refreshTop() + self:refreshScrollRect() + self:refreshBtn() + + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SIGN_MONTH) +end + +function SignMonthComp:refreshTop() + for i = 1, 4 do + local reward = DataManager.SignMonthData:getReward(GConst.SignConst.MONTH_REWARD_TYPE.BOX, DataManager.SignMonthData:getAccumClaimID(i)) + self.boxObjs[i].rewardCell:refreshByConfig(reward, false, false) + local state = DataManager.SignMonthData:getBoxState(i) + if state == GConst.SignConst.BOX_STATE.UNABLE_CLAIM then + self.boxObjs[i].rewardCell:showMask(false, false) + self.boxObjs[i].rewardCell:hideFrameAnimation() + self.boxObjs[i].btnGet:setVisible(false) + elseif state == GConst.SignConst.BOX_STATE.CAN_CLAIM then + self.boxObjs[i].rewardCell:showMask(false, false) + self.boxObjs[i].rewardCell:showFrameAnimation() + self.boxObjs[i].btnGet:setVisible(true) + elseif state == GConst.SignConst.BOX_STATE.CLAIMED then + self.boxObjs[i].rewardCell:showMask(true, true) + self.boxObjs[i].rewardCell:hideFrameAnimation() + self.boxObjs[i].btnGet:setVisible(false) + else + self.boxObjs[i].btnGet:setVisible(false) + end + end + self.curDay = DataManager.SignMonthData:getCurDay() + self.txAccum:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_30SIGNIN_4, self.curDay)) + + if self.curDay == 0 then + self.slider.value = 0 + else + self.slider.value = DataManager.SignMonthData:getSliderValue() + end +end + +function SignMonthComp:refreshBtn() + if DataManager.PaymentData:getIsSkipAd() then + self.imgAd:setSprite(GConst.ATLAS_PATH.COMMON, "common_ad_2") + else + self.imgAd:setSprite(GConst.ATLAS_PATH.COMMON, "common_ad_1") + end + if DataManager.SignMonthData:getCanSign() then + self.btnSign:addRedPoint(89, 42, 1) + self.btnSign:setActive(true) + self.btnAdSign:setActive(false) + self.btnNo:setActive(false) + elseif not DataManager.SignMonthData:getCanSignAgain() then + self.btnSign:setActive(false) + self.btnAdSign:setActive(true) + self.btnNo:setActive(false) + else + self.btnSign:setActive(false) + self.btnAdSign:setActive(false) + self.btnNo:setActive(true) + end +end + +function SignMonthComp:refreshScrollRect() + if self.scrollRect then + self.scrollRect:updateAllCell() + else + self.scrollRect = self.scrollRectPrefab:getLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return "app/ui/sign/cell/sign_month_cell" + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index) + end) + self.scrollRect:refillCells(self.count) + end + if self.curDay > 0 then + self.scrollRect:moveToIndex(self.curDay) + end +end + +return SignMonthComp \ No newline at end of file diff --git a/lua/app/ui/sign/comp/sign_month_comp.lua.meta b/lua/app/ui/sign/comp/sign_month_comp.lua.meta new file mode 100644 index 00000000..af0f7ab8 --- /dev/null +++ b/lua/app/ui/sign/comp/sign_month_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 893b486d1e9e8448fb38b6678437cc9b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/sign/comp/sign_week_comp.lua b/lua/app/ui/sign/comp/sign_week_comp.lua new file mode 100755 index 00000000..a7610b44 --- /dev/null +++ b/lua/app/ui/sign/comp/sign_week_comp.lua @@ -0,0 +1,84 @@ +local SignWeekComp = class("SignWeekComp", LuaComponent) + +function SignWeekComp:init() + local uiMap = self:getBaseObject():genAllChildren() + self.timeTx = uiMap["sign_bounty_node.top_node.time_bg.text"] + self.titleTx = uiMap["sign_bounty_node.top_node.title_tx"] + self.desc1Tx = uiMap["sign_bounty_node.top_node.desc_bg.tx_1"] + self.desc2Tx = uiMap["sign_bounty_node.top_node.desc_bg.tx_2"] + self.lockFlag = uiMap["sign_bounty_node.top_node.bg_2.lock_flag"] + self.gotFlag = uiMap["sign_bounty_node.top_node.bg_2.got_flag"] + self.signTx = uiMap["sign_bounty_node.top_node.bg_2.sign_day_tx"] + self.cardDescTx = uiMap["sign_bounty_node.top_node.bg_2.desc_tx"] + self.buyBtn = uiMap["sign_bounty_node.top_node.bg_2.buy_btn"] + self.buyTx = uiMap["sign_bounty_node.top_node.bg_2.buy_btn.text"] + + self.bg = uiMap["sign_bounty_node.bg"] + self.scrollRectPrefab = uiMap["sign_bounty_node.bg.scroll_rect"] + + self.buyBtn:addClickListener(function() + self:buyCard() + end) + self:bind(DataManager.SignWeekData, "isDirty", function() + self:refresh() + end) +end + +function SignWeekComp:refresh() + local giftCfg = ConfigManager:getConfig("act_gift")[DataManager.SignWeekData:getProRewardGiftId()] + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_1)) + self.desc1Tx:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_3, giftCfg.value)) + self.desc2Tx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_2)) + self.buyTx:setText(GFunc.getFormatPrice(giftCfg.recharge_id)) + + + self:refreshTop() + self:refreshScrollRect() + + -- 尝试请求一次未领取奖励 + ModuleManager.SignManager:reqSignAutoRewardsClaimed() + + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.SING_WEEK) +end + +function SignWeekComp:refreshTop() + self.signTx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_4, DataManager.SignWeekData:getSignDay())) + self.lockFlag:setActive(not DataManager.SignWeekData:isUnlockPro()) + self.buyBtn:setActive(not DataManager.SignWeekData:isUnlockPro()) + self.gotFlag:setActive(DataManager.SignWeekData:isUnlockPro()) + self.cardDescTx:setText(DataManager.SignWeekData:isUnlockPro() and I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_6) or I18N:getGlobalText(I18N.GlobalConst.ACT_BOUNTY_SIGNIN_DESC_5)) +end + +function SignWeekComp:refreshScrollRect() + self.list = DataManager.SignWeekData:getConfigList() + + if self.scrollRect then + self.scrollRect:updateAllCell() + else + self.scrollRect = self.scrollRectPrefab:getLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return "app/ui/sign/cell/sign_week_cell" + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(index) + end) + self.scrollRect:refillCells(#self.list) + end + local curDay = DataManager.SignWeekData:getMinCanGetRewardDay() + self.scrollRect:moveToIndex(curDay) +end + +function SignWeekComp:updateTime() + local remainTime = DataManager.SignWeekData:getRemainTime() + if remainTime < 0 then + return + end + self.timeTx:setText(I18N:getGlobalText(I18N.GlobalConst.NEXT_REFRESH_DESC, Time:formatNumTimeStr(remainTime))) +end + +function SignWeekComp:buyCard() + local id = DataManager.SignWeekData:getProRewardGiftId() + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) +end + +return SignWeekComp \ No newline at end of file diff --git a/lua/app/ui/sign/comp/sign_week_comp.lua.meta b/lua/app/ui/sign/comp/sign_week_comp.lua.meta new file mode 100644 index 00000000..21f40e76 --- /dev/null +++ b/lua/app/ui/sign/comp/sign_week_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: bff0a2d518eeb4c4fa097c9eb9967e37 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/sign/sign_main_ui.lua b/lua/app/ui/sign/sign_main_ui.lua new file mode 100755 index 00000000..1724f878 --- /dev/null +++ b/lua/app/ui/sign/sign_main_ui.lua @@ -0,0 +1,216 @@ +local SignMainUI = class("SignMainUI", BaseUI) + +local BTN_WIDTH = 82 +local BTN_RIGHT = 20 +local BTN_SPACING = 26 + +function SignMainUI:showCommonBG() + return false +end + +function SignMainUI:onPressBackspace() + self:closeUI() +end + +function SignMainUI:getPrefabPath() + return "assets/prefabs/ui/sign/sign_main_ui.prefab" +end + +function SignMainUI: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 SignMainUI: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 SignMainUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + self.btnClose = uiMap["sign_main_ui.bottom.btn_close"] + self.btnNode = uiMap["sign_main_ui.bottom.btns"] + self.btnContent = uiMap["sign_main_ui.bottom.btns.viewport.content"] + self.btns = {} + self.txBtns = {} + for i = 1, table.nums(GConst.SignConst.SIGN_SHOW_PAGE) do + table.insert(self.btns, uiMap["sign_main_ui.bottom.btns.viewport.content.btn_" .. i]) + table.insert(self.txBtns, uiMap["sign_main_ui.bottom.btns.viewport.content.btn_" .. i .. ".tx_desc"]) + end + self.compsRoot = uiMap["sign_main_ui.comps"] + for i, btn in ipairs(self.btns) do + self.txBtns[i]:setText(I18N:getGlobalText(I18N.GlobalConst[GConst.SignConst.SIGN_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.SignWeekData, "isDirty", function() + self:refreshRedPoint() + end) + self:bind(DataManager.SignMonthData, "isDirty", function() + self:refreshRedPoint() + end) +end + +function SignMainUI:initComps() + if self.subComps then + return + end + local uiMap = self.root:genAllChildren() + self.subComps = {} + + for k, id in pairs(GConst.SignConst.SIGN_SHOW_PAGE) do + if GConst.SignConst.SIGN_COMP_NAME[id] then + -- 预制体挂载 + local obj = uiMap[GConst.SignConst.SIGN_COMP_NAME[id]] + obj:initPrefabHelper() + obj:genAllChildren() + local comp = obj:addLuaComponent(GConst.SignConst.SIGN_COMP[id]) + self.subComps[id] = comp + elseif GConst.SignConst.SIGN_COMP_PATH[id] then + -- 动态加载 + self:loadModule(GConst.SignConst.SIGN_COMP_PATH[id], self.compsRoot, GConst.SignConst.SIGN_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 SignMainUI:updateTime() + if self.subComps then + for _, comp in pairs(self.subComps) do + if comp.updateTime then + comp:updateTime() + end + end + end +end + +function SignMainUI: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 SignMainUI:switchOtherPage() + if DataManager.SignWeekData:showRedPoint() then + self.curPage = GConst.SignConst.SIGN_SHOW_PAGE.WEEK + elseif DataManager.SignMonthData:showRedPoint() then + self.curPage = GConst.SignConst.SIGN_SHOW_PAGE.MONTH + end + + if self.curPage ~= nil then + return + end + + for page = 1, table.nums(GConst.SignConst.SIGN_SHOW_PAGE) do + if self:isOpen(page) then + self.curPage = page + break + end + end +end + +function SignMainUI:onRefresh() + 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.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_1[i]) + else + btn:setSprite(GConst.SignConst.SIGN_PAGE_BTN_ICON_ATLAS[i], GConst.SignConst.SIGN_PAGE_BTN_ICON_2[i]) + end + else + btn:setActive(false) + end + end + local width = BTN_RIGHT + BTN_WIDTH * openCount + BTN_SPACING * (openCount - 1) + 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 SignMainUI: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 SignMainUI:isOpen(type) + if type == GConst.SignConst.SIGN_SHOW_PAGE.WEEK then + return DataManager.SignWeekData:isOpen() + elseif type == GConst.SignConst.SIGN_SHOW_PAGE.MONTH then + return DataManager.SignMonthData:isOpen() + end +end + +function SignMainUI:hasRedPoint(type) + if type == GConst.SignConst.SIGN_SHOW_PAGE.WEEK then + return DataManager.SignWeekData:showRedPoint() + elseif type == GConst.SignConst.SIGN_SHOW_PAGE.MONTH then + return DataManager.SignMonthData:showRedPoint() + end +end + +return SignMainUI \ No newline at end of file diff --git a/lua/app/ui/sign/sign_main_ui.lua.meta b/lua/app/ui/sign/sign_main_ui.lua.meta new file mode 100644 index 00000000..7b8af326 --- /dev/null +++ b/lua/app/ui/sign/sign_main_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0a1fafae87f534455b5e96de09641301 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/seven_day/seven_day_data.lua b/lua/app/userdata/activity/seven_day/seven_day_data.lua index bd66c169..4c9578ae 100644 --- a/lua/app/userdata/activity/seven_day/seven_day_data.lua +++ b/lua/app/userdata/activity/seven_day/seven_day_data.lua @@ -1,276 +1,190 @@ -local SevenDayData = class("SevenDayData", BaseData) +local ActSevenDayData = class("ActSevenDayData", BaseData) -function SevenDayData:ctor() - self:clear() -end - -function SevenDayData:clear() +function ActSevenDayData:ctor() + self.taskData = {} + self.scoreReceivedIds = {} self.data.isDirty = false - self.collectTaskCount = 0 - self.collectStepCount = 0 - self.openTs = 0 - self.endTime = 0 - self.tasks = {} - self.stepRewards = {} - DataManager:unregisterCrossDayFunc("SevenDayData") - DataManager:unregisterTryOpenFunc("SevenDayData") end -function SevenDayData:init(data) +function ActSevenDayData:clear() + self.taskData = {} + self.scoreReceivedIds = {} + DataManager:unregisterCrossDayFunc("ActSevenDayData") + ModuleManager.TaskManager:unRegisterAllModuleTask("ActSevenDayData") +end + +function ActSevenDayData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function ActSevenDayData:initData(data, isInit) data = data or GConst.EMPTY_TABLE - self.openTs = GFunc.formatTimeStep(data.open_day_ts) - if self.openTs and self.openTs > 0 then - self.openTs = self.openTs - self.openTs % 86400 - self.endTime = self.openTs + self:getDurationTime() - else - self.openTs = 0 - self.endTime = self.openTs + if EDITOR_MODE then + Logger.logHighlight("七天乐数据") + Logger.printTable(data) + end + + self.scoreReceivedIds = {} -- 已领取奖励的积分id + if data.score_reward_ids then + for _, id in ipairs(data.score_reward_ids) do + self.scoreReceivedIds[id] = true + end + end + self.taskData = {} + local claimedIdMap = {} + if data.claimed_ids then + for index, id in ipairs(data.claimed_ids) do + claimedIdMap[id] = true + end + end + local taskProgress = data.progress or {} + for id, info in pairs(self:getTaskCfg()) do + local maxCount = info.number or 1 + local progress = taskProgress[id] or 0 + if claimedIdMap[id] then + progress = maxCount + end + self.taskData[id] = {progress = progress, collect = claimedIdMap[id] == true} end - self.tasks = data.tasks or {} - self.stepRewards = data.claimed or {} - local today = Time:getBeginningOfServerToday() - self.actDay = (today - self.openTs) // 86400 + 1 - - self:calCollectTaskCount() - self:calCollectStepCount() - self:initTaskListener() - - if self.openTs <= 0 then - DataManager:registerTryOpenFunc("SevenDayData", function() - if self.openTs <= 0 then - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - self.openTs = Time:getBeginningOfServerToday() - self.endTime = self.openTs + self:getDurationTime() - self.actDay = 1 - DataManager:unregisterTryOpenFunc("SevenDayData") - end - end + if isInit then + DataManager:registerCrossDayFunc("ActSevenDayData", function() + self:setDirty() end) + -- 注册任务监听 + for id, info in pairs(self:getTaskCfg()) do + ModuleManager.TaskManager:registerTask("ActSevenDayData", info.type, function(count) + self:addTaskProgress(info.type, count) + end) + end end - - DataManager:registerCrossDayFunc("SevenDayData", function() - self.actDay = self.actDay + 1 - self:setDirty() - end) + self:setDirty() end -function SevenDayData:getIsOpen() - if GFunc.isShenhe() then +function ActSevenDayData:isOpen(period) + period = period or 1 + local moduleKey = period == 1 and ModuleManager.MODULE_KEY.ACT_SEVENDAY or ModuleManager.MODULE_KEY.ACT_SEVENDAY_2 + if not ModuleManager:getIsOpen(moduleKey, true) then return false end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - return false - end - local nowTime = Time:getServerTime() - if self.endTime < nowTime or self.openTs > nowTime then - return false - end - if self.collectTaskCount >= self:getSevenDayTaskMaxCount() and self.collectStepCount >= self:getSevenDayRewardMaxCount() then + + if self:getRemainTime(period) <= 0 then return false end + return true end -function SevenDayData:getDurationTime() - if not self.durationTime then - self.durationTime = GFunc.getConstIntValue("act_sevenday_time") * 86400 - end - return self.durationTime -end - -function SevenDayData:getActDay() - return self.actDay or 1 -end - -function SevenDayData:getEndTime() - return self.endTime -end - -function SevenDayData:refreshTasks(data) - if not data then - return +function ActSevenDayData:hasRedPoint(period) + if not self:isOpen(period) then + return false end - for id, task in pairs(data) do - self.tasks[id] = task + return self:hasTaskRp(period) or self:hasGiftRp(period) +end + +-- 获取开启天数 +function ActSevenDayData:getOpenDays(period) + if self._openDays == nil then + self._openDays = GFunc.getConstIntValue("act_sevenday_duration") end - self:calCollectTaskCount() + return self._openDays end -function SevenDayData:refreshClaimed(data) - if not data then - return - end - for id, b in pairs(data) do - self.stepRewards[id] = b - end - self:calCollectStepCount() -end - -function SevenDayData:opened() - return self.openTs > 0 -end - -function SevenDayData:setOpen() - if self.openTs > 0 then - return - end - self.collectTaskCount = 0 - self.collectStepCount = 0 - self.stepRewards = {} - - self.openTs = Time:getServerTime() - self.endTime = self.openTs + self:getDurationTime() - self.actDay = 1 -end - -function SevenDayData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function SevenDayData:getSevenDayTaskCfg() - if self.sevenDayTaskCfg == nil then - self.sevenDayTaskCfg = ConfigManager:getConfig("act_sevenday_quest") - end - return self.sevenDayTaskCfg -end - -function SevenDayData:getSevenDayTaskMaxCount() - if self.sevenDayTaskMaxCount == nil then - self.sevenDayTaskMaxCount = ConfigManager:getConfigNum("act_sevenday_quest") - end - return self.sevenDayTaskMaxCount -end - -function SevenDayData:getSevenDayRewardCfg() - if self.sevenDayRewardCfg == nil then - self.sevenDayRewardCfg = ConfigManager:getConfig("act_sevenday_quest_reward") - end - return self.sevenDayRewardCfg -end - -function SevenDayData:getSevenDayRewardMaxCount() - if self.sevenDayRewardMaxCount == nil then - self.sevenDayRewardMaxCount = ConfigManager:getConfigNum("act_sevenday_quest_reward") - end - return self.sevenDayRewardMaxCount -end - -function SevenDayData:calCollectTaskCount() - self.collectTaskCount = 0 - for id, info in ipairs(self:getSevenDayTaskCfg()) do - if self:taskCollected(id) then - self.collectTaskCount = self.collectTaskCount + 1 +-- 获取活动开启时间(玩家创号那天) +function ActSevenDayData:getOpenTime(period) + period = period or 1 + local addDay = 0 + if period == 2 then + addDay = ModuleManager:getOpenDay(ModuleManager.MODULE_KEY.ACT_SEVENDAY_2) or 0 + if addDay > 0 then + addDay = addDay - 1 end end + return Time:getDayBeginTimeStamp(DataManager.PlayerData:getCreateTime()) + addDay*86400 end -function SevenDayData:calCollectStepCount() - self.collectStepCount = 0 - for id, info in ipairs(self:getSevenDayRewardCfg()) do - if self:getStepCollected(id) then - self.collectStepCount = self.collectStepCount + 1 - end +-- 结束时间 +function ActSevenDayData:getEndTime(period) + return self:getOpenTime(period) + (self:getOpenDays(period) * 24 * 3600) +end + +-- 获取剩余时间 +function ActSevenDayData:getRemainTime(period) + return self:getEndTime(period) - Time:getServerTime() +end + +-- 获取当前为活动第几天 +function ActSevenDayData:getActDay(period) + local days = (Time:getServerTime() - self:getOpenTime(period)) // 86400 + if days < 0 then + days = -days + end + return math.min(days + 1, 7) +end + +-- 任务及积分奖励 ---------------------------------------------------------------------------------------------------- + +-- 获取任务配置 +function ActSevenDayData:getTaskCfg(taskId) + taskId = tonumber(taskId) + if taskId then + return ConfigManager:getConfig("act_sevenday_quest")[taskId] + else + return ConfigManager:getConfig("act_sevenday_quest") end end -function SevenDayData:getTaskListByDay(day) - if not self.taskList then - self.taskList = {} - for id, info in ipairs(self:getSevenDayTaskCfg()) do - if not self.taskList[info.day] then - self.taskList[info.day] = {} +-- 获取天对应的任务ids +function ActSevenDayData:getTaskIdsByDay(day, period) + if period == 2 then + day = day + 7 + end + if self.taskDayMap == nil then + self.taskDayMap = {} + for id, info in pairs(self:getTaskCfg()) do + if self.taskDayMap[info.day] == nil then + self.taskDayMap[info.day] = {} end - table.insert(self.taskList[info.day], id) - end - end - return self.taskList[day] or {} -end - -function SevenDayData:getStepRewardList() - if not self.stepRewardList then - self.stepRewardList = {} - for id, info in ipairs(self:getSevenDayRewardCfg()) do - table.insert(self.stepRewardList, id) + table.insert(self.taskDayMap[info.day], id) end end - return self.stepRewardList + return self.taskDayMap[day] or {} end -function SevenDayData:getCollectedCount() - return self.collectTaskCount +-- 获取排序的id列表 +function ActSevenDayData:getSortTaskIdsByDay(day, period) + local ids = self:getTaskIdsByDay(day, period) + local sortIds = {} + + for i, id in ipairs(ids) do + local temp = {id = id, sort = id} + if self:isTaskReceived(id) then + temp.sort = temp.sort + 10000000 + end + if self:canClaimTask(id) then + temp.sort = temp.sort - 10000000 + end + table.insert(sortIds, temp) + end + table.sort(sortIds, function(a, b) + return a.sort < b.sort + end) + + local result = {} + for i, data in ipairs(sortIds) do + table.insert(result, data.id) + end + return result end -function SevenDayData:getTotalCount() - return ConfigManager:getConfigNum("act_sevenday_quest") -end -function SevenDayData:getTaskInfo(id) - if not self.tasks[id] then - self.tasks[id] = { - id = id, - progress = 0, - claimed = false - } - end - - return self.tasks[id] -end - -function SevenDayData:taskCollected(id) - return self:getTaskInfo(id).claimed -end - -function SevenDayData:taskCount(id) - return self:getTaskInfo(id).progress -end - -function SevenDayData:taskTotalCount(id) - local cfg = self:getSevenDayTaskCfg()[id] - if not cfg then - return 1 -- 防止除法报错 - end - return cfg.number or 1 -end - -function SevenDayData:getTaskReward(id) - local cfg = self:getSevenDayTaskCfg()[id] - if not cfg then - return - end - return cfg.reward -end - -function SevenDayData:getTaskDay(id) - local cfg = self:getSevenDayTaskCfg()[id] - if not cfg then - return 1 - end - return cfg.day -end - -function SevenDayData:getTaskType(id) - local cfg = self:getSevenDayTaskCfg()[id] - if not cfg then - return - end - return cfg.type -end - -function SevenDayData:getTaskDayLimit(id) - local cfg = self:getSevenDayTaskCfg()[id] - if not cfg or not cfg.count_type then - return - end - return cfg.day -end - -function SevenDayData:getTaskListByType(taskType) +-- 获取类型对应的ids列表 +function ActSevenDayData:getTaskIdsByType(taskType) if not self.taskTypeMap then self.taskTypeMap = {} - for id, info in ipairs(self:getSevenDayTaskCfg()) do + for id, info in pairs(self:getTaskCfg()) do if not self.taskTypeMap[info.type] then self.taskTypeMap[info.type] = {} end @@ -281,122 +195,306 @@ function SevenDayData:getTaskListByType(taskType) return self.taskTypeMap[taskType] or {} end -function SevenDayData:addTaskProgress(id, count) - local dayLimit = self:getTaskDayLimit(id) - if dayLimit and dayLimit > self:getActDay() then - return +-- 获取任务积分配置 +function ActSevenDayData:getScoreCfg(scoreId) + scoreId = tonumber(scoreId) + if scoreId then + return ConfigManager:getConfig("act_sevenday_quest_reward")[scoreId] + else + return ConfigManager:getConfig("act_sevenday_quest_reward") + end +end + +-- 获取任务类型 +function ActSevenDayData:getTaskType(taskId) + return self:getTaskCfg(taskId).type +end + +-- 获取任务目标 +function ActSevenDayData:getTaskTarget(taskId) + return self:getTaskCfg(taskId).number +end + +-- 获取任务奖励 +function ActSevenDayData:getTaskReward(taskId) + return self:getTaskCfg(taskId).reward +end + +-- 获取任务数据 +function ActSevenDayData:getTaskData(taskId) + if self.taskData[taskId] == nil then + self.taskData[taskId] = {progress = 0, collect = false} + end + + return self.taskData[taskId] +end + +-- 获取任务进度 +function ActSevenDayData:getTaskProg(taskId) + return self:getTaskData(taskId).progress or 0 +end + +-- 任务是否已领取 +function ActSevenDayData:isTaskReceived(taskId) + return self:getTaskData(taskId).collect or false +end + +-- 任务是否可领取 +function ActSevenDayData:canClaimTask(taskId) + if self:isTaskReceived(taskId) then + return false + end + if self:getTaskProg(taskId) < self:getTaskTarget(taskId) then + return false + end + + return true +end + +-- 获取所有可领取的任务奖励 +function ActSevenDayData:getAllCanClaimTaskIds(period) + period = period or 1 + local ids = {} + for day = 1, self:getActDay(period) do + for i, id in ipairs(self:getTaskIdsByDay(day, period)) do + if self:canClaimTask(id) then + table.insert(ids, id) + end + end + end + return ids +end + +function ActSevenDayData:setTaskClaimed(taskId, ids) + if taskId then + self:getTaskData(taskId).collect = true + elseif ids then + for i, taskId in ipairs(ids) do + self:getTaskData(taskId).collect = true + end end - self:getTaskInfo(id).progress = self:getTaskInfo(id).progress + count self:setDirty() end -function SevenDayData:canClaimTask(id) - if self:taskCollected(id) then - return false - end - - return self:taskTotalCount(id) <= self:taskCount(id) +-- 获取积分奖励目标 +function ActSevenDayData:getScoreTarget(scoreId) + return self:getScoreCfg(scoreId).num end -function SevenDayData:getStepNum(id) - local cfg = self:getSevenDayRewardCfg()[id] - if not cfg then - return 1 -- 防止除法为0 - end - return cfg.num -end - -function SevenDayData:getStepCollected(id) - return self.stepRewards[id] == true -end - -function SevenDayData:getStepReward(id) - local cfg = self:getSevenDayRewardCfg()[id] - if not cfg then - return - end - return cfg.reward -end - -function SevenDayData:canClaimStepTask(id) - if self:getStepCollected(id) then - return false - end - - return self:stepOver(id) -end - -function SevenDayData:stepOver(id) - return self.collectTaskCount >= self:getStepNum(id) -end - -function SevenDayData:showRedPoint(day) - if day then - local list = self:getTaskListByDay(day) - for _, id in ipairs(list) do - if self:canClaimTask(id) then - return true - end +-- 获取总积分 +function ActSevenDayData:getScoreTotal(period) + period = period or 1 + local cfg = self:getScoreCfg() + local maxNum = 0 + for k, v in pairs(cfg) do + if v.period == period and maxNum < v.num then + maxNum = v.num end + end + return maxNum +end + +-- 获取积分 +function ActSevenDayData:getScore(period) + period = period or 2 + if period == 1 then + return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_SEVEN_DAY_SCORE) else - local day = self:getActDay() - for id, info in pairs(self.tasks) do - local cfg = self:getSevenDayTaskCfg()[id] - if cfg and cfg.day <= day then - if self:canClaimTask(id) then - return true - end - end - end + return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_SEVEN_DAY_SCORE_2) + end +end - local list = self:getStepRewardList() - for _, id in ipairs(list) do - if self:canClaimStepTask(id) then - return true - end +-- 积分是否已领取 +function ActSevenDayData:isScoreReceived(scoreId) + return self.scoreReceivedIds[scoreId] +end + +-- 积分奖励是否可领取 +function ActSevenDayData:canClaimScore(scoreId, period) + period = period or 1 + if self:isScoreReceived(scoreId) then + return false + end + if self:getScore(period) < self:getScoreTarget(scoreId) then + return false + end + + return true +end + +-- 获取所有可领取的积分奖励 +function ActSevenDayData:getAllCanClaimScoreIds(period) + period = period or 1 + local ids = {} + for id, info in ipairs(self:getScoreCfg()) do + if info.period == period and self:canClaimScore(id, period) then + table.insert(ids, id) + end + end + return ids +end + +function ActSevenDayData:setScoreReceived(scoreId, ids) + if scoreId then + self.scoreReceivedIds[scoreId] = true + elseif ids then + for i, scoreId in ipairs(ids) do + self.scoreReceivedIds[scoreId] = true + end + end + self:setDirty() +end + +-- 是否有任务红点 +function ActSevenDayData:hasTaskRp(period) + period = period or 1 + -- 任务奖励 + for i = 1, self:getActDay(period) do + if self:hasTaskDayRp(i, period) then + return true + end + end + -- 积分奖励 + for scoreId, info in ipairs(self:getScoreCfg()) do + if period == info.period and self:canClaimScore(scoreId, period) then + return true end end return false end -function SevenDayData:getSevenDayTaskI18NCfg() - return I18N:getConfig("act_sevenday_quest") +function ActSevenDayData:hasTaskDayRp(day, period) + local ids = self:getTaskIdsByDay(day, period) + for i, taskId in ipairs(ids) do + if self:canClaimTask(taskId) then + return true + end + end + + return false end -function SevenDayData:getSevenDayTaskDesc(id) - local cfg = self:getSevenDayTaskI18NCfg() - if cfg == nil then - return GConst.EMPTY_STRING +-- 添加任务进度 +function ActSevenDayData:addTaskProgress(taskType, count) + local ids = self:getTaskIdsByType(taskType) + for i, id in ipairs(ids) do + local serverData = self:getTaskData(id) + local config = self:getTaskCfg(id) + local addCount = count + -- if table.containValue(GConst.TaskConst.TASK_CONDITION_EQUAL, taskType) then + -- if config.condition == addCount then -- 有参数的任务类型处理一下 + -- addCount = 1 + -- else + -- addCount = 0 + -- end + -- end + if table.containValue(GConst.TaskConst.TASK_TARGRT_TYPE, taskType) then + serverData.progress = math.max(serverData.progress, addCount) + else + if serverData.progress <= math.maxinteger - addCount then -- 检查一下是否相加会溢出 + serverData.progress = serverData.progress + addCount + end + end end - return cfg[id].desc end -function SevenDayData:initTaskListener() - local nowTime = Time:getServerTime() - -- 活动结束就不用监听了 - if self.endTime > 0 and self.endTime < nowTime then - ModuleManager.TaskManager:unRegisterAllModuleTask("SevenDayData") - return false - end - -- 完成了就不用监听了 - if self.collectTaskCount >= self:getSevenDayTaskMaxCount() and self.collectStepCount >= self:getSevenDayRewardMaxCount() then - ModuleManager.TaskManager:unRegisterAllModuleTask("SevenDayData") - return false - end +-- 任务奖励领取成功 +function ActSevenDayData:onGetRewardTask() + self:setDirty() +end - local cfg = self:getSevenDayTaskCfg() - for _, v in ipairs(cfg) do - local taskType = v.type - ModuleManager.TaskManager:registerTask("SevenDayData", taskType, function(count) - local list = self:getTaskListByType(taskType) - if #list > 0 then - for _, id in ipairs(list) do - self:addTaskProgress(id, count) +function ActSevenDayData:getGiftList(day, period) + if self._giftList == nil then + self._giftList = {} + local cfg = ConfigManager:getConfig("act_gift") + for k, v in pairs(cfg) do + if v.type == PayManager.PURCHARSE_ACT_TYPE.ACT_SEVEN_DAY then + if self._giftList[v.parameter] == nil then + self._giftList[v.parameter] = {} + end + local obj = { + id = k, + cfg = v, + } + if v.parameter_pro and v.parameter_pro[1] == 1 then -- 免费 + obj.isFree = true + elseif v.item_cost then -- 道具购买 + obj.isItemCost = true + elseif v.recharge_id == nil then -- 广告 + obj.isAd = true + end + table.insert(self._giftList[v.parameter], obj) + end + end + end + day = day or 1 + if period == 2 then -- 第二期 + day = day + 7 + end + return self._giftList[day] +end + +function ActSevenDayData:getGiftRemainNum(giftId, period) + period = period or 1 + for i = 1, 7 do + local list = self:getGiftList(i, period) + for k, v in ipairs(list) do + if v.id == giftId then + local limit = v.cfg.limit or 0 + local boughtNum = DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) + return limit - boughtNum + end + end + end + return 0 +end + +function ActSevenDayData:getIsGiftAllOverDay(day, period) + period = period or 1 + local list = self:getGiftList(day, period) + for k, v in ipairs(list) do + local limit = v.cfg.limit or 0 + local boughtNum = DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, v.id) + if limit > boughtNum then + return false + end + end + return true +end + +function ActSevenDayData:hasGiftRp(period) + local day = self:getActDay(period) + if day <= 0 or day >= 7 then + day = 7 + end + for i = 1, day do + local list = self:getGiftList(i, period) + for k, v in ipairs(list) do + if v.isFree or v.isAd then + local limit = v.cfg.limit or 0 + local boughtNum = DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, v.id) + if limit > boughtNum then + return true end end - end) + end end + return false end -return SevenDayData \ No newline at end of file +function ActSevenDayData:hasGiftDayRp(day, period) + local list = self:getGiftList(day, period) + for k, v in ipairs(list) do + if v.isFree or v.isAd then + local limit = v.cfg.limit or 0 + local boughtNum = DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, v.id) + if limit > boughtNum then + return true + end + end + end + return false +end + +return ActSevenDayData \ No newline at end of file diff --git a/lua/app/userdata/bounty/bounty_data.lua b/lua/app/userdata/bounty/bounty_data.lua index 1faf7050..6e73992a 100644 --- a/lua/app/userdata/bounty/bounty_data.lua +++ b/lua/app/userdata/bounty/bounty_data.lua @@ -1,464 +1,481 @@ local BountyData = class("BountyData", BaseData) -local ACT_GIFT_ID_BOUNTY = 70102 -local ACT_GIFT_ID_BOUNTY_ADVANCED = 70202 - function BountyData:ctor() - self.data.dirty = false + self.startTime = 0 + self.endTime = 0 + -- 当前赛季数据 + self.season = 0 + self.level = 1 + self.exp = 0 + self.todayExp = 0 + self.receivedRewards = {} + self.unlockPro = {} + -- 上次赛季数据,如果已付费则可领奖 + self.previousSeason = 1 + self.previousLevel = 1 + self.previousExp = 0 + self.previousReceivedRewards = {} + self.previousUnlockPro = {} + + self.data.isDirty = false +end + +function BountyData:setDirty() + self.data.isDirty = not self.data.isDirty end function BountyData:clear() - DataManager:unregisterCrossDayFunc("BountyData") + self.startTime = 0 + self.endTime = 0 + -- 当前赛季数据 + self.season = 0 + self.level = 1 + self.exp = 0 + self.todayExp = 0 + self.receivedRewards = {} + self.unlockPro = {} + -- 上次赛季数据,如果已付费则可领奖 + self.previousSeason = 1 + self.previousLevel = 1 + self.previousExp = 0 + self.previousReceivedRewards = {} + self.previousUnlockPro = {} + + DataManager:unregisterCrossDayFunc("BountyData") + DataManager:unregisterTryOpenFunc("BountyData") end function BountyData:init(data) - data = data or GConst.EMPTY_TABLE - self.season = data.season or 1 - self.level = data.level or 1 - self.exp = data.exp or 0 - self.bought = data.bought - self.isBoughtBase = nil - self.isBoughtAdvance = nil - self.popBoughtTime = LocalData:getBountyPopTime() - self.claimed = data.claimed or {} - self.claimedCount = 0 - for k, v in pairs(self.claimed) do - if v then - self.claimedCount = self.claimedCount + 1 - end - end - self.proClaimed = data.pro_claimed or {} - self.proClaimedCount = 0 - for k, v in pairs(self.proClaimed) do - if v then - self.proClaimedCount = self.proClaimedCount + 1 - end - end - self.endTime = 0 - self:initBountyTime() - self:initBountyLevelCfg() - DataManager:registerCrossDayFunc("BountyData", function() - self:checkNextSeason() - self:markDirty() + data = data or {} + if EDITOR_MODE then + Logger.logHighlight("战令数据") + Logger.printTable(data) + end + + self.startTime = data.open_at or 0-- 本赛季开启时间 + self.endTime = self.startTime + self:getCycleDay() * 86400 + -- 战令数据 + self.season = data.season or self:getMaxSeason() + self.level = data.level or 1 + self.exp = data.exp or 0 + self.todayExp = data.today_exp or 0 + -- 领奖状态 + self.receivedRewards = {} + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.FREE] = data.claimed or 0 + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_1] = data.pro_claimed or 0 + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_2] = data.pro2_claimed or 0 + -- 解锁状态 + self.unlockPro = {} + self.unlockPro[GConst.BountyConst.REWARD_GEAR.PRO_1] = data.bought or false + self.unlockPro[GConst.BountyConst.REWARD_GEAR.PRO_2] = data.bought2 or false + -- 上赛季 + local previousBounty = data.previous or {} + self.previousSeason = previousBounty.season or 1 + self.previousLevel = previousBounty.level or 1 + self.previousExp = previousBounty.exp or 0 + self.previousReceivedRewards = {} + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.FREE] = previousBounty.claimed or 0 + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_1] = previousBounty.pro_claimed or 0 + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_2] = previousBounty.pro2_claimed or 0 + self.previousUnlockPro = {} + self.previousUnlockPro[GConst.BountyConst.REWARD_GEAR.PRO_1] = previousBounty.bought or false + self.previousUnlockPro[GConst.BountyConst.REWARD_GEAR.PRO_2] = previousBounty.bought2 or false + + self:initConfig() + self:fixLevel() + + self:setDirty() + DataManager:registerCrossDayFunc("BountyData", function() + self.todayExp = 0 + self:checkSeasonChange() + self:setDirty() end) + -- 如果功能未开启 注册功能开启监听 + if not self:isOpen() then + DataManager:registerTryOpenFunc("BountyData", function() + if not self:isOpen(false, true) then + return + end + DataManager:unregisterTryOpenFunc("BountyData") + + if EDITOR_MODE then + Logger.logHighlight("战令功能开启") + end + + self.startTime = Time:getDayBeginTimeStamp() + self.endTime = self.startTime + self:getCycleDay() * 86400 + -- 战令数据 + self.season = self:getMaxSeason() + self.level = 1 + self.exp = 0 + self.todayExp = 0 + -- 领奖状态 + self.receivedRewards = {} + -- 解锁状态 + self.unlockPro = {} + -- 上赛季 + self.previousSeason = 0 + self.previousLevel = 0 + self.previousExp = 0 + self.previousReceivedRewards = {} + self.previousUnlockPro = {} + + self:initConfig() + + self:setDirty() + end) + end end -function BountyData:initBountyTime() - local info = ConfigManager:getConfig("bounty_time")[self.season] - if info == nil then - self.endTime = 0 - return - end - self.endTime = Time:getCertainTimeByStr(info.end_time) +-- 检查赛季改变(周期结束) +function BountyData:checkSeasonChange() + if not self:isOpen() then + return + end + if self:getRemainTime() > 0 then + return + end + + self.startTime = self.endTime + self.endTime = self.startTime + self:getCycleDay() * 86400 + + self.previousSeason = self.season + self.previousLevel = self.level + self.previousExp = self.exp + self.previousReceivedRewards = self.receivedRewards + self.previousUnlockPro = self.unlockPro + + self.season = math.min(self.season + 1, self:getMaxSeason()) + self.level = 1 + self.exp = 0 + self.receivedRewards = {} + self.unlockPro = {} + + self:initConfig() end -function BountyData:initBountyLevelCfg() - if self.bountyLevelCfg == nil then - self.bountyLevelCfg = {} - else - for i = 1, #self.bountyLevelCfg do - table.remove(self.bountyLevelCfg) - end - end - if self.proRewards then - for i = 1, #self.proRewards do - table.remove(self.proRewards) - end - end - local cfg = ConfigManager:getConfig("bounty_level") - for k, v in pairs(cfg) do - if v.season == self.season then - self.bountyLevelCfg[k % 100] = v - end - end - self.repeatLevelInfo = table.remove(self.bountyLevelCfg) +-- 服务器的等级不设上限,需要客户端修订 +function BountyData:fixLevel() + if self.level > self:getMaxLv() then + self.level = self:getMaxLv() + end end -function BountyData:checkNextSeason() - if self.endTime > Time:getServerTime() then - return +-- 是否开启 +function BountyData:isOpen(showToast, noCheckTime) + if GFunc.isShenhe() then + return false + end + -- if not GFunc.IsGotServerTime() then + -- return false + -- end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.BOUNTY, not showToast) then + return false end - local nextSeason = self.season + 1 - local info = ConfigManager:getConfig("bounty_time")[nextSeason] - if info == nil then - self.endTime = 0 - return - end - self.endTime = Time:getCertainTimeByStr(info.end_time) - self.season = nextSeason - self.level = 1 - self.exp = 0 - self.bought = false - self.isBoughtBase = nil - self.isBoughtAdvance = nil - for k, v in pairs(self.claimed) do - self.claimed[k] = false - end - self.claimedCount = 0 - for k, v in pairs(self.proClaimed) do - self.proClaimed[k] = false - end - self.proClaimedCount = 0 - self:initBountyLevelCfg() + -- if not noCheckTime and (self:getStartTime() <= 0 or self:getEndTime() <= 0) then + -- return false + -- end + + return true end -function BountyData:getBought() - return self.bought +-- 获取开始时间 +function BountyData:getStartTime() + return self.startTime or 0 end -function BountyData:setBought(season, level) - if self.season ~= season then - return - end - self.bought = true - self.isBoughtBase = nil - self.isBoughtAdvance = nil - level = level or self.level - if self.level ~= level then - self.level = level - BIReport:postBountyLevelUp(self:getBountyReportType(), self.level, self.exp, self.season) - end - DataManager.DailyTaskData:unlockBountyTask() - self:markDirty() +-- 获取结束时间 +function BountyData:getEndTime() + return self.endTime or 0 end -function BountyData:getLevel() - return self.level +-- 获取赛季剩余时间 +function BountyData:getRemainTime() + return self:getEndTime() - Time:getServerTime() end -function BountyData:getExp() - return self.exp +function BountyData:showRedPoint() + if not self:isOpen() then + return false + end + if self:canGetRewards() then + return true + end + + return false end -function BountyData:addExp(num) - self.exp = self.exp + num - local levelBefore = self.level - while true do - local lvUpExp = self:getLvUpExp() - if self.exp >= lvUpExp then - self.exp = self.exp - lvUpExp - self.level = self.level + 1 - else - break - end - end - if levelBefore ~= self.level then - BIReport:postBountyLevelUp(self:getBountyReportType(), self.level, self.exp, self.season) - end - self:markDirty() +function BountyData:getMaxSeason() + local maxSeason = 0 + for id, data in pairs(ConfigManager:getConfig("bounty_level")) do + maxSeason = math.max(maxSeason, data.season) + end + return maxSeason end +function BountyData:initConfig() + self.configList = {} + for id, data in pairs(ConfigManager:getConfig("bounty_level")) do + if data.season == self:getSeason() then + data.id = id + table.insert(self.configList, data) + end + end + table.sort(self.configList, function (a, b) + return a.id < b.id + end) +end + +-- 最大赛季 +function BountyData:getMaxSeason() + if self.maxSeason == nil then + self.maxSeason = 1 + for id, data in pairs(ConfigManager:getConfig("bounty_level")) do + if data.season > self.maxSeason then + self.maxSeason = data.season + end + end + end + return self.maxSeason +end + +-- 最大等级 +function BountyData:getMaxLv() + return #self.configList +end + +-- 获取升级所需经验 function BountyData:getLvUpExp() - local info = self:getSeasonInfoByLevel(self.level + 1) - if info == nil then - return self.repeatLevelInfo and self.repeatLevelInfo.exp or 1 - end - return info.exp + if self:getLevel() >= self:getMaxLv() then + return 0 + end + local curCfg = self.configList[self:getLevel()] + return curCfg.exp end -function BountyData:getRepeatLevelInfo() - return self.repeatLevelInfo +-- 获取奖励 +function BountyData:getReward(type, lv) + local cfg = self.configList[lv] + if type == GConst.BountyConst.REWARD_GEAR.FREE then + return cfg.reward + elseif type == GConst.BountyConst.REWARD_GEAR.PRO_1 then + return cfg.reward_pro + elseif type == GConst.BountyConst.REWARD_GEAR.PRO_2 then + return cfg.reward_pro_max + end end -function BountyData:getIsOpen() - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.BOUNTY_OPEN, true) and self.endTime > Time:getServerTime() then - return true - end - return false +-- 获取循环时间 +function BountyData:getCycleDay() + return GFunc.getConstIntValue("bounty_duration") end -function BountyData:getBannerName() - return ConfigManager:getConfig("bounty_time")[self.season].enter_ui_banner +-- 获取每日最高所获经验 +function BountyData:getDailyMaxExp() + return GFunc.getConstIntValue("bounty_daily_limit") end -function BountyData:getRewardBannerName() - return "bounty_btn_main_0" +-- 获取经验兑换比例 +function BountyData:getExpRatio() + return GFunc.getConstIntValue("bounty_point") end -function BountyData:getBannerSpineName() - return ConfigManager:getConfig("bounty_time")[self.season].ui_banner +-- 获取高级奖励礼包id +function BountyData:getProRewardGiftId(type) + return GConst.BountyConst.ACT_GIFT_IDS[type] end function BountyData:getSeason() - return self.season + return self.season -- 测试 end -function BountyData:getSeasonInfoByLevel(lv) - return self.bountyLevelCfg[lv] +function BountyData:getLevel() + return self.level end -function BountyData:getMaxLevel() - return #self.bountyLevelCfg +function BountyData:getExp() + return self.exp end -function BountyData:getAllProRewards() - if self.proRewards and #self.proRewards > 0 then - return self.proRewards - end - local rewards = {} - for i = 1, #self.bountyLevelCfg do - local cfg = self.bountyLevelCfg[i] - if cfg.reward_pro then - table.insert(rewards, cfg.reward_pro) - end +-- 今日已获得经验 +function BountyData:getTodayExp() + return self.todayExp +end + +-- 获取已领取奖励等级 +function BountyData:getReceivedLevel(type) + return self.receivedRewards[type] or 0 +end + +-- 获取奖励解锁状态 +function BountyData:isUnlockReward(type) + if not self:isOpen() then + return false end - self.proRewards = GFunc.mergeRewards(rewards) - local cfg = ConfigManager:getConfig("item") - table.sort(self.proRewards, function(a, b) - if cfg[a.id].type == cfg[b.id].type then - return a.id > b.id - else - return cfg[a.id].type > cfg[b.id].type - end - end) - return self.proRewards + if type == GConst.BountyConst.REWARD_GEAR.FREE then + return true + end + return self.unlockPro[type] or false end -function BountyData:getLevelState(lv) - return self.claimed[lv] +-- 获取上赛季等级 +function BountyData:getPreviousLevel() + return self.previousLevel or 0 end -function BountyData:getProLevelState(lv) - return self.proClaimed[lv] +-- 获取上赛季 +function BountyData:getPreviousSeason() + return self.previousSeason or 0 end -function BountyData:getIfCanBuyLevel() - local maxLevel = self:getMaxLevel() - if maxLevel > 0 and self.level < maxLevel then - return true - end - return false +-- 获取上赛季领奖等级 +function BountyData:getPreviousReceivedLevel(type) + return self.previousReceivedRewards[type] or 0 end --- 未领取的最小奖励的index -function BountyData:getMinUnclaimedRewardIndex() - local level = self.level - local maxLevel = self:getMaxLevel() - if level > maxLevel then - level = maxLevel - end - if self.claimedCount < self.level then - for i = 1, level do - if not self.claimed[i] then - return i - end - end - end - if self.bought and self.proClaimedCount < self:getMaxLevel() then - for i = 1, level do - if not self.proClaimed[i] then - return i - end - end - end - return level +-- 获取上赛季解锁状态 +function BountyData:isPreviousUnlock(type) + if type == GConst.BountyConst.REWARD_GEAR.FREE then + return true + end + return self.previousUnlockPro[type] or false end --- 是否有未领取的奖励 -function BountyData:getIfCanClaimReward() - if not self:getIsOpen() then - return false - end - if self.claimedCount < self.level then - return true - end - if self.bought and self.level <= self:getMaxLevel() and self.proClaimedCount < self.level then - return true - end - return false +function BountyData:getMoveIdx() + local minLevel = self:getLevel() + for k, gear in pairs(GConst.BountyConst.REWARD_GEAR) do + if self:isUnlockReward(gear) then + local lv = self:getReceivedLevel(gear) + 1 + minLevel = minLevel > lv and lv or minLevel + end + end + return minLevel end --- 展示一键领取按钮 -function BountyData:canShowOneKeyGetBtn() - local maxLevel = self:getMaxLevel() - local curLevel = math.min(maxLevel, self.level) - if curLevel <= 0 then - return false - end - - local count = self:getShowOneKeyLimit() - for i = 1, curLevel do - if not self.claimed[i] then - count = count - 1 - end - if self.bought and not self.proClaimed[i] then - count = count - 1 - end - if count <= 0 then - return true - end - end - - return false +-- 是否已领取奖励 +function BountyData:isReceivedReward(type, level) + return self:getReceivedLevel(type) >= level end -function BountyData:getShowOneKeyLimit() - if not self.showOneKeyLimit then - self.showOneKeyLimit = GFunc.getConstIntValue("bounty_click") - end +-- 是否可领奖励 +function BountyData:canClaimReward(type, level) + if self:isReceivedReward(type, level) then + return false + end + if not self:isUnlockReward(type) then + return false + end - return self.showOneKeyLimit + return self:getLevel() >= level end -function BountyData:onOneKeyClaimReward() - local maxLevel = self:getMaxLevel() - local curLevel = math.min(maxLevel, self.level) - if curLevel <= 0 then - return false - end - for i = 1, curLevel do - if not self.claimed[i] then - self.claimed[i] = true - self.claimedCount = self.claimedCount + 1 - end - if self.bought and not self.proClaimed[i] then - self.proClaimed[i] = true - self.proClaimedCount = self.proClaimedCount + 1 - end - end - - self:markDirty() +-- 是否可领取这赛季奖励 +function BountyData:canGetRewards() + if self:getLevel() > self:getReceivedLevel(GConst.BountyConst.REWARD_GEAR.FREE) then + return true + end + if self:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_1) and self:getLevel() > self:getReceivedLevel(GConst.BountyConst.REWARD_GEAR.PRO_1) then + return true + end + if self:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_2) and self:getLevel() > self:getReceivedLevel(GConst.BountyConst.REWARD_GEAR.PRO_2) then + return true + end end --- 是否可以领取重复奖励 -function BountyData:getIfCanClaimRepeatReward() - local maxLevel = self:getMaxLevel() - if maxLevel <= 0 then - return false - end - if self.level <= maxLevel then - return false - end - return not self:getLevelState(self.level) +-- 是否可领取上赛季奖励 +function BountyData:canGetPreviousRewards() + if self:getPreviousLevel() > self:getPreviousReceivedLevel(GConst.BountyConst.REWARD_GEAR.FREE) then + return true + end + if self:isPreviousUnlock(GConst.BountyConst.REWARD_GEAR.PRO_1) and self:getPreviousLevel() > self:getPreviousReceivedLevel(GConst.BountyConst.REWARD_GEAR.PRO_1) then + return true + end + if self:isPreviousUnlock(GConst.BountyConst.REWARD_GEAR.PRO_2) and self:getPreviousLevel() > self:getPreviousReceivedLevel(GConst.BountyConst.REWARD_GEAR.PRO_2) then + return true + end + return false end -function BountyData:onClaimReward(level) - if self.claimed[level] then - return - end - local maxLevel = self:getMaxLevel() - if level > maxLevel then - for i = maxLevel, level do - self.claimed[i] = true - self.claimedCount = self.claimedCount + 1 - end - else - self.claimed[level] = true - self.claimedCount = self.claimedCount + 1 - end - self:markDirty() +-- 解锁高级奖励 +function BountyData:onUnlockPro(season, type) + if self:getSeason() == season then + self.unlockPro[type] = true + elseif self:getPreviousSeason() == season then + self.previousUnlockPro[type] = true + end + self:setDirty() end -function BountyData:onClaimProReward(level) - if self.proClaimed[level] then - return - end - self.proClaimed[level] = true - self.proClaimedCount = self.proClaimedCount + 1 - self:markDirty() +-- 领取所有可领取的奖励 +function BountyData:onClaimAllRewards() + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.FREE] = self:getLevel() + if self:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_1) then + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_1] = self:getLevel() + end + if self:isUnlockReward(GConst.BountyConst.REWARD_GEAR.PRO_2) then + self.receivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_2] = self:getLevel() + end + self:setDirty() end -function BountyData:getBuyBountyLevelCost() - if self.buyBountyLevelCost == nil then - self.buyBountyLevelCost = ConfigManager:getConfig("const")["bounty_buy_cost"].reward - end - return self.buyBountyLevelCost +-- 领取遗留战令奖励 +function BountyData:onGotBountyPreviousReward() + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.FREE] = self.previousLevel + if self:isPreviousUnlock(GConst.BountyConst.REWARD_GEAR.PRO_1) then + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_1] = self.previousLevel + end + if self:isPreviousUnlock(GConst.BountyConst.REWARD_GEAR.PRO_2) then + self.previousReceivedRewards[GConst.BountyConst.REWARD_GEAR.PRO_2] = self.previousLevel + end + self:setDirty() end -function BountyData:onBoughtLevel() - self.level = self.level + 1 - BIReport:postBountyLevelUp(self:getBountyReportType(), self.level, self.exp, self.season) - self:markDirty() -end - -function BountyData:getGiftId(advanced) - if advanced then - return ACT_GIFT_ID_BOUNTY_ADVANCED - else - return ACT_GIFT_ID_BOUNTY - end -end - -function BountyData:markDirty() - self.data.dirty = not self.data.dirty -end - -function BountyData:getEndTime() - return self.endTime -end - -function BountyData:getExpItemIcon() - local id = GConst.ItemConst.ITEM_ID_BOUNTY_EXP - local info = ConfigManager:getConfig("item")[id] - if info == nil then - return GConst.EMPTY_STRING - end - return info.icon -end - -function BountyData:getIsPopBought() - if not self:getIsOpen() then - return false - end - if self.bought then - return false - end - return self.popBoughtTime < Time:getBeginningOfServerToday() -end - -function BountyData:markPopBought() - if self.popBoughtTime >= Time:getBeginningOfServerToday() then +-- 增加战令经验 +function BountyData:addBountyExp(num) + if not self:isOpen() then return end - self.popBoughtTime = Time:getBeginningOfServerToday() - LocalData:setBountyPopTime(self.popBoughtTime) + + local exp = num * self:getExpRatio() + self.exp = self.exp + exp + self.todayExp = self.todayExp + exp + + local isLvUp = false + if self.exp >= self:getLvUpExp() then + self.exp = self.exp - self:getLvUpExp() + self.level = self.level + 1 + isLvUp = true + end + -- 修订满级 + if self:getLevel() >= self:getMaxLv() then + self.exp = 0 + self.level = self:getMaxLv() + end + + if EDITOR_MODE then + Logger.logHighlight("战令增加经验:" .. exp) + Logger.logHighlight(" 当前等级:" .. self.level .. " 当前经验:" .. self.exp .. "今日获得经验:" .. self.todayExp .. "是否升级:" .. tostring(isLvUp)) + end + + BIReport:postBountyOpt(BIReport.BOUNTY_OPT.EXP_UP) + if isLvUp then + BIReport:postBountyOpt(BIReport.BOUNTY_OPT.LV_UP, BIReport.BOUNTY_LV_UP_TYPE.EXP) + end + + self:setDirty() end -function BountyData:clearPopBought() - self.popBoughtTime = 0 -end - -function BountyData:getRechargeId(advanced) - local cfg = ConfigManager:getConfig("act_gift") - local id = self:getGiftId(advanced) - if cfg[id] then - return cfg[id].recharge_id - end - return 0 -end - -function BountyData:getBuyProBountyAddLevelCount() - if self.buyProBountyAddLevelCount == nil then - self.buyProBountyAddLevelCount = ConfigManager:getConfig("const")["bounty_senior_rise"].value - end - return self.buyProBountyAddLevelCount -end - -function BountyData:getIsBoughtBase() - if self.isBoughtBase == nil then - self.isBoughtBase = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, ACT_GIFT_ID_BOUNTY) > 0 - end - return self.isBoughtBase -end - -function BountyData:getIsBoughtAdvance() - if self.isBoughtAdvance == nil then - self.isBoughtAdvance = DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, ACT_GIFT_ID_BOUNTY_ADVANCED) > 0 - end - return self.isBoughtAdvance -end - -function BountyData:getBountyReportType() - if not self.bought then - return 0 - end - if self:getIsBoughtBase() then - return 1 - end - if self:getIsBoughtAdvance() then - return 2 - end - return 0 +function BountyData:getAllRewards(type) + local rewards = {} + for k, v in pairs(self.configList) do + local reward = self:getReward(type,v.level) + if rewards[reward.id] then + rewards[reward.id].num = rewards[reward.id].num + reward.num + else + rewards[reward.id] = {num = reward.num} + end + end + return rewards end return BountyData \ No newline at end of file diff --git a/lua/app/userdata/chapter_fund.meta b/lua/app/userdata/chapter_fund.meta new file mode 100644 index 00000000..d56fec99 --- /dev/null +++ b/lua/app/userdata/chapter_fund.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d5c0815e5a3642d5aebafec68c77d7a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/chapter_fund/chapter_fund_data.lua b/lua/app/userdata/chapter_fund/chapter_fund_data.lua new file mode 100755 index 00000000..58a2185a --- /dev/null +++ b/lua/app/userdata/chapter_fund/chapter_fund_data.lua @@ -0,0 +1,385 @@ +local ChapterFundData = class("ChapterFundData", BaseData) + +BIReport.EVENT_NAME_CHAPTER_FUND = "client_chapter_fund" + +function ChapterFundData:ctor() + self.data.isDirty = false +end + +function ChapterFundData:clear() + +end + +function ChapterFundData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function ChapterFundData:initData(data) + data = data or {} + if EDITOR_MODE then + Logger.logHighlight("章节基金数据:") + Logger.printTable(data) + end + local fund = data.fund or {} + self.claimed = fund.claimed or {} + + self:findStage() + + self:setDirty() +end + +function ChapterFundData:getIsOpen(stage) + if GFunc.isShenhe() then + return + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.CHAPTER_FUND, true) then + return false + end + + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + return list ~= nil +end + +function ChapterFundData:getRedPoint() + if not self:getIsOpen() then + return false + end + + return self:getMinUnclaimedStage() ~= nil +end + +function ChapterFundData:isStageUnlock(stage) + if stage == nil then + return false + end + if self:getIsAllClaimedByStage(stage) then + return false + end + + if stage > 1 and self:getIsAllCanGetByStage(stage - 1) then + return true + end + + local list = self:getListByStage(stage) + local chapter = self:getNeedChapter(list[1]) + if not DataManager.ChapterData:getChapterPassed(chapter) then + return false + end + + return true +end + +function ChapterFundData:getUnlockStageList() + self:getListByStage(1)-- 用于初始化stageList + local stages = {} + for stage = 1, self:getStageCount() do + if self:isStageUnlock(stage) then + table.insert(stages, stage) + end + end + table.sort(stages) + return stages +end + +function ChapterFundData:findStage() + local stage = 1 + while true do + local list = self:getListByStage(stage) + if not list then + break + else + local lastId = list[#list] + if not self:getFreeGot(lastId) or not self:getProGot(lastId) then + break + end + stage = stage + 1 + end + end + self.curStage = stage +end + +function ChapterFundData:getListByStage(stage) + if not self.stageList then + self.stageList = {} + for id, info in pairs(self:getConfig()) do + if not self.stageList[info.stage] then + self.stageList[info.stage] = {} + end + table.insert(self.stageList[info.stage], id) + end + for stage, _ in pairs(self.stageList) do + table.sort(self.stageList[stage], function(a, b) + return self:getConfig(a).chapter < self:getConfig(b).chapter + end) + end + end + + return self.stageList[stage] +end + +-- 是否已领奖 +function ChapterFundData:isRewardReceived(index, grade) + local id = self:getConfig(index).id + if self.claimed[id] == nil then + return false + end + if self.claimed[id].grade[grade] == nil then + return false + end + + return true +end + +function ChapterFundData:getFreeCanGet(id) + if self:getFreeGot(id) then + return false + end + + return DataManager.ChapterData:getChapterPassed(self:getNeedChapter(id)) +end + +function ChapterFundData:getFreeGot(id) + return self:isRewardReceived(id, 1) +end + +function ChapterFundData:getProCanGet(id) + if not self:getProBought(self:getStageById(id)) then + return false + end + + if self:getProGot(id) then + return false + end + + return DataManager.ChapterData:getChapterPassed(self:getNeedChapter(id)) +end + +function ChapterFundData:getProGot(id) + return self:isRewardReceived(id, 2) +end + +function ChapterFundData:getProBought(stage) + return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getProGiftId(stage)) > 0 +end + +function ChapterFundData:getCurStage() + return self.curStage +end + +function ChapterFundData:canGetRewards(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + for _, id in ipairs(list) do + if self:canGetRewardById(id) then + return true + end + end + + return false +end + +function ChapterFundData:canGetRewardById(id) + if self:getFreeCanGet(id) then + return true + end + if self:getProCanGet(id) then + return true + end + + return false +end + +-- 获取可领奖励的最小阶段 +function ChapterFundData:getMinUnclaimedStage() + for i, stage in pairs(self:getUnlockStageList()) do + if self:canGetRewards(stage) then + return stage + end + end + return nil +end +-- 获取目前最大阶段 +function ChapterFundData:getMaxUnclaimedStage() + local toStage = 1 + for i, stage in pairs(self:getUnlockStageList()) do + toStage = stage + end + return toStage +end +-- 获取可领奖励的最小索引 +function ChapterFundData:getMinUnclaimedRewardIndex(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return 0 + end + for index, id in ipairs(list) do + if self:getFreeCanGet(id) then + return index + end + if self:getProCanGet(id) then + return index + end + end + for i = 1, #list do + if not self:getFreeGot(list[i]) then + return i + end + end + return #list +end + +-- 获取可领奖励的最大索引 +function ChapterFundData:getMaxUnclaimedRewardIndex(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return 0 + end + for i = #list, 1, -1 do + if self:getFreeCanGet(list[i]) then + return i + end + if self:getProCanGet(list[i]) then + return i + end + end + for i = 1, #list do + if not self:getFreeGot(list[i]) then + return i + end + end + return #list +end + +-- 是否已经领取了全部奖励,包括付费的 +function ChapterFundData:getIsAllClaimed() + for stage = 1, self:getStageCount() do + local list = self:getListByStage(stage) + if not self:getFreeGot(list[#list]) or not self:getProGot(list[#list]) then + return false + end + end + + return true +end + +-- 阶段奖励是否领取完毕 +function ChapterFundData:getIsAllClaimedByStage(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + if self:getFreeGot(list[#list]) and self:getProGot(list[#list]) then + return true + end + + return false +end + +-- 阶段奖励是否全部已领取or可领取 +function ChapterFundData:getIsAllCanGetByStage(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + for _, id in ipairs(list) do + if not self:getFreeGot(id) and not self:getFreeCanGet(id) then + return false + end + if not self:getProGot(id) and not self:getProCanGet(id) then + return false + end + end + + return true +end + +--region 配置 + +function ChapterFundData:getConfig(id) + if self.giftCfgs then + if self.giftCfgs[id] then + return self.giftCfgs[id] + else + return self.giftCfgs + end + end + local cfgs = ConfigManager:getConfig("fund_chapter") + self.giftCfgs = {} + local index = 1 + for k, v in pairs(cfgs) do + if v.season == self.season then + v.id = k + self.giftCfgs[index] = v + index = index + 1 + end + end + return self.giftCfgs +end +--获取最大可领取的id +function ChapterFundData:getMaxUnclaimedId() + local list = self:getConfig() + local id = 0 + for k, v in pairs(list) do + local value = DataManager.ChapterData:getChapterPassed(v.chapter) + if value then + if id == nil or id < v.id then + id = v.id + end + end + end + return id +end +-- 获取总阶段个数 +function ChapterFundData:getStageCount() + local count = 0 + for id, info in pairs(self:getConfig()) do + count = math.max(count, info.stage) + end + return count +end + +function ChapterFundData:getStageById(id) + return self:getConfig(id).stage +end + +function ChapterFundData:getProGiftId(stage) + if self.stageMap == nil then + self.stageMap = {} + for id, info in pairs(self:getConfig()) do + self.stageMap[info.stage] = info.act_gift + end + end + return self.stageMap[stage] +end + +function ChapterFundData:getNeedChapter(id) + return self:getConfig(id).chapter +end +function ChapterFundData:getConfigIdByIndex(currStage, index) + local id = self:getListByStage(currStage)[index] + if id then + return self:getConfig(id).id + end +end +function ChapterFundData:getFreeRewards(id) + return self:getConfig(id).reward_free +end + +function ChapterFundData:getProRewards(id) + return self:getConfig(id).reward +end + +--endregion + +return ChapterFundData \ No newline at end of file diff --git a/lua/app/userdata/chapter_fund/chapter_fund_data.lua.meta b/lua/app/userdata/chapter_fund/chapter_fund_data.lua.meta new file mode 100755 index 00000000..48a2137c --- /dev/null +++ b/lua/app/userdata/chapter_fund/chapter_fund_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 5215705ddc1eb3a45990198a26370ba7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/fund/growth_fund_data.lua b/lua/app/userdata/fund/growth_fund_data.lua deleted file mode 100644 index 746dad1c..00000000 --- a/lua/app/userdata/fund/growth_fund_data.lua +++ /dev/null @@ -1,294 +0,0 @@ -local GrowthFundData = class("GrowthFundData", BaseData) - -local ACT_GIFT_FUND_BASE_ID_1 = 60202 -local ACT_GIFT_FUND_BASE_ID_2 = 60402 -local ACT_GIFT_FUND_ADVANCE_ID_1 = 60102 -local ACT_GIFT_FUND_ADVANCE_ID_2 = 60302 - -function GrowthFundData:ctor() - self.data.dirty = false - self.isClaimAll = false -end - -function GrowthFundData:init(data) - data = data or GConst.EMPTY_TABLE - - self.freeClaimed = {} - self.freeClaimedCount = 0 - if data.free_awarded then - for _, v in ipairs(data.free_awarded) do - self.freeClaimed[v] = true - self.freeClaimedCount = self.freeClaimedCount + 1 - end - end - self.baseClaimed = {} - self.baseClaimedCount = 0 - if data.pay_low_awarded then - for _, v in ipairs(data.pay_low_awarded) do - self.baseClaimed[v] = true - self.baseClaimedCount = self.baseClaimedCount + 1 - end - end - self.advanceClaimed = {} - self.advanceClaimedCount = 0 - if data.pay_high_awarded then - for _, v in ipairs(data.pay_high_awarded) do - self.advanceClaimed[v] = true - self.advanceClaimedCount = self.advanceClaimedCount + 1 - end - end - self:initGrowthInfo() - self:initFundGrade() -end - -function GrowthFundData:initGrowthInfo() - if not self.growthInfoMap then - self.growthInfoMap = {} - local cfg = self:getLevelFundCfg() - for id, info in pairs(cfg) do - if not self.growthInfoMap[info.stage] then - self.growthInfoMap[info.stage] = {} - end - table.insert(self.growthInfoMap[info.stage], id) - end - for grade, _ in pairs(self.growthInfoMap) do - table.sort(self.growthInfoMap[grade], function(a, b) - return a < b - end) - end - end -end - -function GrowthFundData:initFundGrade() - local fundGrade = 1 - local totalCount = 0 - while true do - local growInfoIds = self.growthInfoMap[fundGrade] - if growInfoIds == nil then - fundGrade = fundGrade - 1 - break - end - totalCount = totalCount + #growInfoIds - if self.freeClaimedCount >= totalCount and - self.baseClaimedCount >= totalCount and - self.advanceClaimedCount >= totalCount then - fundGrade = fundGrade + 1 - else - break - end - end - if fundGrade < 1 then - fundGrade = 1 - end - self.data.fundGrade = fundGrade - if self.data.fundGrade == 2 then - self.fundBaseId = ACT_GIFT_FUND_BASE_ID_2 - self.fundAdvanceId = ACT_GIFT_FUND_ADVANCE_ID_2 - if self.freeClaimedCount >= totalCount and self.baseClaimedCount >= totalCount and self.advanceClaimedCount >= totalCount then - self.isClaimAll = true - end - else - self.fundBaseId = ACT_GIFT_FUND_BASE_ID_1 - self.fundAdvanceId = ACT_GIFT_FUND_ADVANCE_ID_1 - end -end - -function GrowthFundData:markDirty() - self.data.dirty = not self.data.dirty -end - -function GrowthFundData:getIsOpen() - if self.isClaimAll then - return false - end - return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.FUND, true) -end - -function GrowthFundData:getFundGrade() - return self.data.fundGrade -end - -function GrowthFundData:getFundBaseId() - return self.fundBaseId -end - -function GrowthFundData:getFundAdvanceId() - return self.fundAdvanceId -end - -function GrowthFundData:getCurrGradeBaseRechargeId() - local info = self:getActGiftCfg()[self.fundBaseId] - return info.recharge_id -end - -function GrowthFundData:getCurrGradeAdvanceRechargeId() - local info = self:getActGiftCfg()[self.fundAdvanceId] - return info.recharge_id -end - -function GrowthFundData:getActGiftCfg() - if self.cfg == nil then - self.cfg = ConfigManager:getConfig("act_gift") - end - return self.cfg -end - -function GrowthFundData:getLevelFundCfg() - if self.levelFundCfg == nil then - self.levelFundCfg = ConfigManager:getConfig("act_level_fund") - end - return self.levelFundCfg -end - -function GrowthFundData:getCurrGradeInfoList() - return self.growthInfoMap[self.data.fundGrade] or GConst.EMPTY_TABLE -end - -function GrowthFundData:getNeedLevel(id) - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo == nil then - return 9999 - end - return levelFundInfo.level -end - -function GrowthFundData:getAllStepFundRewards(id) - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo == nil then - return nil, nil, nil - end - return levelFundInfo.reward_free, levelFundInfo.reward_small, levelFundInfo.reward -end - -function GrowthFundData:getFreeFundRewards(id) - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo == nil then - return nil - end - return levelFundInfo.reward_free -end - -function GrowthFundData:getBaseFundRewards(id) - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo == nil then - return nil - end - return levelFundInfo.reward_small -end - -function GrowthFundData:getAdvanceFundRewards(id) - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo == nil then - return nil - end - return levelFundInfo.reward -end - -function GrowthFundData:getIsBoughtBase() - return DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self.fundBaseId) > 0 -end - -function GrowthFundData:getIsBoughtAdvance() - return DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self.fundAdvanceId) > 0 -end - -function GrowthFundData:getFreeClaimedMap() - return self.freeClaimed -end - -function GrowthFundData:getIsClaimedFree(id) - return self.freeClaimed[id] -end - -function GrowthFundData:getBaseClaimedMap() - return self.baseClaimed -end - -function GrowthFundData:getIsClaimedBase(id) - return self.baseClaimed[id] -end - -function GrowthFundData:getAdvanceClaimedMap() - return self.advanceClaimed -end - -function GrowthFundData:getIsClaimedAdvance(id) - return self.advanceClaimed[id] -end - -function GrowthFundData:getMinUnclaimedRewardIndex() - local playerLevel = DataManager.PlayerData:getLv() - local growInfoIds = self:getCurrGradeInfoList() - local minIndex = 0 - local isBoughtBase = self:getIsBoughtBase() - local isBoughtAdvance = self:getIsBoughtAdvance() - for k, id in ipairs(growInfoIds) do - local levelFundInfo = self:getLevelFundCfg()[id] - if levelFundInfo then - if playerLevel >= levelFundInfo.level then -- 等级到了 - if not self.freeClaimed[id] then -- 能领但是没有领 - minIndex = k - break - end - if isBoughtBase then - if not self.baseClaimed[id] then -- 能领但是没有领 - minIndex = k - break - end - end - if isBoughtAdvance then - if not self.advanceClaimed[id] then -- 能领但是没有领 - minIndex = k - break - end - end - else - break - end - end - end - return minIndex -end - --- 是否有未领取的奖励 -function GrowthFundData:getIfCanClaimReward() - if not self:getIsOpen() then - return false - end - return self:getMinUnclaimedRewardIndex() > 0 -end - -function GrowthFundData:onClaimFundRewards(list) - if list == nil then - return - end - if #list <= 0 then - return - end - for _, v in ipairs(list) do - if v.grade == 0 then - if not self.freeClaimed[v.id] then - self.freeClaimed[v.id] = true - self.freeClaimedCount = self.freeClaimedCount + 1 - end - elseif v.grade == 1 then - if not self.baseClaimed[v.id] then - self.baseClaimed[v.id] = true - self.baseClaimedCount = self.baseClaimedCount + 1 - end - elseif v.grade == 2 then - if not self.advanceClaimed[v.id] then - self.advanceClaimed[v.id] = true - self.advanceClaimedCount = self.advanceClaimedCount + 1 - end - end - end - self:initFundGrade() - self:markDirty() -end - -function GrowthFundData:onBoughtFund() - self:markDirty() -end - -return GrowthFundData \ No newline at end of file diff --git a/lua/app/userdata/fund/growth_fund_data.lua.meta b/lua/app/userdata/fund/growth_fund_data.lua.meta deleted file mode 100644 index 20975dae..00000000 --- a/lua/app/userdata/fund/growth_fund_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b4b9202b724428843a59d421a713fe4b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/fund_level.meta b/lua/app/userdata/fund_level.meta new file mode 100644 index 00000000..8660878e --- /dev/null +++ b/lua/app/userdata/fund_level.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35861aabfc81c4f6b8e181ee44779130 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/fund_level/fund_level_data.lua b/lua/app/userdata/fund_level/fund_level_data.lua new file mode 100755 index 00000000..d06d4753 --- /dev/null +++ b/lua/app/userdata/fund_level/fund_level_data.lua @@ -0,0 +1,410 @@ +local FundLevelData = class("FundLevelData", BaseData) + +FundLevelData.PRO_GIFT_IDS = { + [1] = 40102, + [2] = 40202, + [3] = 40302, + [4] = 40402, + [5] = 40502, + [6] = 40602, + [7] = 40702, + [8] = 40802, + [9] = 40902, + [10] = 41002, + [11] = 41102, + [12] = 41202, + [13] = 41302, + [14] = 41402, + [15] = 41502, +} +function FundLevelData:ctor() + self.data.isDirty = false +end + +function FundLevelData:clear() + +end + +function FundLevelData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function FundLevelData:getConfig(id) + if self.giftCfgs then + if self.giftCfgs[id] then + return self.giftCfgs[id] + else + return self.giftCfgs + end + end + local cfgs = ConfigManager:getConfig("act_level_gift") + self.giftCfgs = {} + local index = 1 + for k, v in pairs(cfgs) do + if v.season == self.season then + v.id = k + self.giftCfgs[index] = v + index = index + 1 + end + end + return self.giftCfgs +end + +function FundLevelData:getStageById(id) + return self:getConfig(id).stage +end + +function FundLevelData:initData(data) + if EDITOR_MODE then + Logger.logHighlight("---------------基金------------------") + Logger.printTable(data) + end + data = data or {} + local fund = data.fund or {} + self.season = data.season or 1 + self.claimed = fund.claimed or {} + + self:findStage() + + self:setDirty() +end + +function FundLevelData:getIsOpen(stage) + if GFunc.isShenhe() then + return + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACT_LEVEL_GIFT, true) then + return false + end + + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + return list ~= nil +end + +-- 获取总阶段个数 +function FundLevelData:getStageCount() + local count = 0 + for id, info in pairs(self:getConfig()) do + count = math.max(count, info.stage) + end + return count +end + +function FundLevelData:isStageUnlock(stage) + if self:getIsAllClaimedByStage(stage) then + return false + end + + if stage > 1 and self:getIsAllCanGetByStage(stage - 1) then + return true + end + + local list = self:getListByStage(stage) + if self:getNeedLevel(list[1]) > DataManager.PlayerData:getLv() then + return false + end + + return true +end + +function FundLevelData:getUnlockStageList() + self:getListByStage(1)-- 用于初始化stageList + local stages = {} + for stage = 1, self:getStageCount() do + if self:isStageUnlock(stage) then + table.insert(stages, stage) + end + end + table.sort(stages) + return stages +end + +function FundLevelData:findStage() + local stage = 1 + while true do + local list = self:getListByStage(stage) + if not list then + break + else + local lastId = list[#list] + if not self:getFreeGot(lastId) or not self:getProlGot(lastId) then + break + end + stage = stage + 1 + end + end + self.curStage = stage +end + +function FundLevelData:getListByStage(stage) + if not self.stageList then + self.stageList = {} + for id, info in pairs(self:getConfig()) do + if not self.stageList[info.stage] then + self.stageList[info.stage] = {} + end + table.insert(self.stageList[info.stage], id) + end + for stage, _ in pairs(self.stageList) do + table.sort(self.stageList[stage], function(a, b) + return a < b + end) + end + end + + return self.stageList[stage] +end + +-- 是否已领奖 +function FundLevelData:isRewardReceived(id, grade) + if self.claimed[id] == nil then + return false + end + if self.claimed[id].grade[grade] == nil then + return false + end + + return true +end + +function FundLevelData:getFreeCanGet(id) + if self:getFreeGot(id) then + return false + end + + local cfg = self:getConfig(id) + return cfg.level <= DataManager.PlayerData:getLv() +end + +function FundLevelData:getFreeGot(id) + return self:isRewardReceived(id, 1) +end + +function FundLevelData:getFreeRewards(id) + local cfg = self:getConfig(id) + return cfg.reward_free +end + +function FundLevelData:getNeedLevel(id) + local cfg = self:getConfig(id) + return cfg and cfg.level +end + +function FundLevelData:getProCanGet(id) + if not self:getProlBought(self:getStageById(id)) then + return false + end + + if self:getProlGot(id) then + return false + end + + local cfg = self:getConfig(id) + return cfg.level <= DataManager.PlayerData:getLv() +end + +function FundLevelData:getProlGot(id) + return self:isRewardReceived(id, 2) +end + +function FundLevelData:getProlBought(stage) + return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getProActId(stage)) > 0 +end + +function FundLevelData:getProActId(stage) + stage = stage or self:getCurStage() + return self.PRO_GIFT_IDS[stage] +end + +function FundLevelData:getBigCanGet(id) + if not self:getBigBought() then + return false + end + + if self:getBigGot(id) then + return false + end + + local cfg = self:getConfig(id) + return cfg.level <= DataManager.PlayerData:getLv() +end +function FundLevelData:getConfigIdByIndex(currStage, index) + local id = self:getListByStage(currStage)[index] + if id then + return self:getConfig(id).id + end +end +function FundLevelData:getProGot(id) + return self:isRewardReceived(id, 2) +end + +function FundLevelData:getProBought(stage) + return DataManager.PaymentData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getBigActId(stage)) > 0 +end + +function FundLevelData:getProRewards(id) + local cfg = self:getConfig(id) + return cfg.reward +end + +function FundLevelData:getBigActId(stage) + stage = stage or self:getCurStage() + return self.PRO_GIFT_IDS[stage] +end + +function FundLevelData:getCurStage() + return self.curStage +end + +function FundLevelData:getRedPoint() + if not self:getIsOpen() then + return false + end + + return self:getMinUnclaimedStage() ~= nil +end + +function FundLevelData:canGetRewards(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + for _, id in ipairs(list) do + if self:getFreeCanGet(id) then + return true + end + if self:getProCanGet(id) then + return true + end + end + + return false +end + +-- 获取可领奖励的最小阶段 +function FundLevelData:getMinUnclaimedStage() + for i, stage in pairs(self:getUnlockStageList()) do + if self:canGetRewards(stage) then + return stage + end + end + return nil +end +-- 获取可领奖励的最小阶段 +function FundLevelData:getMaxUnclaimedStage() + local toStage = 1 + for i, stage in pairs(self:getUnlockStageList()) do + toStage = stage + end + return toStage +end +-- 获取可领奖励的最小索引 +function FundLevelData:getMinUnclaimedRewardIndex(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return 0 + end + for index, id in ipairs(list) do + if self:getFreeCanGet(id) then + return index + end + if self:getProCanGet(id) then + return index + end + end + for i = 1, #list do + if not self:getFreeGot(list[i]) then + return i + end + end + return #list +end +--获取最大可领取的id +function FundLevelData:getMaxUnclaimedId() + local list = self:getConfig() + local id = 0 + for k, v in pairs(list) do + local value = DataManager.PlayerData:getLv() >= v.level + if value then + if id == nil or id < v.id then + id = v.id + end + end + end + return id +end +-- 获取可领奖励的最大索引 +function FundLevelData:getMaxUnclaimedRewardIndex(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return 0 + end + for i = #list, 1, -1 do + if self:getFreeCanGet(list[i]) then + return i + end + if self:getProCanGet(list[i]) then + return i + end + end + for i = 1, #list do + if not self:getFreeGot(list[i]) then + return i + end + end + return #list +end + +-- 是否已经领取了全部奖励,包括付费的 +function FundLevelData:getIsAllClaimed() + for stage = 1, self:getStageCount() do + local list = self:getListByStage(stage) + if not self:getFreeGot(list[#list]) or not self:getProlGot(list[#list]) then + return false + end + end + + return true +end + +-- 阶段奖励是否领取完毕 +function FundLevelData:getIsAllClaimedByStage(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + if self:getFreeGot(list[#list]) and self:getProlGot(list[#list]) then + return true + end + + return false +end + +-- 阶段奖励是否全部已领取or可领取 +function FundLevelData:getIsAllCanGetByStage(stage) + stage = stage or self:getCurStage() + local list = self:getListByStage(stage) + if not list then + return false + end + + for _, id in ipairs(list) do + if not self:getFreeGot(id) and not self:getFreeCanGet(id) then + return false + end + if not self:getProlGot(id) and not self:getProCanGet(id) then + return false + end + end + + return true +end + +return FundLevelData \ No newline at end of file diff --git a/lua/app/userdata/fund_level/fund_level_data.lua.meta b/lua/app/userdata/fund_level/fund_level_data.lua.meta new file mode 100755 index 00000000..d9cf7d4f --- /dev/null +++ b/lua/app/userdata/fund_level/fund_level_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4c62fc8a2a3f618448c0ba5e0aa0bb60 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/payment/payment_data.lua b/lua/app/userdata/payment/payment_data.lua index a478d924..7aebc17a 100755 --- a/lua/app/userdata/payment/payment_data.lua +++ b/lua/app/userdata/payment/payment_data.lua @@ -326,9 +326,9 @@ end -- 免广告或者终身卡买了都算 function PaymentData:getIsSkipAd() - if DataManager.PrivilegeCardData:getIsSkipAd() then - return true - end + -- if DataManager.PrivilegeCardData:getIsSkipAd() then + -- return true + -- end return false end diff --git a/lua/app/userdata/sign.meta b/lua/app/userdata/sign.meta new file mode 100644 index 00000000..91930aed --- /dev/null +++ b/lua/app/userdata/sign.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99057ccbee9474ada8991bb6072fb990 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/sign/sign_month_data.lua b/lua/app/userdata/sign/sign_month_data.lua new file mode 100755 index 00000000..87a625bc --- /dev/null +++ b/lua/app/userdata/sign/sign_month_data.lua @@ -0,0 +1,257 @@ +local SignMonthData = class("SignMonthData", BaseData) + +function SignMonthData:ctor() + self.data.isDirty = false +end + +function SignMonthData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function SignMonthData:clear() + DataManager:unregisterCrossDayFunc("SignMonthData") + DataManager:unregisterTryOpenFunc("SignMonthData") +end + +function SignMonthData:initData(data) + data = data or {} + if EDITOR_MODE then + Logger.logHighlight("30天签到") + Logger.printTable(data) + end + + self.curDay = data.day or 0 + self.lastAT = data.last_at or nil + self.isAgain = data.again or false + self.accum = data.accum or {} + + -- 初始化配置 + self:initConfig() + self:setDirty() + DataManager:registerCrossDayFunc("SignMonthData", function() + if self.curDay == self:getConfigCount() then + self.curDay = 0 + self.accum = {} + end + self.isAgain = false + self:setDirty() + end) + -- 如果功能未开启 注册功能开启监听 + if not self:isOpen() then + DataManager:registerTryOpenFunc("SignMonthData", function() + if not self:isOpen(false, true) then + return + end + DataManager:unregisterTryOpenFunc("SignMonthData") + self:setDirty() + end) + end +end + +-- 初始化排序后的配置列表 +function SignMonthData:initConfig() + self.boxList = {} + self.configList = {} + for id, data in pairs(self:getConfig()) do + if data.count_reward~= nil then + table.insert(self.boxList, id) + end + table.insert(self.configList, data) + end + table.sort(self.boxList, function (a, b) + return a < b + end) +end + +function SignMonthData:getConfig(id) + if self._monthSigninCfg == nil then + self._monthSigninCfg = ConfigManager:getConfig("act_month_signin") + end + if id then + return self._monthSigninCfg[id] + else + return self._monthSigninCfg + end +end + +-- 是否开启 +function SignMonthData:isOpen(showToast) + if GFunc.isShenhe() then + return false + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SIGN_MONTH, not showToast) then + return false + end + return true +end + +-- 签到成功 天数+1 +function SignMonthData:setSignSucceed() + self.curDay = self:getCurDay() + 1 + self.lastAT = Time:getServerTime() + self:setDirty() +end + +function SignMonthData:setSignAgainSucceed() + self.isAgain = true + self:setDirty() +end + +-- 获得已签到天数 +function SignMonthData:getCurDay() + return self.curDay +end + +-- 宝箱领取成功 +function SignMonthData:setAccumClaimSucceed(day) + table.insert(self.accum, day) + self:setDirty() +end + +function SignMonthData:getAccumClaimID(index) + return self.boxList[index] +end + +function SignMonthData:showRedPoint() + if not self:isOpen() then + return false + end + if self:getCanSign() then + return true + end + for i = 1, #self.boxList do + if self:getBoxState(i) == GConst.SignConst.BOX_STATE.CAN_CLAIM then + return true + end + end + return false +end + +-- 获取奖励 +function SignMonthData:getReward(type, day) + local cfg = self.configList[day] + if type == GConst.SignConst.MONTH_REWARD_TYPE.SIGN then + return cfg.reward + elseif type == GConst.SignConst.MONTH_REWARD_TYPE.BOX then + return cfg.count_reward + end +end + +-- 获取循环时间 +function SignMonthData:getCycleDay() + return 30 +end + +function SignMonthData:getConfigCount() + return #self.configList +end + +--今天是否可以签到 +function SignMonthData:getCanSign() + if self.lastAT == nil then + return true + end + return not Time:getTimeIsToday(self.lastAT) +end + +--获取是否可以广告再次签到 +function SignMonthData:getCanSignAgain() + return self.isAgain +end + +-- 当前签到是否是今天 +function SignMonthData:getIsSignDay(day) + if self:getCanSign() and day == self:getCurDay() + 1 then + return true + end + return false +end + +function SignMonthData:getIsSignAgainDay(day) + if not self:getCanSign() and not self:getCanSignAgain() and day == self:getCurDay() then + return true + end + return false +end + +-- 是否已经领取 +function SignMonthData:getHasGotReward(type, day) + if type == GConst.SignConst.MONTH_REWARD_TYPE.SIGN then + return day <= self.getCurDay() + elseif type == GConst.SignConst.MONTH_REWARD_TYPE.BOX then + return self.accum[day] or false + end +end + +-- 是否可领取 +function SignMonthData:getSignState(day) + if self:getIsSignDay(day) then --可以签到 + return GConst.SignConst.SIGN_STATE.CAN_SIGN + else + if self:getIsSignAgainDay(day) then --可以再次签到 + return GConst.SignConst.SIGN_STATE.CAN_SIGN_AD + else + if day > self:getCurDay() then + return GConst.SignConst.SIGN_STATE.UNABLE_SIGN + else + return GConst.SignConst.SIGN_STATE.SIGNEDIN + end + end + end +end + +function SignMonthData:getBoxState(index) + local day = self.boxList[index] + if day then + local isClaimed = false + for k, v in pairs(self.accum) do + if day == v then + isClaimed = true + break + end + end + if isClaimed then + return GConst.SignConst.BOX_STATE.CLAIMED + else + if day <= self:getCurDay() then + return GConst.SignConst.BOX_STATE.CAN_CLAIM + else + return GConst.SignConst.BOX_STATE.UNABLE_CLAIM + end + end + end + return GConst.SignConst.BOX_STATE.UNABLE_CLAIM +end + +function SignMonthData:getSliderValue() + local curDay = self:getCurDay() + local startDay = 0 + local rangeIndex = 1 + for i, day in ipairs(self.boxList) do + if curDay <= day then + rangeIndex = i + break + --需要补充return + else + startDay = day + end + end + local percentRange = GConst.SignConst.SIGN_MONTH_SLIDER_RANG[rangeIndex] + if not percentRange then + -- 如果找不到对应的范围,返回默认值或处理错误 + return 0 + end + -- 计算区间的起始天数和结束天数 + local endDay = self.boxList[rangeIndex] + + -- 计算在区间内的比例(避免除零错误) + local ratio = 0 + if endDay > startDay then + ratio = (curDay - startDay) / (endDay - startDay) + end + + -- 线性插值计算最终百分比 + return percentRange[1] + ratio * (percentRange[2] - percentRange[1]) +end + +return SignMonthData \ No newline at end of file diff --git a/lua/app/userdata/sign/sign_month_data.lua.meta b/lua/app/userdata/sign/sign_month_data.lua.meta new file mode 100644 index 00000000..c05be3a4 --- /dev/null +++ b/lua/app/userdata/sign/sign_month_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 0c6e17bf6c6114076a08ec622e40c149 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/sign/sign_week_data.lua b/lua/app/userdata/sign/sign_week_data.lua new file mode 100755 index 00000000..41d62805 --- /dev/null +++ b/lua/app/userdata/sign/sign_week_data.lua @@ -0,0 +1,277 @@ +local SignWeekData = class("SignWeekData", BaseData) + +function SignWeekData:ctor() + self.startTime = 0 + self.endTime = 0 + self.claimedFree = {} + self.claimedPay = {} + + self.data.isDirty = false +end + +function SignWeekData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function SignWeekData:clear() + self.startTime = 0 + self.endTime = 0 + self.claimedFree = {} + self.claimedPay = {} + + DataManager:unregisterCrossDayFunc("SignWeekData") + DataManager:unregisterTryOpenFunc("SignWeekData") +end + +function SignWeekData:initData(data) + data = data or {} + if EDITOR_MODE then + Logger.logHighlight("七天签到战令数据") + Logger.printTable(data) + end + + self.season = data.season or self:getMaxSeason()-- 赛季 + self.startTime = data.open_at or 0-- 本赛季开启时间 + self.endTime = self.startTime + self:getCycleDay() * 86400 + -- 战令数据 + self.claimedFree = data.claimed_free or {} + self.claimedPay = data.claimed_pay or {} + -- 初始化配置 + self:initConfig() + + self:setDirty() + DataManager:registerCrossDayFunc("SignWeekData", function() + if self:isOpen() then + -- 跨周期 + if Time:getServerTime() >= self:getEndTime() then + self.season = self:getMaxSeason()-- 用最新的赛季 + self.startTime = Time:getDayBeginTimeStamp() + self.endTime = self.startTime + self:getCycleDay() * 86400 + self.claimedFree = {[1] = false} + self.claimedPay = {} + -- 初始化配置 + self:initConfig() + else -- 正常跨天 + local day = self:calculateDay() + if self:isUnlockPro() then + self.claimedFree[day] = false + self.claimedPay[day] = false + else + self.claimedFree[day] = false + end + end + self:setDirty() + end + end) + -- 如果功能未开启 注册功能开启监听 + if not self:isOpen() then + DataManager:registerTryOpenFunc("SignWeekData", function() + if not self:isOpen(false, true) then + return + end + DataManager:unregisterTryOpenFunc("SignWeekData") + + if EDITOR_MODE then + Logger.logHighlight("七天签到战令功能开启") + end + + self.season = self:getMaxSeason()-- 用最新的赛季 + self.startTime = Time:getDayBeginTimeStamp() + self.endTime = self.startTime + self:getCycleDay() * 86400 + self.claimedFree = {[1] = false} + self.claimedPay = {} + -- 初始化配置 + self:initConfig() + + self:setDirty() + end) + end +end + +-- 是否开启 +function SignWeekData:isOpen(showToast) + if GFunc.isShenhe() then + return false + end + if self.startTime and self.startTime > 0 then -- 如果已经开启过了则无视正常开启条件,直接开启 + return true + end + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SIGN_BOUNTY, not showToast) then + return false + end + return true +end + +-- 获取开始时间 +function SignWeekData:getStartTime() + return self.startTime or 0 +end + +-- 获取结束时间 +function SignWeekData:getEndTime() + return self.endTime or 0 +end + +-- 获取赛季剩余时间 +function SignWeekData:getRemainTime() + return self:getEndTime() - Time:getServerTime() +end + +-- 计算当前处于第几天 +function SignWeekData:calculateDay() + local diffTime = Time:getServerTime() - self:getStartTime() + local day = math.floor(diffTime / 86400) + 1 + return day +end + +-- 获得已签到天数 +function SignWeekData:getSignDay() + local totalDay = 0 + for k, v in pairs(self.claimedFree) do + if v then + totalDay = totalDay + 1 + end + end + return totalDay +end + +function SignWeekData:showRedPoint() + if not self:isOpen() then + return false + end + local day = self:calculateDay() + for i = 1, day do + if self:getCanGetReward(GConst.SignConst.REWARD_TYPE.FREE, i) then + return true + end + end + + return false +end + +function SignWeekData:getMaxSeason() + local maxSeason = 0 + for id, data in pairs(ConfigManager:getConfig("act_week_signin")) do + maxSeason = math.max(maxSeason, data.season) + end + return maxSeason +end + +-- 初始化排序后的配置列表 +function SignWeekData:initConfig() + self.configList = {} + for id, data in pairs(ConfigManager:getConfig("act_week_signin")) do + if data.season == self:getSeason() then + data.id = id + table.insert(self.configList, data) + end + end + table.sort(self.configList, function (a, b) + return a.id < b.id + end) +end + +function SignWeekData:getConfigList() + return self.configList or {} +end + +-- 最大等级 +function SignWeekData:getMaxLv() + return #self.configList +end + +-- 获取奖励 +function SignWeekData:getReward(type, day) + local cfg = self.configList[day] + if type == GConst.SignConst.REWARD_TYPE.FREE then + return cfg.reward + elseif type == GConst.SignConst.REWARD_TYPE.PRO then + return cfg.reward_pro + end +end + +-- 获取循环时间 +function SignWeekData:getCycleDay() + return 7 +end + +-- 获取高级奖励礼包id +function SignWeekData:getProRewardGiftId() + return GConst.SignConst.GIFT_ID[self:getSeason()] +end + +-- 获取奖励解锁状态 +function SignWeekData:isUnlockPro() + if not self:isOpen() then + return false + end + local boughtTime = DataManager.PaymentData:getGiftBoughtTime(PayManager.PURCHARSE_TYPE.ACT_GIFT, self:getProRewardGiftId()) + if self:getStartTime() <= boughtTime and boughtTime <= self:getEndTime() then + return true + end + return false +end +function SignWeekData:onBountyBuySuccess() + self:setDirty() +end +-- 是否已经领取 +function SignWeekData:getHasGotReward(type, day) + if type == GConst.SignConst.REWARD_TYPE.FREE then + return self.claimedFree[day] or false + elseif type == GConst.SignConst.REWARD_TYPE.PRO then + return self.claimedPay[day] or false + end +end + +-- 是否可领取 +function SignWeekData:getCanGetReward(type, day) + local curDay = self:calculateDay() + if day > curDay then + return false + else + local got = self:getHasGotReward(type, day) + if got then + return false + else + if type == GConst.SignConst.REWARD_TYPE.FREE then + if self.claimedFree[day] == false then + return true + end + elseif type == GConst.SignConst.REWARD_TYPE.PRO then + if self.claimedPay[day] == false then + return true + end + end + end + end + return false +end +function SignWeekData:getMinCanGetRewardDay() + local day = self:calculateDay() + for i = 1, day do + if self:getCanGetReward(GConst.SignConst.REWARD_TYPE.FREE, i) then + return i + end + if self:isUnlockPro() and self:getCanGetReward(GConst.SignConst.REWARD_TYPE.PRO, i) then + return i + end + end + return day +end +function SignWeekData:getSeason() + return self.season +end + +function SignWeekData:getReSignCost() + return GFunc.getConstCost("act_bounty_buy_cost") +end + +-- 解锁高级奖励 +function SignWeekData:onUnlockPro() + -- 请求领取所有奖励 + ModuleManager.SignManager:reqSignClaimed(nil, true) + + self:setDirty() +end + +return SignWeekData \ No newline at end of file diff --git a/lua/app/userdata/sign/sign_week_data.lua.meta b/lua/app/userdata/sign/sign_week_data.lua.meta new file mode 100644 index 00000000..45db2321 --- /dev/null +++ b/lua/app/userdata/sign/sign_week_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f893ec26c7cacce47b5611f969fb09b2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}