diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index db4ac76f..6b1b4404 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -23,23 +23,14 @@ function DataManager:init() self:initManager("TutorialData", "app/userdata/tutorial/tutorial_data") self:initManager("MailData", "app/userdata/mail/mail_data") self:initManager("ActivityData", "app/userdata/activity/activity_data") - self:initManager("GoldPigData", "app/userdata/activity/gold_pig/gold_pig_data") self:initManager("BountyData", "app/userdata/bounty/bounty_data") self:initManager("ArenaBountyData", "app/userdata/arena/arena_bounty_data") 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("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") - self:initManager("FullMoonData", "app/userdata/activity/full_moon/full_moon_data") - self:initManager("TournWaveData", "app/userdata/activity/tourn_wave/tourn_wave_data") - self:initManager("TournArenaData", "app/userdata/activity/tourn_arena/tourn_arena_data") self:initManager("AIHelperData", "app/userdata/game_setting/ai_helper_data") - self:initManager("HeroFundData", "app/userdata/activity/hero_fund/hero_fund_data") - self:initManager("ActBossRushData", "app/userdata/activity/act_boss_rush/act_boss_rush_data") - self:initManager("FourteenDayData", "app/userdata/activity/fourteen_day/fourteen_day_data") - self:initManager("ActPvpData", "app/userdata/activity/act_pvp/act_pvp_data") self:initManager("TalentData", "app/userdata/talent/talent_data") self:initManager("GiftPopData", "app/userdata/gift_pop/gift_pop_data") self:initManager("PaymentData", "app/userdata/payment/payment_data") @@ -48,6 +39,7 @@ function DataManager:init() 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") + self:initManager("ActSevenDayData", "app/userdata/activity/act_seven_day/act_seven_day_data") end function DataManager:initManager(name, path) @@ -147,7 +139,6 @@ function DataManager:initWithServerData(data) self.CollectionData:init(data.collection) self.TutorialData:init(data.guide) self.MailData:init(data.mail_info) - self.GoldPigData:init(data.pig, true) self.BountyData:init(data.bounty) self.ArenaBountyData:init(data.arena_bounty) self.ArenaData:initGiftInfo(data.act_arena_gift, true) @@ -177,12 +168,12 @@ function DataManager:initWithServerData(data) self.SignMonthData:initData(data.sign_30) -- 活动要在礼包后初始化 self.ActivityData:init() + self.ActSevenDayData:initData(data.seven_days, true) -- 商店礼包都初始化完了后检查一下每日红点 -- self.ShopData:checkShopDiscountRedPoint() -- self.ShopData:checkLoginPopInfo() -- 需要写在shopdata所有初始化之后 self.SummonData:init(data.summon_data.summons) self.AIHelperData:init(nil, true) - self.FourteenDayData:init(data.fourteen_bounty) -- 任务数据最后初始化,依赖其他模块的数据 self.TaskData:init() @@ -292,7 +283,7 @@ function DataManager:scheduleGlobal() return end - self.crossDayTS = Time:getOverOfServerToday() + self.crossDayTS = Time:getDayOverTimeStamp() self.cacheTimer = SchedulerManager:scheduleGlobal(function (inter) for k, v in ipairs(self.cdCallBack) do if self[v] and self[v].updateCd then @@ -301,7 +292,7 @@ function DataManager:scheduleGlobal() end if Time:getServerTime() > self.crossDayTS then - self.crossDayTS = Time:getOverOfServerToday() + self.crossDayTS = Time:getDayOverTimeStamp() if self.crossDayCallbacks then for i, info in ipairs(self.crossDayCallbacks) do if info.func and info.open then diff --git a/lua/app/common/module_manager.lua b/lua/app/common/module_manager.lua index 9a174770..cd20b102 100644 --- a/lua/app/common/module_manager.lua +++ b/lua/app/common/module_manager.lua @@ -27,8 +27,6 @@ local MODULE_PATHS = { DailyChallengeManager = "app/module/daily_challenge/daily_challenge_manager", -- 挂机 IdleManager = "app/module/idle/idle_manager", - -- 七天乐 - SevenDayManager = "app/module/activity/seven_day/seven_day_manager", -- 基金 FundManager = "app/module/fund/fund_manager", -- 设置 @@ -71,22 +69,8 @@ local MODULE_PATHS = { SkinManager = "app/module/skin/skin_manager", -- 皮肤 RunesManager = "app/module/runes/runes_manager", - -- 英雄基金 - HeroFundManager = "app/module/activity/hero_fund/hero_fund_manager", - -- 世界首领活动 - ActBossRushManager = "app/module/activity/act_boss_rush/act_boss_rush_manager", - -- 新手14天乐 - FourteenDayManager = "app/module/activity/fourteen_day/fourteen_day_manager", - -- 圆月活动 - FullMoonManager = "app/module/activity/full_moon/full_moon_manager", - -- 波次锦标赛活动 - TournWaveManager = "app/module/activity/tourn_wave/tourn_wave_manager", - -- 竞技场锦标赛活动 - TournArenaManager = "app/module/activity/tourn_arena/tourn_arena_manager", -- 符文副本 DungeonRuneManager = "app/module/dungeon_rune/dungeon_rune_manager", - -- 梦魇酒馆 - ActPvpManager = "app/module/activity/act_pvp/act_pvp_manager", -- 天赋 TalentManager = "app/module/talent/talent_manager", BagManager = "app/module/bag/bag_manager", @@ -98,6 +82,8 @@ local MODULE_PATHS = { FundChapterManager = "app/module/fund_chapter/fund_chapter_manager", -- 签到 SignManager = "app/module/sign/sign_manager", + -- 活动七天乐 + ActSevenDayManager = "app/module/activity/act_seven_day/act_seven_day_manager", } -- 这里的key对应func_open里的id @@ -140,6 +126,9 @@ ModuleManager.MODULE_KEY = { -- 签到 SIGN_BOUNTY = "signin_bounty", SIGN_MONTH = "signin_30", + -- 七天乐 + ACT_SEVENDAY = "act_sevenday", + ACT_SEVENDAY_2 = "act_sevenday_2", } local _moduleMgrs = {} @@ -164,7 +153,6 @@ function ModuleManager:init() ModuleManager.DailyChallengeManager:init() ModuleManager.PlayerManager:init() ModuleManager.SkinManager:init() - ModuleManager.TournArenaManager:init() end -- 功能是否开启 @@ -226,6 +214,14 @@ function ModuleManager:getOpenStageId(key) return cfg.stage end +function ModuleManager:getOpenDay(key) + local cfg = ConfigManager:getConfig("func_open")[key] + if not cfg or cfg.time == nil then + return + end + return cfg.time +end + function ModuleManager:clear() for k, v in ipairs(_moduleMgrs) do v:_clear() diff --git a/lua/app/common/pay_manager.lua b/lua/app/common/pay_manager.lua index 22d63f75..12e4c845 100644 --- a/lua/app/common/pay_manager.lua +++ b/lua/app/common/pay_manager.lua @@ -32,7 +32,8 @@ PayManager.PURCHARSE_ACT_TYPE = { -- RUNES_GIFT = 21, -- TOURN_WAVE_GIFT = 23, -- TOURN_ARENA_GIFT = 24, - GIFT_POP_CHAPTER = 10, + GIFT_POP_CHAPTER = 10, -- 章节礼包 + ACT_SEVEN_DAY = 15, -- 七天乐 } PayManager.PURCHARSE_TYPE_CONFIG = { diff --git a/lua/app/common/server_push_manager.lua b/lua/app/common/server_push_manager.lua index cc521e68..8c2a1435 100644 --- a/lua/app/common/server_push_manager.lua +++ b/lua/app/common/server_push_manager.lua @@ -16,13 +16,13 @@ function ServerPushManager:initWhenLogin() self:addServerPushListener(ProtoMsgType.FromMsgEnum.BountyBoughtNtf, ModuleManager.BountyManager, ModuleManager.BountyManager.onBoughtBountyFinish) self:addServerPushListener(ProtoMsgType.FromMsgEnum.ArenaBountyBoughtNtf, ModuleManager.ArenaBountyManager, ModuleManager.ArenaBountyManager.onBoughtBountyFinish) self:addServerPushListener(ProtoMsgType.FromMsgEnum.NewMailNtf, ModuleManager.MailManager, ModuleManager.MailManager.needUpdateMail) - self:addServerPushListener(ProtoMsgType.FromMsgEnum.PigLevelUpNtf, ModuleManager.ActivityManager, ModuleManager.ActivityManager.onBoughtGoldPigFinish) + -- self:addServerPushListener(ProtoMsgType.FromMsgEnum.PigLevelUpNtf, ModuleManager.ActivityManager, ModuleManager.ActivityManager.onBoughtGoldPigFinish) self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerLevelUpGiftNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerLevelUpGift) self:addServerPushListener(ProtoMsgType.FromMsgEnum.TriggerGrowUpGift2Ntf, ModuleManager.ShopManager, ModuleManager.ShopManager.onTriggerGrowUpGift) -- self:addServerPushListener(ProtoMsgType.FromMsgEnum.MallDailyResetNtf, ModuleManager.ShopManager, ModuleManager.ShopManager.onMallDailyReset) self:addServerPushListener(ProtoMsgType.FromMsgEnum.AIHelpUnreadNtf, ModuleManager.GameSettingManager, ModuleManager.GameSettingManager.rspAiHelperNtf) self:addServerPushListener(ProtoMsgType.FromMsgEnum.RecoveryNtf, ModuleManager.ItemManager, ModuleManager.ItemManager.rspRecoveryNtf) - self:addServerPushListener(ProtoMsgType.FromMsgEnum.BossRushBoughtNtf, ModuleManager.ActBossRushManager, ModuleManager.ActBossRushManager.rspBossRushBoughtNtf) + -- self:addServerPushListener(ProtoMsgType.FromMsgEnum.BossRushBoughtNtf, ModuleManager.ActBossRushManager, ModuleManager.ActBossRushManager.rspBossRushBoughtNtf) -- self:addServerPushListener(ProtoMsgType.FromMsgEnum.RuneUpdateNtf, ModuleManager.RunesManager, ModuleManager.RunesManager.rspUpdate) end diff --git a/lua/app/common/time.lua b/lua/app/common/time.lua index dc3c4bc2..76a2af4d 100644 --- a/lua/app/common/time.lua +++ b/lua/app/common/time.lua @@ -8,13 +8,24 @@ local SECONDS_PRE_DAY = 86400 local SECONDS_PRE_HOUR = 3600 local SECONDS_PRE_MINUTE = 60 local DAY_PER_HOUR = 24 +local DAY_PRE_WEEK = 7 local ZERO_TIME_STR = "00:00:00" local ZERO_TIME_STR_2 = "00:00" local UnityTime = CS.UnityEngine.Time --- 获取服务器的当前时间戳 +-- 获取时间格式(时间戳转本地时间格式) +function Time:getTimeFormat(timestamp) + return os.date('*t', timestamp) +end + +-- 获取时间格式(时间戳转世界时间格式) +function Time:getTimeFormatUTC(timestamp) + return os.date('!*t', timestamp) +end + +-- 获取服务器的当前时间戳(当前服务器是UTC-0) function Time:getServerTime() if not self.serverTime then return os.time() @@ -22,6 +33,19 @@ function Time:getServerTime() return self.serverTime + self.differenceTime + GFunc.getTickCount() end +-- 获取服务器的转本地时区的当前时间戳 +function Time:getServerTimeLocal() + return self:getServerTime() + self:getTimeZoneOffset() * SECONDS_PRE_HOUR +end + +-- 获取服务器的当前时间戳(毫秒级) +function Time:getServerTime2() + if not self.serverTime2 then + return os.time() * 1000 + end + return self.serverTime2 + self.differenceTime2 + GFunc.getTickCount2() +end + function Time:getRealtimeSinceStartup() return UnityTime.realtimeSinceStartup end @@ -39,7 +63,7 @@ function Time:getCertainTime(data) local hour = data.hour or 0 local minute = data.minute or 0 local second = data.second or 0 - return os.time({day = day, month = month, year = year, hour = hour, min = minute, sec = second}) + return os.time({ day = day, month = month, year = year, hour = hour, min = minute, sec = second }) end -- 得到特定时间的时间戳 @@ -50,7 +74,7 @@ function Time:getCertainTimeByStr(timeStr) end timeStr = string.trim(timeStr) local timeTab = {} - for i,v in string.gmatch(timeStr, "%d+") do + for i, v in string.gmatch(timeStr, "%d+") do -- print(i, v) table.insert(timeTab, i) end @@ -60,39 +84,27 @@ function Time:getCertainTimeByStr(timeStr) local hour = timeTab[4] local minute = timeTab[5] local second = timeTab[6] - local time = os.time({day = day, month = month, year = year, hour = hour, min = minute, sec = second}) + Time:getClientTimeZone()*3600 + local timeStr = { day = day, month = month, year = year, hour = hour, min = minute, sec = second } + local time = Time:getCertainTime(timeStr) + Time:getTimeZoneOffset() * SECONDS_PRE_HOUR return math.floor(time) end -- 格式化时间,返回os.data(finalTime) function Time:formatTimeExact(time) local endTime = self:getServerTime() + time - return os.date("*t", endTime) + return self:getTimeFormat(endTime) end --- 格式化y/m/d时间,返回os.data(finalTime) -function Time:formatTimeYMD(time) - time = time or Time:getServerTime() - local date = os.date("!*t", time) - return date.year .. "/" .. date.month .. "/" .. date.day -end - --- 格式化y/m/d/h/m/s时间,返回os.data(finalTime) -function Time:formatTimeYMDHMS(time) - time = time or Time:getServerTime() - local date = os.date("!*t", time) - return date.year .. "/" .. date.month .. "/" .. date.day .. " " .. date.hour .. ":" .. date.min .. ":" .. date.sec -end - - function Time:updateServerTimeToday(todayTime) todayTime = todayTime or 0 - self.todayTime = GFunc.formatTimeStep(todayTime) + self.todayTime = todayTime // 1000 end function Time:updateServerTime(serverTime) self.serverTime = (serverTime or 0) // 1000 + self.serverTime2 = serverTime or 0 -- 毫秒级 self.differenceTime = -GFunc.getTickCount() + self.differenceTime2 = -GFunc.getTickCount2() if EDITOR_MODE then Logger.log("updateServerTime:%s", self.differenceTime) end @@ -104,7 +116,8 @@ function Time:updateByServer(serverTime, todayTime) end function Time:setServerTimeZone(timeZone) - self.timeZoneOffset = timeZone - self:getClientTimeZone() + self.timeZoneOffset = math.floor(timeZone - self:getClientTimeZone()) + self.serverTimeZone = timeZone end function Time:getClientTimeZone() @@ -120,56 +133,18 @@ function Time:getTimeZoneOffset() end function Time:getBeginningOfServerToday() - if Time:getServerTime() > self.todayTime + 86400 then + if self:getServerTime() > self.todayTime + 86400 then self.todayTime = self.todayTime + 86400 end return self.todayTime end -function Time:getOverOfServerToday(time) - if time then - local passS = time % SECONDS_PRE_DAY - if passS > 0 then - return time + SECONDS_PRE_DAY - passS - end - return time + SECONDS_PRE_DAY - end - return self:getBeginningOfServerToday() + SECONDS_PRE_DAY -end - --- 获取今日剩余时间 -function Time:getTodaySurplusTime() - local result = self:getOverOfServerToday() - self:getServerTime() - if result < 0 then - result = 0 - end - return result -end - -function Time:getBeginningOfToday() - local now = os.date('*t', self:getServerTime() + self:getTimeZoneOffset()*SECONDS_PRE_HOUR) - local beginDay = os.time{year = now.year, month = now.month, day = now.day, hour = 0} - return beginDay - self:getTimeZoneOffset()*SECONDS_PRE_HOUR -end - -function Time:getBeginningOfOneDay(t) - local now = os.date('*t', t + self:getTimeZoneOffset()*SECONDS_PRE_HOUR) - local beginDay = os.time{year = now.year, month = now.month, day = now.day, hour = 0} - return beginDay - self:getTimeZoneOffset()*SECONDS_PRE_HOUR -end - --- 判断时间是否是大于等于今天 -function Time:getTimeIsToday(time) - local todayBegin = self:getBeginningOfToday() - return time >= todayBegin -end - function Time:splitTime(time) time = math.floor(time) local reduceD = time % SECONDS_PRE_DAY - local day = math.floor(time/SECONDS_PRE_DAY) + local day = math.floor(time / SECONDS_PRE_DAY) local reduceH = reduceD % SECONDS_PRE_HOUR - local hour = math.floor(reduceD/SECONDS_PRE_HOUR) + local hour = math.floor(reduceD / SECONDS_PRE_HOUR) local minute = math.floor(reduceH / SECONDS_PRE_MINUTE) local second = reduceH % SECONDS_PRE_MINUTE return day, hour, minute, second @@ -177,8 +152,8 @@ end -- 根据秒换算成向上取整hour的时间 function Time:getCeilHourTime(time) - local count = time // 3600 - if time % 3600 > 0 then + local count = time // SECONDS_PRE_HOUR + if time % SECONDS_PRE_HOUR > 0 then count = count + 1 end return count @@ -193,19 +168,7 @@ function Time:getCeilPerSecend(time, per) return count end -function Time:getDayofWeek(time) - local curTime = time or self:getServerTime() - local day = tonumber(os.date("%w", curTime)) - day = day == 0 and 7 or day - return day -end - -function Time:getDayofWeekUTC(time) - local curTime = time or self:getServerTime() - local day = tonumber(os.date("!%w", curTime)) - day = day == 0 and 7 or day - return day -end +-- 格式化文案 ---------------------------------------------------------------------------------------------------------------------------------------- -- 00:00:00 function Time:formatNumTime(time) @@ -238,9 +201,9 @@ function Time:formatNumTimeStr(time) if time >= SECONDS_PRE_DAY then -- 大于1天显示:X天X时 return I18N:getGlobalText(I18N.GlobalConst.TIME_STR_DH, day, hour) else - if time >= SECONDS_PRE_HOUR then -- 小于1天显示:X时X分 + if time >= SECONDS_PRE_HOUR then -- 小于1天显示:X时X分 return I18N:getGlobalText(I18N.GlobalConst.TIME_STR_HM, hour, minute) - else --小于1小时显示:X分X秒 + else --小于1小时显示:X分X秒 return I18N:getGlobalText(I18N.GlobalConst.TIME_STR_MS, minute, second) end end @@ -265,61 +228,165 @@ function Time:formatBeforeTimeStr(time) end end ----- 得到time周开始时的时间戳 +-- 格式化y/m/d时间,返回os.data(finalTime) +function Time:formatTimeYMD(time) + time = time or self:getServerTime() + local date = self:getTimeFormat(time) + return date.year .. "/" .. date.month .. "/" .. date.day +end + +-- 格式化y/m/d/h/m/s时间,返回os.data(finalTime) +function Time:formatTimeYMDHMS(time) + time = time or Time:getServerTime() + local date = self:getTimeFormat(time) + return date.year .. "/" .. date.month .. "/" .. date.day .. " " .. date.hour .. ":" .. date.min .. ":" .. date.sec +end + +-- 格式化y-m-d h:m:s时间,返回os.data(finalTime) +function Time:formatTimeYMDHMS2(time) + time = time or Time:getServerTime() + local date = self:getTimeFormat(time) + return date.year .. "-" .. date.month .. "-" .. date.day .. " " .. date.hour .. ":" .. date.min .. ":" .. date.sec +end + +-- 日相关时间接口 ------------------------------------------------------------------------------------------------------------------------ + +-- time日开始时的时间戳 +function Time:getDayBeginTimeStamp(time) + time = time or self:getServerTime() + local now = self:getTimeFormatUTC(time) + local beginDay = os.time { year = now.year, month = now.month, day = now.day, hour = 0 } + return math.floor(beginDay - self:getTimeZoneOffset() * SECONDS_PRE_HOUR) +end + +-- time日结束时的时间戳 +function Time:getDayOverTimeStamp(time) + time = time or self:getServerTime() + local dateTable = self:getTimeFormatUTC(time) + local nextDay = os.time { year = dateTable.year, month = dateTable.month, day = dateTable.day + 1, hour = 0, min = 0, sec = 0 } + return math.floor(nextDay - self:getTimeZoneOffset() * SECONDS_PRE_HOUR) +end + +-- 获取今日剩余时间 +function Time:getTodaySurplusTime() + local result = self:getDayOverTimeStamp() - self:getServerTime() + if result < 0 then + result = 0 + end + return result +end + +-- 判断时间是否是大于等于今天 +function Time:getTimeIsToday(time) + local todayBegin = self:getDayBeginTimeStamp() + return time >= todayBegin +end + +-- 获取今天距目标日期的天数 +function Time:getDistanceDays(time) + local nowNum = self:getDayBeginTimeStamp(self:getServerTime()) + local targetNum = self:getDayBeginTimeStamp(time) + return (nowNum - targetNum) / 24 / 60 / 60 +end + +-- 周相关时间接口 ------------------------------------------------------------------------------------------------------------------------ + +-- time周开始时的时间戳 function Time:getWeekBeginTimeStamp(time) time = time or self:getServerTime() local remainDay = -self:getDayofWeek(time) - return self:getOverOfServerToday(time) + remainDay * SECONDS_PRE_DAY + return math.floor(self:getDayOverTimeStamp(time) + remainDay * SECONDS_PRE_DAY) end ----- 得到time周结束时的时间戳 +-- time周结束时的时间戳 function Time:getWeekOverTimeStamp(time) time = time or self:getServerTime() local remainDay = 7 - self:getDayofWeek(time) - return self:getOverOfServerToday(time) + remainDay * SECONDS_PRE_DAY + return math.floor(self:getDayOverTimeStamp(time) + remainDay * SECONDS_PRE_DAY) end ----- 得到time月结束的时间戳 +-- 获取本周剩余时间 +function Time:getWeekSurplusTime() + local result = self:getWeekOverTimeStamp() - self:getServerTime() + if result < 0 then + result = 0 + end + return result +end + +-- time时间在周第几天 +function Time:getDayofWeek(time) + local curTime = time or self:getServerTime() + local day = tonumber(os.date("!%w", curTime)) + day = day == 0 and 7 or day + return day +end + +-- 月相关时间接口 ------------------------------------------------------------------------------------------------------------------------ + +-- time月开始的时间戳 +function Time:getMonthBeginTimeStamp(time) + time = time or self:getServerTime() + local day = self:getDayofMonth(time) - 1 + return math.floor(self:getDayBeginTimeStamp(time) - day * SECONDS_PRE_DAY) +end + +-- time月结束的时间戳 function Time:getMonthOverTimeStamp(time) time = time or self:getServerTime() - local now = os.date('!*t', time) + local now = self:getTimeFormatUTC(time) now.month = now.month + 1 if now.month > 12 then now.year = now.year + now.month // 12 now.month = now.month % 12 end - local remainDay = os.date("%d", os.time({year = now.year, month = now.month, day = 0})) - now.day - return self:getOverOfServerToday(time) + remainDay * SECONDS_PRE_DAY + local remainDay = os.date("%d", os.time({ year = now.year, month = now.month, day = 0 })) - now.day + return math.floor(self:getDayOverTimeStamp(time) + remainDay * SECONDS_PRE_DAY) end ----- 得到当前处于本月的第几天 -function Time:getDayByTimeStamp(time) +-- time时间在月第几天 +function Time:getDayofMonth(time) time = time or self:getServerTime() - local now = os.date('!*t', time) + local now = self:getTimeFormatUTC(time) return now.day end --- 获取当前处于星期几 -function Time:getWeekByTimeStamp(time) - time = time or self:getServerTime() - local now = os.date('!*t', time) +-- 其他接口 ------------------------------------------------------------------------------------------------------------------------ - local weekTab = {7, 1, 2, 3, 4, 5, 6} - return weekTab[now.wday] +function Time:getXDaySecond(day) + return day * SECONDS_PRE_DAY end --- 获取今天距目标日期的天数 -function Time:getDistanceDays(time) - local nowNum = self:getBeginningOfOneDay(self:getServerTime()) - local targetNum = self:getBeginningOfOneDay(time) - return (nowNum - targetNum)/24/60/60 +function Time:getAWeekSecond() + return self:getXDaySecond(DAY_PRE_WEEK) end --- 转换服务器时间字符串(ISO 8601)的对应的时间戳,例如2022-09-10T18:10:00.000Z -function Time:convertServerTimeStringToTimestamp(str) - local dateTime = CS.System.DateTime.Parse(str) - local dateTimeOffset = CS.System.DateTimeOffset(dateTime) - return dateTimeOffset:ToUnixTimeSeconds() +--以秒为单位 计算时间差 返回 是否达到时间,剩余时间00:00:00 +function Time:checkTimeByMinutes(lastTriggerTime, minutes) + -- 计算从上次触发到现在经过的秒数 + local currentTime = Time:getServerTime() + local elapsedSeconds = currentTime - lastTriggerTime + Logger.logHighlight(elapsedSeconds) + local freeSeconds = minutes * 60 + -- 计算是否达到时间 + if elapsedSeconds >= freeSeconds then + Logger.logHighlight(freeSeconds) + return true, nil + else + -- 计算剩余的秒数 + local remainingSeconds = freeSeconds - elapsedSeconds + Logger.logHighlight(remainingSeconds) + -- 计算小时数 + local hours = math.floor(remainingSeconds / 3600) + -- 计算剩余的分钟数 + local minutes = math.floor((remainingSeconds % 3600) / 60) + -- 计算剩余的秒数 + local seconds = remainingSeconds % 60 + + -- 格式化时间为 00:00:00 的形式 + local formattedTime = string.format("%02d:%02d:%02d", hours, minutes, seconds) + return false, formattedTime + end end -return Time \ No newline at end of file +return Time diff --git a/lua/app/config/act_sevenday_quest.lua b/lua/app/config/act_sevenday_quest.lua index 48c1adec..f07c40ff 100644 --- a/lua/app/config/act_sevenday_quest.lua +++ b/lua/app/config/act_sevenday_quest.lua @@ -1,955 +1,6317 @@ local act_sevenday_quest = { - [1]={ + [201]={ ["day"]=1, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - } - }, - [2]={ - ["day"]=1, - ["number"]=2, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [3]={ - ["day"]=1, - ["number"]=1, - ["type"]=28, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [4]={ - ["day"]=1, - ["number"]=3, - ["type"]=25, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - } - }, - [5]={ - ["day"]=1, - ["number"]=5, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [6]={ - ["day"]=1, - ["number"]=3, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - } - }, - [7]={ - ["day"]=1, - ["number"]=50, ["type"]=26, + ["number"]=1, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } } }, - [8]={ + [202]={ ["day"]=1, - ["number"]=50, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [9]={ - ["day"]=1, - ["number"]=1000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - } - }, - [10]={ - ["day"]=1, - ["number"]=5, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [11]={ - ["day"]=2, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=2, - ["num_for_nothing"]="VA==" - } - }, - [12]={ - ["day"]=2, - ["number"]=4, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [13]={ - ["day"]=2, - ["number"]=3, - ["type"]=28, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [14]={ - ["day"]=2, - ["number"]=4, - ["type"]=25, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [15]={ - ["day"]=2, - ["number"]=7, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [16]={ - ["day"]=2, - ["number"]=5, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [17]={ - ["day"]=2, - ["number"]=100, - ["type"]=26, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [18]={ - ["day"]=2, - ["number"]=400, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [19]={ - ["day"]=2, - ["number"]=3000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [20]={ - ["day"]=2, - ["number"]=10, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [21]={ - ["day"]=3, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [22]={ - ["day"]=3, - ["number"]=5, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [23]={ - ["day"]=3, - ["number"]=1, - ["type"]=29, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [24]={ - ["day"]=3, - ["number"]=8, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [25]={ - ["day"]=3, - ["number"]=7, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [26]={ - ["day"]=3, - ["number"]=150, - ["type"]=26, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [27]={ - ["day"]=3, - ["number"]=800, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [28]={ - ["day"]=3, - ["number"]=6000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [29]={ - ["day"]=3, - ["number"]=100, - ["type"]=15, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [30]={ - ["day"]=3, - ["number"]=15, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [31]={ - ["day"]=4, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [32]={ - ["day"]=4, - ["number"]=6, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [33]={ - ["day"]=4, - ["number"]=2, - ["type"]=29, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" - } - }, - [34]={ - ["day"]=4, - ["number"]=5, - ["type"]=25, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [35]={ - ["day"]=4, - ["number"]=9, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [36]={ - ["day"]=4, - ["number"]=9, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [37]={ - ["day"]=4, - ["number"]=200, - ["type"]=26, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [38]={ - ["day"]=4, - ["number"]=1000, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [39]={ - ["day"]=4, - ["number"]=10000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [40]={ - ["day"]=4, - ["number"]=20, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [41]={ - ["day"]=5, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [42]={ - ["day"]=5, - ["number"]=7, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [43]={ - ["day"]=5, - ["number"]=1, - ["type"]=7, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - [44]={ - ["day"]=5, - ["number"]=6, - ["type"]=25, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [45]={ - ["day"]=5, - ["number"]=10, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [46]={ - ["day"]=5, - ["number"]=12, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [47]={ - ["day"]=5, - ["number"]=300, - ["type"]=26, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [48]={ - ["day"]=5, - ["number"]=1500, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [49]={ - ["day"]=5, - ["number"]=12000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [50]={ - ["day"]=5, - ["number"]=400, - ["type"]=13, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [51]={ - ["day"]=5, - ["number"]=25, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [52]={ - ["day"]=6, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [53]={ - ["day"]=6, - ["number"]=9, - ["type"]=24, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [54]={ - ["day"]=6, - ["number"]=3, - ["type"]=29, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - [55]={ - ["day"]=6, - ["number"]=11, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" - } - }, - [56]={ - ["day"]=6, - ["number"]=14, - ["type"]=23, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [57]={ - ["day"]=6, - ["number"]=400, - ["type"]=26, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" - } - }, - [58]={ - ["day"]=6, - ["number"]=2000, - ["type"]=3, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" - } - }, - [59]={ - ["day"]=6, - ["number"]=15000, - ["type"]=2, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [60]={ - ["day"]=6, - ["number"]=100, ["type"]=16, + ["number"]=20, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=6, - ["num_for_nothing"]="UA==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, - [61]={ - ["day"]=6, - ["number"]=30, - ["type"]=1, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [62]={ - ["day"]=6, - ["number"]=150, - ["type"]=12, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } - }, - [63]={ - ["day"]=7, - ["number"]=1, - ["type"]=22, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=3, - ["num_for_nothing"]="VQ==" - } - }, - [64]={ - ["day"]=7, + [203]={ + ["day"]=1, + ["type"]=34, ["number"]=10, - ["type"]=24, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, - [65]={ - ["day"]=7, - ["number"]=2, - ["type"]=7, + [204]={ + ["day"]=1, + ["type"]=29, + ["number"]=1000, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, - [66]={ - ["day"]=7, - ["number"]=7, - ["type"]=25, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - [67]={ - ["day"]=7, - ["number"]=12, - ["type"]=27, - ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" - } - }, - [68]={ - ["day"]=7, - ["number"]=16, + [205]={ + ["day"]=1, ["type"]=23, + ["number"]=5, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, - [69]={ - ["day"]=7, - ["number"]=500, + [206]={ + ["day"]=2, ["type"]=26, + ["number"]=1, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } } }, - [70]={ - ["day"]=7, - ["number"]=3000, - ["type"]=3, + [207]={ + ["day"]=2, + ["type"]=16, + ["number"]=40, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, - [71]={ + [208]={ + ["day"]=2, + ["type"]=31, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [209]={ + ["day"]=2, + ["type"]=27, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [210]={ + ["day"]=2, + ["type"]=29, + ["number"]=2000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [211]={ + ["day"]=3, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [212]={ + ["day"]=3, + ["type"]=34, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [213]={ + ["day"]=3, + ["type"]=16, + ["number"]=80, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [214]={ + ["day"]=3, + ["type"]=38, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [215]={ + ["day"]=3, + ["type"]=39, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [216]={ + ["day"]=4, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [217]={ + ["day"]=4, + ["type"]=41, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [218]={ + ["day"]=4, + ["type"]=45, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [219]={ + ["day"]=4, + ["type"]=28, + ["number"]=15, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [220]={ + ["day"]=4, + ["type"]=27, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [221]={ + ["day"]=5, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [222]={ + ["day"]=5, + ["type"]=34, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [223]={ + ["day"]=5, + ["type"]=21, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [224]={ + ["day"]=5, + ["type"]=38, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [225]={ + ["day"]=5, + ["type"]=29, + ["number"]=5000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [226]={ + ["day"]=6, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [227]={ + ["day"]=6, + ["type"]=42, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [228]={ + ["day"]=6, + ["type"]=32, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [229]={ + ["day"]=6, + ["type"]=28, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [230]={ + ["day"]=6, + ["type"]=27, + ["number"]=60, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [231]={ ["day"]=7, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [232]={ + ["day"]=7, + ["type"]=36, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=60, + ["num_for_nothing"]="UAg=" + } + } + }, + [233]={ + ["day"]=7, + ["type"]=21, + ["number"]=50, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [234]={ + ["day"]=7, + ["type"]=38, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [235]={ + ["day"]=7, + ["type"]=39, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=31, + ["id_for_nothing"]="VQk=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [236]={ + ["day"]=8, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [237]={ + ["day"]=8, + ["type"]=16, + ["number"]=160, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [238]={ + ["day"]=8, + ["type"]=46, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [239]={ + ["day"]=8, + ["type"]=29, + ["number"]=10000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [240]={ + ["day"]=8, + ["type"]=23, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [241]={ + ["day"]=9, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [242]={ + ["day"]=9, + ["type"]=34, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [243]={ + ["day"]=9, + ["type"]=43, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [244]={ + ["day"]=9, + ["type"]=38, + ["number"]=40, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [245]={ + ["day"]=9, + ["type"]=28, + ["number"]=60, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [246]={ + ["day"]=10, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [247]={ + ["day"]=10, + ["type"]=35, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [248]={ + ["day"]=10, + ["type"]=21, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [249]={ + ["day"]=10, + ["type"]=39, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [250]={ + ["day"]=10, + ["type"]=27, + ["number"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [251]={ + ["day"]=11, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [252]={ + ["day"]=11, + ["type"]=32, + ["number"]=4, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [253]={ + ["day"]=11, + ["type"]=45, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [254]={ + ["day"]=11, + ["type"]=38, + ["number"]=50, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [255]={ + ["day"]=11, + ["type"]=29, + ["number"]=15000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [256]={ + ["day"]=12, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [257]={ + ["day"]=12, + ["type"]=36, + ["number"]=30, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [258]={ + ["day"]=12, + ["type"]=21, + ["number"]=50, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [259]={ + ["day"]=12, + ["type"]=39, + ["number"]=15, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [260]={ + ["day"]=12, + ["type"]=28, + ["number"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [261]={ + ["day"]=13, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [262]={ + ["day"]=13, + ["type"]=32, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [263]={ + ["day"]=13, + ["type"]=44, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [264]={ + ["day"]=13, + ["type"]=38, + ["number"]=60, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [265]={ + ["day"]=13, + ["type"]=27, + ["number"]=150, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + } + }, + [266]={ + ["day"]=14, + ["type"]=26, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [267]={ + ["day"]=14, + ["type"]=16, + ["number"]=300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=60, + ["num_for_nothing"]="UAg=" + } + } + }, + [268]={ + ["day"]=14, + ["type"]=21, + ["number"]=80, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=40, + ["num_for_nothing"]="Ugg=" + } + } + }, + [269]={ + ["day"]=14, + ["type"]=29, ["number"]=20000, - ["type"]=2, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=4, - ["num_for_nothing"]="Ug==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } } }, - [72]={ - ["day"]=7, - ["number"]=40, - ["type"]=17, + [270]={ + ["day"]=14, + ["type"]=23, + ["number"]=50, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=8, - ["num_for_nothing"]="Xg==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=32, + ["id_for_nothing"]="VQo=", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } } }, - [73]={ - ["day"]=7, - ["number"]=40, - ["type"]=1, + [271]={ + ["day"]=1, + ["type"]=61, + ["number"]=1, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=5, - ["num_for_nothing"]="Uw==" - } + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [272]={ + ["day"]=1, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [273]={ + ["day"]=1, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [274]={ + ["day"]=1, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [275]={ + ["day"]=1, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [276]={ + ["day"]=1, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [277]={ + ["day"]=1, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [278]={ + ["day"]=1, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [279]={ + ["day"]=2, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [280]={ + ["day"]=2, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [281]={ + ["day"]=2, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [282]={ + ["day"]=2, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [283]={ + ["day"]=2, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [284]={ + ["day"]=2, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [285]={ + ["day"]=2, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [286]={ + ["day"]=2, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [287]={ + ["day"]=3, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [288]={ + ["day"]=3, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [289]={ + ["day"]=3, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [290]={ + ["day"]=3, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [291]={ + ["day"]=3, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [292]={ + ["day"]=3, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [293]={ + ["day"]=3, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [294]={ + ["day"]=3, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [295]={ + ["day"]=3, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [296]={ + ["day"]=4, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [297]={ + ["day"]=4, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [298]={ + ["day"]=4, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [299]={ + ["day"]=4, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [300]={ + ["day"]=4, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [301]={ + ["day"]=4, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [302]={ + ["day"]=4, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [303]={ + ["day"]=4, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [304]={ + ["day"]=5, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [305]={ + ["day"]=5, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [306]={ + ["day"]=5, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [307]={ + ["day"]=5, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [308]={ + ["day"]=5, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [309]={ + ["day"]=5, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [310]={ + ["day"]=5, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [311]={ + ["day"]=5, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=259, + ["id_for_nothing"]="VA1V", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [312]={ + ["day"]=6, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [313]={ + ["day"]=6, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [314]={ + ["day"]=6, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [315]={ + ["day"]=6, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [316]={ + ["day"]=6, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [317]={ + ["day"]=6, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [318]={ + ["day"]=6, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [319]={ + ["day"]=6, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [320]={ + ["day"]=6, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [321]={ + ["day"]=7, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201, + ["must_task"]=1 + }, + [322]={ + ["day"]=7, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [323]={ + ["day"]=7, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [324]={ + ["day"]=7, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [325]={ + ["day"]=7, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [326]={ + ["day"]=7, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [327]={ + ["day"]=7, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [328]={ + ["day"]=7, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [329]={ + ["day"]=7, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [330]={ + ["day"]=7, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [331]={ + ["day"]=7, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [332]={ + ["day"]=7, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [333]={ + ["day"]=7, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [334]={ + ["day"]=7, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [335]={ + ["day"]=7, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12201 + }, + [336]={ + ["day"]=1, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [337]={ + ["day"]=1, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [338]={ + ["day"]=1, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [339]={ + ["day"]=1, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [340]={ + ["day"]=1, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [341]={ + ["day"]=1, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [342]={ + ["day"]=1, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [343]={ + ["day"]=1, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [344]={ + ["day"]=2, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [345]={ + ["day"]=2, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [346]={ + ["day"]=2, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [347]={ + ["day"]=2, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [348]={ + ["day"]=2, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [349]={ + ["day"]=2, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [350]={ + ["day"]=2, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [351]={ + ["day"]=2, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [352]={ + ["day"]=3, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [353]={ + ["day"]=3, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [354]={ + ["day"]=3, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [355]={ + ["day"]=3, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [356]={ + ["day"]=3, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [357]={ + ["day"]=3, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [358]={ + ["day"]=3, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [359]={ + ["day"]=3, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [360]={ + ["day"]=3, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [361]={ + ["day"]=4, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [362]={ + ["day"]=4, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [363]={ + ["day"]=4, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [364]={ + ["day"]=4, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [365]={ + ["day"]=4, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [366]={ + ["day"]=4, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [367]={ + ["day"]=4, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [368]={ + ["day"]=4, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [369]={ + ["day"]=5, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [370]={ + ["day"]=5, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [371]={ + ["day"]=5, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [372]={ + ["day"]=5, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [373]={ + ["day"]=5, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [374]={ + ["day"]=5, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [375]={ + ["day"]=5, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [376]={ + ["day"]=5, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [377]={ + ["day"]=6, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [378]={ + ["day"]=6, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [379]={ + ["day"]=6, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [380]={ + ["day"]=6, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [381]={ + ["day"]=6, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [382]={ + ["day"]=6, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [383]={ + ["day"]=6, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [384]={ + ["day"]=6, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [385]={ + ["day"]=6, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [386]={ + ["day"]=7, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401, + ["must_task"]=1 + }, + [387]={ + ["day"]=7, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [388]={ + ["day"]=7, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [389]={ + ["day"]=7, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [390]={ + ["day"]=7, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [391]={ + ["day"]=7, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [392]={ + ["day"]=7, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [393]={ + ["day"]=7, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [394]={ + ["day"]=7, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [395]={ + ["day"]=7, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [396]={ + ["day"]=7, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [397]={ + ["day"]=7, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [398]={ + ["day"]=7, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [399]={ + ["day"]=7, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [400]={ + ["day"]=7, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=260, + ["id_for_nothing"]="VA5c", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12401 + }, + [401]={ + ["day"]=1, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [402]={ + ["day"]=1, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [403]={ + ["day"]=1, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [404]={ + ["day"]=1, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [405]={ + ["day"]=1, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [406]={ + ["day"]=1, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [407]={ + ["day"]=1, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [408]={ + ["day"]=1, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [409]={ + ["day"]=2, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [410]={ + ["day"]=2, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [411]={ + ["day"]=2, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [412]={ + ["day"]=2, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [413]={ + ["day"]=2, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [414]={ + ["day"]=2, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [415]={ + ["day"]=2, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [416]={ + ["day"]=2, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [417]={ + ["day"]=3, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [418]={ + ["day"]=3, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [419]={ + ["day"]=3, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [420]={ + ["day"]=3, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [421]={ + ["day"]=3, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [422]={ + ["day"]=3, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [423]={ + ["day"]=3, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [424]={ + ["day"]=3, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [425]={ + ["day"]=3, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [426]={ + ["day"]=4, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [427]={ + ["day"]=4, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [428]={ + ["day"]=4, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [429]={ + ["day"]=4, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [430]={ + ["day"]=4, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [431]={ + ["day"]=4, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [432]={ + ["day"]=4, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [433]={ + ["day"]=4, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [434]={ + ["day"]=5, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [435]={ + ["day"]=5, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [436]={ + ["day"]=5, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [437]={ + ["day"]=5, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [438]={ + ["day"]=5, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [439]={ + ["day"]=5, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [440]={ + ["day"]=5, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [441]={ + ["day"]=5, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [442]={ + ["day"]=6, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [443]={ + ["day"]=6, + ["type"]=63, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [444]={ + ["day"]=6, + ["type"]=65, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [445]={ + ["day"]=6, + ["type"]=67, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [446]={ + ["day"]=6, + ["type"]=74, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [447]={ + ["day"]=6, + ["type"]=83, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [448]={ + ["day"]=6, + ["type"]=69, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [449]={ + ["day"]=6, + ["type"]=79, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [450]={ + ["day"]=6, + ["type"]=75, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [451]={ + ["day"]=7, + ["type"]=61, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501, + ["must_task"]=1 + }, + [452]={ + ["day"]=7, + ["type"]=77, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [453]={ + ["day"]=7, + ["type"]=66, + ["number"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [454]={ + ["day"]=7, + ["type"]=64, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [455]={ + ["day"]=7, + ["type"]=80, + ["number"]=5, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [456]={ + ["day"]=7, + ["type"]=84, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [457]={ + ["day"]=7, + ["type"]=68, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [458]={ + ["day"]=7, + ["type"]=78, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [459]={ + ["day"]=7, + ["type"]=62, + ["number"]=20, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [460]={ + ["day"]=7, + ["type"]=81, + ["number"]=1, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [461]={ + ["day"]=7, + ["type"]=82, + ["number"]=6, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [462]={ + ["day"]=7, + ["type"]=70, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [463]={ + ["day"]=7, + ["type"]=72, + ["number"]=3, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [464]={ + ["day"]=7, + ["type"]=73, + ["number"]=2, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 + }, + [465]={ + ["day"]=7, + ["type"]=76, + ["number"]=10, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=258, + ["id_for_nothing"]="VA1U", + ["num"]=25, + ["num_for_nothing"]="VA0=" + } + }, + ["activity"]=12501 } } local config = { -data=act_sevenday_quest,count=73 +data=act_sevenday_quest,count=265 } return config \ No newline at end of file diff --git a/lua/app/config/act_sevenday_quest_reward.lua b/lua/app/config/act_sevenday_quest_reward.lua index c959a8d8..a73e955d 100644 --- a/lua/app/config/act_sevenday_quest_reward.lua +++ b/lua/app/config/act_sevenday_quest_reward.lua @@ -1,83 +1,496 @@ local act_sevenday_quest_reward = { [1]={ - ["num"]=10, + ["period"]=1, + ["num"]=100, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=100, - ["num_for_nothing"]="Vwhc" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } } }, [2]={ - ["num"]=20, + ["period"]=1, + ["num"]=200, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=1, - ["id_for_nothing"]="Vw==", - ["num"]=2000, - ["num_for_nothing"]="VAhcAw==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } } }, [3]={ - ["num"]=30, + ["period"]=1, + ["num"]=300, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=150, - ["num_for_nothing"]="Vw1c" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } } }, [4]={ - ["num"]=40, + ["period"]=1, + ["num"]=400, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=13, - ["id_for_nothing"]="Vws=", - ["num"]=3, - ["num_for_nothing"]="VQ==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } } }, [5]={ - ["num"]=50, + ["period"]=1, + ["num"]=500, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=200, - ["num_for_nothing"]="VAhc" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } } }, [6]={ - ["num"]=60, + ["period"]=1, + ["num"]=600, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=14, - ["id_for_nothing"]="Vww=", - ["num"]=1, - ["num_for_nothing"]="Vw==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } } }, [7]={ - ["num"]=70, + ["period"]=1, + ["num"]=700, ["reward"]={ - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=34001, - ["id_for_nothing"]="VQxcA2Q=", - ["num"]=3, - ["num_for_nothing"]="VQ==" + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } } + }, + [8]={ + ["period"]=2, + ["num"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [9]={ + ["period"]=2, + ["num"]=200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + } + }, + [10]={ + ["period"]=2, + ["num"]=300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=12, + ["id_for_nothing"]="Vwo=", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [11]={ + ["period"]=2, + ["num"]=400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [12]={ + ["period"]=2, + ["num"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + } + }, + [13]={ + ["period"]=2, + ["num"]=600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=40, + ["id_for_nothing"]="Ugg=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [14]={ + ["period"]=2, + ["num"]=700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [15]={ + ["num"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["activity"]=12201 + }, + [16]={ + ["num"]=200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["activity"]=12201 + }, + [17]={ + ["num"]=300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["activity"]=12201 + }, + [18]={ + ["num"]=400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=37, + ["id_for_nothing"]="VQ8=", + ["num"]=150, + ["num_for_nothing"]="Vw1c" + } + }, + ["activity"]=12201 + }, + [19]={ + ["num"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + } + }, + ["activity"]=12201 + }, + [20]={ + ["num"]=600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["activity"]=12201 + }, + [21]={ + ["num"]=700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=231, + ["id_for_nothing"]="VAtd", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["activity"]=12201 + }, + [22]={ + ["num"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["activity"]=12401 + }, + [23]={ + ["num"]=200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["activity"]=12401 + }, + [24]={ + ["num"]=300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["activity"]=12401 + }, + [25]={ + ["num"]=400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=222, + ["id_for_nothing"]="VApe", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + ["activity"]=12401 + }, + [26]={ + ["num"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + } + }, + ["activity"]=12401 + }, + [27]={ + ["num"]=600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=68, + ["id_for_nothing"]="UAA=", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + ["activity"]=12401 + }, + [28]={ + ["num"]=700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=228, + ["id_for_nothing"]="VApU", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["activity"]=12401 + }, + [29]={ + ["num"]=100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["activity"]=12501 + }, + [30]={ + ["num"]=200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=5, + ["num_for_nothing"]="Uw==" + } + }, + ["activity"]=12501 + }, + [31]={ + ["num"]=300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + } + }, + ["activity"]=12501 + }, + [32]={ + ["num"]=400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["activity"]=12501 + }, + [33]={ + ["num"]=500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + } + }, + ["activity"]=12501 + }, + [34]={ + ["num"]=600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=262, + ["id_for_nothing"]="VA5e", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + ["activity"]=12501 + }, + [35]={ + ["num"]=700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=19, + ["id_for_nothing"]="VwE=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["activity"]=12501 } } local config = { -data=act_sevenday_quest_reward,count=7 +data=act_sevenday_quest_reward,count=35 } return config \ No newline at end of file diff --git a/lua/app/config/const.lua b/lua/app/config/const.lua index 3704bbc3..c316de08 100644 --- a/lua/app/config/const.lua +++ b/lua/app/config/const.lua @@ -506,6 +506,9 @@ local const = { ["dungeon_rune_buylimit"]={ ["value"]=5 }, + ["act_sevenday_duration"]={ + ["value"]=14.0 + }, ["activity_pvp_time"]={ ["value"]=1 }, diff --git a/lua/app/config/func_open.lua b/lua/app/config/func_open.lua index cea6a2d6..ef26d3d0 100644 --- a/lua/app/config/func_open.lua +++ b/lua/app/config/func_open.lua @@ -31,10 +31,6 @@ local func_open = { ["stage"]=2, ["icon"]="module_unlock_idle" }, - ["act_sevenday"]={ - ["stage"]=999, - ["icon"]="module_unlock_sevenday" - }, ["mall"]={ ["stage"]=2, ["pop_ups"]=1 @@ -103,6 +99,13 @@ local func_open = { ["stage"]=8, ["pop_ups"]=1 }, + ["act_sevenday"]={ + ["stage"]=2 + }, + ["act_sevenday_2"]={ + ["stage"]=2, + ["time"]=8 + }, ["dungeon_armor_open"]={ ["stage"]=10, ["pop_ups"]=1 diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index ff63d16b..6cd2c3ca 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -807,6 +807,32 @@ local LocalizationGlobalConst = ACT_30SIGNIN_3 = "ACT_30SIGNIN_3", ACT_30SIGNIN_4 = "ACT_30SIGNIN_4", ACT_30SIGNIN_5 = "ACT_30SIGNIN_5", + ACT_SEVENDAY = "ACT_SEVENDAY", + ACT_SEVENDAY_2 = "ACT_SEVENDAY_2", + ACT_SEVENDAY_HELP = "ACT_SEVENDAY_HELP", + GIFT_DESC_4 = "GIFT_DESC_4", + ADVENTURE_CLOSED = "ADVENTURE_CLOSED", + TIME_END_DESC_1 = "TIME_END_DESC_1", + GIFT_ROUTINE_DESC_1 = "GIFT_ROUTINE_DESC_1", + GIFT_ROUTINE_DESC_2 = "GIFT_ROUTINE_DESC_2", + GIFT_ROUTINE_DESC_3 = "GIFT_ROUTINE_DESC_3", + GIFT_ROUTINE_DESC_4 = "GIFT_ROUTINE_DESC_4", + GIFT_ROUTINE_DESC_5 = "GIFT_ROUTINE_DESC_5", + GIFT_ROUTINE_DESC_6 = "GIFT_ROUTINE_DESC_6", + GIFT_ROUTINE_DESC_7 = "GIFT_ROUTINE_DESC_7", + GIFT_ROUTINE_DESC_8 = "GIFT_ROUTINE_DESC_8", + GIFT_ROUTINE_DESC_9 = "GIFT_ROUTINE_DESC_9", + GIFT_ROUTINE_DESC_10 = "GIFT_ROUTINE_DESC_10", + GIFT_ROUTINE_DESC_11 = "GIFT_ROUTINE_DESC_11", + GIFT_ROUTINE_DESC_12 = "GIFT_ROUTINE_DESC_12", + GIFT_ROUTINE_DESC_13 = "GIFT_ROUTINE_DESC_13", + GIFT_ROUTINE_DESC_14 = "GIFT_ROUTINE_DESC_14", + GIFT_ROUTINE_DESC_15 = "GIFT_ROUTINE_DESC_15", + GIFT_ROUTINE_DESC_16 = "GIFT_ROUTINE_DESC_16", + GIFT_ROUTINE_DESC_17 = "GIFT_ROUTINE_DESC_17", + GIFT_ROUTINE_DESC_18 = "GIFT_ROUTINE_DESC_18", + GIFT_ROUTINE_DESC_19 = "GIFT_ROUTINE_DESC_19", + FREE_DESC = "FREE_DESC", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/act_gift.lua b/lua/app/config/strings/cn/act_gift.lua new file mode 100644 index 00000000..d4827d3d --- /dev/null +++ b/lua/app/config/strings/cn/act_gift.lua @@ -0,0 +1,342 @@ +local act_gift = { + [10102]={ + ["value"]="首充" + }, + [10202]={ + ["value"]="首充" + }, + [10302]={ + ["value"]="首充" + }, + [10402]={ + ["value"]="首充" + }, + [10502]={ + ["value"]="首充" + }, + [10602]={ + ["value"]="首充" + }, + [10702]={ + ["value"]="首充" + }, + [10802]={ + ["value"]="首充" + }, + [10902]={ + ["value"]="首充" + }, + [20102]={ + ["value"]="超值月卡" + }, + [20202]={ + ["value"]="特权月卡" + }, + [30102]={ + ["value"]="高级战令" + }, + [30202]={ + ["value"]="豪华战令" + }, + [40102]={ + ["value"]="成长基金" + }, + [40202]={ + ["value"]="成长基金" + }, + [40302]={ + ["value"]="成长基金" + }, + [40402]={ + ["value"]="成长基金" + }, + [40502]={ + ["value"]="成长基金" + }, + [40602]={ + ["value"]="成长基金" + }, + [40702]={ + ["value"]="关卡基金" + }, + [40802]={ + ["value"]="关卡基金" + }, + [40902]={ + ["value"]="关卡基金" + }, + [41002]={ + ["value"]="关卡基金" + }, + [41102]={ + ["value"]="关卡基金" + }, + [41202]={ + ["value"]="关卡基金" + }, + [41302]={ + ["value"]="关卡基金" + }, + [41402]={ + ["value"]="关卡基金" + }, + [41502]={ + ["value"]="关卡基金" + }, + [50102]={ + ["value"]="林间巡逻" + }, + [50202]={ + ["value"]="林间巡逻" + }, + [110102]={ + ["value"]="广告礼包" + }, + [110202]={ + ["value"]="半价黄金魔法石" + }, + [110302]={ + ["value"]="黄金魔法石" + }, + [110402]={ + ["value"]="特惠黄金魔法石" + }, + [110502]={ + ["value"]="入门黄金魔法石" + }, + [110602]={ + ["value"]="闪耀黄金魔法石" + }, + [110702]={ + ["value"]="豪华黄金魔法石" + }, + [110802]={ + ["value"]="至尊黄金魔法石" + }, + [110902]={ + ["value"]="超值英雄礼包" + }, + [111002]={ + ["value"]="超值英雄礼包" + }, + [111102]={ + ["value"]="超值升级礼包" + }, + [111202]={ + ["value"]="超值升星礼包" + }, + [114302]={ + ["value"]="广告礼包" + }, + [114402]={ + ["value"]="半价黄金魔法石" + }, + [114502]={ + ["value"]="黄金魔法石" + }, + [114602]={ + ["value"]="特惠黄金魔法石" + }, + [114702]={ + ["value"]="入门黄金魔法石" + }, + [114802]={ + ["value"]="闪耀黄金魔法石" + }, + [114902]={ + ["value"]="豪华黄金魔法石" + }, + [115002]={ + ["value"]="至尊黄金魔法石" + }, + [115102]={ + ["value"]="超值英雄礼包" + }, + [115202]={ + ["value"]="超值英雄礼包" + }, + [115302]={ + ["value"]="超值升级礼包" + }, + [115402]={ + ["value"]="超值升星礼包" + }, + [100102]={ + ["value"]="关卡礼包1-2" + }, + [100202]={ + ["value"]="关卡礼包2-1" + }, + [100302]={ + ["value"]="关卡礼包2-4" + }, + [100402]={ + ["value"]="关卡礼包3-2" + }, + [100502]={ + ["value"]="关卡礼包3-5" + }, + [100602]={ + ["value"]="关卡礼包4-2" + }, + [100702]={ + ["value"]="关卡礼包4-5" + }, + [100802]={ + ["value"]="关卡礼包5-2" + }, + [100902]={ + ["value"]="关卡礼包5-5" + }, + [101002]={ + ["value"]="关卡礼包6-4" + }, + [101102]={ + ["value"]="关卡礼包7-4" + }, + [101202]={ + ["value"]="关卡礼包8-4" + }, + [101302]={ + ["value"]="关卡礼包9-4" + }, + [101402]={ + ["value"]="关卡礼包10-4" + }, + [101502]={ + ["value"]="关卡礼包11-4" + }, + [101602]={ + ["value"]="关卡礼包12-4" + }, + [101702]={ + ["value"]="关卡礼包13-4" + }, + [101802]={ + ["value"]="关卡礼包14-4" + }, + [101902]={ + ["value"]="关卡礼包15-4" + }, + [118502]={ + ["value"]="免费礼包" + }, + [118602]={ + ["value"]="冲刺礼包1" + }, + [118702]={ + ["value"]="冲刺礼包2" + }, + [118802]={ + ["value"]="冲刺礼包3" + }, + [118902]={ + ["value"]="冲刺礼包4" + }, + [119002]={ + ["value"]="冲刺礼包5" + }, + [119102]={ + ["value"]="冲刺礼包6" + }, + [119202]={ + ["value"]="冲刺礼包7" + }, + [119302]={ + ["value"]="冲刺礼包8" + }, + [119402]={ + ["value"]="免费礼包" + }, + [119502]={ + ["value"]="冲刺礼包1" + }, + [119602]={ + ["value"]="冲刺礼包2" + }, + [119702]={ + ["value"]="冲刺礼包3" + }, + [119802]={ + ["value"]="冲刺礼包4" + }, + [119902]={ + ["value"]="冲刺礼包5" + }, + [120002]={ + ["value"]="冲刺礼包6" + }, + [120102]={ + ["value"]="冲刺礼包7" + }, + [120202]={ + ["value"]="冲刺礼包8" + }, + [1100102]={ + ["value"]="免费礼包" + }, + [1100202]={ + ["value"]="冲刺礼包1" + }, + [1100302]={ + ["value"]="冲刺礼包2" + }, + [1100402]={ + ["value"]="冲刺礼包3" + }, + [1100502]={ + ["value"]="冲刺礼包4" + }, + [1100602]={ + ["value"]="冲刺礼包5" + }, + [1100702]={ + ["value"]="冲刺礼包6" + }, + [1100802]={ + ["value"]="冲刺礼包7" + }, + [1100902]={ + ["value"]="冲刺礼包8" + }, + [1101002]={ + ["value"]="免费礼包" + }, + [1101102]={ + ["value"]="冲刺礼包1" + }, + [1101202]={ + ["value"]="冲刺礼包2" + }, + [1101302]={ + ["value"]="冲刺礼包3" + }, + [1101402]={ + ["value"]="冲刺礼包4" + }, + [1101502]={ + ["value"]="冲刺礼包5" + }, + [1101602]={ + ["value"]="冲刺礼包6" + }, + [1101702]={ + ["value"]="冲刺礼包7" + }, + [1101802]={ + ["value"]="冲刺礼包8" + }, + [1800102]={ + ["value"]="扫荡礼包" + }, + [1900102]={ + + }, + [1900202]={ + + } +} +local config = { +data=act_gift,count=112 +} +return config \ No newline at end of file diff --git a/lua/app/module/activity/fourteen_day/fourteen_day_const.lua.meta b/lua/app/config/strings/cn/act_gift.lua.meta similarity index 86% rename from lua/app/module/activity/fourteen_day/fourteen_day_const.lua.meta rename to lua/app/config/strings/cn/act_gift.lua.meta index 865ce302..fc155189 100644 --- a/lua/app/module/activity/fourteen_day/fourteen_day_const.lua.meta +++ b/lua/app/config/strings/cn/act_gift.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0598bbbceeebf3444bc6ac70ab44861a +guid: 3563d3ea57d28419e850dfc5a342bd98 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index ac17d320..e2ce59be 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -806,6 +806,32 @@ local localization_global = ["ACT_30SIGNIN_3"] = "领取完所有奖励后重置", ["ACT_30SIGNIN_4"] = "{0}天累计", ["ACT_30SIGNIN_5"] = "再领一次", + ["ACT_SEVENDAY"] = "七日狂欢", + ["ACT_SEVENDAY_2"] = "七日狂欢2期", + ["ACT_SEVENDAY_HELP"] = "[活动介绍]\n完成全部任务,获得海量奖励。\n\n[活动规则]\n1.活动前7日,每日解锁新的任务和礼包。\n2.14日内可完成所有任务,赢得最终大奖。\n3.未完成和领取的任务奖励将在活动结束后失效,请及时领取。", + ["GIFT_DESC_4"] = "礼包", + ["ADVENTURE_CLOSED"] = "活动已结束", + ["TIME_END_DESC_1"] = "结束时间:{0}", + ["GIFT_ROUTINE_DESC_1"] = "新手礼包", + ["GIFT_ROUTINE_DESC_2"] = "日礼包", + ["GIFT_ROUTINE_DESC_3"] = "周礼包", + ["GIFT_ROUTINE_DESC_4"] = "月礼包", + ["GIFT_ROUTINE_DESC_5"] = "每日充值", + ["GIFT_ROUTINE_DESC_6"] = "循环累充", + ["GIFT_ROUTINE_DESC_7"] = "特惠礼包", + ["GIFT_ROUTINE_DESC_8"] = "限购", + ["GIFT_ROUTINE_DESC_9"] = "{0}后重置", + ["GIFT_ROUTINE_DESC_10"] = "已售罄", + ["GIFT_ROUTINE_DESC_11"] = "未开启", + ["GIFT_ROUTINE_DESC_12"] = "累计{0}天", + ["GIFT_ROUTINE_DESC_13"] = "{0}积分档", + ["GIFT_ROUTINE_DESC_14"] = "累充{0}积分", + ["GIFT_ROUTINE_DESC_15"] = "第{0}日充值获得{1}积分", + ["GIFT_ROUTINE_DESC_16"] = "推荐", + ["GIFT_ROUTINE_DESC_17"] = "累充豪礼", + ["GIFT_ROUTINE_DESC_18"] = "精彩活动", + ["GIFT_ROUTINE_DESC_19"] = "必买", + ["FREE_DESC"] = "免费", } return localization_global \ No newline at end of file diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index cc264681..b17988a0 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -956,6 +956,10 @@ function GFunc.getTickCount() return math.floor(UnityTime.realtimeSinceStartup) end +function GFunc.getTickCount2() + return math.floor(UnityTime.realtimeSinceStartup * 1000) +end + ---得到展示奖励的图集名称,图片资源id function GFunc.getFrameRes(type, id) if type == GConst.REWARD_TYPE.REWARD_NONE then @@ -1352,19 +1356,16 @@ function GFunc.getAdSprite() return skip and "common_ad_4" or "common_ad_3" end -function GFunc.centerImgAndTx(imgObj, txObj, spacing, offset, txMaxWidth) +function GFunc.centerImgAndTx(imgObj, txObj, spacing, iconOffectY, addX) spacing = spacing or 0 - offset = offset or 0 + addX = addX or 0 local imgW = imgObj:getSizeDelta().x + local posx, posy = imgObj:fastGetAnchoredPosition() local txW = txObj:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth - -- 文字最大宽度处理 - if txMaxWidth and txW > txMaxWidth then - txW = txMaxWidth - end txObj:setSizeDeltaX(txW) local w = (imgW + txW + spacing) / 2 - imgObj:setAnchoredPositionX(imgW / 2 - w + offset) - txObj:setAnchoredPositionX(w - txW / 2 + offset) + imgObj:setAnchoredPosition(imgW / 2 - w + addX, iconOffectY or posy) + txObj:setAnchoredPositionX(w - txW / 2 + addX) end -- centerImgAndTx的位置反向版本 diff --git a/lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua b/lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua deleted file mode 100644 index ba57101d..00000000 --- a/lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua +++ /dev/null @@ -1,319 +0,0 @@ -local ActBossRushManager = class("ActBossRushManager", BaseModule) - -function ActBossRushManager:showMainUI() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - self:reqTopRank() - UIManager:showUI("app/ui/activity/act_boss_rush/act_boss_rush_ui") -end - -function ActBossRushManager:showFundUI() - UIManager:showUI("app/ui/activity/act_boss_rush/act_boss_rush_fund_ui") -end - -function ActBossRushManager:showRankUI() - self:reqRankList() - UIManager:showUI("app/ui/activity/act_boss_rush/act_boss_rush_rank_ui") -end - -function ActBossRushManager:showShopUI() - UIManager:showUI("app/ui/activity/act_boss_rush/act_boss_rush_shop_ui") -end - -function ActBossRushManager:showPopUI() - UIManager:showUI("app/ui/activity/act_boss_rush/act_boss_rush_pop_ui") - return true -end - -function ActBossRushManager:reqFight() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if not DataManager.ActBossRushData:getFightFree() then - local cost = DataManager.ActBossRushData:getFightCost() - if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, cost, true) then -- 消耗不足 - return - else - local params ={ - content = I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_1, cost), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - costId = GConst.ItemConst.ITEM_ID_GEM, - costNum = cost, - okFunc = function() - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushStartReq, {}, {}, self.rspFight, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_FIGHT_START) - end, - } - GFunc.showMessageBox(params) - return - end - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushStartReq, {}, {}, self.rspFight, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_FIGHT_START) -end - -function ActBossRushManager:rspFight(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActBossRushData:updateStageSeed(result.seed) - - local params = { - atkFormation = {} - } - local formation = DataManager.FormationData:getBossRushFormation() - for elementType, heroId in pairs(formation) do - local heroEntity = DataManager.HeroData:getHeroById(heroId) - if heroEntity then - params.atkFormation[elementType] = heroEntity - end - end - ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH, params, function() - UIManager:closeAllUI() - ModuleManager.MaincityManager:showMainCityUI() - ModuleManager.ActBossRushManager:showMainUI() - end) - end -end - -function ActBossRushManager:reqEndBattle(chapterId, combatReport, taskProgress) - local params = { - chapterId = chapterId, - combatReport = combatReport, - task_stat = taskProgress - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushSettlementReq, params, {}, self.rspEndBattle, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_FIGHT) -end - -function ActBossRushManager:rspEndBattle(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData then - ModuleManager.TaskManager:addFightTaskProgress(result.reqData.task_stat) - DataManager.ActBossRushData:addWaveCount(result.reqData.task_stat[GConst.BattleConst.BATTLE_TASK_FIELD.PASS_WAVE] or 0) - end - - local wave = result.max_wave or 0 - local round = result.min_round or 0 - DataManager.ActBossRushData:updateWaveAndRound(wave, round) - ModuleManager.BattleManager:showBossRushBattleResultUI(GConst.BattleConst.BATTLE_TYPE.ACT_BOSS_RUSH, result.reqData and result.reqData.combatReport, result.reqData and result.reqData.task_stat) - end -end - -function ActBossRushManager:purcharse(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -function ActBossRushManager:reqFundAward(level, rewardType) - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - -- -- 直接一键领取 - -- local curLevel = DataManager.ActBossRushData:getWaveLevel() - -- local idWithLv = {} - -- for id = 1, curLevel do - -- if DataManager.ActBossRushData:getFreeCanGet(id) then - -- table.insert(idWithLv, {id = id, grade = 0}) - -- end - - -- if DataManager.ActBossRushData:getProCanGet(id) then - -- table.insert(idWithLv, {id = id, grade = 1}) - -- end - - -- if DataManager.ActBossRushData:getUtralCanGet(id) then - -- table.insert(idWithLv, {id = id, grade = 2}) - -- end - -- end - - -- if not idWithLv[1] then - -- return - -- end - - local params = { - id = level, - grade = rewardType - } - - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushBountyClaimReq, params, {}, self.rspFundAward, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_FUND) -end - -function ActBossRushManager:rspFundAward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData then - if result.reqData.id ~= 0 then - DataManager.ActBossRushData:gotSingleFundReward(result.reqData.id, result.reqData.grade) - end - end - GFunc.showRewardBox(result.rewards) - end -end - -function ActBossRushManager:reqBuyFundLevel() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - local cost = DataManager.ActBossRushData:getBuyBountyLevelCost() - if not GFunc.checkCost(cost.id, cost.num, true) then - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushBountyUnlockReq, {}, {}, self.rspBuyFundLevel, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_BUY_FUND) -end - -function ActBossRushManager:rspBuyFundLevel(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - local addCount = result.accum_wave - DataManager.ActBossRushData:getWaveCount() - if addCount > 0 then - DataManager.ActBossRushData:addWaveCount(addCount) - end - end -end - -function ActBossRushManager:reqExchange(id, count) - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if DataManager.ActBossRushData:getExchangeRemainCount(id) < count then - return - end - - local params = { - id = id, - count = count - } - - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushExchangeReq, params, {}, self.rspExchange, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_SHOP) -end - -function ActBossRushManager:rspExchange(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData then - DataManager.ActBossRushData:setShopInfo(result.reqData.id, result.reqData.count) - end - GFunc.showRewardBox(result.rewards) - end -end - -function ActBossRushManager:reqRankReward() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushRankRewardReq, {}, {}, self.rspRankReward, BIReport.ITEM_GET_TYPE.ACT_BOSS_RUSH_RANK) -end - -function ActBossRushManager:rspRankReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActBossRushData:setGotRankReward() - GFunc.showRewardBox(result.rewards) - end -end - -function ActBossRushManager:reqActData() - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushInfoReq, {}, {}, self.rspActData) -end - -function ActBossRushManager:rspActData(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActBossRushData:init(result.boss_rush) - end -end - -function ActBossRushManager:reqRankList() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if not DataManager.ActBossRushData:getNeedUpdateRank() then - return - end - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushRankReq, {}, {}, self.rspRankList) -end - -function ActBossRushManager:rspRankList(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActBossRushData:updateRankInfo(result) - end -end - -function ActBossRushManager:reqTopRank() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if not DataManager.ActBossRushData:getIsOpen() then - return false - end - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushTopReq, {}, {}, self.rspTopRank) -end - -function ActBossRushManager:rspTopRank(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActBossRushData:updateTopRankInfo(result.top3) - end -end - -function ActBossRushManager:reqFormation(formation) - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - local heroes = {} - for matchType, heroId in pairs(formation) do - if heroId and heroId > 0 then - table.insert(heroes, heroId) - end - end - local params = { - heroes = heroes - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushFormationReq, params, {}, self.rspFormation) -end - -function ActBossRushManager:rspFormation(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORMATION_CHANGE, {type = GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH}) - end -end - -function ActBossRushManager:rspBossRushBoughtNtf(result) - if result.bought then - DataManager.ActBossRushData:setProBought() - end - - if result.bought_max then - DataManager.ActBossRushData:setUtralBought() - end -end - ----- 特殊callback, 引用的话,需要注意callback中如果有baseobj需要判定null或销毁状态 -function ActBossRushManager:reqOtherPlayerInfo(playerId, callback) - self.reqOtherPlayerInfoCallback = callback - local params = { - id = playerId - } - self:sendMessage(ProtoMsgType.FromMsgEnum.BossRushPlayerInfoReq, params, {}, self.rspOtherPlayerInfo) -end - -function ActBossRushManager:rspOtherPlayerInfo(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - local callback = self.reqOtherPlayerInfoCallback - self.reqOtherPlayerInfoCallback = nil - local formation = GFunc.formatPlayerFormationInfo(result) - if callback then - callback(formation) - end - end - self.reqOtherPlayerInfoCallback = nil -end - -return ActBossRushManager \ No newline at end of file diff --git a/lua/app/module/activity/act_pvp/act_pvp_manager.lua b/lua/app/module/activity/act_pvp/act_pvp_manager.lua deleted file mode 100644 index b1aebb4b..00000000 --- a/lua/app/module/activity/act_pvp/act_pvp_manager.lua +++ /dev/null @@ -1,446 +0,0 @@ -local ActPvpManager = class("ActPvpManager", BaseModule) - -function ActPvpManager:showMainUI() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if DataManager.ActPvpData:getNeedUpdateData() then - self:reqActData() - end - if DataManager.ActPvpData:isPlaying() then - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_playing_ui") - else - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_main_ui") - end -end - -function ActPvpManager:showMatchUI(forceShowMatchUI) - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - if DataManager.ActPvpData:getNeedReMatch() or forceShowMatchUI then - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_match_ui") - self:reqMatch() - else - self:showMatchResultUI() - end -end - -function ActPvpManager:showMatchResultUI() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_match_result_ui") -end - -function ActPvpManager:showHelpUI() - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_help_ui") -end - -function ActPvpManager:showSelectUI() - local curPairIds = DataManager.ActPvpData:getCurSelectPairId() - if not curPairIds or not curPairIds[1] then - return - end - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_select_ui") -end - -function ActPvpManager:showBountyUI() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_bounty_ui") -end - -function ActPvpManager:showRankUI() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - if DataManager.ActPvpData:getNeedUpdateRank() then - self:reqRank() - end - UIManager:showUI("app/ui/activity/act_pvp/act_pvp_rank_ui") -end - -function ActPvpManager:reqActData() - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPDataReq, {}, {}, self.rspActData) -end - -function ActPvpManager:rspActData(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:updateData(result.activity_pvp) - end -end - -function ActPvpManager:reqEnter() - if DataManager.ActPvpData:isFinalDay() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_24)) - end - - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if DataManager.ActPvpData:isPlaying() then - return - end - - if DataManager.ActPvpData:getFreeEnterCount() <= 0 then - local cost = DataManager.ActPvpData:getEnterCost() - if not GFunc.checkCost(cost.id, cost.num, true) then - return - end - local params ={ - content = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_1, cost.num), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - costId = cost.id, - costNum = cost.num, - okFunc = function() - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBeginReq, {}, {}, self.rspEnter, BIReport.ITEM_GET_TYPE.ACT_PVP_ENTER) - end, - } - GFunc.showMessageBox(params) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBeginReq, {}, {}, self.rspEnter, BIReport.ITEM_GET_TYPE.ACT_PVP_ENTER) -end - -function ActPvpManager:rspEnter(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:updateData(result.activity_pvp) - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {closeMainUI = true}) - self:showMainUI() - end -end - -function ActPvpManager:reqDecideHero(index) - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - --int32 index = 1; // 0. 左边的、1.右边的 - local params = { - index = index - } - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPDecideHeroReq, params, {}, self.rspDecideHero) -end - -function ActPvpManager:rspDecideHero(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:updateHerosInfo(result.heroes, result.pair_id, result.next_select_four_id) - if not result.reqData then - result.reqData = {index = 0} - end - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {selectIndex = result.reqData.index}) - end -end - -function ActPvpManager:reqRefreshHero() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if not DataManager.ActPvpData:getCanAdFlush() then - local cost = DataManager.ActPvpData:getFlushCost() - if not GFunc.checkCost(cost.id, cost.num, true) then - return - end - - local params ={ - content = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_13, cost.num), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - costId = cost.id, - costNum = cost.num, - okFunc = function() - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPFlushHeroesReq, {}, {}, self.rspRefreshHero, BIReport.ITEM_GET_TYPE.ACT_PVP_REFRESH_HERO) - end, - } - GFunc.showMessageBox(params) - return - end - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPFlushHeroesReq, {}, {}, self.rspRefreshHero, BIReport.ITEM_GET_TYPE.ACT_PVP_REFRESH_HERO) -end - -function ActPvpManager:rspRefreshHero(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:addFlushCount() - DataManager.ActPvpData:updateSelectInfo(result.pair_id, result.next_select_four_id) - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {refreshHero = true}) - end -end - -function ActPvpManager:reqMatch() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPMatchReq, {}, {}, self.rspMatch) -end - -function ActPvpManager:rspMatch(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:updateRivalInfo(result.rival, result.match_cd_end_at) - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {matchOver = true}) - end -end - -function ActPvpManager:reqOverCD(isAd) - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - if not isAd then - local cost = DataManager.ActPvpData:getRematchConstGem() - if not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, cost, true) then - return - end - - local params ={ - content = I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_25, cost), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL, - costId = GConst.ItemConst.ITEM_ID_GEM, - costNum = cost, - okFunc = function() - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPOverCDReq, {ad = isAd}, {}, self.rspOverCD, BIReport.ITEM_GET_TYPE.ACT_PVP_OVER_CD) - end, - } - GFunc.showMessageBox(params) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPOverCDReq, {ad = isAd}, {}, self.rspOverCD, BIReport.ITEM_GET_TYPE.ACT_PVP_OVER_CD) -end - -function ActPvpManager:rspOverCD(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {reqCDOver = true}) - local isAd = false - if result.reqData and result.reqData.ad then - isAd = true - end - DataManager.ActPvpData:setMatchCdEndAt(isAd) - self:showMatchUI(true) - end -end - -function ActPvpManager:reqFight() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPStartReq, {}, {}, self.rspFight) -end - -function ActPvpManager:rspFight(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - local atkFormation = {} - local defFormation = {} - local heroes = DataManager.ActPvpData:getRivalInfoHeroes() - if not heroes then - Logger.logHighlight("1") - return - end - - local count = 0 - for matchType, heroEntity in pairs(heroes) do - local id = heroEntity:getCfgId() - if DataManager.HeroData:isExistHeroById(id) then - defFormation[matchType] = heroEntity - count = count + 1 - end - end - - if count <= 0 then - Logger.logHighlight("2") - return - end - - count = 0 - heroes = DataManager.ActPvpData:getHeros() - for matchType, heroEntity in pairs(heroes) do - local id = heroEntity:getCfgId() - if DataManager.HeroData:isExistHeroById(id) then - atkFormation[matchType] = heroEntity - count = count + 1 - end - end - - if count <= 0 then - Logger.logHighlight("3") - return - end - - local defInfo = DataManager.ActPvpData:getRivalInfo() - local params = { - defInfo = defInfo, - atkFormation = atkFormation, - defFormation = defFormation - } - ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.ACT_PVP, params, function() - UIManager:closeAllUI() - ModuleManager.MaincityManager:showMainCityUI() - ModuleManager.ActPvpManager:showMainUI() - end) - end -end - -function ActPvpManager:reqFightEnd(win, battleReport, taskProgress) - local parmas = { - win = win, - task_stat = taskProgress, - battleReport = battleReport, - } - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPSettlementReq, parmas, {}, self.rspFightEnd, BIReport.ITEM_GET_TYPE.ACT_PVP_FIGHT_END) -end - -function ActPvpManager:rspFightEnd(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - local herolv = DataManager.ActPvpData:getHeroLv() - DataManager.ActPvpData:recordLastBountyLevel() - DataManager.ActPvpData:updateData(result.activity_pvp) - DataManager.ActPvpData:setLastTurnWin(nil) -- 默认不给状态 - DataManager.ActPvpData:setHeroLevelUp(false) - -- 展示结算界面 - if result.reqData then - local taskStat = result.reqData.task_stat - if taskStat then - taskStat[GConst.BattleConst.BATTLE_TASK_FIELD.KILL_BOSS] = 0 -- boss不算 - taskStat[GConst.BattleConst.BATTLE_TASK_FIELD.KILL_NORMAL_MONSTER] = 0 -- 击杀小怪数量不算 - taskStat[GConst.BattleConst.BATTLE_TASK_FIELD.PASS_WAVE] = 0 -- 通关波数不算 - ModuleManager.TaskManager:addFightTaskProgress(taskStat) - end - ModuleManager.BattleManager:showActPvpResultUI(GConst.BattleConst.BATTLE_TYPE.ACT_PVP, result.rewards, result.reqData.battleReport) - if not DataManager.ActPvpData:isPlaying() then -- 进入下一轮 - DataManager.ActPvpData:setLastTurnWin(result.reqData.win) - else - local newHerolv = DataManager.ActPvpData:getHeroLv() - if newHerolv > herolv then - DataManager.ActPvpData:setHeroLevelUp(true) - end - end - end - end -end - -function ActPvpManager:reqDailyReward(index) - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - local params = { - id = index - } - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPDailyRewardsReq, params, {}, self.rspDailyReward, BIReport.ITEM_GET_TYPE.ACT_PVP_DAILY_REWARD) -end - -function ActPvpManager:rspDailyReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData then - DataManager.ActPvpData:setDailyReward(result.reqData.id) - end - GFunc.showRewardBox(result.rewards) - end -end - -function ActPvpManager:reqRank() - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPRankReq, {}, {}, self.rspRank) -end - -function ActPvpManager:rspRank(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:updateRankInfo(result.ranks, result.own_rank) - end -end - -function ActPvpManager:reqRankReward() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPRankRewardsReq, {}, {}, self.rspRankReward, BIReport.ITEM_GET_TYPE.ACT_PVP_RANK_REWARD) -end - -function ActPvpManager:rspRankReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:setGotRankReward() - GFunc.showRewardBox(result.rewards) - end -end - -function ActPvpManager:reqBountyReward(id, bountyType) - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - local typeNum = DataManager.ActPvpData.BOUNTY_TYPE_TO_NUM[bountyType] - if not typeNum then - return - end - local params = { - id = id, - grade = typeNum - } - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBountyClaimReq, params, {}, self.rspBountyReward, BIReport.ITEM_GET_TYPE.ACT_PVP_BOUNTY) -end - -function ActPvpManager:rspBountyReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:setBountyCollected(result.success_id_grade) - GFunc.showRewardBox(result.rewards) - end -end - -function ActPvpManager:reqBuyBountyLevel() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - local level = DataManager.ActPvpData:getBountyLevel() - if level + 1 > DataManager.ActPvpData:getMaxBountyLevel() then - return - end - local cost = DataManager.ActPvpData:getBuyBountyLevelCost() - if not GFunc.checkCost(cost.id, cost.num, 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.ACT_PVP_BUY_BOUNTY_LEVEL, - costId = cost.id, - costNum = cost.num, - okFunc = function() - local params = { - id = DataManager.ActPvpData:getBountyLevelId(level + 1) - } - self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBountyClaimByDiamondReq, params, {}, self.rspBuyBountyLevel, BIReport.ITEM_GET_TYPE.ACT_PVP_BUY_BOUNTY_LEVEL) - end, - } - GFunc.showMessageBox(params) -end - -function ActPvpManager:rspBuyBountyLevel(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.ActPvpData:setBountyLevel(result.reqData.id) - end -end - -return ActPvpManager \ No newline at end of file diff --git a/lua/app/module/activity/act_boss_rush.meta b/lua/app/module/activity/act_seven_day.meta similarity index 77% rename from lua/app/module/activity/act_boss_rush.meta rename to lua/app/module/activity/act_seven_day.meta index 87c1dbb4..407b4f62 100644 --- a/lua/app/module/activity/act_boss_rush.meta +++ b/lua/app/module/activity/act_seven_day.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4bc67b0cb6448474b89b7a92613c0fba +guid: 201070154efdf4d09aa56d9e1fc458a4 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua new file mode 100755 index 00000000..1c0b8f21 --- /dev/null +++ b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua @@ -0,0 +1,75 @@ +local ActSevenDayManager = class("ActSevenDayManager", BaseModule) + +function ActSevenDayManager:showMainUI() + UIManager:showUI("app/ui/activity/act_seven_day/act_seven_day_ui") +end + +function ActSevenDayManager:showMainS2UI() + UIManager:showUI("app/ui/activity/act_seven_day/act_seven_day_s2_ui") +end + +function ActSevenDayManager:onGetRewardTask(id, period) + period = period or 1 + if not DataManager.ActSevenDayData:isOpen(period) then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ADVENTURE_CLOSED)) + return + end + + -- 一键领取处理 + id = nil + + local itemGetType = period == 1 and BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK or BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK_2 + self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDaysTaskReq, {id = id, period = period}, self.onGetRewardTaskSuccess, itemGetType) +end + +function ActSevenDayManager:onGetRewardTaskSuccess(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + GFunc.showRewardBox(result.rewards) + + local ids = DataManager.ActSevenDayData:getAllCanClaimTaskIds(result.reqData.period) + DataManager.ActSevenDayData:setTaskClaimed(result.reqData.id, ids) + + if result.reqData.id then + BIReport:postSevenDayTask(BIReport.SEVEN_DAY_OPT.TASK_REWARD, {result.reqData.id}, result.rewards, result.reqData.period) + else + BIReport:postSevenDayTask(BIReport.SEVEN_DAY_OPT.TASK_REWARD, ids, result.rewards, result.reqData.period) + end +end + +function ActSevenDayManager:onGetRewardScore(id, period) + period = period or 1 + if not DataManager.ActSevenDayData:isOpen(period) then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ADVENTURE_CLOSED)) + return + end + + -- 一键领取处理 + id = nil + + local itemGetType = period == 1 and BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE or BIReport.ITEM_GET_TYPE.SEVEN_DAY_SCORE_2 + self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDaysScoreRewardReq, {id = id, period = period}, self.onGetRewardScoreSuccess, itemGetType) +end + +function ActSevenDayManager:onGetRewardScoreSuccess(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + GFunc.showRewardBox(result.rewards) + + local ids = DataManager.ActSevenDayData:getAllCanClaimScoreIds(result.reqData.period) + DataManager.ActSevenDayData:setScoreReceived(result.reqData.id, ids) + + if result.reqData.id then + BIReport:postSevenDayTask(BIReport.SEVEN_DAY_OPT.SCORE_REWARD, {result.reqData.id}, result.rewards, result.reqData.period) + else + BIReport:postSevenDayTask(BIReport.SEVEN_DAY_OPT.SCORE_REWARD, ids, result.rewards, result.reqData.period) + end +end + +function ActSevenDayManager:onGiftBuy(giftId) + PayManager:purchasePackage(giftId, PayManager.PURCHARSE_TYPE.ACT_GIFT, true) +end + +return ActSevenDayManager \ No newline at end of file diff --git a/lua/app/module/activity/act_pvp/act_pvp_manager.lua.meta b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua.meta similarity index 86% rename from lua/app/module/activity/act_pvp/act_pvp_manager.lua.meta rename to lua/app/module/activity/act_seven_day/act_seven_day_manager.lua.meta index 7f837927..510ce7cf 100644 --- a/lua/app/module/activity/act_pvp/act_pvp_manager.lua.meta +++ b/lua/app/module/activity/act_seven_day/act_seven_day_manager.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d97c1d93669059f4990f3ff1b17f7b58 +guid: f88003187528b4303b0803f5e40179b4 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/module/activity/activity_manager.lua b/lua/app/module/activity/activity_manager.lua index 2b046819..61e9c4a5 100644 --- a/lua/app/module/activity/activity_manager.lua +++ b/lua/app/module/activity/activity_manager.lua @@ -1,19 +1,5 @@ local ActivityManager = class("ActivityManager", BaseModule) -function ActivityManager:showGoldPigUI(showType) - UIManager:showUI("app/ui/activity/gold_pig/gold_pig_ui", {showType = showType}) -end - -function ActivityManager:buyGoldPig(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG) -end - -function ActivityManager:onBoughtGoldPigFinish(result) - if result.status == 0 then - DataManager.GoldPigData:onBought(result.pig) - end -end - -- 夏日活动分界线----------------------------------------------------------------------------------------------------- function ActivityManager:showActivityUI(panelType) diff --git a/lua/app/module/activity/fourteen_day/fourteen_day_const.lua b/lua/app/module/activity/fourteen_day/fourteen_day_const.lua deleted file mode 100644 index d65149d8..00000000 --- a/lua/app/module/activity/fourteen_day/fourteen_day_const.lua +++ /dev/null @@ -1,12 +0,0 @@ -local FourteenDayConst = {} - --- 战令档位 -FourteenDayConst.BOUNTY_GRADE_TYPE = { - FREE = 0, - PAY = 1, -} - --- 战令礼包id -FourteenDayConst.BOUNTY_GIFT_ID = 140405 - -return FourteenDayConst \ No newline at end of file diff --git a/lua/app/module/activity/fourteen_day/fourteen_day_manager.lua b/lua/app/module/activity/fourteen_day/fourteen_day_manager.lua deleted file mode 100644 index d09529fa..00000000 --- a/lua/app/module/activity/fourteen_day/fourteen_day_manager.lua +++ /dev/null @@ -1,75 +0,0 @@ -local FourteenDayManager = class("FourteenDayManager", BaseModule) - -function FourteenDayManager:showFourteenDayUI() - if DataManager.FourteenDayData:getNeedSyncData() then - self:reqSyncData() - end - - local time = DataManager.FourteenDayData:getEndRemainTime() - if time > 0 then - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_entrance_ui") - else - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_task_ui") - end -end - --- 购买活动战令 -function FourteenDayManager:buyBounty() - PayManager:purchasePackage(GConst.FourteenDayConst.BOUNTY_GIFT_ID, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - --- 请求任务奖励 -function FourteenDayManager:reqTaskReward(id) - self:sendMessage(ProtoMsgType.FromMsgEnum.FourteenBountyTaskAwardReq, {id = id}, {}, self.rspTaskReward, BIReport.ITEM_GET_TYPE.ACT_FOURTEEN_DAY_TASK) -end - -function FourteenDayManager:rspTaskReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FourteenDayData:onReceivedTaskReward(result.reqData.id) - GFunc.showRewardBox(result.rewards) - end -end - --- 请求战令奖励 -function FourteenDayManager:reqBountyReward(id, grade) - local list = {} - table.insert(list, {id = id, grade = grade}) - self:sendMessage(ProtoMsgType.FromMsgEnum.FourteenBountyAwardReq, {id_with_lv = list}, {}, self.rspBountyReward, BIReport.ITEM_GET_TYPE.ACT_FOURTEEN_DAY_BOUNTY) -end - -function FourteenDayManager:rspBountyReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FourteenDayData:onReceivedBountyReward(result.id_with_lv) - - GFunc.showRewardBox(result.rewards) - end -end - --- 请求兑换奖励 -function FourteenDayManager:reqExchangeReward(id, count) - self:sendMessage(ProtoMsgType.FromMsgEnum.FourteenBountyExchangeAwardReq, {id = id, count = count or 0}, {}, self.rspExchangeReward, BIReport.ITEM_GET_TYPE.ACT_FOURTEEN_DAY_EXCHANGE) -end - -function FourteenDayManager:rspExchangeReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData.count then - DataManager.FourteenDayData:onReceivedExchangeReward(result.reqData.id, result.reqData.count) - end - - GFunc.showRewardBox(result.rewards) - end -end - -function FourteenDayManager:reqSyncData() - self:sendMessage(ProtoMsgType.FromMsgEnum.FourteenDayInfoReq, {}, {}, self.rspSyncData) -end - -function FourteenDayManager:rspSyncData(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FourteenDayData:setSyncData() - DataManager.FourteenDayData:initData(result.info) - DataManager.FourteenDayData:setDirty() - end -end - -return FourteenDayManager \ No newline at end of file diff --git a/lua/app/module/activity/full_moon/full_moon_const.lua b/lua/app/module/activity/full_moon/full_moon_const.lua deleted file mode 100644 index 826e3f09..00000000 --- a/lua/app/module/activity/full_moon/full_moon_const.lua +++ /dev/null @@ -1,28 +0,0 @@ -local FullMoonConst = {} - --- 活动id -FullMoonConst.ACT_ID = 406 - - -FullMoonConst.ACT_DAYS = 10 - --- 英雄自选礼包分页显示个数 -FullMoonConst.HERO_GIFT_SHOW_STEP = { - 4,4,5 -} - --- 界面 -FullMoonConst.PANEL_TYPE = { - TASK = 1, - CHOOSE_HERO = 2, - NEW_HERO = 3, - SKIN = 4, -} - -FullMoonConst.SKIN_CHALLENGE_ID_1 = 1 -FullMoonConst.SKIN_CHALLENGE_ID_2 = 2 - -FullMoonConst.SKIN_GIFT_ID_1 = 200102 -FullMoonConst.SKIN_GIFT_ID_2 = 200202 - -return FullMoonConst \ No newline at end of file diff --git a/lua/app/module/activity/full_moon/full_moon_const.lua.meta b/lua/app/module/activity/full_moon/full_moon_const.lua.meta deleted file mode 100644 index e03c47f8..00000000 --- a/lua/app/module/activity/full_moon/full_moon_const.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2ce3abbd5316c744c9ea4254adf1a947 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/full_moon/full_moon_manager.lua b/lua/app/module/activity/full_moon/full_moon_manager.lua deleted file mode 100644 index 8a32c606..00000000 --- a/lua/app/module/activity/full_moon/full_moon_manager.lua +++ /dev/null @@ -1,112 +0,0 @@ -local FullMoonManager = class("FullMoonManager", BaseModule) - -function FullMoonManager:showActMainUI(panelType) - UIManager:showUI("app/ui/activity/full_moon/full_moon_ui", panelType) -end - --- 初始化计时器 -function FullMoonManager:initTimer() - self:unscheduleGlobal(self.actSid) - - if DataManager.FullMoonData:isOpenTime() then - Logger.logHighlight("圆月活动结束倒计时:"..DataManager.FullMoonData:getEndRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("圆月活动结束") - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACTIVITY_FULL_MOON_END) - end, DataManager.FullMoonData:getEndRemainTime()) - elseif DataManager.FullMoonData:getStartRemainTime() > 0 then - Logger.logHighlight("圆月活动开始倒计时:"..DataManager.FullMoonData:getStartRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("圆月活动开始") - self:reqActData() - end, DataManager.FullMoonData:getStartRemainTime()) - end -end - --- 请求活动数据 -function FullMoonManager:reqActData() - if not DataManager.FullMoonData:isOpen() then - return - end - if not DataManager.FullMoonData:isOpenTime() then - return - end - if self.isReqActData then - return - end - - self.isReqActData = true - self:sendMessage(ProtoMsgType.FromMsgEnum.FullMoonInfoReq, {}, {}, self.rspActData, nil) -end - -function FullMoonManager:rspActData(result) - self.isReqActData = false - DataManager.FullMoonData:setInReset(false) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FullMoonData:onGetActData(result.full_moon) - end -end - --- 请求任务奖励 -function FullMoonManager:reqTaskReward(id) - self:sendMessage(ProtoMsgType.FromMsgEnum.FullMoonTaskClaimReq, {id = id}, {}, self.rspTaskReward, BIReport.ITEM_GET_TYPE.FULL_MOON_TASK) -end - -function FullMoonManager:rspTaskReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FullMoonData:onReceivedTaskReward(result.reqData.id, result.finished) - GFunc.showRewardBox(result.rewards) - end -end - --- 请求任务进度奖励 -function FullMoonManager:reqTaskProgressReward(id) - self:sendMessage(ProtoMsgType.FromMsgEnum.FullMoonRewardClaimReq, {id = id}, {}, self.rspTaskProgressReward, BIReport.ITEM_GET_TYPE.FULL_MOON_TASK_PROG_REWARD) -end - -function FullMoonManager:rspTaskProgressReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FullMoonData:onReceivedTaskProgressReward(result.reqData.id) - GFunc.showRewardBox(result.rewards) - end -end - --- 自选礼包选择 -function FullMoonManager:reqGiftChooseHero(index) - self:sendMessage(ProtoMsgType.FromMsgEnum.FullMoonCustomGiftChooseReq, {index = index}, {}, self.rspGiftChooseHero, nil) -end - -function FullMoonManager:rspGiftChooseHero(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FullMoonData:onChooseHeroSuccess(result.reqData.index) - end -end - --- 皮肤挑战 -function FullMoonManager:skinChallenge(id) - DataManager.FullMoonData:setCurSkinChallengeId(id) - ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.FULL_MOON_SKIN, nil, function() - UIManager:closeAllUI() - ModuleManager.MaincityManager:showMainCityUI() - self:showActMainUI(GConst.FullMoonConst.PANEL_TYPE.SKIN) - end) -end - --- 请求皮肤关卡挑战奖励 -function FullMoonManager:reqChapterSkinClaim(id, combatReport) - if not combatReport.victory or DataManager.FullMoonData:isReceivedSkinFirstChallengeReward(id) then - ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.FULL_MOON_SKIN, {}, combatReport or {}, nil, nil, true) - return - end - - self:sendMessage(ProtoMsgType.FromMsgEnum.FullMoonChapterSkinClaimReq, {id = id, combatReport = combatReport}, {}, self.rspChapterSkinClaim, BIReport.ITEM_GET_TYPE.FULL_MOON_SKIN_CHALLENGE_REWARD) -end - -function FullMoonManager:rspChapterSkinClaim(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.FullMoonData:onReceivedSkinChallengeReward(result.reqData.id) - ModuleManager.BattleManager:showBattleResultUI(GConst.BattleConst.BATTLE_TYPE.FULL_MOON_SKIN, result.rewards, result.reqData and result.reqData.combatReport or {}, nil, nil, true) - end -end - -return FullMoonManager \ No newline at end of file diff --git a/lua/app/module/activity/full_moon/full_moon_manager.lua.meta b/lua/app/module/activity/full_moon/full_moon_manager.lua.meta deleted file mode 100644 index 96c45dbe..00000000 --- a/lua/app/module/activity/full_moon/full_moon_manager.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 5b71325bf902494459246e0b6b8b0799 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/hero_fund.meta b/lua/app/module/activity/hero_fund.meta deleted file mode 100644 index 8e37d3d1..00000000 --- a/lua/app/module/activity/hero_fund.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 182ed211dd57b7044ae0c6f66592ded7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua b/lua/app/module/activity/hero_fund/hero_fund_manager.lua deleted file mode 100644 index b24aab9e..00000000 --- a/lua/app/module/activity/hero_fund/hero_fund_manager.lua +++ /dev/null @@ -1,51 +0,0 @@ -local HeroFundManager = class("HeroFundManager", BaseModule) - -function HeroFundManager:showMainUI() - UIManager:showUI("app/ui/activity/hero_fund/hero_fund_ui") -end - -function HeroFundManager:reqHeroFundAward(level, rewardType) - if not DataManager.HeroFundData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - -- 直接一键领取 - local curLevel = DataManager.HeroFundData:getWaveLevel() - local heroIdWithLv = {} - for id = 1, curLevel do - if DataManager.HeroFundData:getFreeCanGet(id) then - table.insert(heroIdWithLv, {id = id, grade = 0}) - end - - if DataManager.HeroFundData:getProCanGet(id) then - table.insert(heroIdWithLv, {id = id, grade = 1}) - end - - if DataManager.HeroFundData:getUtralCanGet(id) then - table.insert(heroIdWithLv, {id = id, grade = 2}) - end - end - - if not heroIdWithLv[1] then - return - end - - local params = { - id_with_lv = heroIdWithLv - } - - self:sendMessage(ProtoMsgType.FromMsgEnum.HeroFundAwardReq, params, {}, self.rspHeroFundAward, BIReport.ITEM_GET_TYPE.ACT_HERO_FUND) -end - -function HeroFundManager:rspHeroFundAward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.HeroFundData:gotReward(result.id_with_lv) - GFunc.showRewardBox(result.rewards) - end -end - -function HeroFundManager:purcharse(id) - PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - -return HeroFundManager \ No newline at end of file diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta b/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta deleted file mode 100644 index 474cdb5d..00000000 --- a/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 171aacb33b4ccc4439c40b8db650c861 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/seven_day.meta b/lua/app/module/activity/seven_day.meta deleted file mode 100644 index 2ae0347f..00000000 --- a/lua/app/module/activity/seven_day.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6e3e0d09097ce624f8d4b5ae32986f8a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/module/activity/seven_day/seven_day_manager.lua b/lua/app/module/activity/seven_day/seven_day_manager.lua deleted file mode 100644 index e74f83a2..00000000 --- a/lua/app/module/activity/seven_day/seven_day_manager.lua +++ /dev/null @@ -1,43 +0,0 @@ -local SevenDayManager = class("SevenDayManager", BaseModule) - -function SevenDayManager:showUI() - UIManager:showUI("app/ui/activity/seven_day/seven_day_ui") -end - -function SevenDayManager:claimTaskReward(id) - local args = { - ids = {id} - } - self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayTaskRewardReq, args, {}, self.onClaimTaskRewardFinish, BIReport.ITEM_GET_TYPE.SEVEN_DAY_TASK) -end - -function SevenDayManager:onClaimTaskRewardFinish(result) - if result.status == 0 then - GFunc.showRewardBox(result.rewards) - DataManager.SevenDayData:refreshTasks(result.tasks) - DataManager.SevenDayData:setDirty() - end -end - -function SevenDayManager:claimStepReward(id) - if DataManager.SevenDayData:getStepCollected(id) then - return - end - if not DataManager.SevenDayData:canClaimStepTask(id) then - return - end - local params = { - id = id - } - self:sendMessage(ProtoMsgType.FromMsgEnum.SevenDayRewardReq, params, {}, self.onClaimStepRewardFinish, BIReport.ITEM_GET_TYPE.SEVEN_DAY_STEP_REWARD) -end - -function SevenDayManager:onClaimStepRewardFinish(result) - if result.status == 0 then - GFunc.showRewardBox(result.rewards) - DataManager.SevenDayData:refreshClaimed(result.Claimed) - DataManager.SevenDayData:setDirty() - end -end - -return SevenDayManager \ No newline at end of file diff --git a/lua/app/module/activity/seven_day/seven_day_manager.lua.meta b/lua/app/module/activity/seven_day/seven_day_manager.lua.meta deleted file mode 100644 index f3be8a12..00000000 --- a/lua/app/module/activity/seven_day/seven_day_manager.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3fdb6f3ad506b164384e16409f578595 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/tourn_arena.meta b/lua/app/module/activity/tourn_arena.meta deleted file mode 100644 index e4564094..00000000 --- a/lua/app/module/activity/tourn_arena.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0a51eb4f4ea887b4fb3681027bf8e553 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/module/activity/tourn_arena/tourn_arena_const.lua b/lua/app/module/activity/tourn_arena/tourn_arena_const.lua deleted file mode 100644 index e339c7c3..00000000 --- a/lua/app/module/activity/tourn_arena/tourn_arena_const.lua +++ /dev/null @@ -1,33 +0,0 @@ -local TournArenaConst = {} - --- 界面 -TournArenaConst.PANEL_TYPE = { - BOUNTY = 1, - RANK = 2, - GIFT = 3, -} - --- 战令档位 -TournArenaConst.BOUNTY_GRADE_TYPE = { - FREE = 0, - PAY1 = 1, - PAY2 = 2, -} - --- 战令礼包id -TournArenaConst.BOUNTY_GIFT_ID_1 = 240102 -TournArenaConst.BOUNTY_GIFT_ID_2 = 240202 - -TournArenaConst.GIFT_IDS = { - 240302, - 240402, - 240502, - 240602, - 240702, - 240802, -} - --- 轮次周期 -TournArenaConst.PRESENT_TURN_DAY = 2 - -return TournArenaConst \ No newline at end of file diff --git a/lua/app/module/activity/tourn_arena/tourn_arena_const.lua.meta b/lua/app/module/activity/tourn_arena/tourn_arena_const.lua.meta deleted file mode 100644 index 0dfcb7b5..00000000 --- a/lua/app/module/activity/tourn_arena/tourn_arena_const.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fcf392b8e24fe79459d4bb5f8eb0c5d7 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua b/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua deleted file mode 100644 index e97968c0..00000000 --- a/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua +++ /dev/null @@ -1,123 +0,0 @@ -local TournArenaManager = class("TournArenaManager", BaseModule) - -function TournArenaManager:init() - self:addEventListener(EventManager.CUSTOM_EVENT.ARENA_BATTLE_SETTLEMENT, function(isWin) - self:reqActData() - end) -end - -function TournArenaManager:showActMainUI() - UIManager:showUI("app/ui/activity/tourn_arena/tourn_arena_ui") -end - --- 初始化计时器 -function TournArenaManager:initTimer() - self:unscheduleGlobal(self.actSid) - - if DataManager.TournArenaData:isActiveTime() then - Logger.logHighlight("竞技场锦标赛活动结束倒计时:"..DataManager.TournArenaData:getEndRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("竞技场锦标赛活动结束") - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACTIVITY_TOURN_ARENA_END) - end, DataManager.TournArenaData:getEndRemainTime()) - elseif DataManager.TournArenaData:getStartRemainTime() > 0 then - Logger.logHighlight("竞技场锦标赛活动开始倒计时:"..DataManager.TournArenaData:getStartRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("竞技场锦标赛活动开始") - DataManager.ShopData:resetTournArenaGift() - self:reqActData() - end, DataManager.TournArenaData:getStartRemainTime()) - end -end - --- 购买活动战令 -function TournArenaManager:buyBounty(giftId) - PayManager:purchasePackage(giftId, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - --- 请求活动数据 -function TournArenaManager:reqActData() - if not DataManager.TournArenaData:isOpen() then - return - end - if not DataManager.TournArenaData:isActiveTime() then - return - end - self:sendMessage(ProtoMsgType.FromMsgEnum.TournArenaDataReq, {}, {}, self.rspActData, nil) -end - -function TournArenaManager:rspActData(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournArenaData:onGetActData(result.tourn_arena) - end -end - --- 请求战令奖励 -function TournArenaManager:reqBountyReward(id, grade) - id = 0-- 默认领所有可领奖励 - self:sendMessage(ProtoMsgType.FromMsgEnum.TournArenaBountyClaimReq, {id = id, grade = grade}, {}, self.rspBountyReward, BIReport.ITEM_GET_TYPE.TOURN_ARENA_BOUNTY_REWARD) -end - -function TournArenaManager:rspBountyReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournArenaData:onReceivedBountyReward(result.success_id_grade) - - GFunc.showRewardBox(result.rewards) - end -end - --- 购买战令等级 -function TournArenaManager:reqBuyBountyLevel() - local cost = DataManager.TournArenaData: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.ACTIVITY_BUY_LEVEL, - costId = costId, - costNum = costNum, - okFunc = function() - local id = DataManager.TournArenaData:getBountyIdList()[DataManager.TournArenaData:getBountyLevel() + 1] - -- Logger.logHighlight("购买战令等级:"..id) - self:sendMessage(ProtoMsgType.FromMsgEnum.TournArenaBountyClaimByDiamondReq, {id = id}, {}, self.rspBuyBountyLevel, BIReport.ITEM_GET_TYPE.TOURN_ARENA_BOUNTY_LEVEL) - end, - } - GFunc.showMessageBox(params) -end - -function TournArenaManager:rspBuyBountyLevel(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournArenaData:onBoughtBountyLevel() - end -end - --- 获取排行榜数据 -function TournArenaManager:reqRankList(turn) - self:sendMessage(ProtoMsgType.FromMsgEnum.TournArenaRankReq, {turn = turn}, {}, self.rspRankList, nil) -end - -function TournArenaManager:rspRankList(result) - DataManager.TournArenaData:setInReset(false) - if result.err_code == GConst.ERROR_STR.SUCCESS and result.reqData then - DataManager.TournArenaData:onGetRankData(result.reqData.turn, result.ranks, result.score, result.own_rank) - end -end - --- 领取排行榜奖励 -function TournArenaManager:reqRankReward() - self:sendMessage(ProtoMsgType.FromMsgEnum.TournArenaRankClaimRewardReq, {}, {}, self.rspRankReward, BIReport.ITEM_GET_TYPE.TOURN_ARENA_RANK_REWARD) -end - -function TournArenaManager:rspRankReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournArenaData:onReceivedRankReward() - GFunc.showRewardBox(result.rewards) - end -end - -return TournArenaManager \ No newline at end of file diff --git a/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua.meta b/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua.meta deleted file mode 100644 index 940f76ea..00000000 --- a/lua/app/module/activity/tourn_arena/tourn_arena_manager.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c3b14de198ed03f42b62c82328c27519 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/tourn_wave.meta b/lua/app/module/activity/tourn_wave.meta deleted file mode 100644 index e0716506..00000000 --- a/lua/app/module/activity/tourn_wave.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4b9001279852c1a4ca2b3596edbcc576 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/module/activity/tourn_wave/tourn_wave_const.lua b/lua/app/module/activity/tourn_wave/tourn_wave_const.lua deleted file mode 100644 index 35fabcbc..00000000 --- a/lua/app/module/activity/tourn_wave/tourn_wave_const.lua +++ /dev/null @@ -1,33 +0,0 @@ -local TournWaveConst = {} - --- 界面 -TournWaveConst.PANEL_TYPE = { - BOUNTY = 1, - RANK = 2, - GIFT = 3, -} - --- 战令档位 -TournWaveConst.BOUNTY_GRADE_TYPE = { - FREE = 0, - PAY1 = 1, - PAY2 = 2, -} - --- 战令礼包id -TournWaveConst.BOUNTY_GIFT_ID_1 = 230102 -TournWaveConst.BOUNTY_GIFT_ID_2 = 230202 - -TournWaveConst.GIFT_IDS = { - 230302, - 230402, - 230502, - 230602, - 230702, - 230802, -} - --- 轮次周期 -TournWaveConst.PRESENT_TURN_DAY = 2 - -return TournWaveConst \ No newline at end of file diff --git a/lua/app/module/activity/tourn_wave/tourn_wave_const.lua.meta b/lua/app/module/activity/tourn_wave/tourn_wave_const.lua.meta deleted file mode 100644 index 54a4b3b2..00000000 --- a/lua/app/module/activity/tourn_wave/tourn_wave_const.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b16d29c98a6455245aeeb8e6941c3625 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua b/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua deleted file mode 100644 index b95769ee..00000000 --- a/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua +++ /dev/null @@ -1,117 +0,0 @@ -local TournWaveManager = class("TournWaveManager", BaseModule) - -function TournWaveManager:showActMainUI() - UIManager:showUI("app/ui/activity/tourn_wave/tourn_wave_ui") -end - --- 初始化计时器 -function TournWaveManager:initTimer() - self:unscheduleGlobal(self.actSid) - - if DataManager.TournWaveData:isActiveTime() then - Logger.logHighlight("波次锦标赛活动结束倒计时:"..DataManager.TournWaveData:getEndRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("波次锦标赛活动结束") - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACTIVITY_TOURN_WAVE_END) - end, DataManager.TournWaveData:getEndRemainTime()) - elseif DataManager.TournWaveData:getStartRemainTime() > 0 then - Logger.logHighlight("波次锦标赛活动开始倒计时:"..DataManager.TournWaveData:getStartRemainTime()) - self.actSid = self:performWithDelayGlobal(function() - Logger.logHighlight("波次锦标赛活动开始") - DataManager.ShopData:resetTournWaveGift() - self:reqActData() - end, DataManager.TournWaveData:getStartRemainTime()) - end -end - --- 购买活动战令 -function TournWaveManager:buyBounty(giftId) - PayManager:purchasePackage(giftId, PayManager.PURCHARSE_TYPE.ACT_GIFT) -end - --- 请求活动数据 -function TournWaveManager:reqActData() - if not DataManager.TournWaveData:isOpen() then - return - end - if not DataManager.TournWaveData:isActiveTime() then - return - end - self:sendMessage(ProtoMsgType.FromMsgEnum.TournWaveDataReq, {}, {}, self.rspActData, nil) -end - -function TournWaveManager:rspActData(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournWaveData:onGetActData(result.tourn_wave) - end -end - --- 请求战令奖励 -function TournWaveManager:reqBountyReward(id, grade) - id = 0-- 默认领所有可领奖励 - self:sendMessage(ProtoMsgType.FromMsgEnum.TournWaveBountyClaimReq, {id = id, grade = grade}, {}, self.rspBountyReward, BIReport.ITEM_GET_TYPE.TOURN_WAVE_BOUNTY_REWARD) -end - -function TournWaveManager:rspBountyReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournWaveData:onReceivedBountyReward(result.success_id_grade) - - GFunc.showRewardBox(result.rewards) - end -end - --- 购买战令等级 -function TournWaveManager:reqBuyBountyLevel() - local cost = DataManager.TournWaveData: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.ACTIVITY_BUY_LEVEL, - costId = costId, - costNum = costNum, - okFunc = function() - local id = DataManager.TournWaveData:getBountyIdList()[DataManager.TournWaveData:getBountyLevel() + 1] - -- Logger.logHighlight("购买战令等级:"..id) - self:sendMessage(ProtoMsgType.FromMsgEnum.TournWaveBountyClaimByDiamondReq, {id = id}, {}, self.rspBuyBountyLevel, BIReport.ITEM_GET_TYPE.TOURN_WAVE_BOUNTY_LEVEL) - end, - } - GFunc.showMessageBox(params) -end - -function TournWaveManager:rspBuyBountyLevel(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournWaveData:onBoughtBountyLevel() - end -end - --- 获取排行榜数据 -function TournWaveManager:reqRankList(turn) - self:sendMessage(ProtoMsgType.FromMsgEnum.TournWaveRankReq, {turn = turn}, {}, self.rspRankList, nil) -end - -function TournWaveManager:rspRankList(result) - DataManager.TournWaveData:setInReset(false) - if result.err_code == GConst.ERROR_STR.SUCCESS and result.reqData then - DataManager.TournWaveData:onGetRankData(result.reqData.turn, result.ranks, result.score, result.own_rank) - end -end - --- 领取排行榜奖励 -function TournWaveManager:reqRankReward() - self:sendMessage(ProtoMsgType.FromMsgEnum.TournWaveRankClaimRewardReq, {}, {}, self.rspRankReward, BIReport.ITEM_GET_TYPE.TOURN_WAVE_RANK_REWARD) -end - -function TournWaveManager:rspRankReward(result) - if result.err_code == GConst.ERROR_STR.SUCCESS then - DataManager.TournWaveData:onReceivedRankReward() - GFunc.showRewardBox(result.rewards) - end -end - -return TournWaveManager \ No newline at end of file diff --git a/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua.meta b/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua.meta deleted file mode 100644 index e9136a71..00000000 --- a/lua/app/module/activity/tourn_wave/tourn_wave_manager.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 96146863570985640a1597f0ab1dbd55 -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 f6a49025..b5d9159d 100644 --- a/lua/app/module/maincity/maincity_const.lua +++ b/lua/app/module/maincity/maincity_const.lua @@ -25,6 +25,8 @@ MainCityConst.LEFT_SIDE_BARS = { MainCityConst.RIGHT_SIDE_BARS = { "app/ui/main_city/cell/side_bar_sign_cell", -- 签到 + "app/ui/main_city/cell/side_bar_seven_day_cell", -- 七天乐第一期 + "app/ui/main_city/cell/side_bar_seven_day_cell_2", -- 七天乐第二期 } return MainCityConst \ No newline at end of file diff --git a/lua/app/module/maincity/maincity_manager.lua b/lua/app/module/maincity/maincity_manager.lua index 73e5419c..fb4eb2c1 100644 --- a/lua/app/module/maincity/maincity_manager.lua +++ b/lua/app/module/maincity/maincity_manager.lua @@ -81,7 +81,7 @@ function MaincityManager:getModuleEntrancePos(moduleKey) elseif moduleKey == ModuleManager.MODULE_KEY.SUMMON_OPEN then return mainUI:getSummonIconPos() elseif moduleKey == ModuleManager.MODULE_KEY.FUND or - moduleKey == ModuleManager.MODULE_KEY.SEVEN_DAY then + moduleKey == ModuleManager.MODULE_KEY.ACT_SEVENDAY then return mainUI:getSideBarActIconPos(moduleKey) end end diff --git a/lua/app/ui/activity/act_boss_rush.meta b/lua/app/ui/activity/act_boss_rush.meta deleted file mode 100644 index a993b0bd..00000000 --- a/lua/app/ui/activity/act_boss_rush.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cb002506d3ebe7f4b81bfb1f32ccb50b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua b/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua deleted file mode 100644 index 36c818a9..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua +++ /dev/null @@ -1,172 +0,0 @@ -local ActBossRushFundUI = class("ActBossRushFundUI", BaseUI) - -local FUND_CELL = "app/ui/activity/act_boss_rush/cell/fund_cell" -local BTN_ICON = {"common_btn_green_3", "act_bossrush_board_1"} - -function ActBossRushFundUI:onPressBackspace() - self:closeUI() -end - -function ActBossRushFundUI:isFullScreen() - return false -end - -function ActBossRushFundUI:ctor() - self.rewardList = {} - for _, id in pairs(DataManager.ActBossRushData:getBountyList()) do - table.insert(self.rewardList, id) - end - table.sort(self.rewardList, function(a, b) - return a < b - end) -end - -function ActBossRushFundUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_boss_rush/act_boss_rush_fund_ui.prefab" -end - -function ActBossRushFundUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActBossRushFundUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_fund_ui.bg.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_15)) - uiMap["act_boss_rush_fund_ui.bg.level.tx_level"]:setText(DataManager.ActBossRushData:getWaveCount()) - uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level.tx_num"]:setText(GFunc.getRewardNum(DataManager.ActBossRushData:getBuyBountyLevelCost())) - self.downDesc = uiMap["act_boss_rush_fund_ui.bg.bg.desc"] - self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_16)) - - self:refreshBtns() - self:_refreshScrollrect() -end - -function ActBossRushFundUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_fund_ui.bg.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level"]:addClickListener(function() - ModuleManager.ActBossRushManager:reqBuyFundLevel() - end) -end - -function ActBossRushFundUI:_bind() - self:bind(DataManager.ActBossRushData, "isDirty", function() - self:_display() - end) -end - -function ActBossRushFundUI:refreshBtns() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_fund_ui.bg.free.tx_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - - local probtn = uiMap["act_boss_rush_fund_ui.bg.buy1"] - local proBtntx = uiMap["act_boss_rush_fund_ui.bg.buy1.tx_buyed"] - local proBuy = uiMap["act_boss_rush_fund_ui.bg.buy1.tx_buy"] - proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - proBuy:setText(DataManager.ActBossRushData:getProPrice()) - - if DataManager.ActBossRushData:getProBought() then - probtn:setSprite(GConst.ATLAS_PATH.ACT_BOSS_RUSH, BTN_ICON[2]) - probtn:setTouchEnable(false) - proBtntx:setVisible(true) - proBuy:setVisible(false) - else - probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - probtn:setTouchEnable(true) - probtn:addClickListener(function() - ModuleManager.ActBossRushManager:purcharse(DataManager.ActBossRushData:getProActId()) - end) - proBtntx:setVisible(false) - proBuy:setVisible(true) - end - - local utralbtn = uiMap["act_boss_rush_fund_ui.bg.buy2"] - local utralBtntx = uiMap["act_boss_rush_fund_ui.bg.buy2.tx_buyed"] - local utralBuy = uiMap["act_boss_rush_fund_ui.bg.buy2.tx_buy"] - utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - utralBuy:setText(DataManager.ActBossRushData:gettUtralPrice()) - - if DataManager.ActBossRushData:getUtralBought() then - utralbtn:setSprite(GConst.ATLAS_PATH.ACT_BOSS_RUSH, BTN_ICON[2]) - utralbtn:setTouchEnable(false) - utralBtntx:setVisible(true) - utralBuy:setVisible(false) - else - utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - utralbtn:setTouchEnable(true) - utralbtn:addClickListener(function() - ModuleManager.ActBossRushManager:purcharse(DataManager.ActBossRushData:getUtralActId()) - end) - utralBtntx:setVisible(false) - utralBuy:setVisible(true) - end -end - -function ActBossRushFundUI:_refreshScrollrect() - local uiMap = self.root:genAllChildren() - local mask = uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.mask_img"] - local level = DataManager.ActBossRushData:getWaveLevel() - DataManager.ActBossRushData:getStartWaveLevel() - local totalCount = #self.rewardList - local maskCount = math.max(0, totalCount - level) - mask:setAnchoredPositionY(-10 - level * 120) - mask:setSizeDeltaY(maskCount * 120 + 20) - local progSlider = uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - local y = (totalCount - 1) * 120 - if (level - 1) >= 0 then - progSlider.value = (level - 1) / (totalCount - 1) - else - progSlider.value = 0 - end - mask:setVisible(level < totalCount) - - if self.scrollRectComp then - self.scrollRectComp:updateAllCell() - return - end - - local prog = uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.prog"] - prog:setSizeDeltaY(y) - self.scrollRectComp = uiMap["act_boss_rush_fund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return FUND_CELL - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.rewardList[index]) - mask:getTransform():SetAsLastSibling() - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:setTotalCount(0) - if level < 1 then - level = 1 - end - self.scrollRectComp:refillCells(totalCount, nil, level) -end - -function ActBossRushFundUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActBossRushData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - uiMap["act_boss_rush_fund_ui.bg.countdown.tx_countdown"]:setText(str) - - uiMap["act_boss_rush_fund_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level"]:setActive(remainTime < 86400) -end - -return ActBossRushFundUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua.meta b/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua.meta deleted file mode 100644 index afec8598..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_fund_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 45ba6058207d9da498e2e6f026751fa9 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua b/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua deleted file mode 100644 index f82c5ec9..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua +++ /dev/null @@ -1,75 +0,0 @@ -local ActBossRushPopUI = class("ActBossRushPopUI", BaseUI) - -function ActBossRushPopUI:onPressBackspace() - self:closeUI() -end - -function ActBossRushPopUI:isFullScreen() - return false -end - -function ActBossRushPopUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_boss_rush/act_boss_rush_pop_ui.prefab" -end - -function ActBossRushPopUI:onClose() - if self.popCheckBar then - self.popCheckBar:saveCheckStatus() - end -end - -function ActBossRushPopUI:onLoadRootComplete() - self:_display() - self:_addListeners() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) - - DataManager.ActBossRushData:markPoped() -end - -function ActBossRushPopUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_pop_ui.ui_spine_obj"]:playAnim("idle", true, false) - uiMap["act_boss_rush_pop_ui.ui_spine_obj.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_2)) - uiMap["act_boss_rush_pop_ui.ui_spine_obj.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_13)) - uiMap["act_boss_rush_pop_ui.btn_goto.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_14)) - - self.popCheckBar = uiMap["act_boss_rush_pop_ui.pop_check_bar"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_CHECK_BAR) - self.popCheckBar:refresh(false, "ActBossRushData") -end - -function ActBossRushPopUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_pop_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_boss_rush_pop_ui.btn_goto"]:addClickListener(function() - if not DataManager.ActBossRushData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - ModuleManager.ActBossRushManager:showMainUI() - self:closeUI() - end) -end - -function ActBossRushPopUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActBossRushData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - uiMap["act_boss_rush_pop_ui.ui_spine_obj.countdown.tx_countdown"]:setText(str) -end - -return ActBossRushPopUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua.meta b/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua.meta deleted file mode 100644 index 8bbb9fcf..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_pop_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c80ebce3c84c2684c88d7ad6c254c656 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua b/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua deleted file mode 100644 index 545f22d0..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua +++ /dev/null @@ -1,330 +0,0 @@ -local ActBossRushRankUI = class("ActBossRushRankUI", BaseUI) - -local RANK_REWARD_CELL = "app/ui/activity/act_boss_rush/cell/rank_reward_cell" -local RANK_CELL = "app/ui/activity/act_boss_rush/cell/rank_cell" -local TOP_RANK_CELL = "app/ui/activity/act_boss_rush/cell/top_rank_cell" - -local PAGE_ICON = {"common_menu_1", "common_menu_2"} - -local PAGE_TYPE = { - LAST_DAY = 1, - TODAY = 2, - REWARD = 3, -} - -local PAGE_TX = { - [PAGE_TYPE.LAST_DAY] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_20, - [PAGE_TYPE.TODAY] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_21, - [PAGE_TYPE.REWARD] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_22, -} - -function ActBossRushRankUI:onPressBackspace() - self:closeUI() -end - -function ActBossRushRankUI:isFullScreen() - return false -end - -function ActBossRushRankUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_boss_rush/act_boss_rush_rank_ui.prefab" -end - -function ActBossRushRankUI:ctor() - self.rankRewardList = {} - self.rankRewardListCount = 0 - local cfg = DataManager.ActBossRushData:getRankConfig() - local list = DataManager.ActBossRushData:getRankRewardList() - for index, id in ipairs(list) do - local info = cfg[id] - table.insert(self.rankRewardList, {id = id, ranking1 = info.ranking[1], ranking2 = info.ranking[2], rewards = info.reward}) - self.rankRewardListCount = self.rankRewardListCount + 1 - end -end - -function ActBossRushRankUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() -end - -function ActBossRushRankUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_rank_ui.bg.rank_node.rank_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_24)) - uiMap["act_boss_rush_rank_ui.bg.rank_node.player_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_25)) - uiMap["act_boss_rush_rank_ui.bg.rank_node.record_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_26)) - - if not DataManager.ActBossRushData:getIsFinalDay() then - self:switchPage(PAGE_TYPE.TODAY) - else - self:switchPage(PAGE_TYPE.LAST_DAY) - end -end - -function ActBossRushRankUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_rank_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_boss_rush_rank_ui.bg.rank_bg.btn_help"]:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.NORMAL, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_27), - } - ModuleManager.TipsManager:showHelpTips(params) - end) -end - -function ActBossRushRankUI:_bind() - self:bind(DataManager.ActBossRushData, "isDirty", function() - if self.curPage ~= PAGE_TYPE.REWARD then - self:refreshRankNode() - else - self:refreshRewardNode() - end - self:refreshMyRankInfo() - self:refreshPages() - end) -end - -function ActBossRushRankUI:refreshRankNode() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_rank_ui.bg.rank_node"]:setActive(true) - uiMap["act_boss_rush_rank_ui.bg.reward_node"]:setActive(false) - local text = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_20 - if self.curPage == PAGE_TYPE.LAST_DAY then - self.rankList = DataManager.ActBossRushData:getLastRankInfo() - else - self.rankList = DataManager.ActBossRushData:getCurRankInfo() - text = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_21 - end - uiMap["act_boss_rush_rank_ui.bg.title"]:setText(I18N:getGlobalText(text)) - if not self.topRankCells then - self.topRankCells = {} - for i = 1, 3 do - self.topRankCells[i] = CellManager:addCellComp(uiMap["act_boss_rush_rank_ui.bg.rank_node.top_rank_cell_" .. i], TOP_RANK_CELL) - end - end - for index, cell in ipairs(self.topRankCells) do - cell:refresh(self.rankList[index]) - end - local count = #self.rankList - 3 - if count < 0 then - count = 0 - end - if self.rankScrollRectComp then - self.rankScrollRectComp:refillCells(count) - return - end - - self.rankScrollRectComp = uiMap["act_boss_rush_rank_ui.bg.rank_node.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.rankScrollRectComp:addInitCallback(function() - return RANK_CELL - end) - self.rankScrollRectComp:addRefreshCallback(function(index, cell) - local info = self.rankList[index + 3] - cell:refresh(index + 3, info) - end) - self.rankScrollRectComp:clearCells() - self.rankScrollRectComp:setTotalCount(0) - self.rankScrollRectComp:refillCells(count) -end - -function ActBossRushRankUI:refreshRewardNode() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_rank_ui.bg.rank_node"]:setActive(false) - uiMap["act_boss_rush_rank_ui.bg.reward_node"]:setActive(true) - uiMap["act_boss_rush_rank_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_22)) - if self.rewardScrollRectComp then - self.rewardScrollRectComp:updateAllCell() - return - end - - self.rewardScrollRectComp = uiMap["act_boss_rush_rank_ui.bg.reward_node.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.rewardScrollRectComp:addInitCallback(function() - return RANK_REWARD_CELL - end) - self.rewardScrollRectComp:addRefreshCallback(function(index, cell) - local info = self.rankRewardList[index] - cell:refresh(info.ranking1, info.ranking2, info.rewards, self.rankRewardListCount) - end) - self.rewardScrollRectComp:clearCells() - self.rewardScrollRectComp:setTotalCount(0) - self.rewardScrollRectComp:refillCells(#self.rankRewardList) -end - -function ActBossRushRankUI:refreshPages() - if not self.pageObjs then - local uiMap = self.root:genAllChildren() - self.pageObjs = {} - for i = 1, 3 do - self.pageObjs[i] = { - page = uiMap["act_boss_rush_rank_ui.bg.page_" .. i], - tx1 = uiMap["act_boss_rush_rank_ui.bg.page_" .. i .. ".tx"], - tx2 = uiMap["act_boss_rush_rank_ui.bg.page_" .. i .. ".tx_hl"], - } - self.pageObjs[i].page:addClickListener(function() - self:switchPage(i) - end) - end - end - for index, objs in ipairs(self.pageObjs) do - if index == self.curPage then - objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[1]) - objs.page:setAnchoredPositionY(-516.5) - objs.tx1:setText(GConst.EMPTY_STRING) - objs.tx2:setText(I18N:getGlobalText(PAGE_TX[index])) - else - objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[2]) - objs.page:setAnchoredPositionY(-505.5) - objs.tx1:setText(I18N:getGlobalText(PAGE_TX[index])) - objs.tx2:setText(GConst.EMPTY_STRING) - end - end - - if DataManager.ActBossRushData:getIsFinalDay() then - self.pageObjs[2].page:setActive(false) - self.pageObjs[1].page:setActive(true) - self.pageObjs[3].page:setActive(true) - self.pageObjs[1].page:setAnchoredPositionX(-90) - self.pageObjs[3].page:setAnchoredPositionX(90) - elseif DataManager.ActBossRushData:getIsFirstDay() then - self.pageObjs[1].page:setActive(false) - self.pageObjs[2].page:setActive(true) - self.pageObjs[3].page:setActive(true) - self.pageObjs[2].page:setAnchoredPositionX(-90) - self.pageObjs[3].page:setAnchoredPositionX(90) - else - local x = -186 - for index, objs in ipairs(self.pageObjs) do - objs.page:setAnchoredPositionX(x) - x = x + 186 - objs.page:setActive(true) - end - end - - if DataManager.ActBossRushData:canGetRankReward() then - self.pageObjs[3].page:addRedPoint(77, -6.5, 1) - else - self.pageObjs[3].page:removeRedPoint() - end -end - -function ActBossRushRankUI:switchPage(page) - if self.curPage == page then - return - end - self.curPage = page - - if self.curPage ~= PAGE_TYPE.REWARD then - self:refreshRankNode() - else - self:refreshRewardNode() - end - - self:refreshPages() - self:refreshMyRankInfo() -end - -function ActBossRushRankUI:refreshMyRankInfo() - local info = DataManager.ActBossRushData:getLastSelfInfo() - local canGot = DataManager.ActBossRushData:canGetRankReward() - - if self.curPage == PAGE_TYPE.TODAY then - info = DataManager.ActBossRushData:getCurRankSelfInfo() - end - if self.curPage == PAGE_TYPE.REWARD and not canGot then - info = DataManager.ActBossRushData:getCurRankSelfInfo() - end - local rank = info and info.rank or 0 - local wave = info and info.wave or 0 - local round = info and info.round or 0 - local uiMap = self.root:genAllChildren() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["act_boss_rush_rank_ui.bg.rank_bg.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.selfRewardCells = {} - for i = 1, 2 do - self.selfRewardCells[i] = CellManager:addCellComp(uiMap["act_boss_rush_rank_ui.bg.rank_bg.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - end - end - - self.playerHeadCell:refresh() - uiMap["act_boss_rush_rank_ui.bg.rank_bg.name"]:setText(DataManager.PlayerData:getNickname()) - local descObj = uiMap["act_boss_rush_rank_ui.bg.rank_bg.tx_last_day"] - local rankObj = uiMap["act_boss_rush_rank_ui.bg.rank_bg.tx_rank"] - if not rank or rank <= 0 then - rankObj:setText("--") - else - rankObj:setText(rank) - end - - local waveObj = uiMap["act_boss_rush_rank_ui.bg.rank_bg.tx_wave"] - if not wave then - waveObj:setText("--") - else - waveObj:setText(wave) - end - - local roundObj = uiMap["act_boss_rush_rank_ui.bg.rank_bg.tx_round"] - if not round then - roundObj:setText("--") - else - roundObj:setText(round) - end - - local imgWave = uiMap["act_boss_rush_rank_ui.bg.rank_bg.wave_icon"] - local imgRound = uiMap["act_boss_rush_rank_ui.bg.rank_bg.round_icon"] - if self.curPage ~= PAGE_TYPE.REWARD then - imgWave:setVisible(true) - imgRound:setVisible(true) - waveObj:setVisible(true) - roundObj:setVisible(true) - for index, cell in ipairs(self.selfRewardCells) do - cell:getBaseObject():setActive(false) - end - if self.curPage == PAGE_TYPE.LAST_DAY then - descObj:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_20)) - else - descObj:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_21)) - end - else - imgWave:setVisible(false) - imgRound:setVisible(false) - waveObj:setVisible(false) - roundObj:setVisible(false) - - local got = DataManager.ActBossRushData:isGotRankReward() - local rewards - if canGot then - rewards = DataManager.ActBossRushData:getRankRewards(rank) - descObj:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_20)) - else - info = DataManager.ActBossRushData:getCurRankSelfInfo() - rewards = DataManager.ActBossRushData:getRankRewards(info.rank or 0) - got = false - descObj:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_21)) - end - - for index, cell in ipairs(self.selfRewardCells) do - if rewards and rewards[index] then - cell:refreshByConfig(rewards[index], got, got) - cell:getBaseObject():setActive(true) - if canGot then - cell:showFrameAnimation() - cell:addClickListener(function() - ModuleManager.ActBossRushManager:reqRankReward() - end) - else - cell:hideFrameAnimation() - cell:addClickListener(nil) - end - else - cell:getBaseObject():setActive(false) - end - end - end -end - -return ActBossRushRankUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua.meta b/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua.meta deleted file mode 100644 index a5800d2d..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_rank_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f63e47497cfb42442a9ae4c634a24cb1 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua b/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua deleted file mode 100644 index 90ebff49..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua +++ /dev/null @@ -1,116 +0,0 @@ -local ActBossRushShopUI = class("ActBossRushShopUI", BaseUI) - -local SHOP_CELL = "app/ui/activity/act_boss_rush/cell/shop_cell" - -function ActBossRushShopUI:onPressBackspace() - self:closeUI() -end - -function ActBossRushShopUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_boss_rush/act_boss_rush_shop_ui.prefab" -end - -function ActBossRushShopUI:isFullScreen() - return false -end - -function ActBossRushShopUI:ctor() - self:dealList() -end - -function ActBossRushShopUI:dealList() - self.shopList = {} - self.costId = 1 - for _, id in ipairs(DataManager.ActBossRushData:getExchangeList()) do - local canExchange = DataManager.ActBossRushData:getExchangeRemainCount(id) > 0 - table.insert(self.shopList, {id = id, canExchange = canExchange}) - if self.costId == 1 then - local cost = DataManager.ActBossRushData:getShopCost(id) - self.costId = GFunc.getRewardId(cost) - end - end - - table.sort(self.shopList, function(a, b) - if a.canExchange == b.canExchange then - return a.id < b.id - else - return a.canExchange - end - end) -end - -function ActBossRushShopUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) - - DataManager.ActBossRushData:setTodayExchangeCheck() -end - -function ActBossRushShopUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_shop_ui.bg.desc_bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_17)) - uiMap["act_boss_rush_shop_ui.bg.score.tx_score"]:setText(DataManager.BagData.ItemData:getItemNumById(self.costId)) - uiMap["act_boss_rush_shop_ui.bg.score.img"]:setSprite(ModuleManager.ItemManager:getItemIcon(self.costId)) - - self:_refreshScrollrect() -end - -function ActBossRushShopUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_shop_ui.bg.score"]:addClickListener(function() - ModuleManager.ActBossRushManager:showFundUI() - self:closeUI() - end) - - uiMap["act_boss_rush_shop_ui.bg.close_btn"]:addClickListener(function() - self:closeUI() - end) -end - -function ActBossRushShopUI:_bind() - self:bind(DataManager.ActBossRushData, "isDirty", function() - self:dealList() - self:_display() - end) -end - -function ActBossRushShopUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActBossRushData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - uiMap["act_boss_rush_shop_ui.bg.countdown.tx_countdown"]:setText(str) -end - -function ActBossRushShopUI:_refreshScrollrect() - if self.scrollRectComp then - self.scrollRectComp:updateAllCell() - return - end - - local uiMap = self.root:genAllChildren() - self.scrollRectComp = uiMap["act_boss_rush_shop_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return SHOP_CELL - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.shopList[index].id) - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:refillCells(#self.shopList) -end - -return ActBossRushShopUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua.meta b/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua.meta deleted file mode 100644 index 7d809914..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_shop_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 02887a866f7ba9e40a30aeac46081d0e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua b/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua deleted file mode 100644 index 9b9890e1..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua +++ /dev/null @@ -1,205 +0,0 @@ -local ActBossRushUI = class("ActBossRushUI", BaseUI) - -local RANK_CELL = "app/ui/activity/act_boss_rush/cell/rank_cell" - -function ActBossRushUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_boss_rush/act_boss_rush_ui.prefab" -end - -function ActBossRushUI:onPressBackspace() - self:closeUI() -end - -function ActBossRushUI:getCurrencyParams() - if self.currencyParams == nil then - self.currencyParams = { - itemIds = { - GConst.ItemConst.ITEM_ID_GEM, - }, - showType = GConst.CURRENCY_TYPE.HORIZONTAL - } - end - return self.currencyParams -end - -function ActBossRushUI:ctor() - -end - -function ActBossRushUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActBossRushUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_2)) - uiMap["act_boss_rush_ui.bg.tx_today_rank"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_3)) - uiMap["act_boss_rush_ui.down.formation_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_4)) - uiMap["act_boss_rush_ui.bg.btn_rank.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_10)) - uiMap["act_boss_rush_ui.bg.btn_bounty.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_11)) - uiMap["act_boss_rush_ui.bg.btn_shop.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_12)) - uiMap["act_boss_rush_ui.bg.fight_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE)) - - local todayMaxWaveDesc = uiMap["act_boss_rush_ui.bg.tx_today_max_wave_desc"] - local todayMaxWave = uiMap["act_boss_rush_ui.bg.tx_today_max_wave"] - local todayMaxWaveImg = uiMap["act_boss_rush_ui.bg.img_today_max_wave"] - todayMaxWaveDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_4)) - todayMaxWave:setText(DataManager.ActBossRushData:getTodayMaxWave()) - GFunc.centerTxAndImgAndTx(todayMaxWaveDesc, 5, todayMaxWaveImg, 5, todayMaxWave) - - uiMap["act_boss_rush_ui.bg.tx_today_fight_count"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_5, DataManager.ActBossRushData:getTodayFightCount())) - - local cost = uiMap["act_boss_rush_ui.bg.fight_btn.cost"] - local costIcon = uiMap["act_boss_rush_ui.bg.cost.icon"] - local costDesc = uiMap["act_boss_rush_ui.bg.cost.tx_cost_desc"] - local costNum = uiMap["act_boss_rush_ui.bg.cost.tx_cost"] - - local todayFreeFightCount = uiMap["act_boss_rush_ui.bg.tx_count"] - local count = DataManager.ActBossRushData:getFreeFightCount() - if count > 0 then - todayFreeFightCount:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_6, count)) - cost:setVisible(false) - else - todayFreeFightCount:setText(GConst.EMPTY_STRING) - cost:setVisible(true) - costDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_7)) - costNum:setText(DataManager.ActBossRushData:getFightCost()) - GFunc.centerTxAndImgAndTx(costDesc, 5, costIcon, 5, costNum) - end - - local rankBtn = uiMap["act_boss_rush_ui.bg.btn_rank"] - if DataManager.ActBossRushData:canGetRankReward() then - rankBtn:addRedPoint(20, 40, 0.8) - else - rankBtn:removeRedPoint() - end - - local bountyBtn = uiMap["act_boss_rush_ui.bg.btn_bounty"] - if DataManager.ActBossRushData:getHaveReward() then - bountyBtn:addRedPoint(20, 40, 0.8) - else - bountyBtn:removeRedPoint() - end - - local shopBtn = uiMap["act_boss_rush_ui.bg.btn_shop"] - if not DataManager.ActBossRushData:getTodayExchangeCheck() then - shopBtn:addRedPoint(20, 40, 0.8) - else - shopBtn:removeRedPoint() - end - - self:refreshRankList() - self:refreshFormation() -end - -function ActBossRushUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_boss_rush_ui.bg.fight_btn"]:addClickListener(function() - ModuleManager.ActBossRushManager:reqFight() - end) - - uiMap["act_boss_rush_ui.down.formation_btn"]:addClickListener(function() - if not DataManager.ActBossRushData:getIsOpen() then - return - end - ModuleManager.CommonManager:showFormationUI(GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH) - end) - - uiMap["act_boss_rush_ui.down.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_boss_rush_ui.bg.btn_rank"]:addClickListener(function() - ModuleManager.ActBossRushManager:showRankUI() - end) - - uiMap["act_boss_rush_ui.bg.btn_bounty"]:addClickListener(function() - ModuleManager.ActBossRushManager:showFundUI() - end) - - uiMap["act_boss_rush_ui.bg.btn_shop"]:addClickListener(function() - ModuleManager.ActBossRushManager:showShopUI() - end) - - uiMap["act_boss_rush_ui.bg.time_bg.btn_help"]:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.NORMAL, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_31), - } - ModuleManager.TipsManager:showHelpTips(params) - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function() - self:closeUI() - end) -end - -function ActBossRushUI:_bind() - self:bind(DataManager.ActBossRushData, "isDirty", function() - self:_display() - end) - - self:bind(DataManager.FormationData, "dirty", function() - self:refreshFormation() - end) - - self:bind(DataManager.HeroData, "isDirty", function() - self:refreshFormation() - end) -end - -function ActBossRushUI:refreshRankList() - if not self.rankCells then - self.rankCells = {} - local uiMap = self.root:genAllChildren() - for i = 1, 3 do - self.rankCells[i] = CellManager:addCellComp(uiMap["act_boss_rush_ui.bg.act_rank_cell_" .. i], RANK_CELL) - end - end - - local list = DataManager.ActBossRushData:getTopRankInfo() - for index, cell in ipairs(self.rankCells) do - cell:refresh(index, list[index]) - end -end - -function ActBossRushUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActBossRushData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - uiMap["act_boss_rush_ui.bg.time_bg.time"]:setText(str) - - local canFight = remainTime > 86400 - if self.canFight ~= canFight then - self.canFight = canFight - uiMap["act_boss_rush_ui.bg.fight_btn"]:setActive(canFight) - uiMap["act_boss_rush_ui.bg.fight_btn.cost"]:setActive(canFight) - uiMap["act_boss_rush_ui.bg.tx_count"]:setActive(canFight) - end -end - -function ActBossRushUI:refreshFormation() - if not self.formationComp then - local uiMap = self.root:genAllChildren() - self.formationComp = uiMap["act_boss_rush_ui.bg.hero_formation_comp"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.HERO_FORMATION_COMP) - end - self.formationComp:refreshByFormation(DataManager.FormationData:getBossRushFormation()) -end - -return ActBossRushUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua.meta b/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua.meta deleted file mode 100644 index dda9d8af..00000000 --- a/lua/app/ui/activity/act_boss_rush/act_boss_rush_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6309932b9c9dcee4a958a6d21ce8a252 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua b/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua deleted file mode 100644 index 1d315e06..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua +++ /dev/null @@ -1,76 +0,0 @@ -local FundCell = class("FundCell", BaseCell) - -function FundCell:init() - local uiMap = self:getUIMap() - self.txLevel = uiMap["fund_cell.level.tx_level"] - self.rewardCell1 = uiMap["fund_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell2 = uiMap["fund_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) -end - -function FundCell:refresh(level) - self.txLevel:setText(DataManager.ActBossRushData:getLevelWave(level)) - - local isGet - - isGet = DataManager.ActBossRushData:getFreeGot(level) - local reward = DataManager.ActBossRushData:getReward(level, DataManager.ActBossRushData.REWARD_TYPE.FREE) - if reward then - self.rewardCell1:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell1:showLock(false) - if DataManager.ActBossRushData:getFreeCanGet(level) then - self.rewardCell1:showFrameAnimation() - self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell1:addClickListener(function() - self:onClickReward(level, DataManager.ActBossRushData.REWARD_TYPE.FREE) - end) - else - self.rewardCell1:hideFrameAnimation() - self.rewardCell1.baseObject:removeRedPoint() - self.rewardCell1:addClickListener(nil) - end - - isGet = DataManager.ActBossRushData:getProGot(level) - local reward = DataManager.ActBossRushData:getReward(level, DataManager.ActBossRushData.REWARD_TYPE.PRO) - if reward then - self.rewardCell2:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell2:showLock(not DataManager.ActBossRushData:getProBought()) - if DataManager.ActBossRushData:getProCanGet(level) then - self.rewardCell2:showFrameAnimation() - self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell2:addClickListener(function() - self:onClickReward(level, DataManager.ActBossRushData.REWARD_TYPE.PRO) - end) - else - self.rewardCell2:hideFrameAnimation() - self.rewardCell2.baseObject:removeRedPoint() - self.rewardCell2:addClickListener(nil) - end - - isGet = DataManager.ActBossRushData:getUtralGot(level) - local reward = DataManager.ActBossRushData:getReward(level, DataManager.ActBossRushData.REWARD_TYPE.UTRAL) - if reward then - self.rewardCell3:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell3:showLock(not DataManager.ActBossRushData:getUtralBought()) - if DataManager.ActBossRushData:getUtralCanGet(level) then - self.rewardCell3:showFrameAnimation() - self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell3:addClickListener(function() - self:onClickReward(level, DataManager.ActBossRushData.REWARD_TYPE.UTRAL) - end) - else - self.rewardCell3:hideFrameAnimation() - self.rewardCell3.baseObject:removeRedPoint() - self.rewardCell3:addClickListener(nil) - end -end - --- 领取奖励 -function FundCell:onClickReward(level, rewardType) - ModuleManager.ActBossRushManager:reqFundAward(level, rewardType) -end - -return FundCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua.meta b/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua.meta deleted file mode 100644 index 59b2d0cc..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/fund_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b36db9010b508c0478375b99251e7b35 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua b/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua deleted file mode 100644 index 7e45a355..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua +++ /dev/null @@ -1,65 +0,0 @@ -local RankCell = class("RankCell", BaseCell) - -local RANK_ICON = { - "act_ranking_1", - "act_ranking_2", - "act_ranking_3" -} - -local RANK_BG = { - "act_ranking_bg_1", - "act_ranking_bg_2", - "act_ranking_bg_3", - "act_ranking_bg_4" -} - -function RankCell:refresh(index, info) - local uiMap = self:getUIMap() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["act_rank_cell.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - uiMap["act_rank_cell.tx_rank"]:setText(index) - local imgRank = uiMap["act_rank_cell.img_rank"] - if RANK_ICON[index] then - imgRank:setVisible(true) - imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_ICON[index]) - uiMap["act_rank_cell.tx_rank"]:setText(GConst.EMPTY_STRING) - else - imgRank:setVisible(false) - end - - local imgBg = uiMap["act_rank_cell.bg"] - if RANK_BG[index] then - imgBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_BG[index]) - else - imgBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_BG[4]) - end - - local txName = uiMap["act_rank_cell.tx_name"] - local txWave = uiMap["act_rank_cell.tx_wave"] - local txRound = uiMap["act_rank_cell.tx_round"] - - if info then - txName:setText(info.name) - txWave:setText(info.wave) - txRound:setText(info.round) - self.playerHeadCell:getBaseObject():addClickListener(function() - ModuleManager.ActBossRushManager:reqOtherPlayerInfo(info.id, function(formation) - if not self.playerHeadCell or not self.playerHeadCell:getBaseObject() or self.playerHeadCell:getBaseObject():isDestroyed() then - return - end - ModuleManager.TipsManager:showHeroFormation(self.playerHeadCell:getBaseObject(), formation) - end) - end) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame, false) - else - txName:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - txWave:setText("--") - txRound:setText("--") - self.playerHeadCell:getBaseObject():addClickListener(nil) - self.playerHeadCell:refresh(3001, 1000, false) -- 默认 - end - -end - -return RankCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua.meta b/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua.meta deleted file mode 100644 index 2162c314..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 032e61c832631f04b9b9eceb08853b1d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua b/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua deleted file mode 100644 index d1a74a90..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua +++ /dev/null @@ -1,35 +0,0 @@ -local RankRewardcell = class("RankRewardcell", BaseCell) - -function RankRewardcell:refresh(ranking1, ranking2, rewards, totalIndex) - local uiMap = self:getUIMap() - - local rankStr = ranking1 .. "-" - if ranking2 then - rankStr = rankStr .. ranking2 - else - rankStr = rankStr .. "-" - end - if ranking1 == ranking2 then - rankStr = ranking1 - end - if self:getIndex() == totalIndex then - rankStr = ranking1 .. "+" - end - uiMap["rank_reward_cell.bg.tx_rank"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_23, rankStr)) - if not self.rewardCells then - self.rewardCells = {} - for i = 1, 2 do - self.rewardCells[i] = uiMap["rank_reward_cell.bg.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - end - end - for index, cell in ipairs(self.rewardCells) do - if rewards and rewards[index] then - cell:refreshByConfig(rewards[index]) - cell:getBaseObject():setActive(true) - else - cell:getBaseObject():setActive(false) - end - end -end - -return RankRewardcell \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua.meta b/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua.meta deleted file mode 100644 index 2183e3b3..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/rank_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a830faf323aec28408b0a931906bd52d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua b/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua deleted file mode 100644 index 7c99aec6..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua +++ /dev/null @@ -1,66 +0,0 @@ -local ShopCell = class("ShopCell", BaseCell) - -local BTN_ICON = {"common_btn_green_2", "common_btn_grey_2"} - -function ShopCell:init() - local uiMap = self:getUIMap() - self.scoreIcon = uiMap["shop_cell.bg.score"] - self.txScore = uiMap["shop_cell.score.tx_score"] - self.rewardCell = uiMap["shop_cell.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.txBtn = uiMap["shop_cell.ok_btn.text"] - self.txLimit = uiMap["shop_cell.tx_limit"] - self.btn = uiMap["shop_cell.ok_btn"] -end - -function ShopCell:refresh(id) - self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_18)) - - local cost = DataManager.ActBossRushData:getShopCost(id) - local costId = GFunc.getRewardId(cost) - local costNum = GFunc.getRewardNum(cost) - self.scoreIcon:setSprite(ModuleManager.ItemManager:getItemIcon(costId)) - local color = "#FFFFFF" - local itemEnough = GFunc.checkCost(costId, costNum, false) - if not itemEnough then - -- color = "#FF4F38" - end - local str = string.format("%s", color, costNum) - self.txScore:setText(str) - - local remainCount = DataManager.ActBossRushData:getExchangeRemainCount(id) - local reward = DataManager.ActBossRushData:getShopReward(id) - if reward then - self.rewardCell:refreshByConfig(reward) - end - - local canExchange = remainCount > 0 - local color = "#FFFFFF" - if not canExchange then - -- color = "#FF4F38" - end - local str = string.format("%s", color, I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_19, remainCount)) - self.txLimit:setText(str) - - self.btn:addClickListener(function() - self:onClickReward(id) - end) - - if not itemEnough then - canExchange = false - end - local icon = canExchange and BTN_ICON[1] or BTN_ICON[2] - self.btn:setSprite(GConst.ATLAS_PATH.COMMON, icon) - self.btn:setTouchEnable(canExchange) -end - --- 领取奖励 -function ShopCell:onClickReward(id) - local cost = DataManager.ActBossRushData:getShopCost(id) - local remainCount = DataManager.ActBossRushData:getExchangeRemainCount(id) - local reward = DataManager.ActBossRushData:getShopReward(id) - ModuleManager.CommonManager:showExchangeUI(1, remainCount, reward, cost, function(count) - ModuleManager.ActBossRushManager:reqExchange(id, count) - end) -end - -return ShopCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua.meta b/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua.meta deleted file mode 100644 index 6186b208..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/shop_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ea3b29f79e884c845bf330b3dd5a8112 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua b/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua deleted file mode 100644 index 3847bf56..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua +++ /dev/null @@ -1,43 +0,0 @@ -local TopRankCell = class("TopRankCell", BaseCell) - -function TopRankCell:refresh(info) - local uiMap = self:getUIMap() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["top_rank_cell.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - - local txName = uiMap["top_rank_cell.name"] - local txWave = uiMap["top_rank_cell.wave"] - local txRound = uiMap["top_rank_cell.round"] - local imgWave = uiMap["top_rank_cell.img_wave"] - local imgRound = uiMap["top_rank_cell.img_round"] - - if info then - txName:setText(info.name) - txWave:setText(info.wave) - txRound:setText(info.round) - imgWave:setVisible(true) - imgRound:setVisible(true) - self.playerHeadCell:getBaseObject():addClickListener(function() - ModuleManager.ActBossRushManager:reqOtherPlayerInfo(info.id, function(formation) - if not self.playerHeadCell or not self.playerHeadCell:getBaseObject() or self.playerHeadCell:getBaseObject():isDestroyed() then - return - end - ModuleManager.TipsManager:showHeroFormation(self.playerHeadCell:getBaseObject(), formation) - end) - end) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame, false) - GFunc.centerImgAndTx(imgWave, txWave, 5) - GFunc.centerImgAndTx(imgRound, txRound, 5) - else - txName:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - txWave:setText(GConst.EMPTY_STRING) - txRound:setText(GConst.EMPTY_STRING) - imgWave:setVisible(false) - imgRound:setVisible(false) - self.playerHeadCell:getBaseObject():addClickListener(nil) - self.playerHeadCell:refresh(3001, 1000, false) -- 默认 - end -end - -return TopRankCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua.meta b/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua.meta deleted file mode 100644 index 7f4d59f9..00000000 --- a/lua/app/ui/activity/act_boss_rush/cell/top_rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4c6f718109e791b44987ca2a865c654d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp.meta b/lua/app/ui/activity/act_pvp.meta deleted file mode 100644 index 32d2b3d8..00000000 --- a/lua/app/ui/activity/act_pvp.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4ab35e1594335bc42b0386f12e25e6b6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua deleted file mode 100644 index 0a3b6092..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua +++ /dev/null @@ -1,198 +0,0 @@ -local ActPvpBountyUI = class("ActPvpBountyUI", BaseUI) - -local BOUNTY_CELL = "app/ui/activity/act_pvp/cell/bounty_cell" -local BTN_ICON = {"common_btn_green_3", "act_common_board_6"} - -function ActPvpBountyUI:onPressBackspace() - self:closeUI() -end - -function ActPvpBountyUI:isFullScreen() - return false -end - -function ActPvpBountyUI:ctor() - self.rewardList = DataManager.ActPvpData:getBountyList() -end - -function ActPvpBountyUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_bounty_ui.prefab" -end - -function ActPvpBountyUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActPvpBountyUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_bounty_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_4)) - uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level.tx_num"]:setText(GFunc.getRewardNum(DataManager.ActPvpData:getBuyBountyLevelCost())) - self.downDesc = uiMap["act_pvp_bounty_ui.bg.bg.desc"] - self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_16)) - - self:refreshBtns() - self:_refreshScrollrect() - self:refreshLevelInfo() -end - -function ActPvpBountyUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_bounty_ui.bg.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level"]:addClickListener(function() - ModuleManager.ActPvpManager:reqBuyBountyLevel() - end) -end - -function ActPvpBountyUI:_bind() - self:bind(DataManager.ActPvpData, "isDirty", function() - self:_display() - end) - - self:bind(DataManager.ShopData, "isDirty", function() - self:_display() - end) -end - -function ActPvpBountyUI:refreshBtns() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_bounty_ui.bg.free.tx_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - - local probtn = uiMap["act_pvp_bounty_ui.bg.buy1"] - local proBtntx = uiMap["act_pvp_bounty_ui.bg.buy1.tx_buyed"] - local proBuy = uiMap["act_pvp_bounty_ui.bg.buy1.tx_buy"] - proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - proBuy:setText(DataManager.ActPvpData:getProPrice()) - - if DataManager.ActPvpData:getProBought() then - probtn:setSprite(GConst.ATLAS_PATH.ACT_COMMON, BTN_ICON[2]) - probtn:setTouchEnable(false) - proBtntx:setVisible(true) - proBuy:setVisible(false) - else - probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - probtn:setTouchEnable(true) - probtn:addClickListener(function() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - PayManager:purchasePackage(DataManager.ActPvpData:getProActId(), PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - proBtntx:setVisible(false) - proBuy:setVisible(true) - end - - local utralbtn = uiMap["act_pvp_bounty_ui.bg.buy2"] - local utralBtntx = uiMap["act_pvp_bounty_ui.bg.buy2.tx_buyed"] - local utralBuy = uiMap["act_pvp_bounty_ui.bg.buy2.tx_buy"] - utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - utralBuy:setText(DataManager.ActPvpData:gettUtralPrice()) - - if DataManager.ActPvpData:getUtralBought() then - utralbtn:setSprite(GConst.ATLAS_PATH.ACT_COMMON, BTN_ICON[2]) - utralbtn:setTouchEnable(false) - utralBtntx:setVisible(true) - utralBuy:setVisible(false) - else - utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - utralbtn:setTouchEnable(true) - utralbtn:addClickListener(function() - if not DataManager.ActPvpData:getIsOpen() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) - return - end - - PayManager:purchasePackage(DataManager.ActPvpData:getUtralActId(), PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - utralBtntx:setVisible(false) - utralBuy:setVisible(true) - end -end - -function ActPvpBountyUI:_refreshScrollrect() - local uiMap = self.root:genAllChildren() - local mask = uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.mask_img"] - local level = DataManager.ActPvpData:getBountyLevel() - local totalCount = #self.rewardList - local maskCount = math.max(0, totalCount - level) - mask:setAnchoredPositionY(-10 - level * 120) - mask:setSizeDeltaY(maskCount * 120 + 20) - local progSlider = uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - local y = (totalCount - 1) * 120 - if (level - 1) >= 0 then - progSlider.value = (level - 1) / (totalCount - 1) - else - progSlider.value = 0 - end - mask:setVisible(level < totalCount) - - if self.scrollRectComp then - self.scrollRectComp:updateAllCell() - return - end - - local prog = uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.prog"] - prog:setSizeDeltaY(y) - self.scrollRectComp = uiMap["act_pvp_bounty_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return BOUNTY_CELL - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.rewardList[index]) - mask:getTransform():SetAsLastSibling() - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:setTotalCount(0) - if level < 1 then - level = 1 - end - self.scrollRectComp:refillCells(totalCount, nil, level) -end - -function ActPvpBountyUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActPvpData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - uiMap["act_pvp_bounty_ui.bg.countdown.tx_countdown"]:setText(str) - uiMap["act_pvp_bounty_ui.bg.scrollrect.viewport.content.mask_img.line.btn_buy_level"]:setActive(remainTime < 86400) -end - -function ActPvpBountyUI:refreshLevelInfo() - local uiMap = self.root:genAllChildren() - local lv = DataManager.ActPvpData:getBountyLevel() - uiMap["act_pvp_bounty_ui.bg.bg.point_bg.desc_lv_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_12)) - uiMap["act_pvp_bounty_ui.bg.bg.point_bg.desc_lv"]:setText(lv) - uiMap["act_pvp_bounty_ui.bg.bg.point_bg.desc_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_15)) - local needExp = DataManager.ActPvpData:getBountyLevelExp(lv) - local txSlider = uiMap["act_pvp_bounty_ui.bg.bg.point_bg.desc_slider"] - local slider = uiMap["act_pvp_bounty_ui.bg.bg.point_bg.slider_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - if needExp <= 0 then -- 满级了 - txSlider:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) - slider.value = 1 - else - local exp = DataManager.ActPvpData:getBountyExp() - txSlider:setText(exp .. "/" .. needExp) - slider.value = exp / needExp - end -end - -return ActPvpBountyUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua.meta deleted file mode 100644 index bbc55830..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_bounty_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 85f5b0aff76ddba40a262caf5b3fdbbf -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua deleted file mode 100644 index 5efbaaef..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua +++ /dev/null @@ -1,93 +0,0 @@ -local ActPvpHelpUI = class("ActPvpHelpUI", BaseUI) - --- 响应安卓后退事件 -function ActPvpHelpUI:onPressBackspace() - self:closeUI() -end - -function ActPvpHelpUI:isFullScreen() - return false -end - -function ActPvpHelpUI:showCommonBG() - return false -end - -function ActPvpHelpUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_help_ui.prefab" -end - -function ActPvpHelpUI:ctor() -end - -function ActPvpHelpUI:onClose() -end - -function ActPvpHelpUI:onLoadRootComplete() - self:_display() - self:_addListeners() -end - -function ActPvpHelpUI:_display() - local uiMap = self.root:genAllChildren() - self.videoNode = uiMap["act_pvp_help_ui.skill_node.video_node"] - uiMap["act_pvp_help_ui.skill_node.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11)) - uiMap["act_pvp_help_ui.skill_node.last_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_9)) - uiMap["act_pvp_help_ui.skill_node.next_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLE_DESC_10)) - - self.curIndex = 1 - self:showTips() -end - -function ActPvpHelpUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_help_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_help_ui.skill_node.last_btn"]:addClickListener(function() - self.curIndex = math.max(1, self.curIndex - 1) - self:showTips() - end) - - uiMap["act_pvp_help_ui.skill_node.next_btn"]:addClickListener(function() - self.curIndex = math.min(3, self.curIndex + 1) - self:showTips() - end) -end - -function ActPvpHelpUI:showTips() - local uiMap = self.root:genAllChildren() - for i = 1, 3 do - local obj = uiMap["act_pvp_help_ui.skill_node.video_node.pause_video_0" .. i] - obj:setVisible(i == self.curIndex) - end - - local lastBtn = uiMap["act_pvp_help_ui.skill_node.last_btn"] - local nextBtn = uiMap["act_pvp_help_ui.skill_node.next_btn"] - - local str - if self.curIndex == 1 then - str = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_21) - lastBtn:setActive(false) - nextBtn:setActive(true) - nextBtn:setAnchoredPositionX(0) - elseif self.curIndex == 2 then - str = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_22) - lastBtn:setActive(true) - nextBtn:setActive(true) - lastBtn:setAnchoredPositionX(-137.5) - nextBtn:setAnchoredPositionX(137.5) - else - str = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_23) - lastBtn:setActive(true) - nextBtn:setActive(false) - lastBtn:setAnchoredPositionX(0) - end - local descObj = uiMap["act_pvp_help_ui.skill_node.scrollrect.viewport.desc"] - descObj:setText(str) - descObj:setSizeDeltaY(descObj:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight) - descObj:setAnchoredPositionY(0) -end - -return ActPvpHelpUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua.meta deleted file mode 100644 index 9e8cfcd6..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_help_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b44d806ef7fa9b64fa975ab91a13c069 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua deleted file mode 100644 index 3191e823..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua +++ /dev/null @@ -1,297 +0,0 @@ -local ActPvpMainUI = class("ActPvpMainUI", BaseUI) - -local ENTER_BTN_BG = {"common_btn_green_1", "common_btn_grey_1"} - -local TASK_DESC = -{ - "ACT_PVP_TALK_DESC_1", - "ACT_PVP_TALK_DESC_2", - "ACT_PVP_TALK_DESC_3", - "ACT_PVP_TALK_DESC_4", - "ACT_PVP_TALK_DESC_5" -} - -local WIN_TASK_DESC = -{ - "ACT_PVP_TALK_DESC_6", - "ACT_PVP_TALK_DESC_7", -} - -local FAIL_TASK_DESC = -{ - "ACT_PVP_TALK_DESC_8", - "ACT_PVP_TALK_DESC_9", -} - -function ActPvpMainUI:ctor() - -end - -function ActPvpMainUI:getBGMId() - return AudioManager.BGM_ID.ACT_PVP_MAINBGM -end - -function ActPvpMainUI:getCurrencyParams() - if self.currencyParams == nil then - self.currencyParams = { - itemIds = { - GConst.ItemConst.ITEM_ID_GEM, - }, - showType = GConst.CURRENCY_TYPE.HORIZONTAL - } - end - return self.currencyParams -end - -function ActPvpMainUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_main_ui.prefab" -end - -function ActPvpMainUI:onLoadRootComplete() - if not DataManager.ActPvpData:getActPvpShowHelpTag() then - DataManager.ActPvpData:recordActPvpShowHelpTag() - ModuleManager.ActPvpManager:showHelpUI() - end - self:_display() - self:_addListeners() - self:_bind() - - self:showTalk() - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActPvpMainUI:onPressBackspace() - self:closeUI() -end - -function ActPvpMainUI:onClose() - if self.showTalkSeq then - self.showTalkSeq:Kill() - self.showTalkSeq = nil - end - - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - self.countdownSid = nil - end -end - -function ActPvpMainUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_main_ui.bg.ui_spine_obj"]:playAnim("idle", true, false, false) - uiMap["act_pvp_main_ui.down.btn_rank.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_10)) - uiMap["act_pvp_main_ui.down.btn_bounty.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_4)) - - if DataManager.ActPvpData:isFinalDay() then - uiMap["act_pvp_main_ui.bg.desc"]:setText(GConst.EMPTY_STRING) - uiMap["act_pvp_main_ui.down.enter_node.enter_btn"]:setSprite(GConst.ATLAS_PATH.COMMON, ENTER_BTN_BG[2]) - uiMap["act_pvp_main_ui.down.enter_node.enter_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_24)) - else - uiMap["act_pvp_main_ui.bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_5)) - uiMap["act_pvp_main_ui.down.enter_node.enter_btn"]:setSprite(GConst.ATLAS_PATH.COMMON, ENTER_BTN_BG[1]) - uiMap["act_pvp_main_ui.down.enter_node.enter_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_2)) - end - local titleBg = uiMap["act_pvp_main_ui.bg.title_img"] - local title = uiMap["act_pvp_main_ui.bg.title_tx"] - title:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_6)) - GFunc.centerImgAndTx(titleBg, title, 5) - - self:refreshEnterNode() - self:refreshDialyRewardNode() - self:refreshBtns() -end - -function ActPvpMainUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_main_ui.down.enter_node.enter_btn"]:addClickListener(function() - ModuleManager.ActPvpManager:reqEnter() - end) - - uiMap["act_pvp_main_ui.bg.time_bg.btn_help"]:addClickListener(function() - ModuleManager.ActPvpManager:showHelpUI() - end) - - uiMap["act_pvp_main_ui.down.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_main_ui.down.btn_rank"]:addClickListener(function() - ModuleManager.ActPvpManager:showRankUI() - end) - - uiMap["act_pvp_main_ui.down.btn_bounty"]:addClickListener(function() - ModuleManager.ActPvpManager:showBountyUI() - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, function(params) - if params and params.closeMainUI then - self:closeUI() - end - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function() - self:closeUI() - end) -end - -function ActPvpMainUI:_bind() - self:bind(DataManager.ActPvpData, "isDirty", function() - self:_display() - end) -end - -function ActPvpMainUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActPvpData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - local icon = uiMap["act_pvp_main_ui.bg.time_bg.time_icon"] - local tx = uiMap["act_pvp_main_ui.bg.time_bg.time"] - tx:setText(str) - GFunc.centerImgAndTx(icon, tx, 5) - - local canFight = remainTime > 86400 - if self.canFight ~= canFight then - self.canFight = canFight - if not self.canFight then - uiMap["act_pvp_main_ui.down.enter_node.enter_btn"]:setSprite(GConst.ATLAS_PATH.COMMON, ENTER_BTN_BG[2]) - uiMap["act_pvp_main_ui.down.enter_node.enter_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_24)) - end - end -end - -function ActPvpMainUI:refreshEnterNode() - local uiMap = self.root:genAllChildren() - local freeCount = DataManager.ActPvpData:getFreeEnterCount() - local txFree = uiMap["act_pvp_main_ui.down.enter_node.tx_count"] - local costNode = uiMap["act_pvp_main_ui.down.enter_node.cost"] - local costDesc = uiMap["act_pvp_main_ui.down.enter_node.cost.tx_cost_desc"] - local costNum = uiMap["act_pvp_main_ui.down.enter_node.cost.tx_cost"] - local costIcon = uiMap["act_pvp_main_ui.down.enter_node.cost.icon"] - local btnHelp = uiMap["act_pvp_main_ui.bg.time_bg.btn_help"] - if freeCount > 0 then - if DataManager.ActPvpData:isFinalDay() then - freeCount = 0 - end - txFree:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_6, freeCount)) - costNode:setVisible(false) - btnHelp:setAnchoredPositionX(txFree:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth / 2 + 30) - else - txFree:setText(GConst.EMPTY_STRING) - costNode:setVisible(true) - costDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_7)) - costNum:setText(DataManager.ActPvpData:getEnterCost().num) - GFunc.centerTxAndImgAndTx(costDesc, 5, costIcon, 5, costNum) - local x = costNum:fastGetAnchoredPositionX() - btnHelp:setAnchoredPositionX(x + costNum:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth / 2 + 30) - end -end - -function ActPvpMainUI:refreshBtns() - local uiMap = self.root:genAllChildren() - local btnRank = uiMap["act_pvp_main_ui.down.btn_rank"] - if DataManager.ActPvpData:canGetRankReward() then - btnRank:addRedPoint(30, 36, 0.6) - else - btnRank:removeRedPoint() - end - - local btnBounty = uiMap["act_pvp_main_ui.down.btn_bounty"] - if DataManager.ActPvpData:getBountyRp() then - btnBounty:addRedPoint(30, 36, 0.6) - else - btnBounty:removeRedPoint() - end -end - -function ActPvpMainUI:refreshDialyRewardNode() - local uiMap = self.root:genAllChildren() - local boxIndex = 0 - for i = 1, 10 do - local obj = uiMap["act_pvp_main_ui.bg.win_point_" .. i] - local color = "#ffffff" - local countEnough = false - if DataManager.ActPvpData:winCountEnough(i) then - color = "#FFF667" - countEnough = true - end - - if DataManager.ActPvpData:getWinCountMap()[i] then - boxIndex = boxIndex + 1 - local boxIcon = "act_pvp_chest_" .. boxIndex - local tx = uiMap["act_pvp_main_ui.bg.win_desc_" .. i] - if tx then - local str = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_7, i) - str = string.format("%s", color, str) - tx:setText(str) - end - - if DataManager.ActPvpData:canGetDailyReward(i) then - GFunc.getShakeSeq(obj, false, 1) - obj:addClickListener(function() - ModuleManager.ActPvpManager:reqDailyReward(DataManager.ActPvpData:getWinCountMap()[i]) - end) - else - GFunc.getShakeSeq(obj, true, 1) - obj:addClickListener(function() - ModuleManager.TipsManager:showRewardsTips(DataManager.ActPvpData:getDailyRewards(i), nil, obj) - end) - end - - if DataManager.ActPvpData:gotDailyReward(i) then - boxIcon = "act_pvp_chest_" .. boxIndex .. "_1" - end - obj:setSprite(GConst.ATLAS_PATH.UI_ACT_PVP, boxIcon) - else - local icon = "act_pvp_point_2" - if countEnough then - icon = "act_pvp_point_1" - end - obj:setSprite(GConst.ATLAS_PATH.UI_ACT_PVP, icon) - end - end - uiMap["act_pvp_main_ui.bg.mask_img"]:setVisible(DataManager.ActPvpData:isFinalDay()) -end - -function ActPvpMainUI:showTalk() - local uiMap = self.root:genAllChildren() - local popBg = uiMap["act_pvp_main_ui.bg.pop_bg"] - local popDesc = uiMap["act_pvp_main_ui.bg.pop_desc"] - self.curTaskDescList = TASK_DESC - if DataManager.ActPvpData:getLastTurnWin() ~= nil then - if DataManager.ActPvpData:getLastTurnWin() then - self.curTaskDescList = WIN_TASK_DESC - else - self.curTaskDescList = FAIL_TASK_DESC - end - DataManager.ActPvpData:setLastTurnWin(nil) - end - if self.showTalkSeq then - self.showTalkSeq:Kill() - self.showTalkSeq = nil - end - self.showTalkSeq = self.root:createBindTweenSequence() - self.showTalkSeq:AppendCallback(function() - local index = math.random(1, #self.curTaskDescList - 1) - local desc = table.remove(self.curTaskDescList, index) - table.insert(self.curTaskDescList, desc) - popDesc:setText(I18N:getGlobalText(I18N.GlobalConst[desc])) - popBg:setVisible(false) - end) - self.showTalkSeq:Append(popBg:getTransform():DOScale(1, 1)) - self.showTalkSeq:AppendInterval(5) - self.showTalkSeq:Append(popBg:getTransform():DOScale(0, 1)) - self.showTalkSeq:SetLoops(-1) -end - -return ActPvpMainUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua.meta deleted file mode 100644 index 8654eb69..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_main_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 48bd49478e251574ebc7d9744c0f1730 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua deleted file mode 100644 index 3e9957ff..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua +++ /dev/null @@ -1,157 +0,0 @@ -local ActPvpMatchResultUI = class("ActPvpMatchResultUI", BaseUI) - -local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell" - -function ActPvpMatchResultUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_match_result_ui.prefab" -end - -function ActPvpMatchResultUI:onLoadRootComplete() - self:_display() - self:_addListeners() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActPvpMatchResultUI:_display() - local uiMap = self.root:genAllChildren() - local vsSpineObj = uiMap["act_pvp_match_result_ui.match_result.spine_vs"] - vsSpineObj:playAnimComplete("born", false, true, function() - vsSpineObj:playAnim("idle", true, true) - end) - uiMap["act_pvp_match_result_ui.match_result.btn_start.tx_start"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE)) - uiMap["act_pvp_match_result_ui.match_result.btn_rematch.tx_rematch"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_23)) - - local matchAnimator = uiMap["act_pvp_match_result_ui.match_result"]:getComponent(GConst.TYPEOF_UNITY_CLASS.ANIMATOR) - matchAnimator:Play(1396761479, -1, 0) - - self:refreshPlayerInfos() -end - -function ActPvpMatchResultUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_match_result_ui.match_result.btn_close"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_match_result_ui.match_result.btn_rematch"]:addClickListener(function() - self:onClickRefresh() - end) - - uiMap["act_pvp_match_result_ui.match_result.btn_start"]:addClickListener(function() - ModuleManager.ActPvpManager:reqFight() - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, function(params) - if params and params.reqCDOver then - self:closeUI() - end - end) -end - -function ActPvpMatchResultUI:onClickRefresh() - local remainTime = DataManager.ActPvpData:getMatchCdEndTime() - if remainTime <= 0 then - self:closeUI() - ModuleManager.ActPvpManager:showMatchUI(true) - else - if DataManager.ActPvpData:getCanAdRefreshHero() then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.ACT_PVP_AD_REMATCH, function() - ModuleManager.ActPvpManager:reqOverCD(true) - end) - else - ModuleManager.ActPvpManager:reqOverCD(false) - end - end -end - -function ActPvpMatchResultUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActPvpData:getMatchCdEndTime() - local adImg = uiMap["act_pvp_match_result_ui.match_result.btn_rematch.img_ad"] - local str - if remainTime <= 0 then - str = GConst.EMPTY_STRING - adImg:setVisible(false) - else - str = Time:formatNumTime(remainTime) - if DataManager.ActPvpData:getCanAdRefreshHero() then - adImg:setVisible(true) - else - adImg:setVisible(false) - end - end - uiMap["act_pvp_match_result_ui.match_result.btn_rematch.tx_free_countdown"]:setText(str) -end - -function ActPvpMatchResultUI:refreshPlayerInfos() - local uiMap = self.root:genAllChildren() - local rivalInfo = DataManager.ActPvpData:getRivalInfo() - if rivalInfo then - if not self.otherPlayerHeadCell then - self.otherPlayerHeadCell = CellManager:addCellComp(uiMap["act_pvp_match_result_ui.match_result.match.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - self.otherPlayerHeadCell:refresh(rivalInfo.avatar, rivalInfo.avatar_frame) - uiMap["act_pvp_match_result_ui.match_result.match.info.tx_name"]:setText(rivalInfo.name) - uiMap["act_pvp_match_result_ui.match_result.match.info.tx_level"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, rivalInfo.level)) - uiMap["act_pvp_match_result_ui.match_result.match.info.tx_win_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_14)) - uiMap["act_pvp_match_result_ui.match_result.match.info.tx_win_count"]:setText(rivalInfo.total_win) - - if not self.otherSimpleHeroCells then - self.otherSimpleHeroCells = {} - for i = 1, 5 do - self.otherSimpleHeroCells[i] = CellManager:addCellComp(uiMap["act_pvp_match_result_ui.match_result.match.formation.simple_hero_cell_" .. i], SIMPLE_HERO_CELL) - end - end - - local heroes = DataManager.ActPvpData:getRivalInfoHeroes() - if heroes then - for matchType, cell in ipairs(self.otherSimpleHeroCells) do - local entity = heroes[matchType] - if entity then - cell:getBaseObject():setVisible(true) - cell:refresh(entity) - else - cell:getBaseObject():setVisible(false) - end - end - end - end - - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["act_pvp_match_result_ui.match_result.self.info.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - self.playerHeadCell:refresh(DataManager.PlayerData:getUsingAvatarId(), DataManager.PlayerData:getUsingFrameId()) - uiMap["act_pvp_match_result_ui.match_result.self.info.tx_name"]:setText(DataManager.PlayerData:getNickname()) - uiMap["act_pvp_match_result_ui.match_result.self.info.tx_level"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, DataManager.PlayerData:getLv())) - uiMap["act_pvp_match_result_ui.match_result.self.info.tx_win_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_14)) - uiMap["act_pvp_match_result_ui.match_result.self.info.tx_win_count"]:setText(DataManager.ActPvpData:getTotalWinCount()) - - if not self.simpleHeroCells then - self.simpleHeroCells = {} - for i = 1, 5 do - self.simpleHeroCells[i] = CellManager:addCellComp(uiMap["act_pvp_match_result_ui.match_result.self.formation.simple_hero_cell_" .. i], SIMPLE_HERO_CELL) - end - end - - local heroes = DataManager.ActPvpData:getHeros() - if heroes then - for matchType, cell in ipairs(self.simpleHeroCells) do - local entity = heroes[matchType] - if entity then - cell:getBaseObject():setVisible(true) - cell:refresh(entity) - else - cell:getBaseObject():setVisible(false) - end - end - end -end - -return ActPvpMatchResultUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua.meta deleted file mode 100644 index 12cbc091..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_match_result_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2f27fb13715cfd14ca086e16b8bffe19 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua deleted file mode 100644 index 48fe96c0..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua +++ /dev/null @@ -1,40 +0,0 @@ -local ActPvpMatchUI = class("ActPvpMatchUI", BaseUI) - -function ActPvpMatchUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_match_ui.prefab" -end - -function ActPvpMatchUI:ctor() - self:addEventListener(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, function(parmas) - if self.dealySid then - return - end - - if parmas and parmas.matchOver then - self.dealySid = self:performWithDelayGlobal(function() - self:closeUI() - ModuleManager.ActPvpManager:showMatchResultUI() - end, 1.5) - end - end) -end - -function ActPvpMatchUI:onLoadRootComplete() - self:_display() -end - -function ActPvpMatchUI:_display() - local uiMap = self.root:genAllChildren() - -- uiMap["act_pvp_match_ui.match_loading.tx_title"]:setText() - local tx = uiMap["act_pvp_match_ui.match_loading.tx_loading"] - tx:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_22)) - tx:setSizeDeltaX(tx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth) - uiMap["act_pvp_match_ui.match_loading.spine_battle"]:playAnim("idle", true, false, false) - uiMap["act_pvp_match_ui.match_loading.tx_loading.ui_spine_obj"]:playAnim("idle", true, false, false) - uiMap["act_pvp_match_ui.match_loading.btn_cancel.tx_cancel"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_CANCEL)) - uiMap["act_pvp_match_ui.match_loading.btn_cancel"]:addClickListener(function() - self:closeUI() - end) -end - -return ActPvpMatchUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua.meta deleted file mode 100644 index 942b45c9..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_match_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9a54eb3e962386946848a41b53e78a77 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua deleted file mode 100644 index c218fb9d..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua +++ /dev/null @@ -1,315 +0,0 @@ -local ActPvpPlayingUI = class("ActPvpPlayingUI", BaseUI) - -local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell" -local TASK_DESC = -{ - "ACT_PVP_TALK_DESC_1", - "ACT_PVP_TALK_DESC_2", - "ACT_PVP_TALK_DESC_3", - "ACT_PVP_TALK_DESC_4", - "ACT_PVP_TALK_DESC_5" -} - -function ActPvpPlayingUI:ctor() - -end - -function ActPvpPlayingUI:getBGMId() - return AudioManager.BGM_ID.ACT_PVP_MAINBGM -end - -function ActPvpPlayingUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_playing_ui.prefab" -end - -function ActPvpPlayingUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:showTalk() - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActPvpPlayingUI:onPressBackspace() - self:closeUI() -end - -function ActPvpPlayingUI:onClose() - if self.showTalkSeq then - self.showTalkSeq:Kill() - self.showTalkSeq = nil - end - - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - self.countdownSid = nil - end - - if self.showLevelUpSid then - self:unscheduleGlobal(self.showLevelUpSid) - self.showLevelUpSid = nil - end -end - -function ActPvpPlayingUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_playing_ui.bg.ui_spine_obj"]:playAnim("idle", true, false, false) - uiMap["act_pvp_main_ui.down.playing_node.macth_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_2)) - uiMap["act_pvp_main_ui.down.btn_rank.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_10)) - uiMap["act_pvp_main_ui.down.btn_bounty.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_4)) - local title = uiMap["act_pvp_main_ui.bg.title_tx"] - title:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_6)) - title:setSizeDeltaX(title:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth) - - self:refreshPlayingNode() - self:refreshDialyRewardNode() - self:refreshBtns() -end - -function ActPvpPlayingUI:_addListeners() - local uiMap = self.root:genAllChildren() - - uiMap["act_pvp_main_ui.down.playing_node.macth_btn"]:addClickListener(function() - if DataManager.ActPvpData:isFinalDay() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_24)) - return - end - ModuleManager.ActPvpManager:showMatchUI() - end) - - uiMap["act_pvp_main_ui.bg.time_bg.btn_help"]:addClickListener(function() - ModuleManager.ActPvpManager:showHelpUI() - end) - - uiMap["act_pvp_main_ui.down.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_main_ui.down.btn_rank"]:addClickListener(function() - ModuleManager.ActPvpManager:showRankUI() - end) - - uiMap["act_pvp_main_ui.down.btn_bounty"]:addClickListener(function() - ModuleManager.ActPvpManager:showBountyUI() - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, function(params) - if params and params.closeMainUI then - self:closeUI() - end - end) -end - -function ActPvpPlayingUI:_bind() - self:bind(DataManager.ActPvpData, "isDirty", function() - self:_display() - end) -end - -function ActPvpPlayingUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActPvpData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - local icon = uiMap["act_pvp_main_ui.bg.time_bg.time_icon"] - local tx = uiMap["act_pvp_main_ui.bg.time_bg.time"] - tx:setText(str) - GFunc.centerImgAndTx(icon, tx, 5) - - local canFight = remainTime > 86400 - if self.canFight ~= canFight then - self.canFight = canFight - if not self.canFight then - uiMap["act_pvp_main_ui.down.playing_node"]:setVisible(false) - end - end -end - -function ActPvpPlayingUI:refreshPlayingNode() - local curPairIds = DataManager.ActPvpData:getCurSelectPairId() - if curPairIds and curPairIds[1] then - ModuleManager.ActPvpManager:showSelectUI() -- 还有可选择的英雄 - end - - local uiMap = self.root:genAllChildren() - if not self.simpleHeroCells then - self.simpleHeroCells = {} - for i = 1, 5 do - self.simpleHeroCells[i] = CellManager:addCellComp(uiMap["act_pvp_main_ui.down.playing_node.hero_formation_comp.simple_hero_cell_" .. i], SIMPLE_HERO_CELL) - end - end - if not self.skillObjs then - self.skillObjs = {} - for i = 1, 5 do - self.skillObjs[i] = {} - self.skillObjs[i].bg = uiMap["act_pvp_playing_ui.bg.playing_node.skill_up_" .. i] - self.skillObjs[i].icon = uiMap["act_pvp_playing_ui.bg.playing_node.skill_up_" .. i .. ".icon"] - self.skillObjs[i].spine = uiMap["act_pvp_playing_ui.bg.playing_node.skill_up_node.ui_spine_obj_" .. i] - end - end - - local heroes = DataManager.ActPvpData:getHeros() - local skillUpNode = uiMap["act_pvp_playing_ui.bg.playing_node.skill_up_node"] - skillUpNode:setVisible(false) - if DataManager.ActPvpData:getHeroLevelUp() then - DataManager.ActPvpData:setHeroLevelUp(false) - local heroLv = DataManager.ActPvpData:getHeroLv() - local info = ConfigManager:getConfig("hero_level")[heroLv] - local infoLast = ConfigManager:getConfig("hero_level")[heroLv - 1] - if info and infoLast and info.unlock_skill > infoLast.unlock_skill then - skillUpNode:setVisible(true) - for matchType, objs in ipairs(self.skillObjs) do - local entity = heroes[matchType] - local skillId = entity:getRogueSkillList()[info.unlock_skill] - if entity and skillId then - objs.bg:addClickListener(function() - local cfg = ConfigManager:getConfig("skill_rogue")[skillId] - ModuleManager.TipsManager:showSkillTips(objs.icon, cfg.buff_id, skillId) - end) - objs.icon:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueIcon(skillId)) - objs.bg:setSprite(GConst.ATLAS_PATH.ICON_SKILL_ROGUE, ModuleManager.HeroManager:getSkillRogueBg(skillId, true)) - objs.spine:playAnim("idle", false, false, false) - objs.bg:setVisible(true) - else - objs.bg:setVisible(false) - end - end - if self.showLevelUpSid then - self:unscheduleGlobal(self.showLevelUpSid) - self.showLevelUpSid = nil - end - self.showLevelUpSid = self:performWithDelayGlobal(function() - skillUpNode:setVisible(false) - end, 5) - else -- 只升级,没有升级技能 - for matchType, objs in ipairs(self.skillObjs) do - objs.bg:setVisible(false) - objs.spine:playAnim("idle", false, false, false) - end - skillUpNode:setVisible(true) - if self.showLevelUpSid then - self:unscheduleGlobal(self.showLevelUpSid) - self.showLevelUpSid = nil - end - self.showLevelUpSid = self:performWithDelayGlobal(function() - skillUpNode:setVisible(false) - end, 2) - end - end - - local actData = DataManager.ActPvpData - local txObj = uiMap["act_pvp_main_ui.down.playing_node.tx_fight"] - local txLose = uiMap["act_pvp_playing_ui.bg.playing_node.tx_fight_lose"] - txObj:setText(actData:getWinCount() .. "/" .. actData:getWinLimit()) - txLose:setText(actData:getLoseCount() .. "/" .. actData:getLoseLimit()) - - for matchType, cell in ipairs(self.simpleHeroCells) do - local entity = heroes[matchType] - if entity then - cell:getBaseObject():setVisible(true) - cell:refresh(entity) - else - cell:getBaseObject():setVisible(false) - end - end -end - -function ActPvpPlayingUI:refreshBtns() - local uiMap = self.root:genAllChildren() - local btnRank = uiMap["act_pvp_main_ui.down.btn_rank"] - if DataManager.ActPvpData:canGetRankReward() then - btnRank:addRedPoint(30, 36, 0.6) - else - btnRank:removeRedPoint() - end - - local btnBounty = uiMap["act_pvp_main_ui.down.btn_bounty"] - if DataManager.ActPvpData:getBountyRp() then - btnBounty:addRedPoint(30, 36, 0.6) - else - btnBounty:removeRedPoint() - end -end - -function ActPvpPlayingUI:refreshDialyRewardNode() - local uiMap = self.root:genAllChildren() - local boxIndex = 0 - for i = 1, 10 do - local obj = uiMap["act_pvp_main_ui.bg.win_point_" .. i] - local color = "#ffffff" - local countEnough = false - if DataManager.ActPvpData:winCountEnough(i) then - color = "#FFF667" - countEnough = true - end - - if DataManager.ActPvpData:getWinCountMap()[i] then - boxIndex = boxIndex + 1 - local boxIcon = "act_pvp_chest_" .. boxIndex - local tx = uiMap["act_pvp_main_ui.bg.win_desc_" .. i] - if tx then - local str = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_7, i) - str = string.format("%s", color, str) - tx:setText(str) - end - - if DataManager.ActPvpData:canGetDailyReward(i) then - GFunc.getShakeSeq(obj, false, 1) - obj:addClickListener(function() - ModuleManager.ActPvpManager:reqDailyReward(DataManager.ActPvpData:getWinCountMap()[i]) - end) - else - GFunc.getShakeSeq(obj, true, 1) - obj:addClickListener(function() - ModuleManager.TipsManager:showRewardsTips(DataManager.ActPvpData:getDailyRewards(i), nil, obj) - end) - end - - if DataManager.ActPvpData:gotDailyReward(i) then - boxIcon = "act_pvp_chest_" .. boxIndex .. "_1" - end - obj:setSprite(GConst.ATLAS_PATH.UI_ACT_PVP, boxIcon) - else - local icon = "act_pvp_point_2" - if countEnough then - icon = "act_pvp_point_1" - end - obj:setSprite(GConst.ATLAS_PATH.UI_ACT_PVP, icon) - end - end -end - -function ActPvpPlayingUI:showTalk() - local uiMap = self.root:genAllChildren() - local popBg = uiMap["act_pvp_playing_ui.bg.pop_bg"] - local popDesc = uiMap["act_pvp_main_ui.bg.pop_desc"] - if self.showTalkSeq then - self.showTalkSeq:Kill() - self.showTalkSeq = nil - end - self.showTalkSeq = self.root:createBindTweenSequence() - self.showTalkSeq:AppendCallback(function() - local index = math.random(1, #TASK_DESC - 1) - local desc = table.remove(TASK_DESC, index) - table.insert(TASK_DESC, desc) - popDesc:setText(I18N:getGlobalText(I18N.GlobalConst[desc])) - popBg:setVisible(false) - end) - self.showTalkSeq:Append(popBg:getTransform():DOScale(1, 1)) - self.showTalkSeq:AppendInterval(5) - self.showTalkSeq:Append(popBg:getTransform():DOScale(0, 1)) - self.showTalkSeq:SetLoops(-1) -end - -return ActPvpPlayingUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua.meta deleted file mode 100644 index d4d6d5e7..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_playing_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2c9cefddbecc79a488096a2cea9ef0a5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua deleted file mode 100644 index d3d18cec..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua +++ /dev/null @@ -1,289 +0,0 @@ -local ActPvpRankUI = class("ActPvpRankUI", BaseUI) - -local RANK_REWARD_CELL = "app/ui/activity/act_pvp/cell/rank_reward_cell" -local RANK_CELL = "app/ui/activity/act_pvp/cell/rank_cell" -local TOP_RANK_CELL = "app/ui/activity/act_pvp/cell/top_rank_cell" - -local PAGE_ICON = {"common_menu_1", "common_menu_2"} - -local PAGE_TYPE = { - RANK = 1, - REWARD = 2, -} - -local PAGE_TX = { - [PAGE_TYPE.RANK] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_24, - [PAGE_TYPE.REWARD] = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_22, -} - -function ActPvpRankUI:onPressBackspace() - self:closeUI() -end - -function ActPvpRankUI:isFullScreen() - return false -end - -function ActPvpRankUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_rank_ui.prefab" -end - -function ActPvpRankUI:ctor() - self.rankRewardList = {} - self.rankRewardListCount = 0 - local cfg = DataManager.ActPvpData:getRankConfig() - Logger.printTable(DataManager.ActPvpData:getRankRewardList()) - for index, id in ipairs(DataManager.ActPvpData:getRankRewardList()) do - local info = cfg[id] - table.insert(self.rankRewardList, {id = id, ranking1 = info.ranking[1], ranking2 = info.ranking[2], rewards = info.reward}) - self.rankRewardListCount = self.rankRewardListCount + 1 - end -end - -function ActPvpRankUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function ActPvpRankUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_rank_ui.bg.rank_node.rank_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_24)) - uiMap["act_pvp_rank_ui.bg.rank_node.player_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_25)) - uiMap["act_pvp_rank_ui.bg.rank_node.record_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_26)) - - if not DataManager.ActPvpData:isFinalDay() then - self:switchPage(PAGE_TYPE.RANK) - else - self:switchPage(PAGE_TYPE.REWARD) - end -end - -function ActPvpRankUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_rank_ui.close_btn"]:addClickListener(function() - self:closeUI() - end) - - uiMap["act_pvp_rank_ui.bg.rank_bg.btn_help"]:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.NORMAL, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_18), - } - ModuleManager.TipsManager:showHelpTips(params) - end) -end - -function ActPvpRankUI:_bind() - self:bind(DataManager.ActPvpData, "isDirty", function() - if self.curPage ~= PAGE_TYPE.REWARD then - self:refreshRankNode() - else - self:refreshRewardNode() - end - self:refreshMyRankInfo() - self:refreshPages() - end) -end - -function ActPvpRankUI:refreshRankNode() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_rank_ui.bg.rank_node"]:setActive(true) - uiMap["act_pvp_rank_ui.bg.reward_node"]:setActive(false) - local text = I18N.GlobalConst.ACT_BOSS_RUSH_DESC_10 - self.rankList = DataManager.ActPvpData:getRankList() - uiMap["act_pvp_rank_ui.bg.title"]:setText(I18N:getGlobalText(text)) - if not self.topRankCells then - self.topRankCells = {} - for i = 1, 3 do - self.topRankCells[i] = CellManager:addCellComp(uiMap["act_pvp_rank_ui.bg.rank_node.top_rank_cell_" .. i], TOP_RANK_CELL) - end - end - for index, cell in ipairs(self.topRankCells) do - cell:refresh(self.rankList[index]) - end - local count = #self.rankList - 3 - if count < 0 then - count = 0 - end - if self.rankScrollRectComp then - self.rankScrollRectComp:refillCells(count) - return - end - - self.rankScrollRectComp = uiMap["act_pvp_rank_ui.bg.rank_node.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.rankScrollRectComp:addInitCallback(function() - return RANK_CELL - end) - self.rankScrollRectComp:addRefreshCallback(function(index, cell) - local info = self.rankList[index + 3] - cell:refresh(index + 3, info) - end) - self.rankScrollRectComp:clearCells() - self.rankScrollRectComp:setTotalCount(0) - self.rankScrollRectComp:refillCells(count) -end - -function ActPvpRankUI:refreshRewardNode() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_rank_ui.bg.rank_node"]:setActive(false) - uiMap["act_pvp_rank_ui.bg.reward_node"]:setActive(true) - uiMap["act_pvp_rank_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_22)) - if self.rewardScrollRectComp then - self.rewardScrollRectComp:updateAllCell() - return - end - - self.rewardScrollRectComp = uiMap["act_pvp_rank_ui.bg.reward_node.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.rewardScrollRectComp:addInitCallback(function() - return RANK_REWARD_CELL - end) - self.rewardScrollRectComp:addRefreshCallback(function(index, cell) - local info = self.rankRewardList[index] - cell:refresh(info.ranking1, info.ranking2, info.rewards, self.rankRewardListCount) - end) - self.rewardScrollRectComp:clearCells() - self.rewardScrollRectComp:setTotalCount(0) - self.rewardScrollRectComp:refillCells(#self.rankRewardList) -end - -function ActPvpRankUI:refreshPages() - if not self.pageObjs then - local uiMap = self.root:genAllChildren() - self.pageObjs = {} - for i = 1, 2 do - self.pageObjs[i] = { - page = uiMap["act_pvp_rank_ui.bg.page_" .. i], - tx1 = uiMap["act_pvp_rank_ui.bg.page_" .. i .. ".tx"], - tx2 = uiMap["act_pvp_rank_ui.bg.page_" .. i .. ".tx_hl"], - } - self.pageObjs[i].page:addClickListener(function() - self:switchPage(i) - end) - end - end - for index, objs in ipairs(self.pageObjs) do - if index == self.curPage then - objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[1]) - objs.page:setAnchoredPositionY(-451.5) - objs.tx1:setText(GConst.EMPTY_STRING) - objs.tx2:setText(I18N:getGlobalText(PAGE_TX[index])) - else - objs.page:setSprite(GConst.ATLAS_PATH.COMMON, PAGE_ICON[2]) - objs.page:setAnchoredPositionY(-442.5) - objs.tx1:setText(I18N:getGlobalText(PAGE_TX[index])) - objs.tx2:setText(GConst.EMPTY_STRING) - end - end - - if DataManager.ActPvpData:canGetRankReward() then - self.pageObjs[2].page:addRedPoint(77, -6.5, 1) - else - self.pageObjs[2].page:removeRedPoint() - end -end - -function ActPvpRankUI:switchPage(page) - if self.curPage == page then - return - end - self.curPage = page - - if self.curPage ~= PAGE_TYPE.REWARD then - self:refreshRankNode() - else - self:refreshRewardNode() - end - - self:refreshPages() - self:refreshMyRankInfo() -end - -function ActPvpRankUI:refreshMyRankInfo() - local myRank = DataManager.ActPvpData:getSelfRank() - local totalWin = DataManager.ActPvpData:getTotalWinCount() - local canGot = DataManager.ActPvpData:canGetRankReward() - - local uiMap = self.root:genAllChildren() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["act_pvp_rank_ui.bg.rank_bg.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.selfRewardCells = {} - for i = 1, 2 do - self.selfRewardCells[i] = CellManager:addCellComp(uiMap["act_pvp_rank_ui.bg.rank_bg.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - end - end - - self.playerHeadCell:refresh() - uiMap["act_pvp_rank_ui.bg.rank_bg.name"]:setText(DataManager.PlayerData:getNickname()) - local rankObj = uiMap["act_pvp_rank_ui.bg.rank_bg.tx_rank"] - if not myRank or myRank <= 0 then - rankObj:setText("--") - else - rankObj:setText(myRank) - end - - local winObj = uiMap["act_pvp_rank_ui.bg.rank_bg.tx_win"] - winObj:setText(GConst.EMPTY_STRING) - - local winDesc = uiMap["act_pvp_rank_ui.bg.rank_bg.tx_win_desc"] - winDesc:setText(GConst.EMPTY_STRING) - - if self.curPage ~= PAGE_TYPE.REWARD then - for index, cell in ipairs(self.selfRewardCells) do - cell:getBaseObject():setActive(false) - end - if totalWin and totalWin > 0 then - winObj:setText(totalWin) - else - winObj:setText("--") - end - winDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_17)) - else - local got = DataManager.ActPvpData:getGotRankReward() - local rewards = DataManager.ActPvpData:getRankRewards(myRank) - - for index, cell in ipairs(self.selfRewardCells) do - if rewards and rewards[index] then - cell:refreshByConfig(rewards[index], got, got) - cell:getBaseObject():setActive(true) - if canGot then - cell:showFrameAnimation() - cell:addClickListener(function() - ModuleManager.ActPvpManager:reqRankReward() - end) - else - cell:hideFrameAnimation() - cell:addClickListener(nil) - end - else - cell:getBaseObject():setActive(false) - end - end - end -end - -function ActPvpRankUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.ActPvpData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - end - local icon = uiMap["act_pvp_rank_ui.bg.time_node.icon"] - local tx = uiMap["act_pvp_rank_ui.bg.time_node.tx_time"] - tx:setText(str) - GFunc.centerImgAndTx(icon, tx, 5) -end - -return ActPvpRankUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua.meta deleted file mode 100644 index f629cfff..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_rank_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 81701f9779826a2489aca591224354e5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua b/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua deleted file mode 100644 index a50fff6f..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua +++ /dev/null @@ -1,307 +0,0 @@ -local ActPvpSelectUI = class("ActPvpSelectUI", BaseUI) - -local INFO_BG = { - [1] = "common_board_quality_2", - [2] = "common_board_quality_2", - [3] = "common_board_quality_3", - [4] = "common_board_quality_4", -} - -local BG_SPINE = { - [GConst.BattleConst.ELEMENT_TYPE.RED] = "ui_hero_red", - [GConst.BattleConst.ELEMENT_TYPE.YELLOW] = "ui_hero_yellow", - [GConst.BattleConst.ELEMENT_TYPE.GREEN] = "ui_hero_green", - [GConst.BattleConst.ELEMENT_TYPE.BLUE] = "ui_hero_blue", - [GConst.BattleConst.ELEMENT_TYPE.PURPLE] = "ui_hero_purple", -} - -local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell" - -function ActPvpSelectUI:getBGMId() - return AudioManager.BGM_ID.ACT_PVP_CHOOSEBGM -end - -function ActPvpSelectUI:getPrefabPath() - return "assets/prefabs/ui/activity/act_pvp/act_pvp_select_ui.prefab" -end - -function ActPvpSelectUI:onClose() - if self.aniSeq then - self.aniSeq:Kill() - self.aniSeq = nil - end -end - -function ActPvpSelectUI:onLoadRootComplete() - self:_display() - self:_addListeners() -end - -function ActPvpSelectUI:_display() - local curPairIds = DataManager.ActPvpData:getCurSelectPairId() - if not curPairIds or not curPairIds[1] then - AudioManager:playEffect(AudioManager.EFFECT_ID.ACT_PVP_FINISH) - self:closeUI() - return - end - - local uiMap = self.root:genAllChildren() - local heroId = DataManager.ActPvpData:getSelectHeroId(curPairIds[1]) - local heroCfg = ConfigManager:getConfig("hero")[heroId] - local matchType = heroCfg and heroCfg.position or GConst.BattleConst.ELEMENT_TYPE.RED - local matchStr = ModuleManager.HeroManager:getMatchTypeName(matchType, true) - local txTitle = uiMap["act_pvp_select_ui.bg.title_tx"] - txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_8, matchStr)) - txTitle:setSizeDeltaX(txTitle:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth) - uiMap["act_pvp_select_ui.bg.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_9)) - uiMap["act_pvp_select_ui.bg.hero_cell_1.select_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_12)) - uiMap["act_pvp_select_ui.bg.hero_cell_2.select_btn.tx_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_12)) - - if not self.bigHeroInfos then - self.bigHeroInfos = {} - for i = 1, 2 do - local unit = {} - local prefix = "act_pvp_select_ui.bg.hero_cell_" .. i - unit.node = uiMap[prefix] - unit.spineBg = uiMap[prefix .. ".ui_spine_obj_bg"] - unit.spineHero = uiMap[prefix .. ".ui_spine_obj_hero"] - unit.simpleHeroCell = CellManager:addCellComp(uiMap[prefix .. ".simple_hero_cell"], SIMPLE_HERO_CELL) - unit.info = uiMap[prefix .. ".info"] - unit.matchIcon = uiMap[prefix .. ".info.icon"] - unit.name = uiMap[prefix .. ".info.name"] - unit.nextNode = uiMap[prefix .. ".next_node"] - unit.nextDesc = uiMap[prefix .. ".next_node.desc"] - unit.nextBg1 = uiMap[prefix .. ".next_node.bg_1"] - unit.nextBg1Icon = uiMap[prefix .. ".next_node.bg_1.icon"] - unit.nextBg1Dec = uiMap[prefix .. ".next_node.bg_1.dec"] - unit.nextBg1Match = uiMap[prefix .. ".next_node.bg_1.match_img"] - unit.nextBg2 = uiMap[prefix .. ".next_node.bg_2"] - unit.nextBg2Icon = uiMap[prefix .. ".next_node.bg_2.icon"] - unit.nextBg2Dec = uiMap[prefix .. ".next_node.bg_2.dec"] - unit.nextBg2Match = uiMap[prefix .. ".next_node.bg_2.match_img"] - unit.selectBtn = uiMap[prefix .. ".select_btn"] - unit.selectDesc = uiMap[prefix .. ".select_btn.tx_desc"] - unit.clickMask = uiMap[prefix .. ".info.click_mask"] - self.bigHeroInfos[i] = unit - end - end - - self:rfreshRefreshBtns() - self:refreshSelectInfo() - self:refreshFormation() -end - -function ActPvpSelectUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["act_pvp_select_ui.down.close_btn"]:addClickListener(function() - local heroes = DataManager.ActPvpData:getHeros() - if #heroes < GConst.BattleConst.ELEMENT_TYPE_COUNT then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, {closeMainUI = true}) - end - self:closeUI() - end) - - uiMap["act_pvp_select_ui.bg.refresh_btn"]:addClickListener(function() - if DataManager.ActPvpData:getCanAdFlush() then - SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.ACT_PVP_AD_REFRESH_HERO, function() - ModuleManager.ActPvpManager:reqRefreshHero() - end) - else - ModuleManager.ActPvpManager:reqRefreshHero() - end - end) - - uiMap["act_pvp_select_ui.bg.hero_cell_1.select_btn"]:addClickListener(function() - ModuleManager.ActPvpManager:reqDecideHero(0) - end) - - uiMap["act_pvp_select_ui.bg.hero_cell_2.select_btn"]:addClickListener(function() - ModuleManager.ActPvpManager:reqDecideHero(1) - end) - - self:addEventListener(EventManager.CUSTOM_EVENT.ACT_PVP_EVENT, function(params) - if params and params.selectIndex then - if not self.heroEntities or not self.bigHeroInfos or not self.simpleHeroCells then - self:_display() - return - end - local heroEntity - local cell - local node - if params.selectIndex == 0 then -- 左边的 - heroEntity = self.heroEntities[1] - cell = self.bigHeroInfos[1] and self.bigHeroInfos[1].simpleHeroCell - node = self.bigHeroInfos[1] and self.bigHeroInfos[1].node - if cell then - cell:getBaseObject():setAnchoredPosition(-170, 190) - end - else - heroEntity = self.heroEntities[2] - cell = self.bigHeroInfos[2] and self.bigHeroInfos[2].simpleHeroCell - node = self.bigHeroInfos[2] and self.bigHeroInfos[2].node - if cell then - cell:getBaseObject():setAnchoredPosition(170, 190) - end - end - if not heroEntity or not cell then - self:_display() - return - end - - local target = self.simpleHeroCells[heroEntity:getMatchType()] - if not target then - self:_display() - return - end - self:disableUITouch() - local targetPos = target:getBaseObject():getTransform().position - local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos) - targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(node:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent()) - if self.aniSeq then - self.aniSeq:Kill() - self.aniSeq = nil - end - self.aniSeq = self.root:createBindTweenSequence() - self.aniSeq:AppendCallback(function() - cell:getBaseObject():setActive(true) - end) - self.aniSeq:Append(cell:getBaseObject():getTransform():DOAnchorPos(targetPos, 0.3)) - self.aniSeq:AppendCallback(function() - self:_display() - self:enableUITouch() - end) - elseif params and params.refreshHero then - self:_display() - end - end) -end - -function ActPvpSelectUI:refreshSelectInfo() - if not self.bigHeroInfos then - return - end - - local curPairIds = DataManager.ActPvpData:getCurSelectPairId() - local nextPairIds = DataManager.ActPvpData:getNextSelectFourId() - local list = {} - table.insert(list, {curPairIds[1], nextPairIds[1], nextPairIds[2]}) - table.insert(list, {curPairIds[2], nextPairIds[3], nextPairIds[4]}) - self.heroEntities = {} - for inedx, ids in pairs(list) do - local curId = ids[1] - local nextId1 = ids[2] - local nextId2 = ids[3] - local unit = self.bigHeroInfos[inedx] - if curId then - local heroId = DataManager.ActPvpData:getSelectHeroId(curId) - if heroId then - local heroEntity = DataManager.HeroData:getEntity({id = heroId, level = DataManager.ActPvpData:getHeroLv()}) - self.heroEntities[inedx] = heroEntity - unit.node:setVisible(true) - unit.clickMask:addClickListener(function() - ModuleManager.HeroManager:showHeroDetailUI(nil, true, heroEntity) - end) - unit.simpleHeroCell:refresh(heroEntity) - unit.simpleHeroCell:getBaseObject():setActive(false) - unit.info:setSprite(GConst.ATLAS_PATH.COMMON, INFO_BG[heroEntity:getQlt()]) - local heroInfo = heroEntity:getConfig() - unit.matchIcon:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) - unit.name:setText(heroEntity:getName()) - unit.spineBg:setVisible(false) - unit.spineBg:loadAssetAsync(BG_SPINE[heroEntity:getMatchType()], function() - unit.spineBg:setVisible(true, 1.8) - unit.spineBg:playAnim("idle", true, true, true) - end) - unit.spineHero:setVisible(false) - unit.spineHero:loadAssetAsync(heroEntity:getModelId(), function() - unit.spineHero:setVisible(true) - unit.spineHero:playAnim("idle", true, true, true) - end, true) - if nextId1 and nextId2 then - unit.nextNode:setVisible(true) - unit.nextDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_11)) - local heroId = DataManager.ActPvpData:getSelectHeroId(nextId1) - local heroInfo = ConfigManager:getConfig("hero")[heroId] - if heroInfo then - unit.nextBg1:addClickListener(function() - ModuleManager.HeroManager:showHeroDetailUI(nil, true, heroEntity) - end) - local itemInfo = ConfigManager:getConfig("item")[heroInfo.item_id] - if itemInfo then - unit.nextBg1:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[itemInfo.qlt]) - end - unit.nextBg1Icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroInfo.icon) - unit.nextBg1Dec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) - unit.nextBg1Match:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) - end - - heroId = DataManager.ActPvpData:getSelectHeroId(nextId2) - heroInfo = ConfigManager:getConfig("hero")[heroId] - if heroInfo then - unit.nextBg2:addClickListener(function() - ModuleManager.HeroManager:showHeroDetailUI(nil, true, heroEntity) - end) - local itemInfo = ConfigManager:getConfig("item")[heroInfo.item_id] - if itemInfo then - unit.nextBg2:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[itemInfo.qlt]) - end - unit.nextBg2Icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroInfo.icon) - unit.nextBg2Dec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) - unit.nextBg2Match:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) - end - else - unit.nextNode:setVisible(false) - end - else - unit.node:setVisible(false) - end - else - unit.node:setVisible(false) - end - end -end - -function ActPvpSelectUI:rfreshRefreshBtns() - local uiMap = self.root:genAllChildren() - local tx = uiMap["act_pvp_select_ui.bg.refresh_btn.tx_desc"] - local txCost = uiMap["act_pvp_select_ui.bg.refresh_btn.tx_cost"] - local imgCost = uiMap["act_pvp_select_ui.bg.refresh_btn.img_cost"] - local ad = uiMap["act_pvp_select_ui.bg.refresh_btn.img_ad"] - - if DataManager.ActPvpData:getCanAdFlush() then - tx:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_10)) - txCost:setVisible(false) - imgCost:setVisible(false) - ad:setVisible(true) - else - tx:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_3)) - txCost:setVisible(true) - imgCost:setVisible(true) - txCost:setText(DataManager.ActPvpData:getFlushCost().num) - GFunc.centerImgAndTx(imgCost, txCost, 0) - ad:setVisible(false) - end -end - -function ActPvpSelectUI:refreshFormation() - local uiMap = self.root:genAllChildren() - if not self.simpleHeroCells then - self.simpleHeroCells = {} - for i = 1, 5 do - self.simpleHeroCells[i] = CellManager:addCellComp(uiMap["act_pvp_select_ui.down.simple_hero_cell_" .. i], SIMPLE_HERO_CELL) - end - end - - local heroes = DataManager.ActPvpData:getHeros() - for matchType, cell in ipairs(self.simpleHeroCells) do - local entity = heroes[matchType] - if entity then - cell:getBaseObject():setVisible(true) - cell:refresh(entity) - else - cell:getBaseObject():setVisible(false) - end - end -end - -return ActPvpSelectUI \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua.meta b/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua.meta deleted file mode 100644 index b8c01701..00000000 --- a/lua/app/ui/activity/act_pvp/act_pvp_select_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e4da8f16a844c3b47aadec1a0702a68e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/cell.meta b/lua/app/ui/activity/act_pvp/cell.meta deleted file mode 100644 index e2abd4d8..00000000 --- a/lua/app/ui/activity/act_pvp/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c1f6580a433a87548b97bdd085a2d4c3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua b/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua deleted file mode 100644 index 7b19c683..00000000 --- a/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua +++ /dev/null @@ -1,85 +0,0 @@ -local BountyCell = class("BountyCell", BaseCell) - -local LEVEL_ICON = {"act_common_bg_14", "act_common_bg_15"} - -function BountyCell:init() - local uiMap = self:getUIMap() - self.imgLevel = uiMap["fund_cell.level"] - self.txLevel = uiMap["fund_cell.level.tx_level"] - self.rewardCell1 = uiMap["fund_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell2 = uiMap["fund_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) -end - -function BountyCell:refresh(level) - self.txLevel:setText(self:getIndex()) - - local bountyType = DataManager.ActPvpData.BOUNTY_TYPE - local isGet - isGet = DataManager.ActPvpData:getBountyCollected(level, bountyType.NORMAL) - local reward = DataManager.ActPvpData:getBountyReward(level, bountyType.NORMAL) - if reward then - self.rewardCell1:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell1:showLock(false) - if DataManager.ActPvpData:getBountyCanGet(level, bountyType.NORMAL) then - self.rewardCell1:showFrameAnimation() - self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell1:addClickListener(function() - self:onClickReward(level, bountyType.NORMAL) - end) - else - self.rewardCell1:hideFrameAnimation() - self.rewardCell1.baseObject:removeRedPoint() - self.rewardCell1:addClickListener(nil) - end - - isGet = DataManager.ActPvpData:getBountyCollected(level, bountyType.SUPERIOR) - local reward = DataManager.ActPvpData:getBountyReward(level, bountyType.SUPERIOR) - if reward then - self.rewardCell2:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell2:showLock(not DataManager.ActPvpData:getProBought()) - if DataManager.ActPvpData:getBountyCanGet(level, bountyType.SUPERIOR) then - self.rewardCell2:showFrameAnimation() - self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell2:addClickListener(function() - self:onClickReward(level, bountyType.SUPERIOR) - end) - else - self.rewardCell2:hideFrameAnimation() - self.rewardCell2.baseObject:removeRedPoint() - self.rewardCell2:addClickListener(nil) - end - - isGet = DataManager.ActPvpData:getBountyCollected(level, bountyType.SUPERIOR_MAX) - local reward = DataManager.ActPvpData:getBountyReward(level, bountyType.SUPERIOR_MAX) - if reward then - self.rewardCell3:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell3:showLock(not DataManager.ActPvpData:getUtralBought()) - if DataManager.ActPvpData:getBountyCanGet(level, bountyType.SUPERIOR_MAX) then - self.rewardCell3:showFrameAnimation() - self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell3:addClickListener(function() - self:onClickReward(level, bountyType.SUPERIOR_MAX) - end) - else - self.rewardCell3:hideFrameAnimation() - self.rewardCell3.baseObject:removeRedPoint() - self.rewardCell3:addClickListener(nil) - end - - if DataManager.ActPvpData:getBountyLevelEnough(level) then - self.imgLevel:setSprite(GConst.ATLAS_PATH.ACT_COMMON, LEVEL_ICON[1]) - else - self.imgLevel:setSprite(GConst.ATLAS_PATH.ACT_COMMON, LEVEL_ICON[2]) - end -end - --- 领取奖励 -function BountyCell:onClickReward(level, rewardType) - ModuleManager.ActPvpManager:reqBountyReward(level, rewardType) -end - -return BountyCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua.meta b/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua.meta deleted file mode 100644 index 70e42309..00000000 --- a/lua/app/ui/activity/act_pvp/cell/bounty_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 02d1306c1df965b4b837d0b75c47ce29 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/cell/rank_cell.lua b/lua/app/ui/activity/act_pvp/cell/rank_cell.lua deleted file mode 100644 index 07a386dc..00000000 --- a/lua/app/ui/activity/act_pvp/cell/rank_cell.lua +++ /dev/null @@ -1,58 +0,0 @@ -local RankCell = class("RankCell", BaseCell) - -local RANK_ICON = { - "act_ranking_1", - "act_ranking_2", - "act_ranking_3" -} - -local RANK_BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function RankCell:refresh(index, info) - local uiMap = self:getUIMap() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["act_rank_cell.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - uiMap["act_rank_cell.tx_rank"]:setText(index) - local imgRank = uiMap["act_rank_cell.img_rank"] - if RANK_ICON[index] then - imgRank:setVisible(true) - imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_ICON[index]) - uiMap["act_rank_cell.tx_rank"]:setText(GConst.EMPTY_STRING) - else - imgRank:setVisible(false) - end - - local imgBg = uiMap["act_rank_cell.bg"] - if RANK_BG[index] then - imgBg:setSprite(GConst.ATLAS_PATH.COMMON, RANK_BG[index]) - else - imgBg:setSprite(GConst.ATLAS_PATH.COMMON, RANK_BG[4]) - end - - local txName = uiMap["act_rank_cell.tx_name"] - local txWin = uiMap["act_rank_cell.tx_win"] - local txWinDesc = uiMap["act_rank_cell.bg.tx_win_desc"] - txWinDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_17)) - if info then - txName:setText(info.name) - txWin:setText(info.total_win) - self.playerHeadCell:getBaseObject():addClickListener(function() - -- ModuleManager.ActBossRushManager:reqOtherPlayerInfo(info.id, function(formation) - -- if not self.playerHeadCell or not self.playerHeadCell:getBaseObject() or self.playerHeadCell:getBaseObject():isDestroyed() then - -- return - -- end - -- ModuleManager.TipsManager:showHeroFormation(self.playerHeadCell:getBaseObject(), formation) - -- end) - end) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame, false) - else - txName:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - txWin:setText("--") - self.playerHeadCell:getBaseObject():addClickListener(nil) - self.playerHeadCell:refresh(3001, 1000, false) -- 默认 - end - -end - -return RankCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/cell/rank_cell.lua.meta b/lua/app/ui/activity/act_pvp/cell/rank_cell.lua.meta deleted file mode 100644 index 5f2a3fd2..00000000 --- a/lua/app/ui/activity/act_pvp/cell/rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e5a4c55fee315984db7c1113919fffd5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua b/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua deleted file mode 100644 index fa7d3221..00000000 --- a/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua +++ /dev/null @@ -1,54 +0,0 @@ -local RankRewardcell = class("RankRewardcell", BaseCell) - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} -local BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function RankRewardcell:refresh(ranking1, ranking2, rewards, totalIndex) - local uiMap = self:getUIMap() - - local rankStr = ranking1 .. "-" - if ranking2 then - rankStr = rankStr .. ranking2 - else - rankStr = rankStr .. "-" - end - if ranking1 == ranking2 then - rankStr = ranking1 - end - if self:getIndex() == totalIndex then - rankStr = ranking1 .. "+" - end - uiMap["rank_reward_cell.bg.tx_rank"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_23, rankStr)) - if not self.rewardCells then - self.rewardCells = {} - for i = 1, 2 do - self.rewardCells[i] = uiMap["rank_reward_cell.bg.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - end - end - for index, cell in ipairs(self.rewardCells) do - if rewards and rewards[index] then - cell:refreshByConfig(rewards[index]) - cell:getBaseObject():setActive(true) - else - cell:getBaseObject():setActive(false) - end - end - - local bg = uiMap["rank_reward_cell.bg"] - if BG[ranking1] then - bg:setSprite(GConst.ATLAS_PATH.COMMON, BG[ranking1]) - else - bg:setSprite(GConst.ATLAS_PATH.COMMON, BG[4]) - end - - local imgRank = uiMap["rank_reward_cell.bg.rank_img"] - if RANK_IMG[ranking1] then - imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[ranking1]) - imgRank:setVisible(true) - uiMap["rank_reward_cell.bg.tx_rank"]:setText(GConst.EMPTY_STRING) - else - imgRank:setVisible(false) - end -end - -return RankRewardcell \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua.meta b/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua.meta deleted file mode 100644 index 63e65e65..00000000 --- a/lua/app/ui/activity/act_pvp/cell/rank_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1889dcdf72b3c664c8f26a800e1131a2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua b/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua deleted file mode 100644 index 742c5d33..00000000 --- a/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua +++ /dev/null @@ -1,27 +0,0 @@ -local SimpleHeroCell = class("SimpleHeroCell", BaseCell) - -function SimpleHeroCell:refresh(heroEntity) - local uiMap = self:getUIMap() - local bg = uiMap["simple_hero_cell.bg"] - local icon = uiMap["simple_hero_cell.icon"] - local heroDec = uiMap["simple_hero_cell.dec"] - local matchImg = uiMap["simple_hero_cell.match_img"] - local lvTx = uiMap["simple_hero_cell.lv_tx"] - local sImg = uiMap["simple_hero_cell.s"] - local txName = uiMap["simple_hero_cell.tx_name"] - - local heroInfo = heroEntity:getConfig() - bg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.FRAME_QLT[heroInfo.qlt]) - heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[heroInfo.qlt]) - matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position]) - sImg:setVisible(heroInfo.qlt >= 4) - lvTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, heroEntity:getLv())) - txName:setText(heroEntity:getName()) - icon:setSprite(GConst.ATLAS_PATH.ICON_HERO_2, DataManager.SkinData:getIcon(heroEntity:getSkinId())) - - self:getBaseObject():addClickListener(function() - ModuleManager.HeroManager:showHeroDetailUI(nil, true, heroEntity) - end) -end - -return SimpleHeroCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua.meta b/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua.meta deleted file mode 100644 index 8089ba8d..00000000 --- a/lua/app/ui/activity/act_pvp/cell/simple_hero_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 5464d50b0ac119c47b4b948e1e659b3d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua b/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua deleted file mode 100644 index 36798056..00000000 --- a/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua +++ /dev/null @@ -1,34 +0,0 @@ -local TopRankCell = class("TopRankCell", BaseCell) - -function TopRankCell:refresh(info) - local uiMap = self:getUIMap() - if not self.playerHeadCell then - self.playerHeadCell = CellManager:addCellComp(uiMap["top_rank_cell.player_head_cell"], GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - end - - local txName = uiMap["top_rank_cell.name"] - local txWin = uiMap["top_rank_cell.win"] - local txWinDesc = uiMap["top_rank_cell.win_desc"] - txWinDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_17)) - - if info then - txName:setText(info.name) - txWin:setText(info.total_win) - self.playerHeadCell:getBaseObject():addClickListener(function() - -- ModuleManager.ActBossRushManager:reqOtherPlayerInfo(info.id, function(formation) - -- if not self.playerHeadCell or not self.playerHeadCell:getBaseObject() or self.playerHeadCell:getBaseObject():isDestroyed() then - -- return - -- end - -- ModuleManager.TipsManager:showHeroFormation(self.playerHeadCell:getBaseObject(), formation) - -- end) - end) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame, false) - else - txName:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - txWin:setText("--") - self.playerHeadCell:getBaseObject():addClickListener(nil) - self.playerHeadCell:refresh(3001, 1000, false) -- 默认 - end -end - -return TopRankCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua.meta b/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua.meta deleted file mode 100644 index 8608b8e0..00000000 --- a/lua/app/ui/activity/act_pvp/cell/top_rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c1a1c1511467a964b9d4d82ba9224f42 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/fourteen_day.meta b/lua/app/ui/activity/act_seven_day.meta similarity index 77% rename from lua/app/module/activity/fourteen_day.meta rename to lua/app/ui/activity/act_seven_day.meta index a95d6f9c..665fad54 100644 --- a/lua/app/module/activity/fourteen_day.meta +++ b/lua/app/ui/activity/act_seven_day.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a8cccd7f512852a408f6f2ced012eb95 +guid: a32b1e414f6554416b0a2c127efdfece folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua b/lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua new file mode 100755 index 00000000..c86d78cf --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua @@ -0,0 +1,8 @@ +local ActSevenDayUI = require("app/ui/activity/act_seven_day/act_seven_day_ui") +local ActSevenDayS2UI = class("ActSevenDayS2UI", ActSevenDayUI) + +function ActSevenDayS2UI:getPeriod() + return 2 +end + +return ActSevenDayS2UI \ No newline at end of file diff --git a/lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua.meta b/lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua.meta similarity index 86% rename from lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua.meta rename to lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua.meta index ae3a5f36..b33d295d 100644 --- a/lua/app/module/activity/act_boss_rush/act_boss_rush_manager.lua.meta +++ b/lua/app/ui/activity/act_seven_day/act_seven_day_s2_ui.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 72435753c4dcd0e419a2685ad64955d6 +guid: 6401e41b61e344172a4199d92d5b8961 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua b/lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua new file mode 100755 index 00000000..7dc176e1 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua @@ -0,0 +1,293 @@ +local ActSevenDayUI = class("ActSevenDayUI", BaseUI) + +local TASK_COMP = "app/ui/activity/act_seven_day/component/task_comp" +local GIFT_COMP = "app/ui/activity/act_seven_day/component/gift_comp" +local DAY_COMP = "app/ui/activity/act_seven_day/component/day_comp" + +function ActSevenDayUI:getPeriod() + return 1 +end + +function ActSevenDayUI:isFullScreen() + return false +end + +function ActSevenDayUI:onPressBackspace() + self:onClickClose() +end + +function ActSevenDayUI:ctor() +end + +function ActSevenDayUI:getPrefabPath() + return "assets/prefabs/ui/activity/act_sevenday/act_sevenday_ui.prefab" +end + +function ActSevenDayUI:onLoadRootComplete() + local uiMap = self.root:genAllChildren() + uiMap["act_sevenday_ui.d_menu.d_menu_1.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_DESC_1)) + uiMap["act_sevenday_ui.d_menu.d_menu_1.desc_tx_choose"]:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_DESC_1)) + uiMap["act_sevenday_ui.d_menu.d_menu_2.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_DESC_4)) + uiMap["act_sevenday_ui.d_menu.d_menu_2.desc_tx_choose"]:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_DESC_4)) + if self:getPeriod() == 1 then + uiMap["act_sevenday_ui.bg.title_img.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_SEVENDAY)) + else + uiMap["act_sevenday_ui.bg.title_img.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_SEVENDAY_2)) + end + self.timeTx = uiMap["act_sevenday_ui.bg.time_bg.time_tx"] + self.timeBg = uiMap["act_sevenday_ui.bg.time_bg"] + uiMap["act_sevenday_ui.bg.time_bg.help"]:addClickListener(function() + local params = { + desc = I18N:getGlobalText(I18N.GlobalConst.ACT_SEVENDAY_HELP) + } + ModuleManager.TipsManager:showHelpTips(params) + end) + + self:initComps() + self:_display() + self:_addListeners() + self:_bind() + + self:scheduleGlobal(function() + self:updateTime() + end, 1) + self:updateTime() +end + +function ActSevenDayUI:_display() + local page = 1 + if DataManager.ActSevenDayData:hasTaskRp(self:getPeriod()) then + page = 1 + end + self:switchComp(page) + self:refreshTitle() +end + +function ActSevenDayUI:_addListeners() + local uiMap = self.root:genAllChildren() + uiMap["act_sevenday_ui.mask"]:addClickListener(function() + self:onClickClose() + end) + uiMap["act_sevenday_ui.close_btn"]:addClickListener(function() + self:onClickClose() + end) + + self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_CITY_PAGE, function() + self:closeUI() + end) +end + +function ActSevenDayUI:onClickClose() + self:closeUI() + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_POP) +end + +function ActSevenDayUI:_bind() + self:bind(DataManager.ActSevenDayData, "isDirty", function() + if not self.day or not self.page then + return + end + if self:getMaxShowDay() < self.day then + self.day = self:getMaxShowDay() + end + self:refreshTitle() + self:refreshBottoms() + self:refreshDayComp(self.day) + self.subComps[self.page]:refresh(self, self.day, self:getPeriod()) + end) + self:bind(DataManager.PlayerData, "isDirty", function() + if not self.day or not self.page then + return + end + if self:getMaxShowDay() < self.day then + self.day = self:getMaxShowDay() + end + self:refreshTitle() + self:refreshBottoms() + self:refreshDayComp(self.day) + self.subComps[self.page]:refresh(self, self.day, self:getPeriod()) + end) + self:bind(DataManager.PaymentData, "isDirty", function() + if not self.day or not self.page then + return + end + if self:getMaxShowDay() < self.day then + self.day = self:getMaxShowDay() + end + self:refreshTitle() + self:refreshBottoms() + self:refreshDayComp(self.day) + self.subComps[self.page]:refresh(self, self.day, self:getPeriod()) + end) +end + +function ActSevenDayUI:initComps() + if self.subComps then + return + end + local uiMap = self.root:genAllChildren() + self.subComps = {} + + local taskComp = uiMap["act_sevenday_ui.task_comp"] + taskComp:initPrefabHelper() + taskComp:genAllChildren() + self.subComps[1] = taskComp:addLuaComponent(TASK_COMP) + + local giftComp = uiMap["act_sevenday_ui.gift_comp"] + giftComp:initPrefabHelper() + giftComp:genAllChildren() + self.subComps[2] = giftComp:addLuaComponent(GIFT_COMP) + + local dayComp = uiMap["act_sevenday_ui.r_menu"] + dayComp:initPrefabHelper() + dayComp:genAllChildren() + self.dayComp = dayComp:addLuaComponent(DAY_COMP) +end + +function ActSevenDayUI:refreshTitle() +end + +function ActSevenDayUI:refreshBottoms() + if not self.bottomBtns then + local uiMap = self.root:genAllChildren() + self.bottomBtns = {} + self.bgs = {} + self.hlBgs = {} + self.txs = {} + self.hlTxs = {} + self.rps = {} + for i = 1, 2 do + local prefix = "act_sevenday_ui.d_menu.d_menu_" .. i + self.bottomBtns[i] = uiMap[prefix] + self.bottomBtns[i]:addClickListener(function() + AudioManager:playEffect(AudioManager.EFFECT_ID.UI_BTN_SWITCH_2) + self:switchComp(i) + end) + self.bgs[i] = uiMap[prefix .. ".d_menu"] + self.hlBgs[i] = uiMap[prefix .. ".d_menu_choose"] + self.txs[i] = uiMap[prefix .. ".desc_tx"] + self.hlTxs[i] = uiMap[prefix .. ".desc_tx_choose"] + self.rps[i] = uiMap[prefix .. ".point_img"] + end + end + + for index = 1, 2 do + local select = index == self.page + self.hlBgs[index]:setVisible(select) + self.txs[index]:setVisible(not select) + self.bgs[index]:setVisible(not select) + self.hlTxs[index]:setVisible(select) + if index == 1 then + self.rps[index]:setVisible(DataManager.ActSevenDayData:hasTaskRp(self:getPeriod())) + elseif index == 2 then + self.rps[index]:setVisible(DataManager.ActSevenDayData:hasGiftRp(self:getPeriod())) + end + end +end + +function ActSevenDayUI:switchComp(page, force) + if self.page == page and not force then + return + end + self.page = page + local day = self:getMaxShowDay() + day = self:refreshDayComp() or day + self.day = day + for index, comp in ipairs(self.subComps) do + comp:getBaseObject():setActive(index == page) + comp:refresh(self, day, self:getPeriod()) + end + self:refreshBottoms() + + -- if self:getPeriod() == 1 then -- 第一期 + -- if self.page == 1 then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.ACT_SEVENDAY_TASK) + -- else + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.ACT_SEVENDAY_GIFT) + -- end + -- else + -- if self.page == 1 then + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.ACT_SEVENDAY_TASK_2) + -- else + -- BIReportV2:postOperation(BIReportV2.OPERATION_UI_NAME.ACT_SEVENDAY_GIFT_2) + -- end + -- end +end + +function ActSevenDayUI:refreshDayComp(targetDay) + local maxShowDay = self:getMaxShowDay() + local dataInfo = {} + local minRpDay = maxShowDay + for day = 1, 7 do + local over = false + local rp = false + if day <= maxShowDay then + over = true + if self.page == 1 then + local tasks = DataManager.ActSevenDayData:getTaskIdsByDay(day, self:getPeriod()) + if tasks then + for _, id in ipairs(tasks) do + if not DataManager.ActSevenDayData:isTaskReceived(id) then + over = false + end + + if DataManager.ActSevenDayData:canClaimTask(id) then + rp = true + if minRpDay > day then + minRpDay = day + end + break + end + end + + end + elseif self.page == 2 then + rp = DataManager.ActSevenDayData:hasGiftDayRp(day, self:getPeriod()) + over = DataManager.ActSevenDayData:getIsGiftAllOverDay(day, self:getPeriod()) + if rp and minRpDay > day then + minRpDay = day + end + end + end + + table.insert(dataInfo, { + over = over, + rp = rp, + func = function(selectDay) + self.day = selectDay + self.subComps[self.page]:refresh(self, selectDay, self:getPeriod()) + end + }) + end + targetDay = targetDay or minRpDay + self.dayComp:refresh(self, dataInfo, targetDay, maxShowDay, self:getPeriod()) + return minRpDay +end + +function ActSevenDayUI:getMaxShowDay() + local day = DataManager.ActSevenDayData:getActDay(self:getPeriod()) + if day <= 0 or day >= 7 then + day = 7 + end + return day +end + +function ActSevenDayUI:updateTime() + local cd = DataManager.ActSevenDayData:getRemainTime(self:getPeriod()) + local timeStr = GConst.EMPTY_STRING + local remainDay = -1 + if cd <= 0 then + timeStr = I18N:getGlobalText(I18N.GlobalConst.ADVENTURE_CLOSED) + else + remainDay = cd // 86400 + timeStr = I18N:getGlobalText(I18N.GlobalConst.TIME_END_DESC_1, GFunc.getTimeStr(cd)) + end + self.timeTx:setText(timeStr) + if remainDay >= 0 and self.remainDay ~= remainDay then + self.remainDay = remainDay + local width = self.timeTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + self.timeBg:setSizeDeltaX(width + 74) + end +end + +return ActSevenDayUI \ No newline at end of file diff --git a/lua/app/module/activity/fourteen_day/fourteen_day_manager.lua.meta b/lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua.meta similarity index 86% rename from lua/app/module/activity/fourteen_day/fourteen_day_manager.lua.meta rename to lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua.meta index b28b60eb..cd209f9b 100644 --- a/lua/app/module/activity/fourteen_day/fourteen_day_manager.lua.meta +++ b/lua/app/ui/activity/act_seven_day/act_seven_day_ui.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3f6a2e3ef3d3e3045b4c3cc0fda335bc +guid: 10bf3aa8d477d4cd6a75b5569c6c3704 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/ui/activity/act_boss_rush/cell.meta b/lua/app/ui/activity/act_seven_day/cell.meta similarity index 77% rename from lua/app/ui/activity/act_boss_rush/cell.meta rename to lua/app/ui/activity/act_seven_day/cell.meta index 2566ca89..9d73a70f 100644 --- a/lua/app/ui/activity/act_boss_rush/cell.meta +++ b/lua/app/ui/activity/act_seven_day/cell.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e3ad55d83f2f7554b9c8c21a442f894f +guid: 8481132a6d14a4f498ff848b8e7d1c70 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua b/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua new file mode 100755 index 00000000..34024f89 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua @@ -0,0 +1,165 @@ +local GiftCell = class("GiftCell", BaseCell) + +function GiftCell:init() + local uiMap = self:getUIMap() + + self.tagBg = uiMap["gift_cell.tag_bg"] + self.tagTx = uiMap["gift_cell.tag_bg.tag_tx"] + self.claimBtn = uiMap["gift_cell.claim_btn"] + self.claimBtnAdImg = uiMap["gift_cell.claim_btn.ad_img"] + self.claimBtnTx = uiMap["gift_cell.claim_btn.text"] + self.claimBtnTxBlue = uiMap["gift_cell.claim_btn.text_blue"] + self.claimBtnTxGray = uiMap["gift_cell.claim_btn.text_gray"] + self.limitTx = uiMap["gift_cell.limit_tx"] + self.claimBtnIcon = uiMap["gift_cell.claim_btn.icon"] + self.claimBtnNumTx = uiMap["gift_cell.claim_btn.num_tx"] + self.titleTx = uiMap["gift_cell.title_tx"] + self.discountBg = uiMap["gift_cell.discount_bg"] + self.discountBgTx = uiMap["gift_cell.discount_bg.desc_tx"] + + self.rewardCells = {} + for i = 1, 4 do + self.rewardCells[i] = uiMap["gift_cell.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + end + + self.claimBtn:addClickListener(function() + if self.info == nil then + return + end + if self.info.cfg.parameter_pro and self.info.cfg.parameter_pro[1] == 1 then -- 免费 + ModuleManager.ActSevenDayManager:onGiftBuy(self.info.id) + elseif self.info.cfg.item_cost then -- 道具购买 + if not GFunc.checkCost(self.info.cfg.item_cost[1].id, self.info.cfg.item_cost[1].num, true) then + return + end + local params = {} + params.content = I18N:getGlobalText(I18N.GlobalConst.MALL_DESC_13) + params.boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL + params.showToday = GConst.MESSAGE_BOX_SHOW_TODAY.ACT_SEVEN_DAY_GIFT + params.okFunc = function() + ModuleManager.ActSevenDayManager:onGiftBuy(self.info.id) + end + GFunc.showMessageBox(params) + elseif self.info.cfg.recharge_id == nil then -- 广告 + SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_ACT_SEVEN_DAY_GIFT, function () + ModuleManager.ActSevenDayManager:onGiftBuy(self.info.id) + end) + elseif self.info.cfg.recharge_id then -- 正常购买 + ModuleManager.ActSevenDayManager:onGiftBuy(self.info.id) + end + end) +end + +function GiftCell:refresh(info, period) + self.info = info + local giftRemainNum = DataManager.ActSevenDayData:getGiftRemainNum(info.id, period) + self.titleTx:setText(I18N:getText("act_gift", info.id, "value")) + self.limitTx:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_8) .. giftRemainNum .. "/" .. info.cfg.limit) + + if info.cfg.recharge_id then + self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_11") + else + self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_10") + end + + if info.cfg.recommend then + self.tagBg:setActive(true) + self.titleTx:setAnchoredPositionX(88) + if info.cfg.recommend == 1 then + self.tagTx:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_16)) + else + self.tagTx:setText("" .. I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_19) .. "") + end + else + self.tagBg:setActive(false) + self.titleTx:setAnchoredPositionX(24) + end + + GFunc.setAdsSprite(self.claimBtnAdImg) + local isClaimAll = giftRemainNum <= 0 + if isClaimAll then + self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_3") + self.claimBtn:setTouchEnable(false) + self.claimBtnTxGray:setVisible(true) + self.claimBtnTxGray:setText(I18N:getGlobalText(I18N.GlobalConst.GIFT_ROUTINE_DESC_10)) + self.claimBtnTxGray:setSizeDeltaX(120) + self.claimBtnTxGray:setAnchoredPositionX(0) + self.claimBtnTxBlue:setVisible(false) + self.claimBtnTx:setVisible(false) + self.claimBtnAdImg:setActive(false) + self.claimBtnIcon:setActive(false) + self.claimBtnNumTx:setActive(false) + else + self.claimBtn:setTouchEnable(true) + if info.cfg.parameter_pro and info.cfg.parameter_pro[1] == 1 then -- 免费 + self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3") + self.claimBtnAdImg:setActive(false) + self.claimBtnIcon:setActive(false) + self.claimBtnNumTx:setActive(false) + self.claimBtnTxBlue:setVisible(true) + self.claimBtnTxBlue:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_DESC)) + self.claimBtnTxBlue:setSizeDeltaX(120) + self.claimBtnTxBlue:setAnchoredPositionX(0) + self.claimBtnTx:setVisible(false) + self.claimBtnTxGray:setVisible(false) + elseif info.cfg.item_cost then -- 道具购买 + self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_3") + self.claimBtnIcon:setSprite(GFunc.getIconRes(info.cfg.item_cost[1].id)) + self.claimBtnAdImg:setActive(false) + self.claimBtnIcon:setActive(true) + self.claimBtnNumTx:setActive(true) + self.claimBtnTx:setVisible(false) + self.claimBtnTxGray:setVisible(false) + self.claimBtnTxBlue:setVisible(false) + self.claimBtnNumTx:setText(info.cfg.item_cost[1].num) + GFunc.centerImgAndTx(self.claimBtnIcon, self.claimBtnNumTx, 0, nil, -6) + elseif info.cfg.recharge_id == nil then -- 广告 + self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_3") + self.claimBtnAdImg:setActive(true) + self.claimBtnIcon:setActive(false) + self.claimBtnNumTx:setActive(false) + self.claimBtnTxBlue:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_DESC)) + self.claimBtnTxBlue:setSizeDeltaX(80) + self.claimBtnTxBlue:setAnchoredPositionX(18) + self.claimBtnTxBlue:setVisible(true) + self.claimBtnTx:setVisible(false) + self.claimBtnTxGray:setVisible(false) + elseif info.cfg.recharge_id then -- 付费购买 + self.claimBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_3") + self.claimBtnAdImg:setActive(false) + self.claimBtnIcon:setActive(false) + self.claimBtnNumTx:setActive(false) + self.claimBtnTx:setText(GFunc.getFormatPrice(info.cfg.recharge_id)) + self.claimBtnTx:setSizeDeltaX(120) + self.claimBtnTx:setAnchoredPositionX(0) + self.claimBtnTx:setVisible(true) + self.claimBtnTxGray:setVisible(false) + self.claimBtnTxBlue:setVisible(false) + end + end + + -- -- 红点 + -- if not isClaimAll and not self.cfg.free and not self.cfg.item_cost and not self.cfg.recharge_id then + -- self.claimBtn:addRedPoint(67, 28, 0.9) + -- else + -- self.claimBtn:removeRedPoint() + -- end + + for i = 1, 4 do + if info.cfg.reward and info.cfg.reward[i] then + self.rewardCells[i]:setVisible(true) + self.rewardCells[i]:refreshByConfig(info.cfg.reward[i], isClaimAll, isClaimAll) + else + self.rewardCells[i]:setVisible(false) + end + end + + if info.cfg.value then + self.discountBg:setActive(true) + self.discountBgTx:setText(info.cfg.value .. "%") + else + self.discountBg:setActive(false) + end +end + +return GiftCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua.meta b/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua.meta new file mode 100644 index 00000000..a97c029c --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/cell/gift_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 275a3898265ab4a2e9495eb1a14d48c2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua b/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua new file mode 100755 index 00000000..202634cd --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua @@ -0,0 +1,14 @@ +local RechargeCell = class("RechargeCell", BaseCell) + +function RechargeCell:init() + local uiMap = self:getUIMap() + self.txPrice = uiMap["recharge_cell.tx_price"] + self.txScore = uiMap["recharge_cell.tx_score"] +end + +function RechargeCell:refresh(id, info) + self.txPrice:setText(GFunc.getFormatPrice(id)) + self.txScore:setText(info.score) +end + +return RechargeCell \ No newline at end of file diff --git a/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua.meta b/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua.meta new file mode 100644 index 00000000..698ee875 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/cell/recharge_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f30caffecf602420a8ccb2afb57b316b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_seven_day/cell/task_cell.lua b/lua/app/ui/activity/act_seven_day/cell/task_cell.lua new file mode 100755 index 00000000..86b46dac --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/cell/task_cell.lua @@ -0,0 +1,53 @@ +local TaskCell = class("TaskCell", BaseCell) + +function TaskCell:refresh(id, period) + local uiMap = self:getUIMap() + local cfg = ConfigManager:getConfig("act_sevenday_quest")[id] + local taskInfo = DataManager.ActSevenDayData:getTaskData(id) + local slider = uiMap["task_cell.slider_bg.slider"] + local progress = math.max(taskInfo.progress, 0) + progress = math.min(progress, cfg.number) + + slider:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = progress / cfg.number + uiMap["task_cell.progress"]:setText(progress .. "/" .. cfg.number) + local desc = uiMap["task_cell.desc"] + local condition = cfg.number + local str = GFunc.getTaskDesc(cfg.type, condition) + desc:setText(str) + if not self.rewardCell then + self.rewardCell = CellManager:addCellComp(uiMap["task_cell.reward_cell"], GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + end + self.rewardCell:refreshByConfig(cfg.reward[1]) + uiMap["task_cell.num"]:setText(cfg.reward[2].num) + uiMap["task_cell.mask"]:setVisible(taskInfo.collect) + uiMap["task_cell.check_img"]:setVisible(taskInfo.collect) + self:getBaseObject():addClickListener(function() + self:onClick(id, period) + end) + + if DataManager.ActSevenDayData:canClaimTask(id) then + uiMap["task_cell.bg.red_point"]:setVisible(true) + self.rewardCell:addClickListener(function() + self:onClick(id, period) + end) + else + uiMap["task_cell.bg.red_point"]:setVisible(false) + end +end + +function TaskCell:onClick(id, period) + local cfg = ConfigManager:getConfig("act_sevenday_quest")[id] + local taskInfo = DataManager.ActSevenDayData:getTaskData(id) + if taskInfo.collect then + return + end + if taskInfo.progress >= cfg.number then + ModuleManager.ActSevenDayManager:onGetRewardTask(id, period) + else + if cfg.type then + ModuleManager.TaskManager:goToTask(cfg.type) + end + end +end + +return TaskCell \ No newline at end of file diff --git a/lua/app/ui/activity/seven_day/cell/task_cell.lua.meta b/lua/app/ui/activity/act_seven_day/cell/task_cell.lua.meta similarity index 86% rename from lua/app/ui/activity/seven_day/cell/task_cell.lua.meta rename to lua/app/ui/activity/act_seven_day/cell/task_cell.lua.meta index 9a9d43e6..c17c0775 100644 --- a/lua/app/ui/activity/seven_day/cell/task_cell.lua.meta +++ b/lua/app/ui/activity/act_seven_day/cell/task_cell.lua.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a4afbec80f4beef448f851611884982b +guid: 57d97d81d77174aa7a410ee6e78c2a3c ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/lua/app/module/activity/full_moon.meta b/lua/app/ui/activity/act_seven_day/component.meta similarity index 77% rename from lua/app/module/activity/full_moon.meta rename to lua/app/ui/activity/act_seven_day/component.meta index 0d157e21..b213b683 100644 --- a/lua/app/module/activity/full_moon.meta +++ b/lua/app/ui/activity/act_seven_day/component.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0ee2abea36076ae4d8463dff225a1234 +guid: 3b36f6b6074384be7b87858f3528ab90 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/ui/activity/act_seven_day/component/day_comp.lua b/lua/app/ui/activity/act_seven_day/component/day_comp.lua new file mode 100755 index 00000000..e9662e61 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/day_comp.lua @@ -0,0 +1,62 @@ +local DayComp = class("DayComp", LuaComponent) + +-- dataInfo = {{over = bool, rp = bool, func = function(day) end}, {}} +function DayComp:refresh(parentUI, dataInfo, selectedDay, maxShowDay, period) + local uiMap = self:getUIMap() + if not self.chooseBgs then + self.touchs = {} + self.chooseBgs = {} + self.dayDescs = {} + self.dayChooseDescs = {} + self.rpPoints = {} + self.checks = {} + self.locks = {} + for i = 1, 7 do + local prefix = "r_menu.r_menu_" .. i + self.touchs[i] = uiMap[prefix] + self.chooseBgs[i] = uiMap[prefix .. ".r_menu_choose"] + self.dayDescs[i] = uiMap[prefix .. ".day_tx"] + self.dayChooseDescs[i] = uiMap[prefix .. ".day_tx_choose"] + self.rpPoints[i] = uiMap[prefix .. ".point_img"] + self.checks[i] = uiMap[prefix .. ".check_img"] + self.locks[i] = uiMap[prefix .. ".lock"] + end + end + + for day, obj in ipairs(self.touchs) do + obj:addClickListener(function() + if day > maxShowDay then + return + end + + if dataInfo[day].func then + dataInfo[day].func(day) + end + self:refresh(parentUI, dataInfo, day, maxShowDay) + end) + self.locks[day]:setVisible(day > maxShowDay) + self.chooseBgs[day]:setVisible(selectedDay == day) + if dataInfo[day] and dataInfo[day].over then + self.dayDescs[day]:setText(GConst.EMPTY_STRING) + self.dayChooseDescs[day]:setText(GConst.EMPTY_STRING) + self.checks[day]:setVisible(true) + self.rpPoints[day]:setVisible(false) + else + if selectedDay == day then + self.dayDescs[day]:setText(GConst.EMPTY_STRING) + self.dayChooseDescs[day]:setText(day) + else + self.dayDescs[day]:setText(day) + self.dayChooseDescs[day]:setText(GConst.EMPTY_STRING) + end + self.checks[day]:setVisible(false) + if dataInfo[day] and dataInfo[day].rp then + self.rpPoints[day]:setVisible(true) + else + self.rpPoints[day]:setVisible(false) + end + end + end +end + +return DayComp \ No newline at end of file diff --git a/lua/app/ui/activity/act_seven_day/component/day_comp.lua.meta b/lua/app/ui/activity/act_seven_day/component/day_comp.lua.meta new file mode 100644 index 00000000..5b43c7c1 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/day_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: acb59d11433784e28957e5ab7bc347e8 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_seven_day/component/gift_comp.lua b/lua/app/ui/activity/act_seven_day/component/gift_comp.lua new file mode 100755 index 00000000..f7217c68 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/gift_comp.lua @@ -0,0 +1,51 @@ +local GiftComp = class("GiftComp", LuaComponent) + +local GIFT_CELL = "app/ui/activity/act_seven_day/cell/gift_cell" + +function GiftComp:init() + local uiMap = self:getUIMap() + self.scrollRect = uiMap["gift_comp.scroll_rect"]:getLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return GIFT_CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + if self.giftList then + cell:refresh(self.giftList[index], self.period) + end + end) + self.scrollRect:clearCells() +end + +function GiftComp:refresh(parentUI, day, period) + self.day = day + self.period = period + self.giftList = DataManager.ActSevenDayData:getGiftList(self.day, period) or GConst.EMPTY_TABLE + table.sort(self.giftList, function(a, b) + local giftRemainNumA = DataManager.ActSevenDayData:getGiftRemainNum(a.id, period) + local giftRemainNumB = DataManager.ActSevenDayData:getGiftRemainNum(b.id, period) + if (giftRemainNumA > 0 and giftRemainNumB > 0) or (giftRemainNumA <= 0 and giftRemainNumB <= 0) then + if a.isFree == b.isFree then + if a.isAd == b.isAd then + return a.id < b.id + else + if a.isAd then + return true + else + return false + end + end + else + if a.isFree then + return true + else + return false + end + end + else + return giftRemainNumA > 0 + end + end) + self.scrollRect:refillCells(#self.giftList) +end + +return GiftComp \ No newline at end of file diff --git a/lua/app/ui/activity/act_seven_day/component/gift_comp.lua.meta b/lua/app/ui/activity/act_seven_day/component/gift_comp.lua.meta new file mode 100644 index 00000000..b2e45224 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/gift_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c61d5c4f9cb0040c8afcdff842fc51b6 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/act_seven_day/component/task_comp.lua b/lua/app/ui/activity/act_seven_day/component/task_comp.lua new file mode 100755 index 00000000..aaf511b9 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/task_comp.lua @@ -0,0 +1,108 @@ +local TaskComp = class("TaskComp", LuaComponent) + +local TASK_CELL = "app/ui/activity/act_seven_day/cell/task_cell" + +function TaskComp:refresh(parentUI, day, period) + local uiMap = self:getUIMap() + if not self.rewardCells then + self.rewardCells = {} + self.nums = {} + self.boxIcons = {} + self.effects = {} + for i = 1, 7 do + self.rewardCells[i] = uiMap["task_comp.bg.slider_bg.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.nums[i] = uiMap["task_comp.slider_bg.num_" .. i] + self.boxIcons[i] = uiMap["task_comp.slider_bg.box_" .. i] + self.effects[i] = uiMap["task_comp.bg.slider_bg.effect.vfx_ui_b9_daojv_b01_" .. i] + end + end + + local curPoint = DataManager.ActSevenDayData:getScore(period) + local maxPoint = curPoint + + for id, obj in ipairs(self.nums) do + local scoreId = id + if period == 2 then + scoreId = scoreId + 7 + end + local curCfg = DataManager.ActSevenDayData:getScoreCfg(scoreId) + if curCfg then + self.nums[id]:setText(curCfg.num) + if curCfg.num > maxPoint then + maxPoint = curCfg.num + end + local reward = curCfg.reward[1] + local canGet = DataManager.ActSevenDayData:canClaimScore(scoreId, period) + local isReceived = DataManager.ActSevenDayData:isScoreReceived(scoreId) + + if self.rewardCells[id] then + self.rewardCells[id]:refreshByConfig(reward, isReceived, isReceived) + if canGet then + self.rewardCells[id]:showFrameAnimation() + self.rewardCells[id]:addClickListener(function() + ModuleManager.ActSevenDayManager:onGetRewardScore(scoreId, period) + end) + else + self.rewardCells[id]:hideFrameAnimation() + -- self.rewardCells[id]:setClickShowTips() + end + end + + if self.effects[id] then + self.effects[id]:setVisible(not isReceived) + end + end + end + + if maxPoint <= 0 then + maxPoint = 1 + end + + local taskRewardList = DataManager.ActSevenDayData:getScoreCfg() + local step = {} + for id, info in ipairs(taskRewardList) do + if info.period == period then + table.insert(step, info.num) + end + end + + local sliderValue = 0 + local scale = 1 / #step + for i, num in ipairs(step) do + local lastNum = step[i - 1] or 0 + local offset = curPoint - lastNum + sliderValue = scale * (i - 1) + scale * (offset / (num - lastNum)) + if curPoint <= num then + break + end + end + + local slider = uiMap["task_comp.slider_bg.slider"] + slider:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = sliderValue + local pointDesc = uiMap["task_comp.slider_bg.point_desc"] + pointDesc:setText(curPoint) + + local list = DataManager.ActSevenDayData:getSortTaskIdsByDay(day, period) or GConst.EMPTY_TABLE + self:refreshScrollRect(list, period) +end + +function TaskComp:refreshScrollRect(list, period) + self.taskList = list + self.period = period + if self.scrollRect then + self.scrollRect:refillCells(#self.taskList) + return + end + local uiMap = self:getUIMap() + self.scrollRect = uiMap["task_comp.scrollrect_task"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRect:addInitCallback(function() + return TASK_CELL + end) + self.scrollRect:addRefreshCallback(function(index, cell) + cell:refresh(self.taskList[index], self.period) + end) + self.scrollRect:clearCells() + self.scrollRect:refillCells(#self.taskList) +end + +return TaskComp \ No newline at end of file diff --git a/lua/app/ui/activity/act_seven_day/component/task_comp.lua.meta b/lua/app/ui/activity/act_seven_day/component/task_comp.lua.meta new file mode 100644 index 00000000..2df4eb20 --- /dev/null +++ b/lua/app/ui/activity/act_seven_day/component/task_comp.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e7a380d8b4815404c80502bc3821cca1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_bounty_buy_ui.lua b/lua/app/ui/activity/activity_bounty_buy_ui.lua deleted file mode 100644 index 08242787..00000000 --- a/lua/app/ui/activity/activity_bounty_buy_ui.lua +++ /dev/null @@ -1,112 +0,0 @@ -local ActivityUI = class("ActivityUI", BaseUI) -local SPINE_BANNER = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = "ui_act_summer_buy_2", - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = "ui_act_summer_buy_1", -} -local PANEL_BG = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = "assets/arts/textures/background/shop/shop_bg_11.png", - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = "assets/arts/textures/background/shop/shop_bg_pig.png", -} -local TITLE_BG = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = "common_title_10", - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = "common_title_12", -} -local OFF_BG = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = "shop_bg_18", - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = "shop_bg_9", -} -local LINE_BG = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = "act_summer_board_6", - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = "act_summer_board_5", -} -local SPINE_POS_Y = { - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1] = 340, - [GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2] = 285, -} - -function ActivityUI:isFullScreen() - return false -end - -function ActivityUI:getPrefabPath() - return "assets/prefabs/ui/activity/activity_bounty_buy_ui.prefab" -end - -function ActivityUI:onPressBackspace() - self:closeUI() -end - -function ActivityUI:ctor(parmas) - self.payType = parmas - if self.payType == GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1 then - self.giftId = GConst.ActivityConst.BOUNTY_GIFT_ID_1 - elseif self.payType == GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2 then - self.giftId = GConst.ActivityConst.BOUNTY_GIFT_ID_2 - end -end - -function ActivityUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.bg = uiMap["activity_bounty_buy_ui.bg"] - self.spineBanner = uiMap["activity_bounty_buy_ui.bg.spine_banner"] - self.imgTitle = uiMap["activity_bounty_buy_ui.bg.img_title"] - self.txTitle = uiMap["activity_bounty_buy_ui.bg.img_title.tx_title"] - self.imgOff = uiMap["activity_bounty_buy_ui.bg.img_off"] - self.txOff = uiMap["activity_bounty_buy_ui.bg.img_off.tx_off"] - self.txDesc = uiMap["activity_bounty_buy_ui.bg.tx_desc"] - self.line = uiMap["activity_bounty_buy_ui.bg.line"] - self.scrollrectComp = uiMap["activity_bounty_buy_ui.bg.scroll_rect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.btnBuy = uiMap["activity_bounty_buy_ui.bg.btn_buy"] - self.txBuy = uiMap["activity_bounty_buy_ui.bg.btn_buy.tx_buy"] - self.btnClose = uiMap["activity_bounty_buy_ui.bg.close_btn"] - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_PREVIEW_DESC)) - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_11)) - - self.btnBuy:addClickListener(function() - ModuleManager.ActivityManager:buySummerBounty(self.giftId) - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:addEventListener(EventManager.CUSTOM_EVENT.ACTIVITY_SUMMER_END, function() - self:closeUI() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:closeUI() - end) -end - -function ActivityUI:onRefresh() - self.spineBanner:getSkeletonGraphic().enabled = false - self.spineBanner:loadAssetAsync(SPINE_BANNER[self.payType], function() - self.spineBanner:getSkeletonGraphic().enabled = true - self.spineBanner:playAnim("idle", true, true, true) - end, false) - self.spineBanner:setAnchoredPositionY(SPINE_POS_Y[self.payType]) - - self.bg:setTexture(PANEL_BG[self.payType]) - self.imgTitle:setSprite(GConst.ATLAS_PATH.COMMON, TITLE_BG[self.payType]) - self.imgOff:setSprite(GConst.ATLAS_PATH.SHOP, OFF_BG[self.payType]) - self.line:setSprite(GConst.ATLAS_PATH.ACT_SUMMER, LINE_BG[self.payType]) - local gift = DataManager.ShopData:getActGiftConfig()[self.giftId] - if gift.value then - self.imgOff:setActive(true) - self.txOff:setText(gift.value .. "%") - else - self.imgOff:setActive(false) - end - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - - local totalRewards = DataManager.ActivityData:getBountyGradeAllRewardSort(self.payType) - self.scrollrectComp:addInitCallback(function() - return GConst.TYPEOF_LUA_CLASS.REWARD_CELL - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refreshByConfig(totalRewards[index]) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#totalRewards) -end - -return ActivityUI \ No newline at end of file diff --git a/lua/app/ui/activity/activity_bounty_buy_ui.lua.meta b/lua/app/ui/activity/activity_bounty_buy_ui.lua.meta deleted file mode 100644 index cb3dd1a7..00000000 --- a/lua/app/ui/activity/activity_bounty_buy_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2433585b4982fc8439f9ea349d187da2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_bounty_comp.lua b/lua/app/ui/activity/activity_bounty_comp.lua deleted file mode 100644 index ae42f6ad..00000000 --- a/lua/app/ui/activity/activity_bounty_comp.lua +++ /dev/null @@ -1,107 +0,0 @@ -local ActivityBountyComp = class("ActivityBountyComp", LuaComponent) - -function ActivityBountyComp:init() - local uiMap = self:getUIMap() - self.txScore = uiMap["bounty_panel.bounty.tx_score"] - self.imgProg = uiMap["bounty_panel.bounty.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.txProg = uiMap["bounty_panel.bounty.prog.tx_prog"] - self.txLv = uiMap["bounty_panel.bounty.tx_lv"] - self.txLvNum = uiMap["bounty_panel.bounty.tx_lv_num"] - self.txFree = uiMap["bounty_panel.title.free.tx_free"] - -- 档位1 - self.txBuyed1 = uiMap["bounty_panel.title.buy1.tx_buyed"] - self.btnBuy1 = uiMap["bounty_panel.title.buy1.btn_buy"] - self.txBuy1 = uiMap["bounty_panel.title.buy1.btn_buy.tx_buy"] - -- 档位2 - self.txBuyed2 = uiMap["bounty_panel.title.buy2.tx_buyed"] - self.btnBuy2 = uiMap["bounty_panel.title.buy2.btn_buy"] - self.txBuy2 = uiMap["bounty_panel.title.buy2.btn_buy.tx_buy"] - - self.scrollrectComp = uiMap["bounty_panel.list_bounty"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.progLevel = uiMap["bounty_panel.list_bounty.viewport.content.prog"] - self.imgProgLevel = uiMap["bounty_panel.list_bounty.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.maskLevel = uiMap["bounty_panel.list_bounty.viewport.content.mask_img"] - self.lineLevel = uiMap["bounty_panel.list_bounty.viewport.content.line"] - self.btnBuyLevel = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level"] - self.txBuyLevelNum = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.tx_num"] - self.imgBuyLevelIcon = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.icon"] - - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_1)) - self.txLv:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_12)) - self.txFree:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - self.txBuyed1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - self.txBuyed2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - self.bountyList = DataManager.ActivityData:getBountyCfg() - self.scrollrectComp:addInitCallback(function() - self.maskLevel:getTransform():SetAsLastSibling() - self.lineLevel:getTransform():SetAsLastSibling() - return "app/ui/activity/cell/activity_bounty_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(index, self.bountyList[index]) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.bountyList) - - self.btnBuy1:addClickListener(function() - UIManager:showUI("app/ui/activity/activity_bounty_buy_ui", GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1) - end) - self.btnBuy2:addClickListener(function() - UIManager:showUI("app/ui/activity/activity_bounty_buy_ui", GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2) - end) - self.btnBuyLevel:addClickListener(function() - ModuleManager.ActivityManager:reqBuyBountyLevel() - end) -end - -function ActivityBountyComp:refresh() - self.btnBuyLevel:setActive(DataManager.ActivityData:canBuyBountyLevel()) - -- 战令积分显示 - local total = DataManager.ActivityData:getBountyUpgradeScore() - local cur = DataManager.ActivityData:getBountyLevelScore() - if total and total > 0 then - self.imgProg.value = cur / total - self.txProg:setText(cur .. "/" .. total) - else - self.imgProg.value = 1 - self.txProg:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) - end - self.txLvNum:setText(DataManager.ActivityData:getBountyLevel()) - - -- 档位展示 - self.btnBuy1:setActive(not DataManager.ActivityData:isBountyGradeUnlock(GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1)) - self.btnBuy2:setActive(not DataManager.ActivityData:isBountyGradeUnlock(GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2)) - - local gift1 = DataManager.ActivityData:getBountyGradeGiftCfg(GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY1) - local gift2 = DataManager.ActivityData:getBountyGradeGiftCfg(GConst.ActivityConst.BOUNTY_GRADE_TYPE.PAY2) - self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) - self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) - self.txBuyLevelNum:setText(GFunc.getRewardNum(DataManager.ActivityData:getBuyBountyLevelCost())) - GFunc.centerImgAndTx(self.imgBuyLevelIcon, self.txBuyLevelNum, 5) - - -- 等级列表 - self.scrollrectComp:updateAllCell() - - local maxLevel = DataManager.ActivityData:getBountyMaxLevel() - local curLevel = DataManager.ActivityData:getBountyLevel() - local topRecoveryOffset = self.scrollrectComp:getTopRecoveryOffset() - local downRecoveryOffset = self.scrollrectComp:getDownRecoveryOffset() - local cellHeight = self.scrollrectComp:getCellHeight() - if curLevel >= maxLevel then - self.lineLevel:setVisible(false) - else - self.lineLevel:setVisible(true) - self.lineLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - end - self.progLevel:setAnchoredPositionY((topRecoveryOffset + downRecoveryOffset) / 2 - cellHeight / 2 - 10) - self.progLevel:setSizeDeltaY(cellHeight * (maxLevel - 1)) - local percent = (curLevel - 1) / (maxLevel - 1) - if percent < 0 then - percent = 0 - end - self.imgProgLevel.value = percent - self.maskLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - self.maskLevel:setSizeDeltaY(cellHeight * maxLevel + GConst.UI_SCREEN_HEIGHT) -end - -return ActivityBountyComp \ No newline at end of file diff --git a/lua/app/ui/activity/activity_bounty_comp.lua.meta b/lua/app/ui/activity/activity_bounty_comp.lua.meta deleted file mode 100644 index 52cb2e04..00000000 --- a/lua/app/ui/activity/activity_bounty_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6be3caa8b2628cc4eb4bd042b7600484 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_gift_hero_ui.lua b/lua/app/ui/activity/activity_gift_hero_ui.lua deleted file mode 100644 index 6c0e0821..00000000 --- a/lua/app/ui/activity/activity_gift_hero_ui.lua +++ /dev/null @@ -1,6 +0,0 @@ -local ActivityUI = require "app/ui/activity/activity_ui" -local ActivityGiftHeroUI = class("ActivityGiftHeroUI", ActivityUI) - --- 活动英雄礼包,为了避免界面和activity_ui冲突 - -return ActivityGiftHeroUI \ No newline at end of file diff --git a/lua/app/ui/activity/activity_gift_hero_ui.lua.meta b/lua/app/ui/activity/activity_gift_hero_ui.lua.meta deleted file mode 100644 index 934f711a..00000000 --- a/lua/app/ui/activity/activity_gift_hero_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 27dfb616c5928a6408dcd22f5318002c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_gift_skin_ui.lua b/lua/app/ui/activity/activity_gift_skin_ui.lua deleted file mode 100644 index 224a94dc..00000000 --- a/lua/app/ui/activity/activity_gift_skin_ui.lua +++ /dev/null @@ -1,6 +0,0 @@ -local ActivityUI = require "app/ui/activity/activity_ui" -local ActivityGiftSkinUI = class("ActivityGiftSkinUI", ActivityUI) - --- 活动皮肤礼包,为了避免界面和activity_ui冲突 - -return ActivityGiftSkinUI \ No newline at end of file diff --git a/lua/app/ui/activity/activity_gift_skin_ui.lua.meta b/lua/app/ui/activity/activity_gift_skin_ui.lua.meta deleted file mode 100644 index f2293f80..00000000 --- a/lua/app/ui/activity/activity_gift_skin_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fbf4f90499938e74d96a805ca6c2a29b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_hero_comp.lua b/lua/app/ui/activity/activity_hero_comp.lua deleted file mode 100644 index 241680c5..00000000 --- a/lua/app/ui/activity/activity_hero_comp.lua +++ /dev/null @@ -1,52 +0,0 @@ -local ActivityHeroComp = class("ActivityHeroComp", LuaComponent) - -function ActivityHeroComp:init() - local uiMap = self:getUIMap() - self.spineBanner = uiMap["hero_panel.spine_banner"] - self.txTitle = uiMap["hero_panel.tx_title"] - self.popRewardCell1 = uiMap["hero_panel.rewards.pop_reward_cell_1"] - self.popRewardCell2 = uiMap["hero_panel.rewards.pop_reward_cell_2"] - self.popRewardCell3 = uiMap["hero_panel.rewards.pop_reward_cell_3"] - self.txTime = uiMap["hero_panel.tx_time"] - self.btnBuy = uiMap["hero_panel.btn_buy"] - self.txBuy = uiMap["hero_panel.btn_buy.tx_buy"] - self.rewardNode = uiMap["hero_panel.rewards"] - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["hero_panel.rewards.pop_reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - - self.btnBuy:addClickListener(function() - PayManager:purchasePackage(GConst.ActivityConst.HERO_GIFT_ID_1, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - LocalData:recordTodayActSummerWatchedHero() -end - -function ActivityHeroComp:refresh() - self.spineBanner:playAnim("animation", true, true) - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_8)) - - local gift = DataManager.ShopData:getActGiftConfig()[GConst.ActivityConst.HERO_GIFT_ID_1] - self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, tostring(gift.limit))) - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - for index, cell in ipairs(self.rewardCells) do - if gift.reward[index] then - cell:setVisible(true) - cell:refresh(gift.reward[index].id, gift.reward[index].num, true) - else - cell:setVisible(false) - end - end - self.rewardNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout() - if DataManager.ShopData:getGiftRemainBuyNum(GConst.ActivityConst.HERO_GIFT_ID_1) > 0 then - self.btnBuy:setTouchEnable(true) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2") - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - else - self.btnBuy:setTouchEnable(false) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") - self.txBuy:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end -end - -return ActivityHeroComp \ No newline at end of file diff --git a/lua/app/ui/activity/activity_hero_comp.lua.meta b/lua/app/ui/activity/activity_hero_comp.lua.meta deleted file mode 100644 index b71feaba..00000000 --- a/lua/app/ui/activity/activity_hero_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: acb5324ea144d4e40841f09925c09155 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_skin_comp.lua b/lua/app/ui/activity/activity_skin_comp.lua deleted file mode 100644 index fd364c7c..00000000 --- a/lua/app/ui/activity/activity_skin_comp.lua +++ /dev/null @@ -1,112 +0,0 @@ -local ActivitySkinComp = class("ActivitySkinComp", LuaComponent) - -function ActivitySkinComp:init() - local uiMap = self:getUIMap() - self.txTitle = uiMap["skin_panel.banner.title.tx_title"] - self.txBannerDesc1 = uiMap["skin_panel.banner.content.desc1.tx_desc1"] - self.txBannerDesc2 = uiMap["skin_panel.banner.content.desc2.tx_desc2"] - -- 礼包1 - self.spineSkin1 = uiMap["skin_panel.skin1.spine_skin1"] - self.txDesc1 = uiMap["skin_panel.skin1.bg_title.tx_title"] - self.btnBuy1 = uiMap["skin_panel.skin1.btn_buy"] - self.txBuy1 = uiMap["skin_panel.skin1.btn_buy.tx_buy"] - self.rewardCells1 = {} - for i = 1, 3 do - table.insert(self.rewardCells1, uiMap["skin_panel.skin1.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - -- 礼包2 - self.spineSkin2 = uiMap["skin_panel.skin2.spine_skin2"] - self.txDesc2 = uiMap["skin_panel.skin2.bg_title.tx_title"] - self.btnBuy2 = uiMap["skin_panel.skin2.btn_buy"] - self.txBuy2 = uiMap["skin_panel.skin2.btn_buy.tx_buy"] - self.rewardCells2 = {} - for i = 1, 3 do - table.insert(self.rewardCells2, uiMap["skin_panel.skin2.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self.btnBuy1:addClickListener(function() - PayManager:purchasePackage(GConst.ActivityConst.SKIN_GIFT_ID_1, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - self.btnBuy2:addClickListener(function() - PayManager:purchasePackage(GConst.ActivityConst.SKIN_GIFT_ID_2, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - LocalData:recordTodayActSummerWatchedSkin() -end - -function ActivitySkinComp:refresh() - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_5)) - - -- 礼包1 - local gift1 = DataManager.ShopData:getActGiftConfig()[GConst.ActivityConst.SKIN_GIFT_ID_1] - local skinId1,heroId1 - for idx, reward in ipairs(gift1.reward) do - if ConfigManager:getConfig("item")[reward.id].type == GConst.ItemConst.ITEM_TYPE.SKIN then - skinId1 = DataManager.SkinData:getSkinIdByItemId(reward.id) - heroId1 = DataManager.SkinData:getHeroIdBySkinId(skinId1) - end - end - if skinId1 and heroId1 then - self.spineSkin1:getSkeletonGraphic().enabled = false - self.spineSkin1:loadAssetAsync(DataManager.SkinData:getModelId(skinId1), function() - self.spineSkin1:getSkeletonGraphic().enabled = true - self.spineSkin1:playAnim("idle", true, true, true) - end, true) - self.txBannerDesc1:setText(DataManager.HeroData:getHeroById(heroId1):getName() .. "-" .. DataManager.SkinData:getName(skinId1) .. "(" .. I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_9) .. ")") - end - self.txDesc1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_6)) - for index, cell in ipairs(self.rewardCells1) do - if gift1.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(gift1.reward[index]) - else - cell:setVisible(false) - end - end - if DataManager.ShopData:getGiftRemainBuyNum(GConst.ActivityConst.SKIN_GIFT_ID_1) > 0 then - self.btnBuy1:setTouchEnable(true) - self.btnBuy1:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2") - self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) - else - self.btnBuy1:setTouchEnable(false) - self.btnBuy1:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") - self.txBuy1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end - - -- 礼包2 - local gift2 = DataManager.ShopData:getActGiftConfig()[GConst.ActivityConst.SKIN_GIFT_ID_2] - local skinId2,heroId2 - for idx, reward in ipairs(gift2.reward) do - if ConfigManager:getConfig("item")[reward.id].type == GConst.ItemConst.ITEM_TYPE.SKIN then - skinId2 = DataManager.SkinData:getSkinIdByItemId(reward.id) - heroId2 = DataManager.SkinData:getHeroIdBySkinId(skinId2) - end - end - if skinId2 and heroId2 then - self.spineSkin2:getSkeletonGraphic().enabled = false - self.spineSkin2:loadAssetAsync(DataManager.SkinData:getModelId(skinId2), function() - self.spineSkin2:getSkeletonGraphic().enabled = true - self.spineSkin2:playAnim("idle", true, true, true) - end, true) - self.txBannerDesc2:setText(DataManager.HeroData:getHeroById(heroId2):getName() .. "-" .. DataManager.SkinData:getName(skinId2) .. "(" .. I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_9) .. ")") - end - self.txDesc2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_7)) - for index, cell in ipairs(self.rewardCells2) do - if gift2.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(gift2.reward[index]) - else - cell:setVisible(false) - end - end - if DataManager.ShopData:getGiftRemainBuyNum(GConst.ActivityConst.SKIN_GIFT_ID_2) > 0 then - self.btnBuy2:setTouchEnable(true) - self.btnBuy2:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2") - self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) - else - self.btnBuy2:setTouchEnable(false) - self.btnBuy2:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") - self.txBuy2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end -end - -return ActivitySkinComp \ No newline at end of file diff --git a/lua/app/ui/activity/activity_skin_comp.lua.meta b/lua/app/ui/activity/activity_skin_comp.lua.meta deleted file mode 100644 index bc2c473c..00000000 --- a/lua/app/ui/activity/activity_skin_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: efbdbb326ef93fc488aa2aa486acd5aa -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_task_comp.lua b/lua/app/ui/activity/activity_task_comp.lua deleted file mode 100644 index ec347aa5..00000000 --- a/lua/app/ui/activity/activity_task_comp.lua +++ /dev/null @@ -1,35 +0,0 @@ -local ActivityTaskComp = class("ActivityTaskComp", LuaComponent) - -function ActivityTaskComp:init() - local uiMap = self:getUIMap() - self.txScore = uiMap["task_panel.bounty.tx_score"] - self.imgProg = uiMap["task_panel.bounty.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.txProg = uiMap["task_panel.bounty.prog.tx_prog"] - self.txLv = uiMap["task_panel.bounty.tx_lv"] - self.txLvNum = uiMap["task_panel.bounty.tx_lv_num"] - self.scrollrectComp = uiMap["task_panel.list_task"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) -end - -function ActivityTaskComp:refresh() - -- 战令积分显示 - local total = DataManager.ActivityData:getBountyUpgradeScore() - local cur = DataManager.ActivityData:getBountyLevelScore() - self.imgProg.value = cur / total - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_1)) - self.txProg:setText(cur .. "/" .. total) - self.txLv:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_12)) - self.txLvNum:setText(DataManager.ActivityData:getBountyLevel()) - - -- 任务列表 - local tasks = DataManager.ActivityData:getTaskListSort() - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/cell/activity_task_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(tasks[index]) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#tasks) -end - -return ActivityTaskComp \ No newline at end of file diff --git a/lua/app/ui/activity/activity_task_comp.lua.meta b/lua/app/ui/activity/activity_task_comp.lua.meta deleted file mode 100644 index 295594d2..00000000 --- a/lua/app/ui/activity/activity_task_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3f79f106fd5bfec40abd342921663365 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/activity_ui.lua b/lua/app/ui/activity/activity_ui.lua deleted file mode 100644 index b49e8288..00000000 --- a/lua/app/ui/activity/activity_ui.lua +++ /dev/null @@ -1,243 +0,0 @@ -local ActivityUI = class("ActivityUI", BaseUI) -local COMP_TASK = "app/ui/activity/activity_task_comp" -local COMP_BOUNTY = "app/ui/activity/activity_bounty_comp" -local COMP_SKIN = "app/ui/activity/activity_skin_comp" -local COMP_HERO = "app/ui/activity/activity_hero_comp" - -function ActivityUI:isFullScreen() - return false -end - -function ActivityUI:getPrefabPath() - return "assets/prefabs/ui/activity/activity_ui.prefab" -end - -function ActivityUI:onPressBackspace() - self:closeUI() -end - -function ActivityUI:ctor(param) - if param then - self.panelType = param - elseif DataManager.ActivityData:hasTaskRedPoint() then - self.panelType = GConst.ActivityConst.PANEL_TYPE.TASK - elseif DataManager.ActivityData:hasBountyRedPoint() then - self.panelType = GConst.ActivityConst.PANEL_TYPE.BOUNTY - elseif DataManager.ActivityData:hasSkinRedPoint() then - self.panelType = GConst.ActivityConst.PANEL_TYPE.SKIN - elseif DataManager.ActivityData:hasHeroRedPoint() then - self.panelType = GConst.ActivityConst.PANEL_TYPE.HERO - else - self.panelType = GConst.ActivityConst.PANEL_TYPE.TASK -- 默认进入任务页签 - end -end - -function ActivityUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - -- 标题 - self.imgTitle = uiMap["activity_ui.img_title"] - self.txTitle = uiMap["activity_ui.img_title.tx_title"] - -- 子界面 - self.taskPanel = uiMap["activity_ui.task_panel"] - self.bountyPanel = uiMap["activity_ui.bounty_panel"] - self.skinPanel = uiMap["activity_ui.skin_panel"] - self.heroPanel = uiMap["activity_ui.hero_panel"] - -- 任务标签 - self.btnTask = uiMap["activity_ui.common.btns.btn_task"] - self.txTask1 = uiMap["activity_ui.common.btns.btn_task.tx_btn"] - self.txTask2 = uiMap["activity_ui.common.btns.btn_task.select.tx_select"] - self.selectTask = uiMap["activity_ui.common.btns.btn_task.select"] - -- 战令标签 - self.btnBounty = uiMap["activity_ui.common.btns.btn_bounty"] - self.txBounty1 = uiMap["activity_ui.common.btns.btn_bounty.tx_btn"] - self.txBounty2 = uiMap["activity_ui.common.btns.btn_bounty.select.tx_select"] - self.selectBounty = uiMap["activity_ui.common.btns.btn_bounty.select"] - -- 皮肤标签 - self.btnSkin = uiMap["activity_ui.common.btns.btn_skin"] - self.txSkin1 = uiMap["activity_ui.common.btns.btn_skin.tx_btn"] - self.txSkin2 = uiMap["activity_ui.common.btns.btn_skin.select.tx_select"] - self.selectSkin = uiMap["activity_ui.common.btns.btn_skin.select"] - -- 英雄标签 - self.btnHero = uiMap["activity_ui.common.btns.btn_hero"] - self.txHero1 = uiMap["activity_ui.common.btns.btn_hero.tx_btn"] - self.txHero2 = uiMap["activity_ui.common.btns.btn_hero.select.tx_select"] - self.selectHero = uiMap["activity_ui.common.btns.btn_hero.select"] - -- 通用 - self.btnClose = uiMap["activity_ui.common.btn_close"] - self.btnHelp = uiMap["activity_ui.countdown.btn_help"] - self.txCountdown = uiMap["activity_ui.countdown.content.tx_countdown"] - - self.txTask1:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME)) - self.txTask2:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME)) - self.txBounty1:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txBounty2:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txSkin1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_3)) - self.txSkin2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_3)) - self.txHero1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_4)) - self.txHero2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_4)) - - self.btnTask:addClickListener(function() - self.panelType = GConst.ActivityConst.PANEL_TYPE.TASK - self:onRefresh() - end) - self.btnBounty:addClickListener(function() - self.panelType = GConst.ActivityConst.PANEL_TYPE.BOUNTY - self:onRefresh() - end) - self.btnSkin:addClickListener(function() - self.panelType = GConst.ActivityConst.PANEL_TYPE.SKIN - self:onRefresh() - end) - self.btnHero:addClickListener(function() - self.panelType = GConst.ActivityConst.PANEL_TYPE.HERO - self:onRefresh() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self.btnHelp:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.ARENA, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_10), - } - ModuleManager.TipsManager:showHelpTips(params) - end) - self:addEventListener(EventManager.CUSTOM_EVENT.ACTIVITY_SUMMER_END, function() - self:closeUI() - end) - self:bind(DataManager.ActivityData, "isDirty", function() - self:onRefresh() - end) -end - -function ActivityUI:onRefresh() - self.txTitle:setText(DataManager.ActivityData:getActTitle()) - self.imgTitle:setSprite(DataManager.ActivityData:getActTitleBg()) - - -- 倒计时 - if self.actCountdownSid then - self.txCountdown:unscheduleGlobal(self.actCountdownSid) - end - self.txCountdown:setText(GFunc.getTimeStrWithHMS2(DataManager.ActivityData:getEndRemainTime())) - self.actCountdownSid = self.txCountdown:scheduleGlobal(function() - self.txCountdown:setText(GFunc.getTimeStrWithHMS2(DataManager.ActivityData:getEndRemainTime())) - end, 1) - - if self.panelType == GConst.ActivityConst.PANEL_TYPE.TASK then - self:showTaskInfo() - elseif self.panelType == GConst.ActivityConst.PANEL_TYPE.BOUNTY then - self:showBountyInfo() - elseif self.panelType == GConst.ActivityConst.PANEL_TYPE.SKIN then - self:showSkinInfo() - elseif self.panelType == GConst.ActivityConst.PANEL_TYPE.HERO then - self:showHeroInfo() - end - self:refreshRedPoint() -end - --- 刷新标签红点 -function ActivityUI:refreshRedPoint() - if DataManager.ActivityData:hasTaskRedPoint() then - self.btnTask:addRedPoint(-65, -5, 0.6) - else - self.btnTask:removeRedPoint() - end - if DataManager.ActivityData:hasBountyRedPoint() then - self.btnBounty:addRedPoint(-65, -5, 0.6) - else - self.btnBounty:removeRedPoint() - end - if DataManager.ActivityData:hasSkinRedPoint() then - self.btnSkin:addRedPoint(-65, -5, 0.6) - else - self.btnSkin:removeRedPoint() - end - if DataManager.ActivityData:hasHeroRedPoint() then - self.btnHero:addRedPoint(-65, -5, 0.6) - else - self.btnHero:removeRedPoint() - end -end - -function ActivityUI:showTaskInfo() - self.taskPanel:setActive(true) - self.selectTask:setActive(true) - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.heroPanel:setActive(false) - self.selectHero:setActive(false) - self.btnHelp:setActive(true) - - if not self.compTask then - self.taskPanel:initPrefabHelper() - self.taskPanel:genAllChildren() - self.compTask = self.taskPanel:addLuaComponent(COMP_TASK) - end - - self.compTask:refresh() -end - -function ActivityUI:showBountyInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.bountyPanel:setActive(true) - self.selectBounty:setActive(true) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.heroPanel:setActive(false) - self.selectHero:setActive(false) - self.btnHelp:setActive(true) - - if not self.compBounty then - self.bountyPanel:initPrefabHelper() - self.bountyPanel:genAllChildren() - self.compBounty = self.bountyPanel:addLuaComponent(COMP_BOUNTY) - end - - self.compBounty:refresh() -end - -function ActivityUI:showSkinInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.skinPanel:setActive(true) - self.selectSkin:setActive(true) - self.heroPanel:setActive(false) - self.selectHero:setActive(false) - self.btnHelp:setActive(false) - - if not self.compSkin then - self.skinPanel:initPrefabHelper() - self.skinPanel:genAllChildren() - self.compSkin = self.skinPanel:addLuaComponent(COMP_SKIN) - end - - self.compSkin:refresh() -end - -function ActivityUI:showHeroInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.heroPanel:setActive(true) - self.selectHero:setActive(true) - self.btnHelp:setActive(false) - - if not self.compHero then - self.heroPanel:initPrefabHelper() - self.heroPanel:genAllChildren() - self.compHero = self.heroPanel:addLuaComponent(COMP_HERO) - end - - self.compHero:refresh() -end - -return ActivityUI \ No newline at end of file diff --git a/lua/app/ui/activity/activity_ui.lua.meta b/lua/app/ui/activity/activity_ui.lua.meta deleted file mode 100644 index cf54edd7..00000000 --- a/lua/app/ui/activity/activity_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0c526726984e51544a3c4431f87407a6 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day.meta b/lua/app/ui/activity/fourteen_day.meta deleted file mode 100644 index 13ae4c1a..00000000 --- a/lua/app/ui/activity/fourteen_day.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e405abdcb4030e64dba3631b38b997ee -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/fourteen_day/cell.meta b/lua/app/ui/activity/fourteen_day/cell.meta deleted file mode 100644 index 60d3bf36..00000000 --- a/lua/app/ui/activity/fourteen_day/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1c817462bfb12094bab1174e31e48e1d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua deleted file mode 100644 index 03c67103..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua +++ /dev/null @@ -1,52 +0,0 @@ -local FourteenDayBountyCell = class("FourteenDayBountyCell", BaseCell) - -function FourteenDayBountyCell:init() - local uiMap = self:getUIMap() - self.imgLevel = uiMap["fourteen_day_bounty_cell.level"] - self.txLevel = uiMap["fourteen_day_bounty_cell.level.tx_level"] - self.line = uiMap["fourteen_day_bounty_cell.line"] - self.bountyRewardCell1 = uiMap["fourteen_day_bounty_cell.bounty_reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.BOUNTY_REWARD_CELL) - self.bountyRewardCell2 = uiMap["fourteen_day_bounty_cell.bounty_reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.BOUNTY_REWARD_CELL) -end - -function FourteenDayBountyCell:refresh(id) - self.txLevel:setText(id) - self.line:setActive(id < #DataManager.FourteenDayData:getBountyCfg()) - - self.bountyRewardCell1:refresh( - DataManager.FourteenDayData:getBountyGradeReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE), false, - not DataManager.FourteenDayData:isBountyGradeUnlock(GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE), - DataManager.FourteenDayData:isReceivedBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE)) - self.bountyRewardCell2:refresh( - DataManager.FourteenDayData:getBountyGradeReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY), true, - not DataManager.FourteenDayData:isBountyGradeUnlock(GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY), - DataManager.FourteenDayData:isReceivedBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY)) - - if DataManager.FourteenDayData:getActiveDays() >= id then - self.imgLevel:setImageGray(false) - if DataManager.FourteenDayData:canGetBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE) then - self.bountyRewardCell1:showLight() - self.bountyRewardCell1:addClickListener(function() - ModuleManager.FourteenDayManager:reqBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE) - end) - else - self.bountyRewardCell1:hideLight() - self.bountyRewardCell1:addClickListener(nil) - end - if DataManager.FourteenDayData:canGetBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY) then - self.bountyRewardCell2:showLight() - self.bountyRewardCell2:addClickListener(function() - ModuleManager.FourteenDayManager:reqBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY) - end) - else - self.bountyRewardCell2:hideLight() - self.bountyRewardCell2:addClickListener(nil) - end - else - self.imgLevel:setImageGray(true) - self.bountyRewardCell1:hideLight() - self.bountyRewardCell2:hideLight() - end -end - -return FourteenDayBountyCell \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua.meta b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua.meta deleted file mode 100644 index 531d75f4..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b719a1636ad4d83438f07408ff008528 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua deleted file mode 100644 index 0b6ef174..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua +++ /dev/null @@ -1,57 +0,0 @@ -local FourteenDayExchangeCell = class("FourteenDayExchangeCell", BaseCell) - -function FourteenDayExchangeCell:init() - local uiMap = self:getUIMap() - self.rewardCell = uiMap["fourteen_day_exchange_cell.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.txLimit = uiMap["fourteen_day_exchange_cell.tx_limit"] - self.cost = uiMap["fourteen_day_exchange_cell.cost"] - self.imgCost = uiMap["fourteen_day_exchange_cell.cost.img_cost"] - self.txCost = uiMap["fourteen_day_exchange_cell.cost.tx_num"] - self.lock = uiMap["fourteen_day_exchange_cell.lock"] - self.txLock = uiMap["fourteen_day_exchange_cell.lock.tx_lock"] - - self:addClickListener(function() - if DataManager.FourteenDayData:canExchange(self.id) then - local cost = DataManager.FourteenDayData:getExchangeCost(self.id) - local remainCount = DataManager.FourteenDayData:getExchangeRemainTime(self.id) - local reward = DataManager.FourteenDayData:getExchangeReward(self.id) - ModuleManager.CommonManager:showExchangeUI(1, remainCount, reward, cost, function(count) - ModuleManager.FourteenDayManager:reqExchangeReward(self.id, count) - end) - end - end) -end - -function FourteenDayExchangeCell:refresh(id) - self.id = id - - if DataManager.FourteenDayData:isExchangeUnlock(self.id) then - -- 已解锁 - self.cost:setActive(true) - self.txLimit:setActive(true) - self.lock:setActive(false) - local time = DataManager.FourteenDayData:getExchangeRemainTime(self.id) - if time > 0 then - self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, time)) - else - self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, ""..time.."")) - end - local costNum = DataManager.FourteenDayData:getExchangeCostNum(self.id) - if DataManager.FourteenDayData:getExchangeItemNum() >= costNum then - self.txCost:setText(costNum) - else - self.txCost:setText(""..costNum.."") - end - GFunc.centerImgAndTx(self.imgCost, self.txCost) - else - -- 未解锁 - self.cost:setActive(false) - self.txLimit:setActive(false) - self.lock:setActive(true) - self.txLock:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_33, DataManager.FourteenDayData:getExchangeUnlockCondition(self.id))) - end - - self.rewardCell:refreshByConfig(DataManager.FourteenDayData:getExchangeReward(self.id)) -end - -return FourteenDayExchangeCell \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua.meta b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua.meta deleted file mode 100644 index a8e780f6..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e9fe8f4f82483f947b15fccafcee78c3 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua deleted file mode 100644 index ac898d28..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua +++ /dev/null @@ -1,56 +0,0 @@ -local FourteenDayGiftCell = class("FourteenDayGiftCell", BaseCell) - -function FourteenDayGiftCell:init() - local uiMap = self:getUIMap() - - self.txLimit = uiMap["fourteen_day_gift_cell.tx_limit"] - self.txBuy = uiMap["fourteen_day_gift_cell.tx_buy"] - self.imgOff = uiMap["fourteen_day_gift_cell.off_img"] - self.txOff = uiMap["fourteen_day_gift_cell.off_img.tx_off"] - self.rewards = {} - for i = 1, 3 do - table.insert(self.rewards, uiMap["fourteen_day_gift_cell.reward_cell_"..i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self:addClickListener(function() - if DataManager.FourteenDayData:getGiftRemainTime(self.id) > 0 then - PayManager:purchasePackage(self.id, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end - end) -end - -function FourteenDayGiftCell:refresh(id) - self.id = id - local cfg = DataManager.ShopData:getActGiftConfig()[self.id] - local time = DataManager.FourteenDayData:getGiftRemainTime(self.id) - - self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, time)) - - for idx, reward in ipairs(self.rewards) do - if cfg.reward[idx] then - reward:setVisible(true) - reward:refreshByConfig(cfg.reward[idx]) - else - reward:setVisible(false) - end - end - - local buyStr - if cfg.recharge_id then - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_6") - self.imgOff:setActive(true) - self.txOff:setText(cfg.value .. "%") - buyStr = GFunc.getFormatPrice(cfg.recharge_id) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_5") - self.imgOff:setActive(false) - buyStr = I18N:getGlobalText(I18N.GlobalConst.STR_FREE) - end - - if time <= 0 then - buyStr = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20) - end - self.txBuy:setText(buyStr) -end - -return FourteenDayGiftCell \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua.meta b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua.meta deleted file mode 100644 index 8f606933..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6c0949220f56e2a4888eb9d2106a949e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua deleted file mode 100644 index 171c9bf6..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua +++ /dev/null @@ -1,63 +0,0 @@ -local FourteenDayTaskCell = class("FourteenDayTaskCell", BaseCell) -local TASK_BG = { - "act_common_bg_2", - "act_common_bg_3", -} -local TASK_ICON_BG = { - "act_common_board_3", - "act_common_board_4", -} - -function FourteenDayTaskCell:init() - local uiMap = self:getUIMap() - self.imgTaskBg = uiMap["fourteen_day_task_cell.img_task_bg"] - self.imgTask = uiMap["fourteen_day_task_cell.img_task_bg.img_task"] - self.txDesc = uiMap["fourteen_day_task_cell.tx_desc"] - self.imgProg = uiMap["fourteen_day_task_cell.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.txProg = uiMap["fourteen_day_task_cell.prog.tx_prog"] - self.txNum = uiMap["fourteen_day_task_cell.tx_num"] - self.finish = uiMap["fourteen_day_task_cell.finish"] - self.txFinish = uiMap["fourteen_day_task_cell.finish.bg.tx_finish"] - - self:addClickListener(function() - if DataManager.FourteenDayData:canGetTaskReward(self.taskId) then - ModuleManager.FourteenDayManager:reqTaskReward(self.taskId) - end - end) -end - -function FourteenDayTaskCell:refresh(id) - self.taskId = id - local total = DataManager.FourteenDayData:getTaskTarget(self.taskId) - local cur = DataManager.FourteenDayData:getTaskProgress(self.taskId) - if DataManager.FourteenDayData:getTaskType(self.taskId) == GConst.TaskConst.TASK_TYPE.X_ARENA_GRADING then - local minScore = DataManager.ArenaData:getSeasonGradingMinScore() - total = total - minScore - cur = cur - minScore - if cur < 0 then - cur = 0 - end - end - self.imgTask:setSprite(GConst.ATLAS_PATH.ICON_TASK, tostring(DataManager.FourteenDayData:getTaskIcon(self.taskId))) - self.txDesc:setText(DataManager.FourteenDayData:getTaskDesc(self.taskId)) - self.imgProg.value = cur / total - self.txProg:setText(cur .. "/" .. total) - self.txNum:setText(GFunc.getRewardNum(DataManager.FourteenDayData:getTaskRewards(self.taskId)[1])) - self.txFinish:setText(I18N:getGlobalText(I18N.GlobalConst.STR_COMPLETED)) - - self.finish:setActive(false) - self.baseObject:removeRedPoint() - if DataManager.FourteenDayData:canGetTaskReward(self.taskId) then - -- 可领取 - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, TASK_BG[2]) - self.imgTaskBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, TASK_ICON_BG[2]) - self.baseObject:addRedPoint(260, 70, 0.8) - else - -- 未完成 or 已领取 - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, TASK_BG[1]) - self.imgTaskBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, TASK_ICON_BG[1]) - self.finish:setActive(DataManager.FourteenDayData:isReceivedTaskReward(self.taskId)) - end -end - -return FourteenDayTaskCell \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua.meta b/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua.meta deleted file mode 100644 index 568dfd12..00000000 --- a/lua/app/ui/activity/fourteen_day/cell/fourteen_day_task_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 41f7aa194192dd641bc09fbb49698a9b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua b/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua deleted file mode 100644 index 7d77a063..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua +++ /dev/null @@ -1,132 +0,0 @@ -local FourteenDayBountyUI = class("FourteenDayBountyUI", BaseUI) - -function FourteenDayBountyUI:isFullScreen() - return false -end - -function FourteenDayBountyUI:getPrefabPath() - return "assets/prefabs/ui/activity/fourteen_day/fourteen_day_bounty_ui.prefab" -end - -function FourteenDayBountyUI:onPressBackspace() - self:closeUI() -end - -function FourteenDayBountyUI:onClose() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end -end - -function FourteenDayBountyUI:ctor() -end - -function FourteenDayBountyUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.txTitle = uiMap["fourteen_day_bounty_ui.content.title.tx_title"] - self.btnClose = uiMap["fourteen_day_bounty_ui.content.btn_close"] - self.scrollrectComp = uiMap["fourteen_day_bounty_ui.content.list_bounty"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.prog = uiMap["fourteen_day_bounty_ui.content.list_bounty.viewport.content.prog"] - self.imgProg = uiMap["fourteen_day_bounty_ui.content.list_bounty.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.imgMask = uiMap["fourteen_day_bounty_ui.content.list_bounty.viewport.content.mask_img"] - self.imgLine = uiMap["fourteen_day_bounty_ui.content.list_bounty.viewport.content.line"] - -- 购买 - self.btnBuy = uiMap["fourteen_day_bounty_ui.content.btn_buy"] - self.txBuy = uiMap["fourteen_day_bounty_ui.content.btn_buy.tx_buy"] - self.txTips = uiMap["fourteen_day_bounty_ui.content.tx_tips"] - self.txCountdown = uiMap["fourteen_day_bounty_ui.content.countdown.tx_countdown"] - self.bought = uiMap["fourteen_day_bounty_ui.content.bought"] - self.txBought = uiMap["fourteen_day_bounty_ui.content.bought.tx_bought"] - - self.bountyList = DataManager.FourteenDayData:getBountyCfg() - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_1)) - self.txTips:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_5)) - self.txBought:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - self.scrollrectComp:addInitCallback(function() - self.imgMask:getTransform():SetAsLastSibling() - self.imgLine:getTransform():SetAsLastSibling() - return "app/ui/activity/fourteen_day/cell/fourteen_day_bounty_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(index) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.bountyList) - - self.btnBuy:addClickListener(function() - ModuleManager.FourteenDayManager:buyBounty() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:bind(DataManager.FourteenDayData, "isDirty", function() - self:onRefresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refreshBuy() - self:refreshBountyList() - end) -end - -function FourteenDayBountyUI:onRefresh() - self:refreshBuy() - self:refreshBountyList() - self:refreshCountdown() -end - --- 刷新倒计时 -function FourteenDayBountyUI:refreshCountdown() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - self.countdownSid = self:scheduleGlobal(function() - local time = DataManager.FourteenDayData:getEndRemainTime() - if time < 0 then - self:closeUI() - return - end - self.txCountdown:setText(Time:formatNumTimeStr(time)) - end, 1) - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FourteenDayData:getEndRemainTime())) -end - --- 刷新购买 -function FourteenDayBountyUI:refreshBuy() - if not DataManager.FourteenDayData:isBountyGradeUnlock(GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY) then - self.bought:setActive(false) - self.btnBuy:setActive(true) - local gift = DataManager.ShopData:getActGiftConfig()[GConst.FourteenDayConst.BOUNTY_GIFT_ID] - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - else - self.bought:setActive(true) - self.btnBuy:setActive(false) - end -end - --- 刷新战令列表 -function FourteenDayBountyUI:refreshBountyList() - self.scrollrectComp:updateAllCell() - local maxLevel = #self.bountyList - local curLevel = DataManager.FourteenDayData:getActiveDays() - local topRecoveryOffset = self.scrollrectComp:getTopRecoveryOffset() - local downRecoveryOffset = self.scrollrectComp:getDownRecoveryOffset() - local cellHeight = self.scrollrectComp:getCellHeight() - if curLevel >= maxLevel then - self.imgLine:setVisible(false) - else - self.imgLine:setVisible(true) - self.imgLine:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - end - self.prog:setAnchoredPositionY((topRecoveryOffset + downRecoveryOffset) / 2 - cellHeight / 2 - 10) - self.prog:setSizeDeltaY(cellHeight * (maxLevel - 1)) - local percent = (curLevel - 1) / (maxLevel - 1) - if percent < 0 then - percent = 0 - end - self.imgProg.value = percent - self.imgMask:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - self.imgMask:setSizeDeltaY(cellHeight * maxLevel + GConst.UI_SCREEN_HEIGHT) -end - -return FourteenDayBountyUI \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua.meta b/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua.meta deleted file mode 100644 index 18b4da8f..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_bounty_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4855e5b248c94bb4cabd7c39b659352a -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua b/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua deleted file mode 100644 index f2d5e1d7..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua +++ /dev/null @@ -1,163 +0,0 @@ -local FourteenDayEntranceUI = class("FourteenDayEntranceUI", BaseUI) - -function FourteenDayEntranceUI:isFullScreen() - return false -end - -function FourteenDayEntranceUI:getPrefabPath() - return "assets/prefabs/ui/activity/fourteen_day/fourteen_day_entrance_ui.prefab" -end - -function FourteenDayEntranceUI:onPressBackspace() - self:closeUI() -end - -function FourteenDayEntranceUI:onClose() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - if self.animsAppear then - for idx, anim in pairs(self.animsAppear) do - if anim then - anim:Kill() - end - end - end -end - -function FourteenDayEntranceUI:ctor() -end - -function FourteenDayEntranceUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.btnClose = uiMap["fourteen_day_entrance_ui.btn_close"] - self.flyPos = uiMap["fourteen_day_entrance_ui.fly_posx"] - -- 战令 - self.itemBounty = uiMap["fourteen_day_entrance_ui.item_bounty"] - self.txBountyTitle = uiMap["fourteen_day_entrance_ui.item_bounty.tx_title"] - self.txBountyDesc = uiMap["fourteen_day_entrance_ui.item_bounty.tx_desc"] - self.txBountyCountdown = uiMap["fourteen_day_entrance_ui.item_bounty.countdown.tx_countdown"] - -- 任务 - self.itemTask = uiMap["fourteen_day_entrance_ui.item_task"] - self.txTaskTitle = uiMap["fourteen_day_entrance_ui.item_task.tx_title"] - self.txTaskDesc = uiMap["fourteen_day_entrance_ui.item_task.tx_desc"] - self.txTaskCountdown = uiMap["fourteen_day_entrance_ui.item_task.countdown.tx_countdown"] - -- 兑换 - self.itemExchange = uiMap["fourteen_day_entrance_ui.item_exchange"] - self.txExchangeTitle = uiMap["fourteen_day_entrance_ui.item_exchange.tx_title"] - self.txExchangeDesc = uiMap["fourteen_day_entrance_ui.item_exchange.tx_desc"] - self.txExchangeCountdown = uiMap["fourteen_day_entrance_ui.item_exchange.countdown.tx_countdown"] - -- 礼包 - self.itemGift = uiMap["fourteen_day_entrance_ui.item_gift"] - self.txGiftTitle = uiMap["fourteen_day_entrance_ui.item_gift.tx_title"] - self.txGiftDesc = uiMap["fourteen_day_entrance_ui.item_gift.tx_desc"] - self.txGiftCountdown = uiMap["fourteen_day_entrance_ui.item_gift.countdown.tx_countdown"] - - self.txBountyTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_1)) - self.txBountyDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_1)) - self.txTaskTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_2)) - self.txTaskDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_2)) - self.txExchangeTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_3)) - self.txExchangeDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_3)) - self.txGiftTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_4)) - self.txGiftDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_32)) - if self.animsAppear then - for idx, anim in pairs(self.animsAppear) do - if anim then - anim:Kill() - end - end - end - self.animsAppear = {} - table.insert(self.animsAppear, self:showAppearAnim(1, self.itemBounty)) - table.insert(self.animsAppear, self:showAppearAnim(2, self.itemTask)) - table.insert(self.animsAppear, self:showAppearAnim(3, self.itemExchange)) - table.insert(self.animsAppear, self:showAppearAnim(4, self.itemGift)) - - self.itemBounty:addClickListener(function() - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_bounty_ui") - end) - self.itemTask:addClickListener(function() - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_task_ui") - end) - self.itemExchange:addClickListener(function() - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_exchange_ui") - end) - self.itemGift:addClickListener(function() - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_gift_ui") - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:bind(DataManager.FourteenDayData, "isDirty", function() - self:onRefresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refreshRedPoint() - end) -end - -function FourteenDayEntranceUI:onRefresh() - -- 倒计时 - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - self.countdownSid = self:scheduleGlobal(function() - local time = DataManager.FourteenDayData:getEndRemainTime() - if time < 0 then - self:closeUI() - return - end - self.txBountyCountdown:setText(Time:formatNumTimeStr(time)) - self.txTaskCountdown:setText(Time:formatNumTimeStr(time)) - self.txExchangeCountdown:setText(Time:formatNumTimeStr(time)) - self.txGiftCountdown:setText(Time:formatNumTimeStr(time)) - end, 1) - local time = DataManager.FourteenDayData:getEndRemainTime() - self.txBountyCountdown:setText(Time:formatNumTimeStr(time)) - self.txTaskCountdown:setText(Time:formatNumTimeStr(time)) - self.txExchangeCountdown:setText(Time:formatNumTimeStr(time)) - self.txGiftCountdown:setText(Time:formatNumTimeStr(time)) - - self:refreshRedPoint() -end - --- 刷新红点 -function FourteenDayEntranceUI:refreshRedPoint() - if DataManager.FourteenDayData:hasBountyRedPoint() then - self.itemBounty:addRedPoint(300, 75, 0.6) - else - self.itemBounty:removeRedPoint() - end - if DataManager.FourteenDayData:hasTaskRedPoint() then - self.itemTask:addRedPoint(300, 75, 0.6) - else - self.itemTask:removeRedPoint() - end - if DataManager.FourteenDayData:hasExchangeRedPoint() then - self.itemExchange:addRedPoint(300, 75, 0.6) - else - self.itemExchange:removeRedPoint() - end - if DataManager.FourteenDayData:hasGiftRedPoint() then - self.itemGift:addRedPoint(300, 75, 0.6) - else - self.itemGift:removeRedPoint() - end -end - --- 展示出现动画 -function FourteenDayEntranceUI:showAppearAnim(idx, item) - item:setTouchEnable(false) - item:setPosition(self.flyPos:getPosition().x, item:getPosition().y, item:getPosition().z) - - local delay = (idx - 1) * 0.1 - local animAppear = item:createBindTweenSequence() - animAppear:Insert(delay, item:getTransform():DOMove(CS.UnityEngine.Vector3(0, item:getPosition().y, item:getPosition().z), 0.5)) - animAppear:OnComplete(function() - item:setTouchEnable(true) - end) - return animAppear -end - -return FourteenDayEntranceUI \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua.meta b/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua.meta deleted file mode 100644 index 732999d1..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_entrance_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: fbd9d20a63c9fe94583d988bb8d253e2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua b/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua deleted file mode 100644 index 88b4f2bf..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua +++ /dev/null @@ -1,84 +0,0 @@ -local FourteenDayExchangeUI = class("FourteenDayExchangeUI", BaseUI) - -function FourteenDayExchangeUI:isFullScreen() - return false -end - -function FourteenDayExchangeUI:getPrefabPath() - return "assets/prefabs/ui/activity/fourteen_day/fourteen_day_exchange_ui.prefab" -end - -function FourteenDayExchangeUI:onPressBackspace() - self:closeUI() -end - -function FourteenDayExchangeUI:onClose() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end -end - -function FourteenDayExchangeUI:ctor() -end - -function FourteenDayExchangeUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.txTitle = uiMap["fourteen_day_exchange_ui.content.img_title.tx_title"] - self.btnClose = uiMap["fourteen_day_exchange_ui.content.btn_close"] - self.txCountdown = uiMap["fourteen_day_exchange_ui.content.countdown.tx_countdown"] - self.txDesc = uiMap["fourteen_day_exchange_ui.content.tx_desc"] - self.scrollrectComp = uiMap["fourteen_day_exchange_ui.content.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.txNum = uiMap["fourteen_day_exchange_ui.content.item.tx_num"] - self.btnAdd = uiMap["fourteen_day_exchange_ui.content.item"] - - self.exchangeList = DataManager.FourteenDayData:getExchangeShowIdsSort() - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_3)) - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_9)) - - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/fourteen_day/cell/fourteen_day_exchange_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.exchangeList[index].id) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.exchangeList) - - self.btnAdd:addClickListener(function() - UIManager:showUI("app/ui/activity/fourteen_day/fourteen_day_task_ui") - self:closeUI() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:bind(DataManager.FourteenDayData, "isDirty", function() - self:onRefresh() - end) -end - -function FourteenDayExchangeUI:onRefresh() - DataManager.FourteenDayData:setTodayExchangeCheck() - self.exchangeList = DataManager.FourteenDayData:getExchangeShowIdsSort() - - self.txNum:setText(DataManager.FourteenDayData:getExchangeItemNum()) - self.scrollrectComp:updateAllCell() - self:refreshCountdown() -end - --- 刷新倒计时 -function FourteenDayExchangeUI:refreshCountdown() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - self.countdownSid = self:scheduleGlobal(function() - local time = DataManager.FourteenDayData:getEndRemainTime() - if time < 0 then - self:closeUI() - return - end - self.txCountdown:setText(Time:formatNumTimeStr(time)) - end, 1) - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FourteenDayData:getEndRemainTime())) -end - -return FourteenDayExchangeUI \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua.meta b/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua.meta deleted file mode 100644 index 636449e8..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_exchange_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 68f6d93df63aa1248864fba73ced6424 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua b/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua deleted file mode 100644 index 5dd13884..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua +++ /dev/null @@ -1,75 +0,0 @@ -local FourteenDayGiftUI = class("FourteenDayGiftUI", BaseUI) - -function FourteenDayGiftUI:isFullScreen() - return false -end - -function FourteenDayGiftUI:getPrefabPath() - return "assets/prefabs/ui/activity/fourteen_day/fourteen_day_gift_ui.prefab" -end - -function FourteenDayGiftUI:onPressBackspace() - self:closeUI() -end - -function FourteenDayGiftUI:onClose() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end -end - -function FourteenDayGiftUI:ctor() -end - -function FourteenDayGiftUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.txTitle = uiMap["fourteen_day_gift_ui.content.img_title.tx_title"] - self.btnClose = uiMap["fourteen_day_gift_ui.content.btn_close"] - self.txCountdown = uiMap["fourteen_day_gift_ui.content.countdown.tx_countdown"] - self.scrollrectComp = uiMap["fourteen_day_gift_ui.content.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_4)) - - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/fourteen_day/cell/fourteen_day_gift_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.giftList[index].id) - end) - - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:bind(DataManager.FourteenDayData, "isDirty", function() - self:onRefresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:onRefresh() - end) -end - -function FourteenDayGiftUI:onRefresh() - self.giftList = DataManager.FourteenDayData:getGiftIdsSort() - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.giftList) - - self:refreshCountdown() -end - --- 刷新倒计时 -function FourteenDayGiftUI:refreshCountdown() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - self.countdownSid = self:scheduleGlobal(function() - local time = DataManager.FourteenDayData:getEndRemainTime() - if time < 0 then - self:closeUI() - return - end - self.txCountdown:setText(Time:formatNumTimeStr(time)) - end, 1) - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FourteenDayData:getEndRemainTime())) -end - -return FourteenDayGiftUI \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua.meta b/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua.meta deleted file mode 100644 index 43609044..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_gift_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a171fec6561af8045b52689025759620 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua b/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua deleted file mode 100644 index 51677809..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua +++ /dev/null @@ -1,122 +0,0 @@ -local FourteenDayTaskUI = class("FourteenDayTaskUI", BaseUI) - -function FourteenDayTaskUI:isFullScreen() - return false -end - -function FourteenDayTaskUI:getPrefabPath() - return "assets/prefabs/ui/activity/fourteen_day/fourteen_day_task_ui.prefab" -end - -function FourteenDayTaskUI:onPressBackspace() - self:closeUI() -end - -function FourteenDayTaskUI:onClose() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end -end - -function FourteenDayTaskUI:ctor() - self.curStage = DataManager.FourteenDayData:getTaskShowStage() -end - -function FourteenDayTaskUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.txTitle = uiMap["fourteen_day_task_ui.content.img_title.tx_title"] - self.txCountdown = uiMap["fourteen_day_task_ui.content.countdown.tx_countdown"] - self.txDesc = uiMap["fourteen_day_task_ui.content.stage.tx_desc"] - self.rewardsNode = uiMap["fourteen_day_task_ui.content.stage.rewards"] - self.rewards = {} - for i = 1, 4 do - table.insert(self.rewards, uiMap["fourteen_day_task_ui.content.stage.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - self.btnRight = uiMap["fourteen_day_task_ui.content.stage.select.btn_right"] - self.btnLeft = uiMap["fourteen_day_task_ui.content.stage.select.btn_left"] - self.txStage = uiMap["fourteen_day_task_ui.content.stage.select.tx_stage"] - self.txSelect = uiMap["fourteen_day_task_ui.content.stage.select.tx_select"] - self.scrollrectComp = uiMap["fourteen_day_task_ui.content.list_task"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.btnClose = uiMap["fourteen_day_task_ui.content.btn_close"] - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_TITLE_2)) - self.txStage:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_6)) - - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/fourteen_day/cell/fourteen_day_task_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.taskList[index]) - end) - - self.btnRight:addClickListener(function() - if self.curStage + 1 > DataManager.FourteenDayData:getActiveDays() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_7)) - return - end - self.curStage = self.curStage + 1 - self:onRefresh() - end) - self.btnLeft:addClickListener(function() - self.curStage = self.curStage - 1 - self:onRefresh() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:bind(DataManager.FourteenDayData, "isDirty", function() - self:onRefresh() - end) -end - -function FourteenDayTaskUI:onRefresh() - self.taskStage = DataManager.FourteenDayData:getStageTaskId(self.curStage) - self.taskList = DataManager.FourteenDayData:getStageSubTaskIdsSort(self.curStage) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.taskList) - - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_FOURTEEN_DESC_8)) - self.txSelect:setText(self.curStage .. "/" .. DataManager.FourteenDayData:getTaskMaxStage()) - self.btnRight:setActive(self.curStage < DataManager.FourteenDayData:getTaskMaxStage()) - self.btnLeft:setActive(self.curStage > 1) - - self:refreshStageRewards() - self:refreshCountdown() -end - --- 刷新阶段奖励显示 -function FourteenDayTaskUI:refreshStageRewards() - local stageRewards = DataManager.FourteenDayData:getTaskRewards(self.taskStage) - local canGet = DataManager.FourteenDayData:canGetTaskReward(self.taskStage) - local isReceived = DataManager.FourteenDayData:isReceivedTaskReward(self.taskStage) - for idx, reward in ipairs(self.rewards) do - reward:hideFrameAnimation() - if stageRewards[idx] then - reward:setVisible(true) - reward:refreshByConfig(stageRewards[idx], isReceived, isReceived) - if canGet then - reward:addClickListener(function() - ModuleManager.FourteenDayManager:reqTaskReward(self.taskStage) - end) - reward:showFrameAnimation() - else - reward:addClickListener(nil) - end - else - reward:setVisible(false) - end - end -end - --- 刷新倒计时 -function FourteenDayTaskUI:refreshCountdown() - if self.countdownSid then - self:unscheduleGlobal(self.countdownSid) - end - self.countdownSid = self:scheduleGlobal(function() - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FourteenDayData:getEndRemainTime())) - end, 1) - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FourteenDayData:getEndRemainTime())) -end - -return FourteenDayTaskUI \ No newline at end of file diff --git a/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua.meta b/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua.meta deleted file mode 100644 index 15067fcb..00000000 --- a/lua/app/ui/activity/fourteen_day/fourteen_day_task_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 70750f44a076f274eabff37f134cc6b0 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon.meta b/lua/app/ui/activity/full_moon.meta deleted file mode 100644 index 2905de6f..00000000 --- a/lua/app/ui/activity/full_moon.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1332d53647109d0499e22a6659ce1f1e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/full_moon/cell.meta b/lua/app/ui/activity/full_moon/cell.meta deleted file mode 100644 index 4dbd0df8..00000000 --- a/lua/app/ui/activity/full_moon/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dd6f0549559c9064790b07dc590f84a4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua b/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua deleted file mode 100644 index 66b31c55..00000000 --- a/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua +++ /dev/null @@ -1,58 +0,0 @@ -local FullMoonTaskCell = class("FullMoonTaskCell", BaseCell) - -function FullMoonTaskCell:init() - local uiMap = self:getUIMap() - self.imgTaskBg = uiMap["full_moon_task_cell.img_task_bg"] - self.imgTask = uiMap["full_moon_task_cell.img_task_bg.img_task"] - self.txDesc = uiMap["full_moon_task_cell.tx_desc"] - self.imgProg = uiMap["full_moon_task_cell.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.txProg = uiMap["full_moon_task_cell.prog.tx_prog"] - self.imgRewardIcon = uiMap["full_moon_task_cell.icon_reward"] - self.txNum = uiMap["full_moon_task_cell.tx_num"] - self.finish = uiMap["full_moon_task_cell.finish"] - self.txFinish = uiMap["full_moon_task_cell.finish.bg.tx_finish"] - - self:addClickListener(function() - if DataManager.FullMoonData:canGetTaskReward(self.taskId) and not DataManager.FullMoonData:isReceivedTaskReward(self.taskId) then - ModuleManager.FullMoonManager:reqTaskReward(self.taskId) - end - end) -end - -function FullMoonTaskCell:refresh(id) - self.taskId = id - local taskType = DataManager.FullMoonData:getTaskType(self.taskId) - local total = DataManager.FullMoonData:getTaskTarget(self.taskId) - local cur = DataManager.FullMoonData:getTaskProgress(self.taskId) - local reward = DataManager.FullMoonData:getTaskReward(self.taskId) - self.imgTask:setSprite(GConst.ATLAS_PATH.ICON_TASK, GFunc.getTaskIcon(taskType, total)) - self.txDesc:setText(GFunc.getTaskDesc(taskType, total)) - self.imgProg.value = cur / total - self.txProg:setText(cur .. "/" .. total) - self.imgRewardIcon:setSprite(GFunc.getRewardIconRes(reward.type, reward.id)) - self.txNum:setText(GFunc.getRewardNum(reward)) - self.txFinish:setText(I18N:getGlobalText(I18N.GlobalConst.STR_COMPLETED)) - - self.finish:setActive(false) - self.baseObject:removeRedPoint() - if DataManager.FullMoonData:canGetTaskReward(self.taskId) then - -- 已完成 - if DataManager.FullMoonData:isReceivedTaskReward(self.taskId) then - -- 已领取 - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_2") - self.imgTaskBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_board_3") - self.finish:setActive(true) - else - -- 未领取 - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_3") - self.imgTaskBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_board_4") - self.baseObject:addRedPoint(260, 70, 0.8) - end - else - --未完成 - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_2") - self.imgTaskBg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_board_3") - end -end - -return FullMoonTaskCell \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua.meta b/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua.meta deleted file mode 100644 index 34a17de7..00000000 --- a/lua/app/ui/activity/full_moon/cell/full_moon_task_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7f22f15dc9b4a6d4385ac1f17fd683b4 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua b/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua deleted file mode 100644 index b2054696..00000000 --- a/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua +++ /dev/null @@ -1,34 +0,0 @@ -local FullMoonTaskProgCell = class("FullMoonTaskProgCell", BaseCell) - -function FullMoonTaskProgCell:init() - local uiMap = self:getUIMap() - self.imgProg = uiMap["prog_reward.img_prog"] - self.txProg = uiMap["prog_reward.img_prog.tx_prog"] - self.rewardCell = uiMap["prog_reward.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) -end - -function FullMoonTaskProgCell:refresh(id) - local canGet = DataManager.FullMoonData:isReachTaskProgressReward(id) - local isReceived = DataManager.FullMoonData:isReceivedTaskProgressReward(id) - - self.txProg:setText(DataManager.FullMoonData:getTaskProgressTarget(id)) - self.rewardCell:refreshByConfig(DataManager.FullMoonData:getTaskProgressReward(id), isReceived, isReceived) - if canGet then - self.imgProg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_7") - if not isReceived then - self.rewardCell.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell:addClickListener(function() - ModuleManager.FullMoonManager:reqTaskProgressReward(id) - end) - else - self.rewardCell.baseObject:removeRedPoint() - self.rewardCell:addClickListener(nil) - end - else - self.imgProg:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_8") - self.rewardCell.baseObject:removeRedPoint() - self.rewardCell:addClickListener(nil) - end -end - -return FullMoonTaskProgCell \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua.meta b/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua.meta deleted file mode 100644 index aaef64f4..00000000 --- a/lua/app/ui/activity/full_moon/cell/full_moon_task_prog_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 77ab55a8c675c344f86e75e0c68481dc -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua b/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua deleted file mode 100644 index 9da49232..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua +++ /dev/null @@ -1,130 +0,0 @@ -local FullMoonChooseHeroComp = class("FullMoonChooseHeroComp", LuaComponent) - -function FullMoonChooseHeroComp:init() - local uiMap = self:getUIMap() - -- self.spineBanner = uiMap["choose_hero_panel.spine_banner"] - self.txTitle = uiMap["choose_hero_panel.tx_title"] - self.txTips = uiMap["choose_hero_panel.tx_tips"] - self.btnBuy = uiMap["choose_hero_panel.btn_buy"] - self.txBuy = uiMap["choose_hero_panel.btn_buy.tx_buy"] - self.rewards = uiMap["choose_hero_panel.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["choose_hero_panel.rewards.pop_reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - self.gifts = uiMap["choose_hero_panel.gifts"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.giftItems = {} - for i = 1, 5 do - table.insert(self.giftItems, uiMap["choose_hero_panel.gifts.gift_" .. i]) - end - - -- self.spineBanner:playAnim("animation", true, true) - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_4)) - self.txTips:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_6)) - - self.btnBuy:addClickListener(function() - if not DataManager.FullMoonData:getChooseHeroIndex() then - self:showChoose() - return - end - PayManager:purchasePackage(self.selectGiftId, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) -end - -function FullMoonChooseHeroComp:refresh() - self.curGiftId = DataManager.FullMoonData:getCurChooseHeroGiftId() - self.selectGiftId = self.curGiftId - self:refreshGifts() -end - --- 刷新礼包显示 -function FullMoonChooseHeroComp:refreshGifts() - local chooseFunc = function() - self:showChoose() - end - local gift = DataManager.ShopData:getActGiftConfig()[self.selectGiftId] - - self.txTips:setActive(self.selectGiftId ~= self.curGiftId) - self.btnBuy:setActive(self.selectGiftId == self.curGiftId) - if not DataManager.FullMoonData:isGiftBought(self.selectGiftId) then - self.btnBuy:setTouchEnable(true) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_1") - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - else - self.btnBuy:setTouchEnable(false) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1") - self.txBuy:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end - - for index, cell in ipairs(self.rewardCells) do - if gift.reward[index] then - cell:setVisible(true) - cell:refresh(gift.reward[index].id, gift.reward[index].num, true) - elseif index == #gift.reward + 1 then - cell:setVisible(true) - if DataManager.FullMoonData:getChooseHeroIndex() then - local choose = DataManager.FullMoonData:getChooseRewards(self.selectGiftId, true)[DataManager.FullMoonData:getChooseHeroIndex()] - -- Logger.logHighlight(DataManager.FullMoonData:getChooseHeroIndex()) - cell:refresh(choose.id, choose.num, true) - cell:refreshChoose(chooseFunc) - else - cell:refreshOnlyChoose(chooseFunc) - end - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() - - local ids = DataManager.FullMoonData:getCurStepChooseHeroGiftIds() - for index, item in ipairs(self.giftItems) do - if ids[index] then - item:setActive(true) - local map = item:genAllChildren() - local imgGift = map["img_gift"] - local imgBught = map["img_bught"] - local imgSelect = map["img_select"] - - if ids[index] == self.curGiftId then - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_2") - elseif ids[index] > self.curGiftId then - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_3") - else - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_1") - end - imgSelect:setActive(ids[index] == self.selectGiftId) - imgBught:setActive(DataManager.FullMoonData:isGiftBought(ids[index])) - item:addClickListener(function() - self:onSelectGift(ids[index]) - end) - else - item:setActive(false) - end - end - self.gifts:RefreshLayout() -end - --- 选择礼包 -function FullMoonChooseHeroComp:onSelectGift(id) - if id < self.curGiftId then - -- 已购礼包不允许点击 - return - end - self.selectGiftId = id - self:refreshGifts() -end - --- 自选弹窗 -function FullMoonChooseHeroComp:showChoose() - ModuleManager.TipsManager:showChooseRewardTips( - I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_7), - I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_8), - DataManager.FullMoonData:getChooseRewards(self.selectGiftId), - function(index) - index = DataManager.FullMoonData:getChooseRewardsIndexByCanChooseIndex(index) - ModuleManager.FullMoonManager:reqGiftChooseHero(index) - end - ) -end - -return FullMoonChooseHeroComp \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua.meta b/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua.meta deleted file mode 100644 index c139f7ee..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_choose_hero_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ff32f3cd22038324e8daab0f06524093 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua b/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua deleted file mode 100644 index 0f496bac..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua +++ /dev/null @@ -1,100 +0,0 @@ -local FullMoonNewHeroComp = class("FullMoonNewHeroComp", LuaComponent) - -function FullMoonNewHeroComp:init() - local uiMap = self:getUIMap() - -- self.spineBanner = uiMap["new_hero_panel.spine_banner"] - self.txTitle = uiMap["new_hero_panel.tx_title"] - self.txTips = uiMap["new_hero_panel.tx_tips"] - self.btnBuy = uiMap["new_hero_panel.btn_buy"] - self.txBuy = uiMap["new_hero_panel.btn_buy.tx_buy"] - self.rewards = uiMap["new_hero_panel.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["new_hero_panel.rewards.pop_reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.POP_REWARD_CELL)) - end - self.gifts = uiMap["new_hero_panel.gifts"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.giftItems = {} - for i = 1, 5 do - table.insert(self.giftItems, uiMap["new_hero_panel.gifts.gift_" .. i]) - end - - -- self.spineBanner:playAnim("animation", true, true) - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_5)) - self.txTips:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_6)) - - self.btnBuy:addClickListener(function() - PayManager:purchasePackage(self.selectGiftId, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) -end - -function FullMoonNewHeroComp:refresh() - self.curGiftId = DataManager.FullMoonData:getCurNewHeroGiftId() - self.selectGiftId = self.curGiftId - self:refreshGifts() -end - --- 刷新礼包显示 -function FullMoonNewHeroComp:refreshGifts() - local gift = DataManager.ShopData:getActGiftConfig()[self.selectGiftId] - - self.txTips:setActive(self.selectGiftId ~= self.curGiftId) - self.btnBuy:setActive(self.selectGiftId == self.curGiftId) - if not DataManager.FullMoonData:isGiftBought(self.selectGiftId) then - self.btnBuy:setTouchEnable(true) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_1") - self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id)) - else - self.btnBuy:setTouchEnable(false) - self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1") - self.txBuy:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end - - for index, cell in ipairs(self.rewardCells) do - if gift.reward[index] then - cell:setVisible(true) - cell:refresh(gift.reward[index].id, gift.reward[index].num, true) - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() - - local ids = DataManager.FullMoonData:getCurStepNewHeroGiftIds() - for index, item in ipairs(self.giftItems) do - if ids[index] then - item:setActive(true) - local map = item:genAllChildren() - local imgGift = map["img_gift"] - local imgBught = map["img_bught"] - local imgSelect = map["img_select"] - - if ids[index] == self.curGiftId then - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_2") - elseif ids[index] > self.curGiftId then - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_3") - else - imgGift:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_chest_1") - end - imgSelect:setActive(ids[index] == self.selectGiftId) - imgBught:setActive(DataManager.FullMoonData:isGiftBought(ids[index])) - item:addClickListener(function() - self:onSelectGift(ids[index]) - end) - else - item:setActive(false) - end - end - self.gifts:RefreshLayout() -end - --- 选择礼包 -function FullMoonNewHeroComp:onSelectGift(id) - if id < self.curGiftId then - -- 已购礼包不允许点击 - return - end - self.selectGiftId = id - self:refreshGifts() -end - -return FullMoonNewHeroComp \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua.meta b/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua.meta deleted file mode 100644 index 981d90b7..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_new_hero_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8d0203e3e0bcce8458287cbbb13b18be -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua b/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua deleted file mode 100644 index e1c43dde..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua +++ /dev/null @@ -1,144 +0,0 @@ -local FullMoonSkinComp = class("FullMoonSkinComp", LuaComponent) - -function FullMoonSkinComp:init() - local uiMap = self:getUIMap() - self.txTitle = uiMap["skin_panel.banner.title.tx_title"] - self.txBannerDesc1 = uiMap["skin_panel.banner.content.desc1.tx_desc1"] - self.txBannerDesc2 = uiMap["skin_panel.banner.content.desc2.tx_desc2"] - -- 礼包1 - self.spineSkin1 = uiMap["skin_panel.skin1.spine_skin1"] - self.txDesc1 = uiMap["skin_panel.skin1.bg_title.tx_title"] - self.btnBuy1 = uiMap["skin_panel.skin1.btn_buy"] - self.txBuy1 = uiMap["skin_panel.skin1.btn_buy.tx_buy"] - self.challenge1 = uiMap["skin_panel.skin1.challenge"] - self.challengeTag1 = uiMap["skin_panel.skin1.challenge.tag"] - self.imgChallengeTag1 = uiMap["skin_panel.skin1.challenge.tag.content.img"] - self.txChallengeTag1 = uiMap["skin_panel.skin1.challenge.tag.content.tx_num"] - self.rewardCells1 = {} - for i = 1, 3 do - table.insert(self.rewardCells1, uiMap["skin_panel.skin1.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - -- 礼包2 - self.spineSkin2 = uiMap["skin_panel.skin2.spine_skin2"] - self.txDesc2 = uiMap["skin_panel.skin2.bg_title.tx_title"] - self.btnBuy2 = uiMap["skin_panel.skin2.btn_buy"] - self.txBuy2 = uiMap["skin_panel.skin2.btn_buy.tx_buy"] - self.challenge2 = uiMap["skin_panel.skin2.challenge"] - self.challengeTag2 = uiMap["skin_panel.skin2.challenge.tag"] - self.imgChallengeTag2 = uiMap["skin_panel.skin2.challenge.tag.content.img"] - self.txChallengeTag2 = uiMap["skin_panel.skin2.challenge.tag.content.tx_num"] - self.rewardCells2 = {} - for i = 1, 3 do - table.insert(self.rewardCells2, uiMap["skin_panel.skin2.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_9)) - - self.challenge1:addClickListener(function() - ModuleManager.FullMoonManager:skinChallenge(GConst.FullMoonConst.SKIN_CHALLENGE_ID_1) - end) - self.challenge2:addClickListener(function() - ModuleManager.FullMoonManager:skinChallenge(GConst.FullMoonConst.SKIN_CHALLENGE_ID_2) - end) - self.btnBuy1:addClickListener(function() - PayManager:purchasePackage(GConst.FullMoonConst.SKIN_GIFT_ID_1, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - self.btnBuy2:addClickListener(function() - PayManager:purchasePackage(GConst.FullMoonConst.SKIN_GIFT_ID_2, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end) - LocalData:recordTodayActSummerWatchedSkin() -end - -function FullMoonSkinComp:refresh() - -- 礼包1 - if not DataManager.FullMoonData:isReceivedSkinFirstChallengeReward(GConst.FullMoonConst.SKIN_CHALLENGE_ID_1) then - self.challengeTag1:setActive(true) - local reward = DataManager.FullMoonData:getSkinFirstChallengeReward(GConst.FullMoonConst.SKIN_CHALLENGE_ID_1) - self.imgChallengeTag1:setSprite(GFunc.getIconRes(reward.id)) - self.txChallengeTag1:setText(reward.num) - GFunc.centerImgAndTx(self.imgChallengeTag1, self.txChallengeTag1) - else - self.challengeTag1:setActive(false) - end - local gift1 = DataManager.ShopData:getActGiftConfig()[GConst.FullMoonConst.SKIN_GIFT_ID_1] - local skinId1,heroId1 - for idx, reward in ipairs(gift1.reward) do - if ConfigManager:getConfig("item")[reward.id].type == GConst.ItemConst.ITEM_TYPE.SKIN then - skinId1 = DataManager.SkinData:getSkinIdByItemId(reward.id) - heroId1 = DataManager.SkinData:getHeroIdBySkinId(skinId1) - end - end - if skinId1 and heroId1 then - self.spineSkin1:getSkeletonGraphic().enabled = false - self.spineSkin1:loadAssetAsync(DataManager.SkinData:getModelId(skinId1), function() - self.spineSkin1:getSkeletonGraphic().enabled = true - self.spineSkin1:playAnim("idle", true, true, true) - end, true) - self.txBannerDesc1:setText(DataManager.HeroData:getHeroById(heroId1):getName() .. "-" .. DataManager.SkinData:getName(skinId1) .. "(" .. I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_9) .. ")") - end - self.txDesc1:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_10, DataManager.HeroData:getHeroById(heroId1):getName())) - for index, cell in ipairs(self.rewardCells1) do - if gift1.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(gift1.reward[index]) - else - cell:setVisible(false) - end - end - if DataManager.ShopData:getGiftRemainBuyNum(GConst.FullMoonConst.SKIN_GIFT_ID_1) > 0 then - self.btnBuy1:setTouchEnable(true) - self.btnBuy1:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2") - self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) - else - self.btnBuy1:setTouchEnable(false) - self.btnBuy1:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") - self.txBuy1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end - - -- 礼包2 - if not DataManager.FullMoonData:isReceivedSkinFirstChallengeReward(GConst.FullMoonConst.SKIN_CHALLENGE_ID_2) then - self.challengeTag2:setActive(true) - local reward = DataManager.FullMoonData:getSkinFirstChallengeReward(GConst.FullMoonConst.SKIN_CHALLENGE_ID_2) - self.imgChallengeTag2:setSprite(GFunc.getIconRes(reward.id)) - self.txChallengeTag2:setText(reward.num) - GFunc.centerImgAndTx(self.imgChallengeTag2, self.txChallengeTag2) - else - self.challengeTag2:setActive(false) - end - local gift2 = DataManager.ShopData:getActGiftConfig()[GConst.FullMoonConst.SKIN_GIFT_ID_2] - local skinId2,heroId2 - for idx, reward in ipairs(gift2.reward) do - if ConfigManager:getConfig("item")[reward.id].type == GConst.ItemConst.ITEM_TYPE.SKIN then - skinId2 = DataManager.SkinData:getSkinIdByItemId(reward.id) - heroId2 = DataManager.SkinData:getHeroIdBySkinId(skinId2) - end - end - if skinId2 and heroId2 then - self.spineSkin2:getSkeletonGraphic().enabled = false - self.spineSkin2:loadAssetAsync(DataManager.SkinData:getModelId(skinId2), function() - self.spineSkin2:getSkeletonGraphic().enabled = true - self.spineSkin2:playAnim("idle", true, true, true) - end, true) - self.txBannerDesc2:setText(DataManager.HeroData:getHeroById(heroId2):getName() .. "-" .. DataManager.SkinData:getName(skinId2) .. "(" .. I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_9) .. ")") - end - self.txDesc2:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_10, DataManager.HeroData:getHeroById(heroId2):getName())) - for index, cell in ipairs(self.rewardCells2) do - if gift2.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(gift2.reward[index]) - else - cell:setVisible(false) - end - end - if DataManager.ShopData:getGiftRemainBuyNum(GConst.FullMoonConst.SKIN_GIFT_ID_2) > 0 then - self.btnBuy2:setTouchEnable(true) - self.btnBuy2:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2") - self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) - else - self.btnBuy2:setTouchEnable(false) - self.btnBuy2:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2") - self.txBuy2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - end -end - -return FullMoonSkinComp \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua.meta b/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua.meta deleted file mode 100644 index 4f42ad11..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_skin_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2bdec32481442b648a69cea1bf0a2bc9 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/full_moon_task_comp.lua b/lua/app/ui/activity/full_moon/full_moon_task_comp.lua deleted file mode 100644 index c7684eee..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_task_comp.lua +++ /dev/null @@ -1,74 +0,0 @@ -local FullMoonTaskComp = class("FullMoonTaskComp", LuaComponent) - -function FullMoonTaskComp:init() - local uiMap = self:getUIMap() - self.listProg = uiMap["task_panel.prog.list_prog"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.content = uiMap["task_panel.prog.list_prog.viewport.content"] - self.prog = uiMap["task_panel.prog.list_prog.viewport.content.prog"] - self.imgProg = uiMap["task_panel.prog.list_prog.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.listTask = uiMap["task_panel.list_task"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.spineSkin = uiMap["task_panel.prog.spine_skin"] - self.imgScore = uiMap["task_panel.prog.score.img_score"] - self.txScore = uiMap["task_panel.prog.score.tx_score"] - self.txSkin = uiMap["task_panel.prog.skin_desc.skin.tx_skin"] - self.txAllFinish = uiMap["task_panel.tx_all_finish"] - - local skinId,heroId - for id, data in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - if ConfigManager:getConfig("item")[data.reward.id].type == GConst.ItemConst.ITEM_TYPE.SKIN then - skinId = DataManager.SkinData:getSkinIdByItemId(data.reward.id) - heroId = DataManager.SkinData:getHeroIdBySkinId(skinId) - end - end - if heroId and skinId then - self.txSkin:setText(DataManager.HeroData:getHeroById(heroId):getName() .. "-" .. DataManager.SkinData:getName(skinId)) - - self.spineSkin:getSkeletonGraphic().enabled = false - self.spineSkin:loadAssetAsync(DataManager.SkinData:getModelId(skinId), function() - self.spineSkin:getSkeletonGraphic().enabled = true - self.spineSkin:playAnim("idle", true, true, true) - end, true) - end -end - -function FullMoonTaskComp:refresh() - self.txScore:setText(DataManager.FullMoonData:getTaskFinishNum()) - GFunc.centerImgAndTx(self.imgScore, self.txScore) - - -- 任务列表 - local tasks = DataManager.FullMoonData:getTaskListSort() - if tasks then - self.txAllFinish:setActive(false) - self.listTask:addInitCallback(function() - return "app/ui/activity/full_moon/cell/full_moon_task_cell" - end) - self.listTask:addRefreshCallback(function(index, cell) - cell:refresh(tasks[index].id) - end) - self.listTask:clearCells() - self.listTask:refillCells(#tasks) - else - self.txAllFinish:setActive(true) - self.txAllFinish:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_11)) - end - - -- 任务进度奖励列表 - self.listProg:addInitCallback(function() - return "app/ui/activity/full_moon/cell/full_moon_task_prog_cell" - end) - self.listProg:addRefreshCallback(function(index, cell) - cell:refresh(DataManager.FullMoonData:getTaskProgressRewardIdByIndex(index)) - end) - self.listProg:clearCells() - self.listProg:refillCells(DataManager.FullMoonData:getTaskProgressRewardTotalNum()) - local idx = DataManager.FullMoonData:getCurTaskProgressRewardIndex() - -- Logger.logHighlight(idx) - self.listProg:moveToIndex(idx) - - local maxIndex = DataManager.FullMoonData:getTaskProgressRewardTotalNum() - local cellWidth = self.listProg:getCellWidth() - self.prog:setSizeDeltaX(cellWidth * maxIndex) - self.imgProg.value = DataManager.FullMoonData:getTaskFinishNum() / DataManager.FullMoonData:getTaskTotalNum() -end - -return FullMoonTaskComp \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/full_moon_task_comp.lua.meta b/lua/app/ui/activity/full_moon/full_moon_task_comp.lua.meta deleted file mode 100644 index 034c2582..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_task_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c992c98a31d8ac74398f2cba0db13c33 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/full_moon/full_moon_ui.lua b/lua/app/ui/activity/full_moon/full_moon_ui.lua deleted file mode 100644 index f442edb5..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_ui.lua +++ /dev/null @@ -1,243 +0,0 @@ -local FullMoonUI = class("FullMoonUI", BaseUI) -local COMP_TASK = "app/ui/activity/full_moon/full_moon_task_comp" -local COMP_CHOOSE_HERO = "app/ui/activity/full_moon/full_moon_choose_hero_comp" -local COMP_NEW_HERO = "app/ui/activity/full_moon/full_moon_new_hero_comp" -local COMP_SKIN = "app/ui/activity/full_moon/full_moon_skin_comp" - -function FullMoonUI:isFullScreen() - return false -end - -function FullMoonUI:getPrefabPath() - return "assets/prefabs/ui/activity/full_moon/full_moon_ui.prefab" -end - -function FullMoonUI:onPressBackspace() - self:closeUI() -end - -function FullMoonUI:onClose() - if self.actCountdownSid then - self.txCountdown:unscheduleGlobal(self.actCountdownSid) - end -end - -function FullMoonUI:ctor(param) - if param then - self.panelType = param - else - self.panelType = GConst.FullMoonConst.PANEL_TYPE.TASK -- 默认进入任务页签 - end -end - -function FullMoonUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - -- 通用 - self.txTitle = uiMap["full_moon_ui.img_title.tx_title"] - self.btnClose = uiMap["full_moon_ui.common.btn_close"] - self.txCountdown = uiMap["full_moon_ui.countdown.tx_countdown"] - self.bg_task = uiMap["full_moon_ui.common.bg_task"] - self.bg_gift = uiMap["full_moon_ui.common.bg_gift"] - -- 子界面 - self.taskPanel = uiMap["full_moon_ui.task_panel"] - self.chooseHeroPanel = uiMap["full_moon_ui.choose_hero_panel"] - self.newHeroPanel = uiMap["full_moon_ui.new_hero_panel"] - self.skinPanel = uiMap["full_moon_ui.skin_panel"] - -- 任务标签 - self.btnTask = uiMap["full_moon_ui.common.btns.btn_task"] - self.txTask1 = uiMap["full_moon_ui.common.btns.btn_task.tx_btn"] - self.txTask2 = uiMap["full_moon_ui.common.btns.btn_task.select.tx_select"] - self.selectTask = uiMap["full_moon_ui.common.btns.btn_task.select"] - -- 自选英雄礼包标签 - self.btnChooseHero = uiMap["full_moon_ui.common.btns.btn_choose_hero"] - self.txChooseHero1 = uiMap["full_moon_ui.common.btns.btn_choose_hero.tx_btn"] - self.txChooseHero2 = uiMap["full_moon_ui.common.btns.btn_choose_hero.select.tx_select"] - self.selectChooseHero = uiMap["full_moon_ui.common.btns.btn_choose_hero.select"] - -- 新英雄礼包标签 - self.btnNewHero = uiMap["full_moon_ui.common.btns.btn_new_hero"] - self.txNewHero1 = uiMap["full_moon_ui.common.btns.btn_new_hero.tx_btn"] - self.txNewHero2 = uiMap["full_moon_ui.common.btns.btn_new_hero.select.tx_select"] - self.selectNewHero = uiMap["full_moon_ui.common.btns.btn_new_hero.select"] - -- 皮肤标签 - self.btnSkin = uiMap["full_moon_ui.common.btns.btn_skin"] - self.txSkin1 = uiMap["full_moon_ui.common.btns.btn_skin.tx_btn"] - self.txSkin2 = uiMap["full_moon_ui.common.btns.btn_skin.select.tx_select"] - self.selectSkin = uiMap["full_moon_ui.common.btns.btn_skin.select"] - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_1)) - self.txTask1:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME)) - self.txTask2:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME)) - self.txChooseHero1:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_2)) - self.txChooseHero2:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_2)) - self.txNewHero1:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_3)) - self.txNewHero2:setText(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_MOON_DESC_3)) - self.txSkin1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_3)) - self.txSkin2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_DESC_3)) - DataManager.FullMoonData:showActPanel() - - self.btnTask:addClickListener(function() - self.panelType = GConst.FullMoonConst.PANEL_TYPE.TASK - self:onRefresh() - end) - self.btnChooseHero:addClickListener(function() - self.panelType = GConst.FullMoonConst.PANEL_TYPE.CHOOSE_HERO - self:onRefresh() - end) - self.btnNewHero:addClickListener(function() - self.panelType = GConst.FullMoonConst.PANEL_TYPE.NEW_HERO - self:onRefresh() - end) - self.btnSkin:addClickListener(function() - self.panelType = GConst.FullMoonConst.PANEL_TYPE.SKIN - self:onRefresh() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:addEventListener(EventManager.CUSTOM_EVENT.ACTIVITY_FULL_MOON_END, function() - self:closeUI() - end) - self:bind(DataManager.FullMoonData, "isDirty", function() - -- 检查更新数据 - if DataManager.FullMoonData:getIsInReset() and self.panelType == GConst.FullMoonConst.PANEL_TYPE.TASK then - ModuleManager.FullMoonManager:reqActData() - end - - self:onRefresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:onRefresh() - end) -end - -function FullMoonUI:onRefresh() - -- 倒计时 - if self.actCountdownSid then - self.txCountdown:unscheduleGlobal(self.actCountdownSid) - end - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FullMoonData:getEndRemainTime())) - self.actCountdownSid = self.txCountdown:scheduleGlobal(function() - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.FullMoonData:getEndRemainTime())) - end, 1) - - if self.panelType == GConst.FullMoonConst.PANEL_TYPE.TASK then - self:showTaskInfo() - elseif self.panelType == GConst.FullMoonConst.PANEL_TYPE.CHOOSE_HERO then - self:showChooseHeroInfo() - elseif self.panelType == GConst.FullMoonConst.PANEL_TYPE.NEW_HERO then - self:showNewHeroInfo() - elseif self.panelType == GConst.FullMoonConst.PANEL_TYPE.SKIN then - self:showSkinInfo() - end - self:refreshRedPoint() -end - --- 刷新标签红点 -function FullMoonUI:refreshRedPoint() - -- if DataManager.FullMoonData:hasTaskRedPoint() then - -- self.btnTask:addRedPoint(-65, -5, 0.6) - -- else - -- self.btnTask:removeRedPoint() - -- end - -- if DataManager.FullMoonData:hasBountyRedPoint() then - -- self.btnBounty:addRedPoint(-65, -5, 0.6) - -- else - -- self.btnBounty:removeRedPoint() - -- end - -- if DataManager.FullMoonData:hasSkinRedPoint() then - -- self.btnSkin:addRedPoint(-65, -5, 0.6) - -- else - -- self.btnSkin:removeRedPoint() - -- end - -- if DataManager.FullMoonData:hasHeroRedPoint() then - -- self.btnHero:addRedPoint(-65, -5, 0.6) - -- else - -- self.btnHero:removeRedPoint() - -- end -end - -function FullMoonUI:showTaskInfo() - self.taskPanel:setActive(true) - self.selectTask:setActive(true) - self.chooseHeroPanel:setActive(false) - self.selectChooseHero:setActive(false) - self.newHeroPanel:setActive(false) - self.selectNewHero:setActive(false) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.bg_task:setActive(true) - self.bg_gift:setActive(false) - - if not self.compTask then - self.taskPanel:initPrefabHelper() - self.taskPanel:genAllChildren() - self.compTask = self.taskPanel:addLuaComponent(COMP_TASK) - end - - self.compTask:refresh() -end - -function FullMoonUI:showChooseHeroInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.chooseHeroPanel:setActive(true) - self.selectChooseHero:setActive(true) - self.newHeroPanel:setActive(false) - self.selectNewHero:setActive(false) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.bg_task:setActive(false) - self.bg_gift:setActive(true) - - if not self.chooseHeroComp then - self.chooseHeroPanel:initPrefabHelper() - self.chooseHeroPanel:genAllChildren() - self.chooseHeroComp = self.chooseHeroPanel:addLuaComponent(COMP_CHOOSE_HERO) - end - - self.chooseHeroComp:refresh() -end - -function FullMoonUI:showNewHeroInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.chooseHeroPanel:setActive(false) - self.selectChooseHero:setActive(false) - self.newHeroPanel:setActive(true) - self.selectNewHero:setActive(true) - self.skinPanel:setActive(false) - self.selectSkin:setActive(false) - self.bg_task:setActive(false) - self.bg_gift:setActive(true) - - if not self.newHeroComp then - self.newHeroPanel:initPrefabHelper() - self.newHeroPanel:genAllChildren() - self.newHeroComp = self.newHeroPanel:addLuaComponent(COMP_NEW_HERO) - end - - self.newHeroComp:refresh() -end - -function FullMoonUI:showSkinInfo() - self.taskPanel:setActive(false) - self.selectTask:setActive(false) - self.chooseHeroPanel:setActive(false) - self.selectChooseHero:setActive(false) - self.newHeroPanel:setActive(false) - self.selectNewHero:setActive(false) - self.skinPanel:setActive(true) - self.selectSkin:setActive(true) - self.bg_task:setActive(false) - self.bg_gift:setActive(false) - - if not self.compSkin then - self.skinPanel:initPrefabHelper() - self.skinPanel:genAllChildren() - self.compSkin = self.skinPanel:addLuaComponent(COMP_SKIN) - end - - self.compSkin:refresh() -end - -return FullMoonUI \ No newline at end of file diff --git a/lua/app/ui/activity/full_moon/full_moon_ui.lua.meta b/lua/app/ui/activity/full_moon/full_moon_ui.lua.meta deleted file mode 100644 index 60ed16b1..00000000 --- a/lua/app/ui/activity/full_moon/full_moon_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 89c9eb8cb84d89441b6f18941c24b880 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/gold_pig.meta b/lua/app/ui/activity/gold_pig.meta deleted file mode 100644 index 05aace21..00000000 --- a/lua/app/ui/activity/gold_pig.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a58e68efa3d74624fbe79c249e00960b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua deleted file mode 100644 index 751f3312..00000000 --- a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua +++ /dev/null @@ -1,111 +0,0 @@ -local GoldPigUI = class("GoldPigUI", BaseUI) - -function GoldPigUI:isFullScreen() - return false -end - -function GoldPigUI:getPrefabPath() - return "assets/prefabs/ui/activity/gold_pig/gold_pig_ui.prefab" -end - -function GoldPigUI:ctor(params) - self.goldPigId = DataManager.GoldPigData:getId() - self.showType = params.showType -end - -function GoldPigUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - self.uiMap = uiMap - uiMap["gold_pig_ui.bg.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self:initSpine() - - uiMap["gold_pig_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_TITLE)) - uiMap["gold_pig_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_DESC)) - - local levelInfo = DataManager.GoldPigData:getCurrLevelInfo() - uiMap["gold_pig_ui.bg.value_bg.tx"]:setText(levelInfo.value .. "%") - local currGem = DataManager.GoldPigData:getCount() - local maxGem = DataManager.GoldPigData:getMaxCount() - local percent = currGem / maxGem - local nowGemTx = uiMap["gold_pig_ui.bg.slider.now_gem_bg.gem_tx"] - nowGemTx:setText(GFunc.intToString(currGem)) - local nowGemImg = uiMap["gold_pig_ui.bg.slider.now_gem_bg.gem_img"] - GFunc.centerImgAndTx(nowGemImg, nowGemTx, 0, -4) - - local currGold = DataManager.GoldPigData:getGoldCount() - local nowGoldTx = uiMap["gold_pig_ui.bg.now_gem_bg.gold_tx"] - nowGoldTx:setText(GFunc.intToString(currGold)) - local nowGoldImg = uiMap["gold_pig_ui.bg.now_gem_bg.gold_img"] - GFunc.centerImgAndTx(nowGoldImg, nowGoldTx, 0, -4) - - local sliderWidth = uiMap["gold_pig_ui.bg.slider"]:getRectWidth() - uiMap["gold_pig_ui.bg.slider.now_gem_bg"]:setAnchoredPositionX((percent - 0.5) * sliderWidth) - - local initialCount = DataManager.GoldPigData:getInitialCount() - uiMap["gold_pig_ui.bg.begin_text"]:setText(GFunc.intToString(initialCount)) - uiMap["gold_pig_ui.bg.end_text"]:setText(GFunc.intToString(maxGem)) - - uiMap["gold_pig_ui.bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = percent - uiMap["gold_pig_ui.bg.buy_btn"]:addClickListener(function() - ModuleManager.ActivityManager:buyGoldPig(self.goldPigId) - end) - local rechargeId = DataManager.GoldPigData:getRechargeId() - uiMap["gold_pig_ui.bg.buy_btn.text"]:setText(GFunc.getFormatPrice(rechargeId)) - - self:bind(DataManager.GoldPigData, "boughtFlag", function() - -- 购买后需要关闭界面 - if not DataManager.GoldPigData:getIsOpen() then - self:closeUI() - end - end) - - BIReport:postPayUIShow(BIReport.GIFT_TYPE.GOLD_PIG, self.goldPigId, self.showType) - - self.timeTx = uiMap["gold_pig_ui.bg.time_bg.time_tx"] - local isFull = DataManager.GoldPigData:getIsFull() - if isFull then - uiMap["gold_pig_ui.bg.time_bg"]:setVisible(true) - self.cdSid = self:scheduleGlobal(function() - self:updateTime() - end, 1) - self:updateTime() - else - uiMap["gold_pig_ui.bg.time_bg"]:setVisible(false) - end -end - -function GoldPigUI:initSpine() - self.titleSpine = self.uiMap["gold_pig_ui.bg.ui_spine_obj"] - local trackEntry = self.titleSpine:playAnim("open", false) - local time = self.titleSpine:getAnimation(trackEntry).Duration - self:performWithDelayGlobal(function() - self.titleSpine:playAnim("idle", true) - end, time) -end - -function GoldPigUI:updateTime() - local endTime = DataManager.GoldPigData:getEndTime() - local remainTime = endTime - Time:getServerTime() - if remainTime > 0 then - self.timeTx:setText(GFunc.getTimeStrWithHMS(remainTime)) - else - self.timeTx:setText("00:00:00") - if self.cdSid then - self:unscheduleGlobal(self.cdSid) - self.cdSid = nil - end - local params = { - content = I18N:getGlobalText(I18N.GlobalConst.GOLD_PIG_CLOSE_DESC), - boxType = GConst.MESSAGE_BOX_TYPE.MB_OK, - okFunc = function() - self:closeUI() - end - } - GFunc.showMessageBox(params) - end -end - -return GoldPigUI \ No newline at end of file diff --git a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua.meta b/lua/app/ui/activity/gold_pig/gold_pig_ui.lua.meta deleted file mode 100644 index c8b5a180..00000000 --- a/lua/app/ui/activity/gold_pig/gold_pig_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a300b20a79863224baf9dfd4e9a4635a -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/hero_fund.meta b/lua/app/ui/activity/hero_fund.meta deleted file mode 100644 index a69c4c11..00000000 --- a/lua/app/ui/activity/hero_fund.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bccad4c3ed05c9a4c92259b32009b0f1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/hero_fund/cell.meta b/lua/app/ui/activity/hero_fund/cell.meta deleted file mode 100644 index 344f15fd..00000000 --- a/lua/app/ui/activity/hero_fund/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ad4fd607b9b2d0b4ea51cd7a175ac2c0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua deleted file mode 100644 index 0be011f0..00000000 --- a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua +++ /dev/null @@ -1,76 +0,0 @@ -local FundCell = class("FundCell", BaseCell) - -function FundCell:init() - local uiMap = self:getUIMap() - self.txLevel = uiMap["fund_cell.level.tx_level"] - self.rewardCell1 = uiMap["fund_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell2 = uiMap["fund_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) -end - -function FundCell:refresh(level) - self.txLevel:setText(DataManager.HeroFundData:getLevelWave(level)) - - local isGet - - isGet = DataManager.HeroFundData:getFreeGot(level) - local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE) - if reward then - self.rewardCell1:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell1:showLock(false) - if DataManager.HeroFundData:getFreeCanGet(level) then - self.rewardCell1:showFrameAnimation() - self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell1:addClickListener(function() - self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE) - end) - else - self.rewardCell1:hideFrameAnimation() - self.rewardCell1.baseObject:removeRedPoint() - self.rewardCell1:addClickListener(nil) - end - - isGet = DataManager.HeroFundData:getProGot(level) - local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO) - if reward then - self.rewardCell2:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell2:showLock(not DataManager.HeroFundData:getProBought()) - if DataManager.HeroFundData:getProCanGet(level) then - self.rewardCell2:showFrameAnimation() - self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell2:addClickListener(function() - self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO) - end) - else - self.rewardCell2:hideFrameAnimation() - self.rewardCell2.baseObject:removeRedPoint() - self.rewardCell2:addClickListener(nil) - end - - isGet = DataManager.HeroFundData:getUtralGot(level) - local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL) - if reward then - self.rewardCell3:refreshByConfig(reward, isGet, isGet) - end - self.rewardCell3:showLock(not DataManager.HeroFundData:getUtralBought()) - if DataManager.HeroFundData:getUtralCanGet(level) then - self.rewardCell3:showFrameAnimation() - self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell3:addClickListener(function() - self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL) - end) - else - self.rewardCell3:hideFrameAnimation() - self.rewardCell3.baseObject:removeRedPoint() - self.rewardCell3:addClickListener(nil) - end -end - --- 领取奖励 -function FundCell:onClickReward(level, rewardType) - ModuleManager.HeroFundManager:reqHeroFundAward(level, rewardType) -end - -return FundCell \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta deleted file mode 100644 index d5367fe9..00000000 --- a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1c7ef27b36c6ea042a002ca71d0b3bc3 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua deleted file mode 100644 index d3e8801f..00000000 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua +++ /dev/null @@ -1,188 +0,0 @@ -local HeroFundUI = class("HeroFundUI", BaseUI) - -local FUND_CELL = "app/ui/activity/hero_fund/cell/fund_cell" -local BTN_ICON = {"common_btn_green_3", "act_herofund_board_2"} - -function HeroFundUI:onPressBackspace() - self:closeUI() -end - -function HeroFundUI:isFullScreen() - return false -end - -function HeroFundUI:ctor() - self.rewardList = {} - for id, info in pairs(DataManager.HeroFundData:getConfig()) do - table.insert(self.rewardList, id) - end - table.sort(self.rewardList, function(a, b) - return a < b - end) -end - -function HeroFundUI:getPrefabPath() - return "assets/prefabs/ui/activity/hero_fund/activity_herofund_ui.prefab" -end - -function HeroFundUI:onLoadRootComplete() - self:_display() - self:_addListeners() - self:_bind() - - self:refreshTime() - if self.actCountdownSid then - self:unscheduleGlobal(self.actCountdownSid) - end - self.actCountdownSid = self:scheduleGlobal(function() - self:refreshTime() - end, 1) -end - -function HeroFundUI:_display() - local uiMap = self.root:genAllChildren() - uiMap["activity_herofund_ui.bg.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_2)) - uiMap["activity_herofund_ui.bg.ui_spine_obj"]:playAnim("idle", true, false) - uiMap["activity_herofund_ui.bg.level.tx_level"]:setText(DataManager.HeroFundData:getWaveCount()) - self.downDesc = uiMap["activity_herofund_ui.bg.bg.desc"] - self.downDesc:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_3)) - self.toActivityTx = uiMap["activity_herofund_ui.bg.bg.to_activity_tx"] - self.toActivityTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_4)) - self.toActivityBtn = uiMap["activity_herofund_ui.bg.bg.to_activity_btn"] - self.toActivityBtnTx = uiMap["activity_herofund_ui.bg.bg.to_activity_btn.text"] - self.toActivityBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.PART_IN_DESC)) - self.toActivityBtn:addClickListener(function() - self:closeUI() - ModuleManager.FourteenDayManager:showFourteenDayUI() - end) - - self:refreshBtns() - self:_refreshScrollrect() -end - -function HeroFundUI:_addListeners() - local uiMap = self.root:genAllChildren() - uiMap["activity_herofund_ui.bg.close_btn"]:addClickListener(function() - self:closeUI() - end) -end - -function HeroFundUI:_bind() - self:bind(DataManager.HeroFundData, "isDirty", function() - self:_display() - end) - - self:bind(DataManager.ShopData, "isDirty", function() - self:_display() - end) -end - -function HeroFundUI:refreshBtns() - local uiMap = self.root:genAllChildren() - uiMap["activity_herofund_ui.bg.title.free.tx_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - - local probtn = uiMap["activity_herofund_ui.bg.title.buy1"] - local proBtntx = uiMap["activity_herofund_ui.bg.title.buy1.tx_buyed"] - local proBuy = uiMap["activity_herofund_ui.bg.title.buy1.tx_buy"] - proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - proBuy:setText(DataManager.HeroFundData:getProPrice()) - - if DataManager.HeroFundData:getProBought() then - probtn:setSprite(GConst.ATLAS_PATH.ACT_HEROFUND, BTN_ICON[2]) - probtn:setTouchEnable(false) - proBtntx:setVisible(true) - proBuy:setVisible(false) - else - probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - probtn:setTouchEnable(true) - probtn:addClickListener(function() - ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getProActId()) - end) - proBtntx:setVisible(false) - proBuy:setVisible(true) - end - - local utralbtn = uiMap["activity_herofund_ui.bg.title.buy2"] - local utralBtntx = uiMap["activity_herofund_ui.bg.title.buy2.tx_buyed"] - local utralBuy = uiMap["activity_herofund_ui.bg.title.buy2.tx_buy"] - utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) - utralBuy:setText(DataManager.HeroFundData:gettUtralPrice()) - - if DataManager.HeroFundData:getUtralBought() then - utralbtn:setSprite(GConst.ATLAS_PATH.ACT_HEROFUND, BTN_ICON[2]) - utralbtn:setTouchEnable(false) - utralBtntx:setVisible(true) - utralBuy:setVisible(false) - else - utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) - utralbtn:setTouchEnable(true) - utralbtn:addClickListener(function() - ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getUtralActId()) - end) - utralBtntx:setVisible(false) - utralBuy:setVisible(true) - end -end - -function HeroFundUI:_refreshScrollrect() - local uiMap = self.root:genAllChildren() - local mask = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.mask_img"] - local level = DataManager.HeroFundData:getWaveLevel() - local totalCount = #self.rewardList - local maskCount = math.max(0, totalCount - level) - mask:setAnchoredPositionY(-10 - level * 120) - mask:setSizeDeltaY(maskCount * 120 + 20) - local progSlider = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - local y = (totalCount - 1) * 120 - if (level - 1) >= 0 then - progSlider.value = (level - 1) / (totalCount - 1) - else - progSlider.value = 0 - end - mask:setVisible(level < totalCount) - - if self.scrollRectComp then - self.scrollRectComp:updateAllCell() - return - end - - local prog = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog"] - prog:setSizeDeltaY(y) - self.scrollRectComp = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return FUND_CELL - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.rewardList[index]) - mask:getTransform():SetAsLastSibling() - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:setTotalCount(0) - if level < 1 then - level = 1 - end - self.scrollRectComp:refillCells(totalCount, nil, level) -end - -function HeroFundUI:refreshTime() - local uiMap = self.root:genAllChildren() - local remainTime = DataManager.HeroFundData:getRemainTime() - local str - if remainTime <= 0 then - str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) - else - str = Time:formatNumTimeStr(remainTime) - if DataManager.FourteenDayData:getOpenStatus() then -- 14天活动开了就显示 - self.toActivityTx:setVisible(true) - self.toActivityBtn:setActive(true) - self.downDesc:setVisible(false) - else - self.toActivityTx:setVisible(false) - self.toActivityBtn:setActive(false) - self.downDesc:setVisible(true) - end - end - uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str) -end - -return HeroFundUI \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta deleted file mode 100644 index 04df0cd8..00000000 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2a7c6809db6b28846acefe557b94944c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/seven_day.meta b/lua/app/ui/activity/seven_day.meta deleted file mode 100644 index 43e5e49b..00000000 --- a/lua/app/ui/activity/seven_day.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7bac277fb0fe3a3468738e9906b96dd8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/seven_day/cell.meta b/lua/app/ui/activity/seven_day/cell.meta deleted file mode 100644 index 6bf4ffa3..00000000 --- a/lua/app/ui/activity/seven_day/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bc98a28f4a7cea144951f2e3a6b5ae84 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/seven_day/cell/task_cell.lua b/lua/app/ui/activity/seven_day/cell/task_cell.lua deleted file mode 100644 index 59011440..00000000 --- a/lua/app/ui/activity/seven_day/cell/task_cell.lua +++ /dev/null @@ -1,52 +0,0 @@ -local TaskCell = class("TaskCell", BaseCell) - -function TaskCell:init() - local uiMap = self.baseObject:genAllChildren() - self.bg2 = uiMap["task_cell.bg.bg2"] - self.rewardCell = uiMap["task_cell.bg.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.desc = uiMap["task_cell.bg.desc"] - self.sliderOver = uiMap["task_cell.bg.slider_bg.slider_over"] - self.sliderComp = uiMap["task_cell.bg.slider_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.sliderTx = uiMap["task_cell.bg.slider_bg.text"] - self.cliamBtn = uiMap["task_cell.bg.cliam_btn"] - self.cliamBtn:addClickListener(function() - if self.id and DataManager.SevenDayData:canClaimTask(self.id) then - ModuleManager.SevenDayManager:claimTaskReward(self.id) - end - end) - self.btnGreyImg = uiMap["task_cell.bg.cliam_btn.grey"] - self.mask = uiMap["task_cell.bg.mask"] - self.cliamBtnTx = uiMap["task_cell.bg.cliam_btn.text"] - uiMap["task_cell.bg.mask.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_COMPLETED)) -end - -function TaskCell:refresh(id) - self.id = id - local canClaimTask = DataManager.SevenDayData:canClaimTask(id) - local collected = DataManager.SevenDayData:taskCollected(id) - local count = DataManager.SevenDayData:taskCount(id) - local totalCount = DataManager.SevenDayData:taskTotalCount(id) - if collected or count > totalCount then - count = totalCount - end - local reward = DataManager.SevenDayData:getTaskReward(id) - local taskDesc = DataManager.SevenDayData:getSevenDayTaskDesc(id) - self.desc:setText(taskDesc) - - local isComplete = count >= totalCount - self.sliderOver:setVisible(isComplete) - self.bg2:setVisible(isComplete) - self.sliderComp.value = count / totalCount - self.rewardCell:refreshByConfig(reward) - self.sliderTx:setText(count .. "/" .. totalCount) - - self.btnGreyImg:setVisible(not canClaimTask) - self.mask:setVisible(collected) - if collected then - self.cliamBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE)) - else - self.cliamBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) - end -end - -return TaskCell \ No newline at end of file diff --git a/lua/app/ui/activity/seven_day/seven_day_ui.lua b/lua/app/ui/activity/seven_day/seven_day_ui.lua deleted file mode 100644 index 152f2a92..00000000 --- a/lua/app/ui/activity/seven_day/seven_day_ui.lua +++ /dev/null @@ -1,295 +0,0 @@ -local SevenDayUI = class("SevenDayUI", BaseUI) - -local TASK_CELL = "app/ui/activity/seven_day/cell/task_cell" - -function SevenDayUI:getPrefabPath() - return "assets/prefabs/ui/activity/seven_day/seven_day_ui.prefab" -end - -function SevenDayUI:getCurrencyParams() - if self.currencyParams == nil then - self.currencyParams = { - itemIds = { - GConst.ItemConst.ITEM_ID_GOLD, - GConst.ItemConst.ITEM_ID_GEM, - GConst.ItemConst.ITEM_ID_VIT, - }, - showType = GConst.CURRENCY_TYPE.HORIZONTAL - } - end - return self.currencyParams -end - -function SevenDayUI:onClose() - if self.finalAutoRotateTween then - self.finalAutoRotateTween:Kill() - self.finalAutoRotateTween = nil - end -end - -function SevenDayUI:ctor() - self.day = DataManager.SevenDayData:getActDay() - if self.day < 0 then - self.day = 1 - elseif self.day > 7 then - self.day = 7 - end -end - -function SevenDayUI:onLoadRootComplete() - self.uiMap = self.root:genAllChildren() - self:_display() - self:_bind() - - self:scheduleGlobal(function() - self:updateTime() - end, 1) - self:updateTime() -end - -function SevenDayUI:_display() - self.uiMap["seven_day_ui.title_bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SEVEN_DAY_TITLE)) - self.uiMap["seven_day_ui.down.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.SEVEN_DAY_DESC_1)) - self.uiMap["seven_day_ui.down.close_btn"]:addClickListener(function() - self:closeUI() - end) - - self.downDesc = self.uiMap["seven_day_ui.down.desc"] - self.toHeroFundTx = self.uiMap["seven_day_ui.down.to_herofund_tx"] - self.toHeroFundBtn = self.uiMap["seven_day_ui.down.to_herofund_btn"] - self.toHeroFundBtnTx = self.uiMap["seven_day_ui.down.to_herofund_btn.text"] - self.toHeroFundBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.PART_IN_DESC)) - self.toHeroFundTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_FUND_DESCC_1)) - self.toHeroFundBtn:addClickListener(function() - self:closeUI() - if DataManager.HeroFundData:getIsOpen() then - ModuleManager.HeroFundManager:showMainUI() - end - end) - - self:initTop() - self:initTasks() -end - -function SevenDayUI:initTop() - self.dayTextList = {} - self.dayLockList = {} - self.stepObjs = {} - for i = 1, 7 do - self.dayLockList[i] = self.uiMap["seven_day_ui.day_bg.lock_" .. i] - self.dayTextList[i] = self.uiMap["seven_day_ui.day_bg.day_" .. i] - self.dayTextList[i]:setText(I18N:getGlobalText(I18N.GlobalConst.DAY_X, i)) - self.dayTextList[i]:addClickListener(function() - if i > DataManager.SevenDayData:getActDay() then - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAY_X_UNLOCK, i)) - return - end - self.day = i - self:refreshDay() - self:refreshScrollRect() - end) - - self.stepObjs[i] = { - btn = self.uiMap["seven_day_ui.slider_bg.btn_" .. i], - num = self.uiMap["seven_day_ui.slider_bg.num_" .. i], - spine = self.uiMap["seven_day_ui.slider_bg.btn_" .. i .. ".ui_spine"], - } - self.stepObjs[i].btn:addClickListener(function() - local list = DataManager.SevenDayData:getStepRewardList() - local id = list[i] - if id then - if DataManager.SevenDayData:canClaimStepTask(id) then - self:showBoxOpenAnimation(i, id) - else - local reward = DataManager.SevenDayData:getStepReward(id) - if id == 7 then - ModuleManager.TipsManager:showRewardTips(reward.id, reward.type, self.stepObjs[i].btn) - else - ModuleManager.TipsManager:showRewardsTips({reward}, nil, self.stepObjs[i].btn) - end - end - end - end) - end - self.finalBoxCell = self.uiMap["seven_day_ui.slider_bg.btn_7.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.finalBoxCell:setTouchEnable(false) - self.finalBoxLight = self.uiMap["seven_day_ui.slider_bg.light_7"] - self.sevenDayDesc = self.uiMap["seven_day_ui.slider_bg.desc"] - self.sevenDaySliderComp = self.uiMap["seven_day_ui.slider_bg.slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) - self.daySelectImg = self.uiMap["seven_day_ui.day_bg.day_select"] - self.timeTx = self.uiMap["seven_day_ui.title_bg.time"] - self.timeIcon = self.uiMap["seven_day_ui.title_bg.time_icon"] -end - -function SevenDayUI:initTasks() - self.scrollRectComp = self.uiMap["seven_day_ui.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.scrollRectComp:addInitCallback(function() - return TASK_CELL - end) - self.scrollRectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.taskList[index]) - end) - self.scrollRectComp:clearCells() - self.scrollRectComp:setTotalCount(0) -end - -function SevenDayUI:_bind() - self:bind(DataManager.SevenDayData, "isDirty", function() - self:onRefresh() - end) -end - -function SevenDayUI:onRefresh() - self:refreshDay() - self:refreshStepInfo() - self:refreshScrollRect() -end - -function SevenDayUI:refreshDay() - local actDay = DataManager.SevenDayData:getActDay() - for i = 1, 7 do - if i == self.day then - self.daySelectImg:setAnchoredPositionX(self.dayTextList[i]:fastGetAnchoredPositionX()) - end - if i > actDay then - self.dayLockList[i]:setVisible(true) - self.dayTextList[i]:removeRedPoint() - else - self.dayLockList[i]:setVisible(false) - if DataManager.SevenDayData:showRedPoint(i) then - self.dayTextList[i]:addRedPoint(40, 26, 0.5) - else - self.dayTextList[i]:removeRedPoint() - end - end - end -end - -function SevenDayUI:refreshStepInfo() - local list = DataManager.SevenDayData:getStepRewardList() - for index, objs in ipairs(self.stepObjs) do - local id = list[index] - if id then - objs.num:setText(DataManager.SevenDayData:getStepNum(id)) - if not self.isInBoxAnimation then - if index ~= 7 then - if DataManager.SevenDayData:getStepCollected(id) then -- 领过了 - objs.spine:playAnim("idle02", true) - else - if DataManager.SevenDayData:stepOver(id) then -- 可以领 - objs.spine:playAnim("ready", true) - else - objs.spine:playAnim("idle01", true) - end - end - end - end - end - end - - local count = DataManager.SevenDayData:getCollectedCount() - local totalCount = DataManager.SevenDayData:getTotalCount() - self.sevenDayDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SEVEN_DAY_DESC_2, count, totalCount)) - self.sevenDaySliderComp.value = count / DataManager.SevenDayData:getStepNum(#self.stepObjs) - - local finalId = #list - local finalReward = DataManager.SevenDayData:getStepReward(finalId) - if finalReward then - if DataManager.SevenDayData:getStepCollected(finalId) then - self.finalBoxCell:refreshByConfig(finalReward, true, true) - self.finalBoxLight:setVisible(false) - self.stepObjs[finalId].spine:setVisible(false) - else - if DataManager.SevenDayData:stepOver(finalId) then -- 可以领 - self.finalBoxLight:setVisible(true) - if self.finalAutoRotateTween == nil then - self.finalAutoRotateTween = self.finalBoxLight:getTransform():DOLocalRotate(BF.Vector3(0, 0, -360), 3, CS.DG.Tweening.RotateMode.FastBeyond360):SetEase(CS.DG.Tweening.Ease.Linear) - self.finalAutoRotateTween:SetLoops(-1) - end - self.stepObjs[finalId].spine:setVisible(true) - self.stepObjs[finalId].spine:playAnim("ready", true) - else - self.finalBoxLight:setVisible(false) - self.stepObjs[finalId].spine:setVisible(false) - end - self.finalBoxCell:refreshByConfig(finalReward) - end - self.finalBoxCell:setNumTx("x" .. finalReward.num) - end -end - -function SevenDayUI:refreshScrollRect() - self:sortTaskList(self.day) - if self.scrollRectComp:getTotalCount() ~= #self.taskList then -- 打开界面的时候定位到当前可领取的最低等级奖励,如果没有则定位到当前等级 - self.scrollRectComp:clearCells() - self.scrollRectComp:refillCells(#self.taskList) - else - self.scrollRectComp:updateAllCell() - end -end - -function SevenDayUI:sortTaskList(day) - self.day = day - self.taskList = DataManager.SevenDayData:getTaskListByDay(day or 1) - table.sort(self.taskList, function(a, b) - local aClaimed = DataManager.SevenDayData:taskCollected(a) - local bClaimed = DataManager.SevenDayData:taskCollected(b) - if aClaimed == false and aClaimed == bClaimed then - local aCan = DataManager.SevenDayData:canClaimTask(a) - local bCan = DataManager.SevenDayData:canClaimTask(b) - if aCan == bCan then - return a < b - else - return aCan - end - else - if aClaimed == bClaimed then - return a < b - else - return not aClaimed - end - end - end) -end - -function SevenDayUI:updateTime() - local endTime = DataManager.SevenDayData:getEndTime() - local remainTime = endTime - Time:getServerTime() - if remainTime >= 0 then - self.timeTx:setText(GFunc.getTimeStr(remainTime)) - if DataManager.HeroFundData and DataManager.HeroFundData:getIsOpen() then - self.toHeroFundTx:setVisible(true) - self.toHeroFundBtn:setActive(true) - self.downDesc:setVisible(false) - else - self.toHeroFundTx:setVisible(false) - self.toHeroFundBtn:setActive(false) - self.downDesc:setVisible(true) - end - else - UIManager:closeUnderUI(self) - self:closeUI() - end -end - -function SevenDayUI:showBoxOpenAnimation(index, id) - if index == 7 then - ModuleManager.SevenDayManager:claimStepReward(id) - return - end - if self.isInBoxAnimation then - return - end - self.isInBoxAnimation = true - self:disableUITouch() - local spine = self.stepObjs[index].spine - local trackEntry = spine:playAnim("open", false) - local time = spine:getAnimation(trackEntry).Duration - self:performWithDelayGlobal(function() - self:enableUITouch() - self.isInBoxAnimation = false - ModuleManager.SevenDayManager:claimStepReward(id) - end, time) -end - -return SevenDayUI \ No newline at end of file diff --git a/lua/app/ui/activity/seven_day/seven_day_ui.lua.meta b/lua/app/ui/activity/seven_day/seven_day_ui.lua.meta deleted file mode 100644 index 8947e4fa..00000000 --- a/lua/app/ui/activity/seven_day/seven_day_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: df5ee3920131a6c44b1e0d7712bf9159 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena.meta b/lua/app/ui/activity/tourn_arena.meta deleted file mode 100644 index 940dcb21..00000000 --- a/lua/app/ui/activity/tourn_arena.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0db3ebc134726304cb0a40fd23ab52b8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/tourn_arena/cell.meta b/lua/app/ui/activity/tourn_arena/cell.meta deleted file mode 100644 index 7e6af678..00000000 --- a/lua/app/ui/activity/tourn_arena/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6fdea40bf29965944b9ae4c5184361b1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua deleted file mode 100644 index 290d5ab8..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua +++ /dev/null @@ -1,78 +0,0 @@ -local TournArenaBountyCell = class("TournArenaBountyCell", BaseCell) - -function TournArenaBountyCell:init() - local uiMap = self:getUIMap() - self.txLevel = uiMap["tourn_arena_bounty_cell.level.tx_level"] - self.rewardCell1 = uiMap["tourn_arena_bounty_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell2 = uiMap["tourn_arena_bounty_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell3 = uiMap["tourn_arena_bounty_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.prog = uiMap["tourn_arena_bounty_cell.progress"] - self.imgProg = uiMap["tourn_arena_bounty_cell.progress.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) -end - -function TournArenaBountyCell:refresh(level, id) - self.id = id - self.txLevel:setText(DataManager.TournArenaData:getLevelTotalScore(level)) - - -- 进度条显示 - local helf = self:getBaseObject():getSizeDeltaY() / 2 - if level == 1 then - self.prog:setAnchoredPositionY(-helf) - self.prog:setSizeDeltaY(helf) - elseif level == DataManager.TournArenaData:getBountyMaxLevel() then - self.prog:setAnchoredPositionY(0) - self.prog:setSizeDeltaY(helf) - else - self.prog:setAnchoredPositionY(0) - self.prog:setSizeDeltaY(self:getBaseObject():getSizeDeltaY()) - end - self.imgProg.value = DataManager.TournArenaData:getBountyProgress(level) - - local isGet - - isGet = DataManager.TournArenaData:isReceivedBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE) - self.rewardCell1:refreshByConfig(DataManager.TournArenaData:getBountyGradeReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE), isGet, isGet) - self.rewardCell1:showLock(not DataManager.TournArenaData:isBountyGradeUnlock(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE)) - if DataManager.TournArenaData:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE) then - self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell1:addClickListener(function() - self:onClickReward(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE) - end) - else - self.rewardCell1.baseObject:removeRedPoint() - self.rewardCell1:addClickListener(nil) - end - - isGet = DataManager.TournArenaData:isReceivedBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1) - self.rewardCell2:refreshByConfig(DataManager.TournArenaData:getBountyGradeReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1), isGet, isGet) - self.rewardCell2:showLock(not DataManager.TournArenaData:isBountyGradeUnlock(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1)) - if DataManager.TournArenaData:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1) then - self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell2:addClickListener(function() - self:onClickReward(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1) - end) - else - self.rewardCell2.baseObject:removeRedPoint() - self.rewardCell2:addClickListener(nil) - end - - isGet = DataManager.TournArenaData:isReceivedBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2) - self.rewardCell3:refreshByConfig(DataManager.TournArenaData:getBountyGradeReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2), isGet, isGet) - self.rewardCell3:showLock(not DataManager.TournArenaData:isBountyGradeUnlock(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2)) - if DataManager.TournArenaData:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2) then - self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell3:addClickListener(function() - self:onClickReward(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2) - end) - else - self.rewardCell3.baseObject:removeRedPoint() - self.rewardCell3:addClickListener(nil) - end -end - --- 领取奖励 -function TournArenaBountyCell:onClickReward(grade) - ModuleManager.TournArenaManager:reqBountyReward(self.id, grade) -end - -return TournArenaBountyCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua.meta b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua.meta deleted file mode 100644 index d9f8c6aa..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ede94bb5b293fd84487866bda65bc97e -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua deleted file mode 100644 index d940d631..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua +++ /dev/null @@ -1,56 +0,0 @@ -local TournArenaGiftCell = class("TournArenaGiftCell", BaseCell) - -function TournArenaGiftCell:init() - local uiMap = self:getUIMap() - - self.txLimit = uiMap["tourn_arena_gift_cell.tx_limit"] - self.txBuy = uiMap["tourn_arena_gift_cell.tx_buy"] - self.imgOff = uiMap["tourn_arena_gift_cell.off_img"] - self.txOff = uiMap["tourn_arena_gift_cell.off_img.tx_off"] - self.rewards = {} - for i = 1, 3 do - table.insert(self.rewards, uiMap["tourn_arena_gift_cell.reward_cell_"..i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self:addClickListener(function() - if DataManager.TournArenaData:getGiftRemainTime(self.id) > 0 then - PayManager:purchasePackage(self.id, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end - end) -end - -function TournArenaGiftCell:refresh(id) - self.id = id - local cfg = DataManager.ShopData:getActGiftConfig()[self.id] - local time = DataManager.TournArenaData:getGiftRemainTime(self.id) - - self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, time)) - - for idx, reward in ipairs(self.rewards) do - if cfg.reward[idx] then - reward:setVisible(true) - reward:refreshByConfig(cfg.reward[idx]) - else - reward:setVisible(false) - end - end - - local buyStr - if cfg.recharge_id then - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_6") - self.imgOff:setActive(true) - self.txOff:setText(cfg.value .. "%") - buyStr = GFunc.getFormatPrice(cfg.recharge_id) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_5") - self.imgOff:setActive(false) - buyStr = I18N:getGlobalText(I18N.GlobalConst.STR_FREE) - end - - if time <= 0 then - buyStr = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20) - end - self.txBuy:setText(buyStr) -end - -return TournArenaGiftCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua.meta b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua.meta deleted file mode 100644 index f39234fd..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 88465b50d54bb764eaa2aa91a489e08d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua deleted file mode 100644 index d1f7438b..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua +++ /dev/null @@ -1,61 +0,0 @@ -local TournArenaRankCell = class("TournArenaRankCell", BaseCell) - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} -local BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function TournArenaRankCell:init() - local uiMap = self:getUIMap() - - self.txRank = uiMap["tourn_arena_rank_cell.tx_rank"] - self.imgRank = uiMap["tourn_arena_rank_cell.img_rank"] - self.playerHeadCell = uiMap["tourn_arena_rank_cell.player_head_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.txName = uiMap["tourn_arena_rank_cell.tx_name"] - self.txScore = uiMap["tourn_arena_rank_cell.tx_score"] - self.rewards = uiMap["tourn_arena_rank_cell.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["tourn_arena_rank_cell.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end -end - -function TournArenaRankCell:refresh(rank, info) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame) - local name = info.name - if name == nil or #name == 0 then - name = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) - end - self.txName:setText(name) - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_16)..":"..info.score) - - if BG[rank] then - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[rank]) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[4]) - end - - if RANK_IMG[rank] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[rank]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - if info.score > 0 then - self.txRank:setText(rank) - else - self.txRank:setText("--") - end - end - - local rewards = DataManager.TournArenaData:getRewardByRank(rank) - for index, cell in ipairs(self.rewardCells) do - if rewards[index] then - cell:setVisible(true) - cell:refreshByConfig(rewards[index]) - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - -return TournArenaRankCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua.meta b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua.meta deleted file mode 100644 index 57fc98b8..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0701b2f9d5a616241b15a566c048cbf5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua deleted file mode 100644 index 6990a9d3..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua +++ /dev/null @@ -1,61 +0,0 @@ -local TournArenaRankRewardCell = class("TournArenaRankRewardCell", BaseCell) - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} -local BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function TournArenaRankRewardCell:init() - local uiMap = self:getUIMap() - - self.txRank = uiMap["tourn_arena_rank_reward_cell.tx_rank"] - self.imgRank = uiMap["tourn_arena_rank_reward_cell.img_rank"] - self.rewards = uiMap["tourn_arena_rank_reward_cell.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["tourn_arena_rank_reward_cell.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end -end - -function TournArenaRankRewardCell:refresh(index) - local info = DataManager.TournArenaData:getRankCfgByIndex(index) - local ranking1 = info.ranking[1] - local ranking2 = info.ranking[2] - - if BG[ranking1] then - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[ranking1]) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[4]) - end - - if RANK_IMG[ranking1] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[ranking1]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - local rankStr = ranking1 .. "-" - if ranking2 then - rankStr = rankStr .. ranking2 - else - rankStr = rankStr .. "-" - end - if ranking1 == ranking2 then - rankStr = ranking1 - end - if index == #DataManager.TournArenaData:getRankIdList() then - rankStr = ranking1 .. "+" - end - self.txRank:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_23, rankStr)) - end - - for index, cell in ipairs(self.rewardCells) do - if info.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(info.reward[index]) - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - -return TournArenaRankRewardCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua.meta b/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua.meta deleted file mode 100644 index 1b0d26b7..00000000 --- a/lua/app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 39da646b9dfd3154ea5eb18ea98c12d7 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua b/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua deleted file mode 100644 index 4f4993a8..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua +++ /dev/null @@ -1,93 +0,0 @@ -local TournArenaBountyComp = class("TournArenaBountyComp", LuaComponent) - -function TournArenaBountyComp:init() - local uiMap = self:getUIMap() - self.txDesc = uiMap["bounty_panel.tx_desc"] - self.txFree = uiMap["bounty_panel.title.free.tx_free"] - self.txCurScore = uiMap["bounty_panel.title.cur_level.tx_level"] - -- 档位1 - self.txBuyed1 = uiMap["bounty_panel.title.buy1.tx_buyed"] - self.btnBuy1 = uiMap["bounty_panel.title.buy1.btn_buy"] - self.txBuy1 = uiMap["bounty_panel.title.buy1.btn_buy.tx_buy"] - -- 档位2 - self.txBuyed2 = uiMap["bounty_panel.title.buy2.tx_buyed"] - self.btnBuy2 = uiMap["bounty_panel.title.buy2.btn_buy"] - self.txBuy2 = uiMap["bounty_panel.title.buy2.btn_buy.tx_buy"] - - self.scrollrectComp = uiMap["bounty_panel.list_bounty"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.maskLevel = uiMap["bounty_panel.list_bounty.viewport.content.mask_img"] - self.lineLevel = uiMap["bounty_panel.list_bounty.viewport.content.line"] - self.btnBuyLevel = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level"] - self.txBuyLevelNum = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.tx_num"] - self.imgBuyLevelIcon = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.icon"] - - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_ARENEA_DESC_1)) - self.txFree:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - self.txBuyed1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - self.txBuyed2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - - self.bountyIdList = DataManager.TournArenaData:getBountyIdList() - self.scrollrectComp:addInitCallback(function() - self.maskLevel:getTransform():SetAsLastSibling() - self.lineLevel:getTransform():SetAsLastSibling() - return "app/ui/activity/tourn_arena/cell/tourn_arena_bounty_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(index, self.bountyIdList[index]) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(DataManager.TournArenaData:getBountyMaxLevel()) - - self.btnBuy1:addClickListener(function() - ModuleManager.TournArenaManager:buyBounty(GConst.TournArenaConst.BOUNTY_GIFT_ID_1) - end) - self.btnBuy2:addClickListener(function() - ModuleManager.TournArenaManager:buyBounty(GConst.TournArenaConst.BOUNTY_GIFT_ID_2) - end) - self.btnBuyLevel:addClickListener(function() - ModuleManager.TournArenaManager:reqBuyBountyLevel() - end) - self:bind(DataManager.TournArenaData, "isDirty", function() - self:refresh(true) - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh(true) - end) -end - -function TournArenaBountyComp:refresh(notUpdatePos) - self.btnBuyLevel:setActive(DataManager.TournArenaData:canBuyBountyLevel()) - self.txCurScore:setText(DataManager.TournArenaData:getBountyTotalScore()) - - -- 档位展示 - self.btnBuy1:setActive(not DataManager.TournArenaData:isBountyGradeUnlock(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1)) - self.btnBuy2:setActive(not DataManager.TournArenaData:isBountyGradeUnlock(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2)) - - local gift1 = DataManager.TournArenaData:getBountyGradeGiftCfg(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1) - local gift2 = DataManager.TournArenaData:getBountyGradeGiftCfg(GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2) - self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) - self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) - self.txBuyLevelNum:setText(GFunc.getRewardNum(DataManager.TournArenaData:getBuyBountyLevelCost())) - GFunc.centerImgAndTx(self.imgBuyLevelIcon, self.txBuyLevelNum, 5) - - -- 等级列表 - local maxLevel = DataManager.TournArenaData:getBountyMaxLevel() - local curLevel = DataManager.TournArenaData:getBountyLevel() - local topRecoveryOffset = self.scrollrectComp:getTopRecoveryOffset() - local cellHeight = self.scrollrectComp:getCellHeight() - if curLevel >= maxLevel then - self.lineLevel:setVisible(false) - else - self.lineLevel:setVisible(true) - self.lineLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - end - self.maskLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - self.maskLevel:setSizeDeltaY(cellHeight * maxLevel + GConst.UI_SCREEN_HEIGHT) - self.scrollrectComp:updateAllCell() - if not notUpdatePos then - local rewardLevel = DataManager.TournArenaData:getFirstCanGetBountyRewardLevel() - self.scrollrectComp:moveToIndex(rewardLevel or curLevel) - end -end - -return TournArenaBountyComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua.meta b/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua.meta deleted file mode 100644 index 881da977..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_bounty_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: add50f9a8e4e59c438d243609ebb1951 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua b/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua deleted file mode 100644 index 59cb482d..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua +++ /dev/null @@ -1,28 +0,0 @@ -local TournArenaGiftComp = class("TournArenaGiftComp", LuaComponent) - -function TournArenaGiftComp:init() - local uiMap = self:getUIMap() - self.scrollrectComp = uiMap["gift_panel.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/tourn_arena/cell/tourn_arena_gift_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.giftList[index].id) - end) - - self:bind(DataManager.TournArenaData, "isDirty", function() - self:refresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh() - end) -end - -function TournArenaGiftComp:refresh() - self.giftList = DataManager.TournArenaData:getGiftIdsSort() - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.giftList) -end - -return TournArenaGiftComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua.meta b/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua.meta deleted file mode 100644 index b14dc28f..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_gift_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b6ea3f91f034273478a904f0ca403424 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua b/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua deleted file mode 100644 index 379f22ea..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua +++ /dev/null @@ -1,228 +0,0 @@ -local TournArenaRankComp = class("TournArenaRankComp", LuaComponent) - -local SHOW_TYPE = { - CUR_RANK = 1, - LAST_RANK = 2, - REWARD = 3, -} - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} - -function TournArenaRankComp:onClose() - if self.countdownSid then - self.baseObject:unscheduleGlobal(self.countdownSid) - self.countdownSid = nil - end -end - -function TournArenaRankComp:init() - local uiMap = self:getUIMap() - - self.txEmpty = uiMap["rank_panel.tx_empty"] - self.btnHelp = uiMap["rank_panel.btn_help"] - self.btns = uiMap["rank_panel.btns"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.btnCur = uiMap["rank_panel.btns.btn_cur"] - self.txCur = uiMap["rank_panel.btns.btn_cur.tx_cur"] - self.btnLast = uiMap["rank_panel.btns.btn_last"] - self.txLast = uiMap["rank_panel.btns.btn_last.tx_last"] - self.btnReward = uiMap["rank_panel.btns.btn_reward"] - self.txReward = uiMap["rank_panel.btns.btn_reward.tx_reward"] - self.txCountdown = uiMap["rank_panel.tx_countdown"] - self.listRewardComp = uiMap["rank_panel.list_reward"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.listRankComp = uiMap["rank_panel.list_rank"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - -- 自己排名 - self.imgRank = uiMap["rank_panel.my_rank.img_rank"] - self.txRank = uiMap["rank_panel.my_rank.tx_rank"] - self.txName = uiMap["rank_panel.my_rank.tx_name"] - self.txScore = uiMap["rank_panel.my_rank.tx_score"] - self.playerHeadCell = uiMap["rank_panel.my_rank.player_head_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.rewards = uiMap["rank_panel.my_rank.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["rank_panel.my_rank.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self.txEmpty:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - self.txCur:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_1)) - self.txLast:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_2)) - self.txReward:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_3)) - - self.listRankComp:addInitCallback(function() - return "app/ui/activity/tourn_arena/cell/tourn_arena_rank_cell" - end) - self.listRankComp:addRefreshCallback(function(index, cell) - cell:refresh(index, self.rankDataList[index]) - end) - self.listRewardComp:addInitCallback(function() - return "app/ui/activity/tourn_arena/cell/tourn_arena_rank_reward_cell" - end) - self.listRewardComp:addRefreshCallback(function(index, cell) - cell:refresh(index) - end) - - self.btnHelp:addClickListener(function() - local str = I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_ARENEA_HELP_1) .. "\n" - for id, data in ipairs(ConfigManager:getConfig("activity_tourn_arena_point")) do - str = str .. "\n" .. I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_ARENEA_HELP_2, I18N:getGlobalText(I18N.GlobalConst["ARENA_RANKNAME_" .. id]), data.point_win, data.point_lose) - end - - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.ARENA, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = str, - } - ModuleManager.TipsManager:showHelpTips(params) - end) - self.btnCur:addClickListener(function() - ModuleManager.TournArenaManager:reqRankList(DataManager.TournArenaData:getCurRankStep()) - self:refresh(SHOW_TYPE.CUR_RANK) - end) - self.btnLast:addClickListener(function() - local curStep = DataManager.TournArenaData:getCurRankStep() - ModuleManager.TournArenaManager:reqRankList(curStep > 0 and curStep - 1 or DataManager.TournArenaData:getTotalTurnCount()) - self:refresh(SHOW_TYPE.LAST_RANK) - end) - self.btnReward:addClickListener(function() - self:refresh(SHOW_TYPE.REWARD) - end) - self:bind(DataManager.TournArenaData, "isDirty", function() - self:refresh() - end) -end - -function TournArenaRankComp:refresh(showType) - self.showType = showType or self.showType or (DataManager.TournArenaData:isFinalDay() and SHOW_TYPE.LAST_RANK or SHOW_TYPE.CUR_RANK) - - self.btnCur:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.CUR_RANK and "common_board_130" or "common_board_134") - self.btnLast:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.LAST_RANK and "common_board_130" or "common_board_134") - self.btnReward:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.REWARD and "common_board_130" or "common_board_134") - - local curStep = DataManager.TournArenaData:getCurRankStep() - self.btnCur:setActive(DataManager.TournArenaData:isFinalDay() == false) - self.btnLast:setActive(curStep > 1 or curStep == 0) - self.btns:RefreshLayout() - - if self.showType == SHOW_TYPE.CUR_RANK then - self:showRankList(curStep) - self:showSelfRank(curStep) - elseif self.showType == SHOW_TYPE.LAST_RANK then - local lastStep = curStep > 0 and curStep - 1 or DataManager.TournArenaData:getTotalTurnCount() - self:showRankList(lastStep) - self:showSelfRank(lastStep) - elseif self.showType == SHOW_TYPE.REWARD then - self:showRankReward() - self:showSelfRank(curStep) - end - self:refreshCountdown() -end - --- 展示自己排名 -function TournArenaRankComp:showSelfRank(step) - local rank = DataManager.TournArenaData:getSelfRank(step) - local score = DataManager.TournArenaData:getSelfScore(step) - - if score > 0 then - if RANK_IMG[rank] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[rank]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - self.txRank:setText(rank) - end - else - self.imgRank:setActive(false) - self.txRank:setText("--") - end - self.playerHeadCell:refresh() - self.txName:setText(DataManager.PlayerData:getNickname()) - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_16)..":"..score) - - local isReceived = step ~= DataManager.TournArenaData:getCurRankStep() and DataManager.TournArenaData:isReceivedRankReward() - local rewards = DataManager.TournArenaData:getRewardByRank(rank) - for index, cell in ipairs(self.rewardCells) do - if score > 0 and rewards[index] then - cell:setVisible(true) - cell:refreshByConfig(rewards[index], isReceived, isReceived) - if step ~= DataManager.TournArenaData:getCurRankStep() and DataManager.TournArenaData:isReachRankReward() then - cell.baseObject:addRedPoint(50, 50, 0.6) - cell:addClickListener(function() - ModuleManager.TournArenaManager:reqRankReward() - end) - else - cell.baseObject:removeRedPoint() - cell:addClickListener(nil) - end - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - --- 展示榜单 -function TournArenaRankComp:showRankList(step) - self.listRankComp:getBaseObject():setActive(true) - self.listRewardComp:getBaseObject():setActive(false) - - self.rankDataList = DataManager.TournArenaData:getRankListData(step) - if self.rankDataList == nil then - self.rankDataList = {} - end - self.listRankComp:clearCells() - self.listRankComp:refillCells(#self.rankDataList) - self.txEmpty:setActive(#self.rankDataList <= 0) -end - --- 展示排行榜奖励 -function TournArenaRankComp:showRankReward() - self.listRankComp:getBaseObject():setActive(false) - self.listRewardComp:getBaseObject():setActive(true) - self.txEmpty:setActive(false) - - self.rankIdList = DataManager.TournArenaData:getRankIdList() - self.listRewardComp:clearCells() - self.listRewardComp:refillCells(#self.rankIdList) -end - --- 刷新倒计时 -function TournArenaRankComp:refreshCountdown() - if self.countdownSid then - self.baseObject:unscheduleGlobal(self.countdownSid) - end - if DataManager.TournArenaData:isFinalDay() then - -- 活动最后一天 - self.txCountdown:setText(I18N:getGlobalText(I18N.GlobalConst.EVENT_COUNTDOWN) .. Time:formatNumTimeStr(DataManager.TournArenaData:getEndRemainTime())) - self.countdownSid = self.baseObject:scheduleGlobal(function() - local time = DataManager.TournArenaData:getEndRemainTime() - if time >= 0 then - self.txCountdown:setText(I18N:getGlobalText(I18N.GlobalConst.EVENT_COUNTDOWN) .. Time:formatNumTimeStr(time)) - end - end, 1) - else - -- 分组中 - local time = DataManager.TournArenaData:getCurRankStepRemainTime() - if time < 0 then - return - end - - local str = DataManager.TournArenaData:getCurRankStep() >= DataManager.TournArenaData:getTotalTurnCount() and I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_3) or I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_2) - - self.txCountdown:setText(str .. Time:formatNumTimeStr(time)) - self.countdownSid = self.baseObject:scheduleGlobal(function() - local time = DataManager.TournArenaData:getCurRankStepRemainTime() - if time >= 0 then - self.txCountdown:setText(str .. Time:formatNumTimeStr(time)) - else - self.baseObject:unscheduleGlobal(self.countdownSid) - if self.showType == SHOW_TYPE.CUR_RANK then - ModuleManager.TournArenaManager:reqRankList(DataManager.TournArenaData:getCurRankStep()) - elseif self.showType == SHOW_TYPE.LAST_RANK then - ModuleManager.TournArenaManager:reqRankList(DataManager.TournArenaData:getCurRankStep() - 1) - end - end - end, 1) - end -end - -return TournArenaRankComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua.meta b/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua.meta deleted file mode 100644 index bf19c44b..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_rank_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 423848385560f3d49a0d5861ef04b564 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua b/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua deleted file mode 100644 index 10b0a6c7..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua +++ /dev/null @@ -1,212 +0,0 @@ -local TournArenaUI = class("TournArenaUI", BaseUI) - -local COMP_BOUNTY = "app/ui/activity/tourn_arena/tourn_arena_bounty_comp" -local COMP_RANK = "app/ui/activity/tourn_arena/tourn_arena_rank_comp" -local COMP_GIFT = "app/ui/activity/tourn_arena/tourn_arena_gift_comp" - -function TournArenaUI:isFullScreen() - return false -end - -function TournArenaUI:getPrefabPath() - return "assets/prefabs/ui/activity/tourn_arena/tourn_arena_ui.prefab" -end - -function TournArenaUI:onPressBackspace() - self:closeUI() -end - -function TournArenaUI:onClose() - if self.compRank ~= nil then - self.compRank:refresh() - end - if self.countdownSid then - self.txCountdown:unscheduleGlobal(self.countdownSid) - end -end - -function TournArenaUI:ctor(param) - if param then - self.panelType = param - else - self.panelType = GConst.TournArenaConst.PANEL_TYPE.BOUNTY -- 默认进入任务页签 - end -end - -function TournArenaUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - - -- 通用 - self.txTitle = uiMap["tourn_arena_ui.common.img_title.tx_title"] - self.btnClose = uiMap["tourn_arena_ui.common.btn_close"] - self.bg = uiMap["tourn_arena_ui.common.bg"] - self.countdown = uiMap["tourn_arena_ui.common.countdown"] - self.txCountdown = uiMap["tourn_arena_ui.common.countdown.tx_countdown"] - self.spineTitle = uiMap["tourn_arena_ui.common.spine_title"] - -- 子界面 - self.bountyPanel = uiMap["tourn_arena_ui.bounty_panel"] - self.rankPanel = uiMap["tourn_arena_ui.rank_panel"] - self.giftPanel = uiMap["tourn_arena_ui.gift_panel"] - -- 战令标签 - self.btnBounty = uiMap["tourn_arena_ui.common.btns.btn_bounty"] - self.txBounty1 = uiMap["tourn_arena_ui.common.btns.btn_bounty.tx_btn"] - self.txBounty2 = uiMap["tourn_arena_ui.common.btns.btn_bounty.select.tx_select"] - self.selectBounty = uiMap["tourn_arena_ui.common.btns.btn_bounty.select"] - -- 排行榜标签 - self.btnRank = uiMap["tourn_arena_ui.common.btns.btn_rank"] - self.txRank1 = uiMap["tourn_arena_ui.common.btns.btn_rank.tx_btn"] - self.txRank2 = uiMap["tourn_arena_ui.common.btns.btn_rank.select.tx_select"] - self.selectRank = uiMap["tourn_arena_ui.common.btns.btn_rank.select"] - -- 礼包标签 - self.btnGift = uiMap["tourn_arena_ui.common.btns.btn_gift"] - self.txGift1 = uiMap["tourn_arena_ui.common.btns.btn_gift.tx_btn"] - self.txGift2 = uiMap["tourn_arena_ui.common.btns.btn_gift.select.tx_select"] - self.selectGift = uiMap["tourn_arena_ui.common.btns.btn_gift.select"] - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_ARENEA_TITLE)) - self.txBounty1:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txBounty2:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txRank1:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_5)) - self.txRank2:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_5)) - self.txGift1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_4)) - self.txGift2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_4)) - - self.spineTitle:getSkeletonGraphic().enabled = false - self.spineTitle:loadAssetAsync("ui_act_tourn_arena_title", function() - self.spineTitle:getSkeletonGraphic().enabled = true - self.spineTitle:playAnimComplete("animation", false, true, function() - self.spineTitle:playAnim("idle", true, true, true) - end, true) - end, false) - - self.btnBounty:addClickListener(function() - self.panelType = GConst.TournArenaConst.PANEL_TYPE.BOUNTY - self:onRefresh() - end) - self.btnRank:addClickListener(function() - self.panelType = GConst.TournArenaConst.PANEL_TYPE.RANK - self:onRefresh() - end) - self.btnGift:addClickListener(function() - self.panelType = GConst.TournArenaConst.PANEL_TYPE.GIFT - self:onRefresh() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:addEventListener(EventManager.CUSTOM_EVENT.ACTIVITY_TOURN_ARENA_END, function() - self:closeUI() - end) - self:bind(DataManager.TournArenaData, "isDirty", function() - -- 检查更新数据 - if DataManager.TournArenaData:getIsInReset() and self.panelType == GConst.TournArenaConst.PANEL_TYPE.RANK then - ModuleManager.TournArenaManager:reqActData() - self:onRefresh() - else - self:refreshRedPoint() - end - end) -end - -function TournArenaUI:onRefresh() - -- 倒计时 - if self.countdownSid then - self.txCountdown:unscheduleGlobal(self.countdownSid) - end - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.TournArenaData:getEndRemainTime())) - self.countdownSid = self.txCountdown:scheduleGlobal(function() - local time = DataManager.TournArenaData:getEndRemainTime() - if time >= 0 then - self.txCountdown:setText(Time:formatNumTimeStr(time)) - end - end, 1) - - if self.panelType == GConst.TournArenaConst.PANEL_TYPE.BOUNTY then - self:showBountyInfo() - elseif self.panelType == GConst.TournArenaConst.PANEL_TYPE.RANK then - self:showRankInfo() - elseif self.panelType == GConst.TournArenaConst.PANEL_TYPE.GIFT then - self:showGiftInfo() - end - self:refreshRedPoint() -end - --- 刷新标签红点 -function TournArenaUI:refreshRedPoint() - if DataManager.TournArenaData:hasBountyRedPoint() then - self.btnBounty:addRedPoint(75, 5, 0.6) - else - self.btnBounty:removeRedPoint() - end - if DataManager.TournArenaData:hasRankRedPoint() then - self.btnRank:addRedPoint(75, 5, 0.6) - else - self.btnRank:removeRedPoint() - end - if DataManager.TournArenaData:hasGiftRedPoint() then - self.btnGift:addRedPoint(75, 5, 0.6) - else - self.btnGift:removeRedPoint() - end -end - -function TournArenaUI:showBountyInfo() - self.bountyPanel:setActive(true) - self.selectBounty:setActive(true) - self.rankPanel:setActive(false) - self.selectRank:setActive(false) - self.giftPanel:setActive(false) - self.selectGift:setActive(false) - self.countdown:setActive(true) - self.bg:setActive(true) - - if not self.compBounty then - self.bountyPanel:initPrefabHelper() - self.bountyPanel:genAllChildren() - self.compBounty = self.bountyPanel:addLuaComponent(COMP_BOUNTY) - end - - self.compBounty:refresh() -end - -function TournArenaUI:showRankInfo() - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.rankPanel:setActive(true) - self.selectRank:setActive(true) - self.giftPanel:setActive(false) - self.selectGift:setActive(false) - self.countdown:setActive(false) - self.bg:setActive(false) - - local curStep = DataManager.TournArenaData:getCurRankStep() - ModuleManager.TournArenaManager:reqRankList(curStep > 0 and curStep or DataManager.TournArenaData:getTotalTurnCount()) - if not self.compRank then - self.rankPanel:initPrefabHelper() - self.rankPanel:genAllChildren() - self.compRank = self.rankPanel:addLuaComponent(COMP_RANK) - end - - self.compRank:refresh() -end - -function TournArenaUI:showGiftInfo() - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.rankPanel:setActive(false) - self.selectRank:setActive(false) - self.giftPanel:setActive(true) - self.selectGift:setActive(true) - self.countdown:setActive(true) - self.bg:setActive(false) - - if not self.compGift then - self.giftPanel:initPrefabHelper() - self.giftPanel:genAllChildren() - self.compGift = self.giftPanel:addLuaComponent(COMP_GIFT) - end - - self.compGift:refresh() -end - -return TournArenaUI \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua.meta b/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua.meta deleted file mode 100644 index d5cc5ea5..00000000 --- a/lua/app/ui/activity/tourn_arena/tourn_arena_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c29f7f21d2c22f74db078cffc8100e42 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave.meta b/lua/app/ui/activity/tourn_wave.meta deleted file mode 100644 index 8ca0493a..00000000 --- a/lua/app/ui/activity/tourn_wave.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 840201af24820dd4387b1ebf46520230 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/tourn_wave/cell.meta b/lua/app/ui/activity/tourn_wave/cell.meta deleted file mode 100644 index 18677e99..00000000 --- a/lua/app/ui/activity/tourn_wave/cell.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bb3773d108d0c7c46b23ba556dec5723 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua deleted file mode 100644 index df892e4d..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua +++ /dev/null @@ -1,78 +0,0 @@ -local TournWaveBountyCell = class("TournWaveBountyCell", BaseCell) - -function TournWaveBountyCell:init() - local uiMap = self:getUIMap() - self.txLevel = uiMap["tourn_wave_bounty_cell.level.tx_level"] - self.rewardCell1 = uiMap["tourn_wave_bounty_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell2 = uiMap["tourn_wave_bounty_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.rewardCell3 = uiMap["tourn_wave_bounty_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) - self.prog = uiMap["tourn_wave_bounty_cell.progress"] - self.imgProg = uiMap["tourn_wave_bounty_cell.progress.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) -end - -function TournWaveBountyCell:refresh(level, id) - self.id = id - self.txLevel:setText(DataManager.TournWaveData:getLevelTotalScore(level)) - - -- 进度条显示 - local helf = self:getBaseObject():getSizeDeltaY() / 2 - if level == 1 then - self.prog:setAnchoredPositionY(-helf) - self.prog:setSizeDeltaY(helf) - elseif level == DataManager.TournWaveData:getBountyMaxLevel() then - self.prog:setAnchoredPositionY(0) - self.prog:setSizeDeltaY(helf) - else - self.prog:setAnchoredPositionY(0) - self.prog:setSizeDeltaY(self:getBaseObject():getSizeDeltaY()) - end - self.imgProg.value = DataManager.TournWaveData:getBountyProgress(level) - - local isGet - - isGet = DataManager.TournWaveData:isReceivedBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE) - self.rewardCell1:refreshByConfig(DataManager.TournWaveData:getBountyGradeReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE), isGet, isGet) - self.rewardCell1:showLock(not DataManager.TournWaveData:isBountyGradeUnlock(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE)) - if DataManager.TournWaveData:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE) then - self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell1:addClickListener(function() - self:onClickReward(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE) - end) - else - self.rewardCell1.baseObject:removeRedPoint() - self.rewardCell1:addClickListener(nil) - end - - isGet = DataManager.TournWaveData:isReceivedBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1) - self.rewardCell2:refreshByConfig(DataManager.TournWaveData:getBountyGradeReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1), isGet, isGet) - self.rewardCell2:showLock(not DataManager.TournWaveData:isBountyGradeUnlock(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1)) - if DataManager.TournWaveData:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1) then - self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell2:addClickListener(function() - self:onClickReward(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1) - end) - else - self.rewardCell2.baseObject:removeRedPoint() - self.rewardCell2:addClickListener(nil) - end - - isGet = DataManager.TournWaveData:isReceivedBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2) - self.rewardCell3:refreshByConfig(DataManager.TournWaveData:getBountyGradeReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2), isGet, isGet) - self.rewardCell3:showLock(not DataManager.TournWaveData:isBountyGradeUnlock(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2)) - if DataManager.TournWaveData:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2) then - self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) - self.rewardCell3:addClickListener(function() - self:onClickReward(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2) - end) - else - self.rewardCell3.baseObject:removeRedPoint() - self.rewardCell3:addClickListener(nil) - end -end - --- 领取奖励 -function TournWaveBountyCell:onClickReward(grade) - ModuleManager.TournWaveManager:reqBountyReward(self.id, grade) -end - -return TournWaveBountyCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua.meta b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua.meta deleted file mode 100644 index 7855158c..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0aba106b0cea72f43bb5fe476d750402 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua deleted file mode 100644 index 67398365..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua +++ /dev/null @@ -1,56 +0,0 @@ -local TournWaveGiftCell = class("TournWaveGiftCell", BaseCell) - -function TournWaveGiftCell:init() - local uiMap = self:getUIMap() - - self.txLimit = uiMap["tourn_wave_gift_cell.tx_limit"] - self.txBuy = uiMap["tourn_wave_gift_cell.tx_buy"] - self.imgOff = uiMap["tourn_wave_gift_cell.off_img"] - self.txOff = uiMap["tourn_wave_gift_cell.off_img.tx_off"] - self.rewards = {} - for i = 1, 3 do - table.insert(self.rewards, uiMap["tourn_wave_gift_cell.reward_cell_"..i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self:addClickListener(function() - if DataManager.TournWaveData:getGiftRemainTime(self.id) > 0 then - PayManager:purchasePackage(self.id, PayManager.PURCHARSE_TYPE.ACT_GIFT) - end - end) -end - -function TournWaveGiftCell:refresh(id) - self.id = id - local cfg = DataManager.ShopData:getActGiftConfig()[self.id] - local time = DataManager.TournWaveData:getGiftRemainTime(self.id) - - self.txLimit:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, time)) - - for idx, reward in ipairs(self.rewards) do - if cfg.reward[idx] then - reward:setVisible(true) - reward:refreshByConfig(cfg.reward[idx]) - else - reward:setVisible(false) - end - end - - local buyStr - if cfg.recharge_id then - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_6") - self.imgOff:setActive(true) - self.txOff:setText(cfg.value .. "%") - buyStr = GFunc.getFormatPrice(cfg.recharge_id) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.ACT_COMMON, "act_common_bg_5") - self.imgOff:setActive(false) - buyStr = I18N:getGlobalText(I18N.GlobalConst.STR_FREE) - end - - if time <= 0 then - buyStr = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20) - end - self.txBuy:setText(buyStr) -end - -return TournWaveGiftCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua.meta b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua.meta deleted file mode 100644 index febde932..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 08a1c923b2c92e0478372680efbdce07 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua deleted file mode 100644 index d378cb9b..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua +++ /dev/null @@ -1,61 +0,0 @@ -local TournWaveRankCell = class("TournWaveRankCell", BaseCell) - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} -local BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function TournWaveRankCell:init() - local uiMap = self:getUIMap() - - self.txRank = uiMap["tourn_wave_rank_cell.tx_rank"] - self.imgRank = uiMap["tourn_wave_rank_cell.img_rank"] - self.playerHeadCell = uiMap["tourn_wave_rank_cell.player_head_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.txName = uiMap["tourn_wave_rank_cell.tx_name"] - self.txScore = uiMap["tourn_wave_rank_cell.tx_score"] - self.rewards = uiMap["tourn_wave_rank_cell.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["tourn_wave_rank_cell.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end -end - -function TournWaveRankCell:refresh(rank, info) - self.playerHeadCell:refresh(info.avatar, info.avatar_frame) - local name = info.name - if name == nil or #name == 0 then - name = I18N:getGlobalText(I18N.GlobalConst.NEW_PLAYER) - end - self.txName:setText(name) - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_16)..":"..info.score) - - if BG[rank] then - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[rank]) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[4]) - end - - if RANK_IMG[rank] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[rank]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - if info.score > 0 then - self.txRank:setText(rank) - else - self.txRank:setText("--") - end - end - - local rewards = DataManager.TournWaveData:getRewardByRank(rank) - for index, cell in ipairs(self.rewardCells) do - if rewards[index] then - cell:setVisible(true) - cell:refreshByConfig(rewards[index]) - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - -return TournWaveRankCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua.meta b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua.meta deleted file mode 100644 index 5396e915..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8cd3744c1d41e3449b5a254f46c48b86 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua deleted file mode 100644 index 82462c11..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua +++ /dev/null @@ -1,61 +0,0 @@ -local TournWaveRankRewardCell = class("TournWaveRankRewardCell", BaseCell) - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} -local BG = {"common_bg_8", "common_bg_9", "common_bg_10", "common_bg_11"} - -function TournWaveRankRewardCell:init() - local uiMap = self:getUIMap() - - self.txRank = uiMap["tourn_wave_rank_reward_cell.tx_rank"] - self.imgRank = uiMap["tourn_wave_rank_reward_cell.img_rank"] - self.rewards = uiMap["tourn_wave_rank_reward_cell.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["tourn_wave_rank_reward_cell.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end -end - -function TournWaveRankRewardCell:refresh(index) - local info = DataManager.TournWaveData:getRankCfgByIndex(index) - local ranking1 = info.ranking[1] - local ranking2 = info.ranking[2] - - if BG[ranking1] then - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[ranking1]) - else - self.baseObject:setSprite(GConst.ATLAS_PATH.COMMON, BG[4]) - end - - if RANK_IMG[ranking1] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[ranking1]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - local rankStr = ranking1 .. "-" - if ranking2 then - rankStr = rankStr .. ranking2 - else - rankStr = rankStr .. "-" - end - if ranking1 == ranking2 then - rankStr = ranking1 - end - if index == #DataManager.TournWaveData:getRankIdList() then - rankStr = ranking1 .. "+" - end - self.txRank:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_23, rankStr)) - end - - for index, cell in ipairs(self.rewardCells) do - if info.reward[index] then - cell:setVisible(true) - cell:refreshByConfig(info.reward[index]) - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - -return TournWaveRankRewardCell \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua.meta b/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua.meta deleted file mode 100644 index 1eab447b..00000000 --- a/lua/app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 967b65025941ddd469069a4d210fc121 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua b/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua deleted file mode 100644 index 25b5b480..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua +++ /dev/null @@ -1,103 +0,0 @@ -local TournWaveBountyComp = class("TournWaveBountyComp", LuaComponent) - -function TournWaveBountyComp:init() - local uiMap = self:getUIMap() - self.txDesc = uiMap["bounty_panel.tx_desc"] - self.btnHelp = uiMap["bounty_panel.tx_desc.btn_help"] - self.txFree = uiMap["bounty_panel.title.free.tx_free"] - self.txCurWave = uiMap["bounty_panel.title.cur_level.tx_level"] - -- 档位1 - self.txBuyed1 = uiMap["bounty_panel.title.buy1.tx_buyed"] - self.btnBuy1 = uiMap["bounty_panel.title.buy1.btn_buy"] - self.txBuy1 = uiMap["bounty_panel.title.buy1.btn_buy.tx_buy"] - -- 档位2 - self.txBuyed2 = uiMap["bounty_panel.title.buy2.tx_buyed"] - self.btnBuy2 = uiMap["bounty_panel.title.buy2.btn_buy"] - self.txBuy2 = uiMap["bounty_panel.title.buy2.btn_buy.tx_buy"] - - self.scrollrectComp = uiMap["bounty_panel.list_bounty"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.maskLevel = uiMap["bounty_panel.list_bounty.viewport.content.mask_img"] - self.lineLevel = uiMap["bounty_panel.list_bounty.viewport.content.line"] - self.btnBuyLevel = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level"] - self.txBuyLevelNum = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.tx_num"] - self.imgBuyLevelIcon = uiMap["bounty_panel.list_bounty.viewport.content.line.btn_buy_level.icon"] - - self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_1)) - self.txFree:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) - self.txBuyed1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - self.txBuyed2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) - - self.bountyIdList = DataManager.TournWaveData:getBountyIdList() - self.scrollrectComp:addInitCallback(function() - self.maskLevel:getTransform():SetAsLastSibling() - self.lineLevel:getTransform():SetAsLastSibling() - return "app/ui/activity/tourn_wave/cell/tourn_wave_bounty_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(index, self.bountyIdList[index]) - end) - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(DataManager.TournWaveData:getBountyMaxLevel()) - - self.btnHelp:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.ARENA, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_HELP_1), - } - ModuleManager.TipsManager:showHelpTips(params) - end) - self.btnBuy1:addClickListener(function() - ModuleManager.TournWaveManager:buyBounty(GConst.TournWaveConst.BOUNTY_GIFT_ID_1) - end) - self.btnBuy2:addClickListener(function() - ModuleManager.TournWaveManager:buyBounty(GConst.TournWaveConst.BOUNTY_GIFT_ID_2) - end) - self.btnBuyLevel:addClickListener(function() - ModuleManager.TournWaveManager:reqBuyBountyLevel() - end) - self:bind(DataManager.TournWaveData, "isDirty", function() - self:refresh(true) - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh(true) - end) -end - -function TournWaveBountyComp:refresh(notUpdatePos) - self.btnBuyLevel:setActive(DataManager.TournWaveData:canBuyBountyLevel()) - self.txCurWave:setText(DataManager.TournWaveData:getBountyTotalScore()) - - -- 档位展示 - self.btnBuy1:setActive(not DataManager.TournWaveData:isBountyGradeUnlock(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1)) - self.btnBuy2:setActive(not DataManager.TournWaveData:isBountyGradeUnlock(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2)) - - local gift1 = DataManager.TournWaveData:getBountyGradeGiftCfg(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1) - local gift2 = DataManager.TournWaveData:getBountyGradeGiftCfg(GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2) - self.txBuy1:setText(GFunc.getFormatPrice(gift1.recharge_id)) - self.txBuy2:setText(GFunc.getFormatPrice(gift2.recharge_id)) - self.txBuyLevelNum:setText(GFunc.getRewardNum(DataManager.TournWaveData:getBuyBountyLevelCost())) - GFunc.centerImgAndTx(self.imgBuyLevelIcon, self.txBuyLevelNum, 5) - - -- 等级列表 - local maxLevel = DataManager.TournWaveData:getBountyMaxLevel() - local curLevel = DataManager.TournWaveData:getBountyLevel() - local topRecoveryOffset = self.scrollrectComp:getTopRecoveryOffset() - local cellHeight = self.scrollrectComp:getCellHeight() - if curLevel >= maxLevel then - self.lineLevel:setVisible(false) - else - self.lineLevel:setVisible(true) - self.lineLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - end - self.maskLevel:setAnchoredPositionY(-topRecoveryOffset - curLevel * cellHeight) - self.maskLevel:setSizeDeltaY(cellHeight * maxLevel + GConst.UI_SCREEN_HEIGHT) - self.scrollrectComp:updateAllCell() - - if not notUpdatePos then - local rewardLevel = DataManager.TournWaveData:getFirstCanGetBountyRewardLevel() - self.scrollrectComp:moveToIndex(rewardLevel or curLevel) - end -end - -return TournWaveBountyComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua.meta b/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua.meta deleted file mode 100644 index bfd0fe98..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_bounty_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a89a4c596ad402b448d81442cc26026f -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua b/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua deleted file mode 100644 index d5297006..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua +++ /dev/null @@ -1,28 +0,0 @@ -local TournWaveGiftComp = class("TournWaveGiftComp", LuaComponent) - -function TournWaveGiftComp:init() - local uiMap = self:getUIMap() - self.scrollrectComp = uiMap["gift_panel.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - - self.scrollrectComp:addInitCallback(function() - return "app/ui/activity/tourn_wave/cell/tourn_wave_gift_cell" - end) - self.scrollrectComp:addRefreshCallback(function(index, cell) - cell:refresh(self.giftList[index].id) - end) - - self:bind(DataManager.TournWaveData, "isDirty", function() - self:refresh() - end) - self:bind(DataManager.ShopData, "isDirty", function() - self:refresh() - end) -end - -function TournWaveGiftComp:refresh() - self.giftList = DataManager.TournWaveData:getGiftIdsSort() - self.scrollrectComp:clearCells() - self.scrollrectComp:refillCells(#self.giftList) -end - -return TournWaveGiftComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua.meta b/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua.meta deleted file mode 100644 index 2fb749a4..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_gift_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: cff71edf36f45d74d849b0c5ebc13b7c -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua b/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua deleted file mode 100644 index 3e8e8304..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua +++ /dev/null @@ -1,223 +0,0 @@ -local TournWaveRankComp = class("TournWaveRankComp", LuaComponent) - -local SHOW_TYPE = { - CUR_RANK = 1, - LAST_RANK = 2, - REWARD = 3, -} - -local RANK_IMG = {"act_ranking_1", "act_ranking_2", "act_ranking_3"} - -function TournWaveRankComp:onClose() - if self.countdownSid then - self.baseObject:unscheduleGlobal(self.countdownSid) - self.countdownSid = nil - end -end - -function TournWaveRankComp:init() - local uiMap = self:getUIMap() - - self.txEmpty = uiMap["rank_panel.tx_empty"] - self.btnHelp = uiMap["rank_panel.btn_help"] - self.btns = uiMap["rank_panel.btns"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.btnCur = uiMap["rank_panel.btns.btn_cur"] - self.txCur = uiMap["rank_panel.btns.btn_cur.tx_cur"] - self.btnLast = uiMap["rank_panel.btns.btn_last"] - self.txLast = uiMap["rank_panel.btns.btn_last.tx_last"] - self.btnReward = uiMap["rank_panel.btns.btn_reward"] - self.txReward = uiMap["rank_panel.btns.btn_reward.tx_reward"] - self.txCountdown = uiMap["rank_panel.tx_countdown"] - self.listRewardComp = uiMap["rank_panel.list_reward"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - self.listRankComp = uiMap["rank_panel.list_rank"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) - -- 自己排名 - self.imgRank = uiMap["rank_panel.my_rank.img_rank"] - self.txRank = uiMap["rank_panel.my_rank.tx_rank"] - self.txName = uiMap["rank_panel.my_rank.tx_name"] - self.txScore = uiMap["rank_panel.my_rank.tx_score"] - self.playerHeadCell = uiMap["rank_panel.my_rank.player_head_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.PLAYER_HEAD_CELL) - self.rewards = uiMap["rank_panel.my_rank.rewards"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT) - self.rewardCells = {} - for i = 1, 3 do - table.insert(self.rewardCells, uiMap["rank_panel.my_rank.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)) - end - - self.txEmpty:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_BOSS_RUSH_DESC_8)) - self.txCur:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_1)) - self.txLast:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_2)) - self.txReward:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_BTN_3)) - - self.listRankComp:addInitCallback(function() - return "app/ui/activity/tourn_wave/cell/tourn_wave_rank_cell" - end) - self.listRankComp:addRefreshCallback(function(index, cell) - cell:refresh(index, self.rankDataList[index]) - end) - self.listRewardComp:addInitCallback(function() - return "app/ui/activity/tourn_wave/cell/tourn_wave_rank_reward_cell" - end) - self.listRewardComp:addRefreshCallback(function(index, cell) - cell:refresh(index) - end) - - self.btnHelp:addClickListener(function() - local params = { - type = GConst.TipsConst.HELP_TIPS_TYPE.ARENA, - title = I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_11), - desc = I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_HELP_2), - } - ModuleManager.TipsManager:showHelpTips(params) - end) - self.btnCur:addClickListener(function() - ModuleManager.TournWaveManager:reqRankList(DataManager.TournWaveData:getCurRankStep()) - self:refresh(SHOW_TYPE.CUR_RANK) - end) - self.btnLast:addClickListener(function() - local curStep = DataManager.TournWaveData:getCurRankStep() - ModuleManager.TournWaveManager:reqRankList(curStep > 0 and curStep - 1 or DataManager.TournWaveData:getTotalTurnCount()) - self:refresh(SHOW_TYPE.LAST_RANK) - end) - self.btnReward:addClickListener(function() - self:refresh(SHOW_TYPE.REWARD) - end) - self:bind(DataManager.TournWaveData, "isDirty", function() - self:refresh() - end) -end - -function TournWaveRankComp:refresh(showType) - self.showType = showType or self.showType or (DataManager.TournWaveData:isFinalDay() and SHOW_TYPE.LAST_RANK or SHOW_TYPE.CUR_RANK) - - self.btnCur:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.CUR_RANK and "common_board_130" or "common_board_134") - self.btnLast:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.LAST_RANK and "common_board_130" or "common_board_134") - self.btnReward:setSprite(GConst.ATLAS_PATH.COMMON, self.showType == SHOW_TYPE.REWARD and "common_board_130" or "common_board_134") - - local curStep = DataManager.TournWaveData:getCurRankStep() - self.btnCur:setActive(DataManager.TournWaveData:isFinalDay() == false) - self.btnLast:setActive(curStep > 1 or curStep == 0) - self.btns:RefreshLayout() - - if self.showType == SHOW_TYPE.CUR_RANK then - self:showRankList(curStep) - self:showSelfRank(curStep) - elseif self.showType == SHOW_TYPE.LAST_RANK then - local lastStep = curStep > 0 and curStep - 1 or DataManager.TournWaveData:getTotalTurnCount() - self:showRankList(lastStep) - self:showSelfRank(lastStep) - elseif self.showType == SHOW_TYPE.REWARD then - self:showRankReward() - self:showSelfRank(curStep) - end - self:refreshCountdown() -end - --- 展示自己排名 -function TournWaveRankComp:showSelfRank(step) - local rank = DataManager.TournWaveData:getSelfRank(step) - local score = DataManager.TournWaveData:getSelfScore(step) - - if score > 0 then - if RANK_IMG[rank] then - self.imgRank:setActive(true) - self.imgRank:setSprite(GConst.ATLAS_PATH.ACT_COMMON, RANK_IMG[rank]) - self.txRank:setText(GConst.EMPTY_STRING) - else - self.imgRank:setActive(false) - self.txRank:setText(rank) - end - else - self.imgRank:setActive(false) - self.txRank:setText("--") - end - self.playerHeadCell:refresh() - self.txName:setText(DataManager.PlayerData:getNickname()) - self.txScore:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_16)..":"..score) - - local isReceived = step ~= DataManager.TournWaveData:getCurRankStep() and DataManager.TournWaveData:isReceivedRankReward() - local rewards = DataManager.TournWaveData:getRewardByRank(rank) - for index, cell in ipairs(self.rewardCells) do - if score > 0 and rewards[index] then - cell:setVisible(true) - cell:refreshByConfig(rewards[index], isReceived, isReceived) - if step ~= DataManager.TournWaveData:getCurRankStep() and DataManager.TournWaveData:isReachRankReward() then - cell.baseObject:addRedPoint(50, 50, 0.6) - cell:addClickListener(function() - ModuleManager.TournWaveManager:reqRankReward() - end) - else - cell.baseObject:removeRedPoint() - cell:addClickListener(nil) - end - else - cell:setVisible(false) - end - end - self.rewards:RefreshLayout() -end - --- 展示榜单 -function TournWaveRankComp:showRankList(step) - self.listRankComp:getBaseObject():setActive(true) - self.listRewardComp:getBaseObject():setActive(false) - - self.rankDataList = DataManager.TournWaveData:getRankListData(step) - if self.rankDataList == nil then - self.rankDataList = {} - end - self.listRankComp:clearCells() - self.listRankComp:refillCells(#self.rankDataList) - self.txEmpty:setActive(#self.rankDataList <= 0) -end - --- 展示排行榜奖励 -function TournWaveRankComp:showRankReward() - self.listRankComp:getBaseObject():setActive(false) - self.listRewardComp:getBaseObject():setActive(true) - self.txEmpty:setActive(false) - - self.rankIdList = DataManager.TournWaveData:getRankIdList() - self.listRewardComp:clearCells() - self.listRewardComp:refillCells(#self.rankIdList) -end - --- 刷新倒计时 -function TournWaveRankComp:refreshCountdown() - if self.countdownSid then - self.baseObject:unscheduleGlobal(self.countdownSid) - end - if DataManager.TournWaveData:isFinalDay() then - -- 活动最后一天 - self.txCountdown:setText(I18N:getGlobalText(I18N.GlobalConst.EVENT_COUNTDOWN) .. Time:formatNumTimeStr(DataManager.TournWaveData:getEndRemainTime())) - self.countdownSid = self.baseObject:scheduleGlobal(function() - local time = DataManager.TournWaveData:getEndRemainTime() - if time >= 0 then - self.txCountdown:setText(I18N:getGlobalText(I18N.GlobalConst.EVENT_COUNTDOWN) .. Time:formatNumTimeStr(time)) - end - end, 1) - else - -- 分组中 - local time = DataManager.TournWaveData:getCurRankStepRemainTime() - if time < 0 then - return - end - - local str = DataManager.TournWaveData:getCurRankStep() >= DataManager.TournWaveData:getTotalTurnCount() and I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_3) or I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_2) - - self.txCountdown:setText(str .. Time:formatNumTimeStr(time)) - self.countdownSid = self.baseObject:scheduleGlobal(function() - local time = DataManager.TournWaveData:getCurRankStepRemainTime() - if time >= 0 then - self.txCountdown:setText(str .. Time:formatNumTimeStr(time)) - else - self.baseObject:unscheduleGlobal(self.countdownSid) - if self.showType == SHOW_TYPE.CUR_RANK then - ModuleManager.TournWaveManager:reqRankList(DataManager.TournWaveData:getCurRankStep()) - elseif self.showType == SHOW_TYPE.LAST_RANK then - ModuleManager.TournWaveManager:reqRankList(DataManager.TournWaveData:getCurRankStep() - 1) - end - end - end, 1) - end -end - -return TournWaveRankComp \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua.meta b/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua.meta deleted file mode 100644 index d996fef2..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_rank_comp.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f1a089a3d69cb5c43954d024f28ce4e8 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua b/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua deleted file mode 100644 index 646bceab..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua +++ /dev/null @@ -1,203 +0,0 @@ -local TournWaveUI = class("TournWaveUI", BaseUI) - -local COMP_BOUNTY = "app/ui/activity/tourn_wave/tourn_wave_bounty_comp" -local COMP_RANK = "app/ui/activity/tourn_wave/tourn_wave_rank_comp" -local COMP_GIFT = "app/ui/activity/tourn_wave/tourn_wave_gift_comp" - -function TournWaveUI:isFullScreen() - return false -end - -function TournWaveUI:getPrefabPath() - return "assets/prefabs/ui/activity/tourn_wave/tourn_wave_ui.prefab" -end - -function TournWaveUI:onPressBackspace() - self:closeUI() -end - -function TournWaveUI:onClose() - if self.compRank ~= nil then - self.compRank:refresh() - end - if self.countdownSid then - self.txCountdown:unscheduleGlobal(self.countdownSid) - end -end - -function TournWaveUI:ctor(param) - if param then - self.panelType = param - else - self.panelType = GConst.TournWaveConst.PANEL_TYPE.BOUNTY -- 默认进入任务页签 - end -end - -function TournWaveUI:onLoadRootComplete() - local uiMap = self.root:genAllChildren() - - -- 通用 - self.txTitle = uiMap["tourn_wave_ui.common.img_title.tx_title"] - self.btnClose = uiMap["tourn_wave_ui.common.btn_close"] - self.bg = uiMap["tourn_wave_ui.common.bg"] - self.countdown = uiMap["tourn_wave_ui.common.countdown"] - self.txCountdown = uiMap["tourn_wave_ui.common.countdown.tx_countdown"] - -- 子界面 - self.bountyPanel = uiMap["tourn_wave_ui.bounty_panel"] - self.rankPanel = uiMap["tourn_wave_ui.rank_panel"] - self.giftPanel = uiMap["tourn_wave_ui.gift_panel"] - -- 战令标签 - self.btnBounty = uiMap["tourn_wave_ui.common.btns.btn_bounty"] - self.txBounty1 = uiMap["tourn_wave_ui.common.btns.btn_bounty.tx_btn"] - self.txBounty2 = uiMap["tourn_wave_ui.common.btns.btn_bounty.select.tx_select"] - self.selectBounty = uiMap["tourn_wave_ui.common.btns.btn_bounty.select"] - -- 排行榜标签 - self.btnRank = uiMap["tourn_wave_ui.common.btns.btn_rank"] - self.txRank1 = uiMap["tourn_wave_ui.common.btns.btn_rank.tx_btn"] - self.txRank2 = uiMap["tourn_wave_ui.common.btns.btn_rank.select.tx_select"] - self.selectRank = uiMap["tourn_wave_ui.common.btns.btn_rank.select"] - -- 礼包标签 - self.btnGift = uiMap["tourn_wave_ui.common.btns.btn_gift"] - self.txGift1 = uiMap["tourn_wave_ui.common.btns.btn_gift.tx_btn"] - self.txGift2 = uiMap["tourn_wave_ui.common.btns.btn_gift.select.tx_select"] - self.selectGift = uiMap["tourn_wave_ui.common.btns.btn_gift.select"] - - self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_TITLE)) - self.txBounty1:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txBounty2:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) - self.txRank1:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_5)) - self.txRank2:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_5)) - self.txGift1:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_4)) - self.txGift2:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_TOURN_WAVE_DESC_4)) - - self.btnBounty:addClickListener(function() - self.panelType = GConst.TournWaveConst.PANEL_TYPE.BOUNTY - self:onRefresh() - end) - self.btnRank:addClickListener(function() - self.panelType = GConst.TournWaveConst.PANEL_TYPE.RANK - self:onRefresh() - end) - self.btnGift:addClickListener(function() - self.panelType = GConst.TournWaveConst.PANEL_TYPE.GIFT - self:onRefresh() - end) - self.btnClose:addClickListener(function() - self:closeUI() - end) - self:addEventListener(EventManager.CUSTOM_EVENT.ACTIVITY_TOURN_WAVE_END, function() - self:closeUI() - end) - self:bind(DataManager.TournWaveData, "isDirty", function() - -- 检查更新数据 - if DataManager.TournWaveData:getIsInReset() and self.panelType == GConst.TournWaveConst.PANEL_TYPE.RANK then - ModuleManager.TournWaveManager:reqActData() - self:onRefresh() - else - self:refreshRedPoint() - end - end) -end - -function TournWaveUI:onRefresh() - -- 倒计时 - if self.countdownSid then - self.txCountdown:unscheduleGlobal(self.countdownSid) - end - self.txCountdown:setText(Time:formatNumTimeStr(DataManager.TournWaveData:getEndRemainTime())) - self.countdownSid = self.txCountdown:scheduleGlobal(function() - local time = DataManager.TournWaveData:getEndRemainTime() - if time >= 0 then - self.txCountdown:setText(Time:formatNumTimeStr(time)) - end - end, 1) - - if self.panelType == GConst.TournWaveConst.PANEL_TYPE.BOUNTY then - self:showBountyInfo() - elseif self.panelType == GConst.TournWaveConst.PANEL_TYPE.RANK then - self:showRankInfo() - elseif self.panelType == GConst.TournWaveConst.PANEL_TYPE.GIFT then - self:showGiftInfo() - end - self:refreshRedPoint() -end - --- 刷新标签红点 -function TournWaveUI:refreshRedPoint() - if DataManager.TournWaveData:hasBountyRedPoint() then - self.btnBounty:addRedPoint(-75, -5, 0.6) - else - self.btnBounty:removeRedPoint() - end - if DataManager.TournWaveData:hasRankRedPoint() then - self.btnRank:addRedPoint(-75, -5, 0.6) - else - self.btnRank:removeRedPoint() - end - if DataManager.TournWaveData:hasGiftRedPoint() then - self.btnGift:addRedPoint(-75, -5, 0.6) - else - self.btnGift:removeRedPoint() - end -end - -function TournWaveUI:showBountyInfo() - self.bountyPanel:setActive(true) - self.selectBounty:setActive(true) - self.rankPanel:setActive(false) - self.selectRank:setActive(false) - self.giftPanel:setActive(false) - self.selectGift:setActive(false) - self.countdown:setActive(true) - self.bg:setActive(true) - - if not self.compBounty then - self.bountyPanel:initPrefabHelper() - self.bountyPanel:genAllChildren() - self.compBounty = self.bountyPanel:addLuaComponent(COMP_BOUNTY) - end - - self.compBounty:refresh() -end - -function TournWaveUI:showRankInfo() - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.rankPanel:setActive(true) - self.selectRank:setActive(true) - self.giftPanel:setActive(false) - self.selectGift:setActive(false) - self.countdown:setActive(false) - self.bg:setActive(false) - - local curStep = DataManager.TournWaveData:getCurRankStep() - ModuleManager.TournWaveManager:reqRankList(curStep > 0 and curStep or DataManager.TournWaveData:getTotalTurnCount()) - if not self.compRank then - self.rankPanel:initPrefabHelper() - self.rankPanel:genAllChildren() - self.compRank = self.rankPanel:addLuaComponent(COMP_RANK) - end - - self.compRank:refresh() -end - -function TournWaveUI:showGiftInfo() - self.bountyPanel:setActive(false) - self.selectBounty:setActive(false) - self.rankPanel:setActive(false) - self.selectRank:setActive(false) - self.giftPanel:setActive(true) - self.selectGift:setActive(true) - self.countdown:setActive(true) - self.bg:setActive(false) - - if not self.compGift then - self.giftPanel:initPrefabHelper() - self.giftPanel:genAllChildren() - self.compGift = self.giftPanel:addLuaComponent(COMP_GIFT) - end - - self.compGift:refresh() -end - -return TournWaveUI \ No newline at end of file diff --git a/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua.meta b/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua.meta deleted file mode 100644 index 9a235a03..00000000 --- a/lua/app/ui/activity/tourn_wave/tourn_wave_ui.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c3c48b9494daada49a21717ce70dd4a8 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/arena/arena_ui.lua b/lua/app/ui/arena/arena_ui.lua index 51fb1514..fd5dbc59 100644 --- a/lua/app/ui/arena/arena_ui.lua +++ b/lua/app/ui/arena/arena_ui.lua @@ -1,6 +1,6 @@ local ArenaUI = class("ArenaUI", BaseUI) -local GIFT_CELL = "app/ui/main_city/cell/side_bar_arena_gift_cell" +-- local GIFT_CELL = "app/ui/main_city/cell/side_bar_arena_gift_cell" function ArenaUI:isFullScreen() return false end @@ -110,7 +110,7 @@ function ArenaUI:onLoadRootComplete() self.rightArrow:setVisible(false) self.rightNode = uiMap["arena_ui.right_node"] self.rightBtnCells = {} - self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["arena_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL) + -- self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["arena_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL) self.fightBtn = uiMap["arena_ui.fight_btn"] -- 体力消耗 @@ -250,19 +250,19 @@ function ArenaUI:refreshInfo() end function ArenaUI:refreshRightBtns() - local y = 0 - if self.rightBtnCells.giftCell:checkIsOpen() then - y = y - 60 - self.rightBtnCells.giftCell:setActive(true) - self.rightBtnCells.giftCell:setVisible(true) - self.rightBtnCells.giftCell:getBaseObject():setAnchoredPositionY(y) - self.rightBtnCells.giftCell:refresh() - else - self.rightBtnCells.giftCell:setVisible(false) - end + -- local y = 0 + -- if self.rightBtnCells.giftCell:checkIsOpen() then + -- y = y - 60 + -- self.rightBtnCells.giftCell:setActive(true) + -- self.rightBtnCells.giftCell:setVisible(true) + -- self.rightBtnCells.giftCell:getBaseObject():setAnchoredPositionY(y) + -- self.rightBtnCells.giftCell:refresh() + -- else + -- self.rightBtnCells.giftCell:setVisible(false) + -- end - -- 暂不处理箭头的问题 - self.rightNode:setVisible(y < 0) + -- -- 暂不处理箭头的问题 + -- self.rightNode:setVisible(y < 0) end -- 刷新段位奖励红点 diff --git a/lua/app/ui/common/common_box_ui.lua b/lua/app/ui/common/common_box_ui.lua index 8fabe1b2..73bfccce 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/main_city/cell/side_bar_seven_day_cell.lua b/lua/app/ui/main_city/cell/side_bar_seven_day_cell.lua new file mode 100755 index 00000000..861bb2e7 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_seven_day_cell.lua @@ -0,0 +1,27 @@ +local SideBarSevenDayCell = class("SideBarSevenDayCell", SideBarBaseCell) + +function SideBarSevenDayCell:getCellName() + return I18N:getGlobalText(I18N.GlobalConst.ACT_SEVENDAY) +end + +function SideBarSevenDayCell:getModuleKey() + return ModuleManager.MODULE_KEY.ACT_SEVENDAY +end + +function SideBarSevenDayCell:getIsOpen() + return DataManager.ActSevenDayData:isOpen() +end + +function SideBarSevenDayCell:getSpineName() + return "ui_main_btn_shop" +end + +function SideBarSevenDayCell:onClick() + ModuleManager.ActSevenDayManager:showMainUI() +end + +function SideBarSevenDayCell:getIsShowRedPoint() + return DataManager.ActSevenDayData:hasRedPoint() +end + +return SideBarSevenDayCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_seven_day_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_seven_day_cell.lua.meta new file mode 100644 index 00000000..6afec282 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_seven_day_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6c064656b9730428f9a80762509af783 +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_day_cell_2.lua b/lua/app/ui/main_city/cell/side_bar_seven_day_cell_2.lua new file mode 100755 index 00000000..c520f375 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_seven_day_cell_2.lua @@ -0,0 +1,27 @@ +local SideBarSevenDayCell2 = class("SideBarSevenDayCell2", SideBarBaseCell) + +function SideBarSevenDayCell2:getCellName() + return I18N:getGlobalText(I18N.GlobalConst.ACT_SEVENDAY_2) +end + +function SideBarSevenDayCell2:getModuleKey() + return ModuleManager.MODULE_KEY.ACT_SEVENDAY_2 +end + +function SideBarSevenDayCell2:getIsOpen() + return DataManager.ActSevenDayData:isOpen(2) +end + +function SideBarSevenDayCell2:getSpineName() + return "ui_main_btn_shop" +end + +function SideBarSevenDayCell2:onClick() + ModuleManager.ActSevenDayManager:showMainS2UI() +end + +function SideBarSevenDayCell2:getIsShowRedPoint() + return DataManager.ActSevenDayData:hasRedPoint(2) +end + +return SideBarSevenDayCell2 \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_seven_day_cell_2.lua.meta b/lua/app/ui/main_city/cell/side_bar_seven_day_cell_2.lua.meta new file mode 100644 index 00000000..dcc341cd --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_seven_day_cell_2.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a549a708f81bf43e48b5e0080af1bd8f +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 44f6bfaf..0fe052c8 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -1072,7 +1072,7 @@ function MainCityUI:checkMainPop() if battleSnapshot.battleType then if battleSnapshot.currentVersion == Platform:getClientVersion() then local snapshotTime = battleSnapshot.snapShotTime - if snapshotTime and Time:getOverOfServerToday(snapshotTime) >= Time:getOverOfServerToday() then + if snapshotTime and Time:getDayOverTimeStamp(snapshotTime) >= Time:getDayOverTimeStamp() then BIReport:postBatttleSnapshotOpen() local params = { content = I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_14), diff --git a/lua/app/userdata/activity/act_boss_rush.meta b/lua/app/userdata/activity/act_boss_rush.meta deleted file mode 100644 index 2ebd44ea..00000000 --- a/lua/app/userdata/activity/act_boss_rush.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8f03a26eebd5c8c4da63b03db9b6be58 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua b/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua deleted file mode 100644 index e91f05ea..00000000 --- a/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua +++ /dev/null @@ -1,792 +0,0 @@ -local ActBossRushData = class("ActBossRushData", BaseData) - -local ACT_ID = 206 -local PRO_ACT_ID = 130502 -local UTRAL_ACT_ID = 130602 - -ActBossRushData.REWARD_TYPE = { - FREE = 0, - PRO = 1, - UTRAL = 2 -} - -function ActBossRushData:clear() - self.data.isDirty = false - self.startTime = 0 - self.endTime = 0 - -- 战斗相关 - self.stageRandomSeed = 0 - self.stageList = {} - self.todayMaxWave = 0 - self.todayFightCount = 0 - self.fightCount = 0 - self.todayMaxWaveRound = 0 - -- 兑换 - self.shop = {} - -- 战令 - self.waveCount = 0 -- 波次 - self.waveLevel = 0 -- 波次等级 可领的最高等级 - self.freeLevel = 0 -- 免费领取过的等级 - self.proLevel = 0 -- 付费1领取过的等级 - self.utralLevel = 0 -- 付费2领取过的等级 - self.free_awarded = {} -- 领取过的免费id - self.pay_low_awarded = {} -- 领取过的付费1id - self.pay_high_awarded = {} -- 领取过的付费2id - self.proBounght = false -- 付费1已购买 - self.utralBounght = false -- 付费2已购买 - self.waveLevelList = {} -- 缓存波次等级 - self.waveLevelListCount = 0 -- 缓存最大等级 - -- 排行榜 - self.topRankList = {} - self.lastRankList = {} - self.rankList = {} - self.selfRank = {} - self.lastSelfRank = {} - self.needUpdateRank = 0 - self.todayRankRerwardGot = false - - DataManager:unregisterCrossDayFunc("ActBossRushData") -end - -function ActBossRushData:ctor() - self:clear() -end - -function ActBossRushData:setActivityInfo(activity) - self.startTime = GFunc.formatTimeStep(activity.start_at) - self.endTime = GFunc.formatTimeStep(activity.end_at) -end - -function ActBossRushData:init(data) - if not data then - return - end - - self.activity_id = data.activity_id - self.bountyList = nil - self.rankRewardList = nil - -- 战斗 - if data.heroes then - local update = false - for _, heroId in ipairs(data.heroes) do - if heroId > 0 then - update = true - break - end - end - if update then - DataManager.FormationData:initFormationByType(GConst.BattleConst.FORMATION_TYPE.BOSS_RUSH, data.heroes) - end - end - self.todayFightCount = data.fight_count or 0 - self.fightCount = data.total_fight_count or 0 - self.todayMaxWave = data.max_wave or 0 - self.todayMaxWaveRound = data.min_round or 0 - - -- 兑换 - self.shop = data.exchanged or {} - - -- 排行榜 - if data.rank_rewarded ~= nil then - self.todayRankRerwardGot = data.rank_rewarded - end - - -- 战令 - self.waveCount = data.accum_wave or 0 - self.waveLevelListCount = 0 - local list = self:getBountyList() - local startId - self.waveLevelStartId = nil - for index, id in ipairs(list) do - local info = self:getBountyCfg()[id] - if info then - self.waveLevelList[id] = info.exp - self.waveLevelListCount = self.waveLevelListCount + 1 - if not startId or startId > id then - startId = id - self.waveLevelStartId = startId - end - end - end - if self.waveLevelStartId then - local startId = math.max(0, self.waveLevelStartId - 1) - self.freeLevel = startId - self.proLevel = startId - self.utralLevel = startId - end - - if startId then - for id = startId, startId + self.waveLevelListCount do - local wave = self.waveLevelList[id] - if wave and wave <= self.waveCount then - self.waveLevel = id - else - break - end - end - end - - if data.collected then - for level, bossrushgrade in pairs(data.collected) do - if bossrushgrade.normal then - self:setFreeGot(level) - end - if bossrushgrade.superior then - self:setProGot(level) - end - if bossrushgrade.superior_max then - self:setUtralGot(level) - end - end - end - - if data.bought ~= nil then - self.proBounght = data.bought - self.utralBounght = data.bought_max - end - - DataManager:registerCrossDayFunc("ActBossRushData", function() - self.todayMaxWave = 0 - self.todayMaxWaveRound = 0 - self.todayFightCount = 0 - - self.needUpdateRank = 0 - self.todayRankRerwardGot = false - self:setDirty() - - if self:getIsFirstDay() then - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) - end - end) -end - -function ActBossRushData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function ActBossRushData:getConditionDay() - if not self.conditionDay then - self.conditionDay = GFunc.getConstIntValue('activity_recurring_day') - self.conditionDay = (self.conditionDay - 1) * 86400 - end - - return self.conditionDay -end - -function ActBossRushData:getIsOpen() - if GFunc.isShenhe() then - self.isOpen = false - return false - end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then - self.isOpen = false - return false - end - if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到 - if self.fightCount > 0 or self.proBounght or self.utralBounght then - -- 兼容已参与的玩家 - else - self.isOpen = false - return false - end - end - local time = Time:getServerTime() - local isOpen = false - if self.endTime > time and time > self.startTime then - isOpen = true - end - if self.isOpen == false and isOpen then -- 没开->开 - DataManager.BagData.ItemData:clearItemCount(GConst.ItemConst.ITEM_ID_BOSS_RUSH) - end - self.isOpen = isOpen - return isOpen -end - -function ActBossRushData:getRp() - if not self:getIsOpen() then - return false - end - - if self:getHaveReward() then - return true - end - - if self:canGetRankReward() then - return true - end - - if not self:getTodayExchangeCheck() then - return true - end - - return false -end - -function ActBossRushData:getRemainTime() - local time = self.endTime - Time:getServerTime() - if time < 0 then - time = 0 - end - return time -end - -function ActBossRushData:getIsFinalDay() - local time = self:getRemainTime() - if time > 0 and time < 86400 then - return true - end - return false -end - -function ActBossRushData:getIsFirstDay() - local time = Time:getServerTime() - self.startTime - if time <= 86400 then - return true - end - return false -end - ----- 战斗 -function ActBossRushData:updateStageSeed(seed) - self.todayFightCount = self.todayFightCount + 1 - self.fightCount = self.fightCount + 1 - if self.stageRandomSeed == seed then - return - end - self.stageRandomSeed = seed - self.stageList = {} - for id, info in ipairs(ConfigManager:getConfig("activity_boss_rush_chapter")) do - table.insert(self.stageList, id) - end - self.stageList = table.shuffleBySeed(self.stageList, self.stageRandomSeed) -end - -function ActBossRushData:getStageList() - return self.stageList -end - -function ActBossRushData:getTodayMaxWave() - return self.todayMaxWave or 0 -end - -function ActBossRushData:getTodayFightCount() - return self.todayFightCount -end - -function ActBossRushData:getTotalFightCount() - return self.fightCount -end - -function ActBossRushData:getFreeFightLimit() - if not self.freeFightLimit then - self.freeFightLimit = GFunc.getConstIntValue("activity_boss_rush_time") or 1 - end - return self.freeFightLimit -end - -function ActBossRushData:getFreeFightCount() - local count = self:getFreeFightLimit() - self:getTodayFightCount() - if count < 0 then - count = 0 - end - return count -end - -function ActBossRushData:getFightFree() - return self.todayFightCount <= 0 -end - -function ActBossRushData:getFightCost() - if not self.fightCostOrigin then - self.fightCostOrigin = GFunc.getRewardNum(GFunc.getConstReward("activity_boss_rush_cost")) - self.fightCostAdd = GFunc.getRewardNum(GFunc.getConstReward("activity_boss_rush_costadd")) - end - local count = self.todayFightCount - self:getFreeFightLimit() - if count <= 0 then - return self.fightCostOrigin - end - - return self.fightCostOrigin + self.fightCostAdd * count -end - - ----- 排行榜 -function ActBossRushData:getTodayRankList() - if self:getRemainTime() < 86400 then -- 最后一天 - return self.lastRankList - end - return self.rankList -end - -function ActBossRushData:getRankConfig() - return ConfigManager:getConfig("activity_boss_rush_rank") -end - -function ActBossRushData:getRankRewardList() - if not self.rankRewardList then - self.rankRewardList = {} - local cfg = self:getRankConfig() - for id, info in pairs(cfg) do - if info.activity == (self.activity_id or ACT_ID) then - table.insert(self.rankRewardList, id) - end - end - table.sort(self.rankRewardList, function(a, b) - return a < b - end) - end - return self.rankRewardList -end - -function ActBossRushData:getRankRewards(rank) - if not rank or rank <= 0 then -- 没参加就没有 - return - end - if not self.cacheRankRewardsMap then -- 缓存名次对应的配置表ID - self.cacheRankRewardsMap = {} - end - if not self.cacheRankRewardsMap[rank] then - local cfg = self:getRankConfig() - local lsit = self:getRankRewardList() - for index, id in ipairs(lsit) do - local info = cfg[id] - if info.ranking[1] and info.ranking[2] then - if info.ranking[1] <= rank and rank <= info.ranking[2] then - self.cacheRankRewardsMap[rank] = id - end - elseif info.ranking[1] then - if info.ranking[1] <= rank then - self.cacheRankRewardsMap[rank] = id - end - end - end - end - local cfg = self:getRankConfig()[self.cacheRankRewardsMap[rank]] - if cfg then - return cfg.reward - end -end - -function ActBossRushData:getNeedUpdateRank() - if not self:getIsOpen() then - return false - end - return (Time:getServerTime() - self.needUpdateRank) > 30 -end - -function ActBossRushData:setNeedUpdateRank() - self.needUpdateRank = Time:getServerTime() -end - -function ActBossRushData:updateRankInfo(info) - self.lastRankList = info.yesterday_top50 - self.lastSelfRank = info.yesterday_self - self.rankList = info.today_top50 - self.selfRank = info.today_self - - self.needUpdateRank = Time:getServerTime() - self:setDirty() -end - -function ActBossRushData:updateTopRankInfo(info) - self.topRankList = info or {} - - self:setDirty() -end - -function ActBossRushData:getTopRankInfo() - return self.topRankList -end - -function ActBossRushData:getLastRankInfo() - return self.lastRankList -end - -function ActBossRushData:getCurRankInfo() - return self.rankList -end - -function ActBossRushData:getLastSelfInfo() - return self.lastSelfRank -end - -function ActBossRushData:getCurRankSelfInfo() - return self.selfRank -end - -function ActBossRushData:canGetRankReward() - if not self.todayRankRerwardGot then - if (not self.lastSelfRank or not self.lastSelfRank.rank) and not self:getIsFirstDay() then - return true - end - end - - if not self.lastSelfRank or not self.lastSelfRank.rank or self.lastSelfRank.rank <= 0 then - return false - end - - return not self.todayRankRerwardGot -end - -function ActBossRushData:setGotRankReward() - self.todayRankRerwardGot = true - self:setDirty() -end - -function ActBossRushData:isGotRankReward() - return self.todayRankRerwardGot -end - ----- 战令 -function ActBossRushData:getBountyCfg() - return ConfigManager:getConfig("activity_bounty_level") -end - -function ActBossRushData:getBountyList() - if not self.bountyList then - self.bountyList = GFunc.getTable(DataManager:getActivityBountyLevelByActId(self.activity_id or ACT_ID) or {}) - table.sort(self.bountyList, function(a, b) - return a < b - end) - end - return self.bountyList -end - -function ActBossRushData:getWaveCount() - return self.waveCount or 0 -end - -function ActBossRushData:getWaveLevel() - return self.waveLevel or 0 -end - -function ActBossRushData:getStartWaveLevel() - return (self.waveLevelStartId - 1) -end - -function ActBossRushData:getMaxLevel() - return (self.waveLevelStartId - 1) + self.waveLevelListCount -end - -function ActBossRushData:isMaxWaveLevel() - return self.waveLevel >= self:getMaxLevel() -end - -function ActBossRushData:getLevelWave(level) - if level > self:getMaxLevel() then - level = self:getMaxLevel() - end - return self.waveLevelList[level] or 0 -end - -function ActBossRushData:updateWaveAndRound(wave, round) - self.waveNewtag = false - self.roundNewtag = false - if wave > self.todayMaxWave then - self.todayMaxWave = wave - self.todayMaxWaveRound = round - self.waveNewtag = true - self.roundNewtag = true - elseif wave == self.todayMaxWave and round < self.todayMaxWaveRound then - self.todayMaxWaveRound = round - self.roundNewtag = true - end -end - -function ActBossRushData:getWaveRoundNewTag() - return self.waveNewtag, self.roundNewtag -end - -function ActBossRushData:getLastWaveLevelInfo() - return self.lastWaveLevel or self.waveLevel, self.lastWaveCount or self.waveCount -end - -function ActBossRushData:addWaveCount(count) - self.lastWaveLevel = self.waveLevel - self.lastWaveCount = self.waveCount - - self.waveCount = self.waveCount + count - local nextLevel = self.waveLevel + 1 - if self.waveLevelList[nextLevel] and self.waveCount >= self.waveLevelList[nextLevel] then -- 升级了 - for id = nextLevel, self:getMaxLevel() do - local wave = self.waveLevelList[id] - if wave and wave <= self.waveCount then - self.waveLevel = id - else - break - end - end - end - - self:setDirty() -end - -function ActBossRushData:getFreeGot(level) - return self.free_awarded[level] -end - -function ActBossRushData:setFreeGot(level) - if not self.free_awarded[level] then - self.freeLevel = self.freeLevel + 1 - end - self.free_awarded[level] = true -end - -function ActBossRushData:getProActId() - return PRO_ACT_ID -end - -function ActBossRushData:getProPrice() - local cfg = ConfigManager:getConfig("act_gift")[PRO_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function ActBossRushData:getProGot(level) - return self.pay_low_awarded[level] -end - -function ActBossRushData:setProGot(level) - if not self.pay_low_awarded[level] then - self.proLevel = self.proLevel + 1 - end - self.pay_low_awarded[level] = true -end - -function ActBossRushData:getProBought() - return self.proBounght -end - -function ActBossRushData:setProBought() - self.proBounght = true - self:setDirty() -end - -function ActBossRushData:getUtralActId() - return UTRAL_ACT_ID -end - -function ActBossRushData:gettUtralPrice() - local cfg = ConfigManager:getConfig("act_gift")[UTRAL_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function ActBossRushData:getUtralGot(level) - return self.pay_high_awarded[level] -end - -function ActBossRushData:setUtralGot(level) - if not self.pay_high_awarded[level] then - self.utralLevel = self.utralLevel + 1 - end - self.pay_high_awarded[level] = true -end - -function ActBossRushData:getUtralBought() - return self.utralBounght -end - -function ActBossRushData:setUtralBought() - self.utralBounght = true - self:setDirty() -end - -function ActBossRushData:gotFundReward(idWithLv) - if not idWithLv then - return - end - - for _, info in ipairs(idWithLv) do - if info.grade == 0 then - self:setFreeGot(info.id) - elseif info.grade == 1 then - self:setProGot(info.id) - elseif info.grade == 2 then - self:setUtralGot(info.id) - end - end - - self:setDirty() -end - -function ActBossRushData:gotSingleFundReward(level, grade) - if grade == 0 then - self:setFreeGot(level) - elseif grade == 1 then - self:setProGot(level) - elseif grade == 2 then - self:setUtralGot(level) - end - - self:setDirty() -end - -function ActBossRushData:getFreeCanGet(level) - if self:getFreeGot(level) then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function ActBossRushData:getProCanGet(level) - if self:getProGot(level) then - return false - end - - if not self.proBounght then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function ActBossRushData:getUtralCanGet(level) - if self:getUtralGot(level) then - return false - end - - if not self.utralBounght then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function ActBossRushData:getHaveReward() - if self.freeLevel < self.waveLevel then - return true - end - - if self.proBounght then - if self.proLevel < self.waveLevel then - return true - end - end - - if self.utralBounght then - if self.utralLevel < self.waveLevel then - return true - end - end - - return false -end - -function ActBossRushData:getReward(level, rewardType) - local cfg = self:getBountyCfg()[level] - if not cfg then - return - end - - if rewardType == ActBossRushData.REWARD_TYPE.FREE then - return cfg.reward - elseif rewardType == ActBossRushData.REWARD_TYPE.PRO then - return cfg.reward_pro - elseif rewardType == ActBossRushData.REWARD_TYPE.UTRAL then - return cfg.reward_pro_max - end -end - -function ActBossRushData:getBuyBountyLevelCost() - return GFunc.getConstReward("activity_bounty_cost") -end - ----- 兑换商店 - -function ActBossRushData:getExchangeList() - if not self.exchangeList then - self.exchangeList = GFunc.getTable(DataManager:getActivityExchangeByActId(self.activity_id or ACT_ID) or {}) - end - - return self.exchangeList -end - -function ActBossRushData:getExchangeConfig() - return ConfigManager:getConfig("activity_exchange") -end - -function ActBossRushData:getExchangeRemainCount(id) - local count = self.shop[id] or 0 - local cfg = self:getExchangeConfig()[id] - if not cfg then - return 0 - end - count = cfg.limit - count - if count <= 0 then - count = 0 - end - return count -end - -function ActBossRushData:getShopReward(id) - local cfg = self:getExchangeConfig()[id] - if not cfg then - return - end - return cfg.reward -end - -function ActBossRushData:getShopCost(id) - local cfg = self:getExchangeConfig()[id] - if not cfg then - return - end - return cfg.cost -end - -function ActBossRushData:setShopInfo(id, count) - if not id or not count then - return - end - self.shop[id] = (self.shop[id] or 0) + count - self:setDirty() -end - -function ActBossRushData:markPoped() - self.popTag = true -end - -function ActBossRushData:getMarkPoped() - if self.popTag == nil then - local time = LocalData:getNotPopToday("ActBossRushData") - self.popTag = time == Time:getBeginningOfServerToday() - end - return self.popTag -end - -function ActBossRushData:getTodayExchangeCheck() - if self.todayExchangeChecked == nil then - self.todayExchangeChecked = LocalData:getTodayBossRushExchangeWatched() == Time:getServerTime() - end - return self.todayExchangeChecked -end - -function ActBossRushData:setTodayExchangeCheck() - if self.todayExchangeChecked then - return - else - LocalData:recordTodayBossRushExchangeWatched() - end - self.todayExchangeChecked = true - self:setDirty() -end - -return ActBossRushData \ No newline at end of file diff --git a/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua.meta b/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua.meta deleted file mode 100644 index fe7e587f..00000000 --- a/lua/app/userdata/activity/act_boss_rush/act_boss_rush_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a9dee8d82b60a8b4c88bed4c0c52260b -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/act_pvp.meta b/lua/app/userdata/activity/act_pvp.meta deleted file mode 100644 index 580d5faf..00000000 --- a/lua/app/userdata/activity/act_pvp.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bd035484550799f45a05bda7f00acb7a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/act_pvp/act_pvp_data.lua b/lua/app/userdata/activity/act_pvp/act_pvp_data.lua deleted file mode 100644 index ad32e499..00000000 --- a/lua/app/userdata/activity/act_pvp/act_pvp_data.lua +++ /dev/null @@ -1,729 +0,0 @@ -local ACT_ID = 306 -local PRO_ACT_ID = 220102 -local UTRAL_ACT_ID = 220202 -local ActPvpData = class("ActPvpData", BaseData) - -ActPvpData.BOUNTY_TYPE = { - NORMAL = "normal", - SUPERIOR = "superior", - SUPERIOR_MAX = "superior_max" -} - -ActPvpData.BOUNTY_TYPE_TO_NUM = { - [ActPvpData.BOUNTY_TYPE.NORMAL] = 0, - [ActPvpData.BOUNTY_TYPE.SUPERIOR] = 1, - [ActPvpData.BOUNTY_TYPE.SUPERIOR_MAX] = 2 -} - -function ActPvpData:ctor() - self.endTime = 0 - self.startTime = 0 - self.data.isDirty = false - - self.playing = false - self.enterCountDaily = 0 - self.totalFightCount = 0 - self.totalWinCount = 0 - self.todayWinCount = 0 - self.winCount = 0 - self.loseCount = 0 - self.heroeAndSkins = {} - self.currentSelectPairId = {} - self.nextSelectFourId = {} - self.flushCount = 0 - self.matchCdEndAt = 0 - self.todayAdCount = 0 - self.rivalInfo = {} - self.dailyRewards = {} - self.gotRankRewards = false - self.exp = 0 - self.level = 1 - self.collected = {} -end - -function ActPvpData:setActivityInfo(activity) - self.startTime = GFunc.formatTimeStep(activity.start_at) - self.endTime = GFunc.formatTimeStep(activity.end_at) -end - -function ActPvpData:setActivityId(actId) - self.activity_id = actId -end - -function ActPvpData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function ActPvpData:clear() - DataManager:unregisterCrossDayFunc("ActPvpData") -end - -function ActPvpData:init(data) - if not data.enter_count_daily then -- 没数据 - self:setNeedUpdate(false) - else - self:updateData(data) - end - self:getBountyList() - DataManager:registerCrossDayFunc("ActPvpData", function() - if self:isFinalDay() then - self.playing = false - end - self.todayWinCount = 0 - self.enterCountDaily = 0 - self.todayAdCount = 0 - self.dailyRewards = {} - self:setDirty() - end) -end - -function ActPvpData:updateData(data) - if not data then - return - end - self:setNeedUpdate(false) - self.playing = data.playing - self.enterCountDaily = data.enter_count_daily - self.totalWinCount = data.total_win_count - self.todayWinCount = data.daily_win_count - self.winCount = data.win_count - self.loseCount = data.lose_count - self.todayAdCount = data.today_ad_count - self.dailyRewards = data.daily_rewards - self.gotRankRewards = data.rank_rewards - self.exp = data.exp - self.level = data.level - self.collected = data.collected - self:updateRivalInfo(data.rival_info, data.match_cd_end_at) - self:updateHerosInfo(data.heroes, data.current_select_pair_id, data.next_select_four_id) - self.flushCount = data.flush_count - - if self:isFinalDay() then - self.playing = false - end - - self:setDirty() -end - -function ActPvpData:getConditionDay() - if not self.conditionDay then - self.conditionDay = GFunc.getConstIntValue('activity_recurring_day') - self.conditionDay = (self.conditionDay - 1) * 86400 - end - - return self.conditionDay -end - -function ActPvpData:getIsOpen() - if GFunc.isShenhe() or not self.endTime then - self.isOpen = false - return false - end - - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then - self.isOpen = false - return false - end - if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到 - self.isOpen = false - return false - end - local time = Time:getServerTime() - local isOpen = false - if self.endTime > time and time > self.startTime then - isOpen = true - end - if self.isOpen == false and isOpen then -- 没开->开 - DataManager.ShopData:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, PRO_ACT_ID) - DataManager.ShopData:resetGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, UTRAL_ACT_ID) - end - self.isOpen = isOpen - return isOpen -end - -function ActPvpData:getRemainTime() - return self.endTime - Time:getServerTime() -end - -function ActPvpData:isFinalDay() - return self:getRemainTime() <= 86400 -end - -function ActPvpData:isPlaying() - return self.playing -end - -function ActPvpData:getEnterCount() - return self.enterCountDaily -end - -function ActPvpData:getFreeEnterLimit() - if not self.freeEnterLimit then - self.freeEnterLimit = GFunc.getConstIntValue("activity_pvp_time") - end - return self.freeEnterLimit -end - -function ActPvpData:getFreeEnterCount() - return self:getFreeEnterLimit() - self:getEnterCount() -end - -function ActPvpData:getEnterCost() - if not self.enterBaseCost then - self.enterBaseCost = GFunc.getConstReward("activity_pvp_cost") - end - if not self.enterAddCost then - self.enterAddCost = GFunc.getConstReward("activity_pvp_costadd") - end - if not self.enterCost then - self.enterCost = GFunc.getTable(self.enterBaseCost) - end - local count = self:getFreeEnterCount() - if count > 0 then - self.enterCost.num = 0 - else - count = 0 - count - self.enterCost.num = self.enterBaseCost.num + self.enterAddCost.num * count - end - return self.enterCost -end - -function ActPvpData:getWinCount() - return self.winCount or 0 -end - -function ActPvpData:getWinLimit() - if not self.winLimit then - self.winLimit = GFunc.getConstIntValue("activity_pvp_win_times") - end - return self.winLimit -end - -function ActPvpData:getLoseCount() - return self.loseCount or 0 -end - -function ActPvpData:getLoseLimit() - if not self.loseLimit then - self.loseLimit = GFunc.getConstIntValue("activity_pvp_lose_times") - end - return self.loseLimit -end - -function ActPvpData:updateHerosInfo(heroes, pairIds, nextSelectFourId) - if heroes then - self.heroEntities = {} - for heroId, skinId in pairs(heroes) do - if DataManager.HeroData:isExistHeroById(heroId) then - local level = self:getHeroLv() - local heroEntity = DataManager.HeroData:getEntity({id = heroId, level = level, skin = skinId}) - heroEntity:setSkins({skinId}) - self.heroEntities[heroEntity:getMatchType()] = heroEntity - end - end - end - - self:updateSelectInfo(pairIds, nextSelectFourId) -end - -function ActPvpData:updateSelectInfo(pairIds, nextSelectFourId) - self.currentSelectPairId = pairIds - self.nextSelectFourId = nextSelectFourId - self:setDirty() -end - -function ActPvpData:getHeros() - return self.heroEntities or {} -end - -function ActPvpData:getCurSelectPairId() - return self.currentSelectPairId -end - -function ActPvpData:getNextSelectFourId() - return self.nextSelectFourId -end - -function ActPvpData:getSelectHeroId(selectId) - local cfg = ConfigManager:getConfig("activity_pvp")[selectId] - if not cfg then - return - end - return cfg.hero_id -end - -function ActPvpData:getRematchConstGem() - return GFunc.getConstIntValue("arena_refresh_cost") -end - -function ActPvpData:updateRivalInfo(rivalInfo, endCd) - self.rivalInfo = rivalInfo or {} - self.matchCdEndAt = GFunc.formatTimeStep(endCd) - if self.rivalInfo.rival_heroes then - self.rivalHeroEntities = {} - for heroId, skinId in pairs(self.rivalInfo.rival_heroes) do - if DataManager.HeroData:isExistHeroById(heroId) then - local level = self:getHeroLv() - local heroEntity = DataManager.HeroData:getEntity({id = heroId, level = level, skin = skinId}) - heroEntity:setSkins({skinId}) - self.rivalHeroEntities[heroEntity:getMatchType()] = heroEntity - end - end - end -end - -function ActPvpData:getRivalInfo() - return self.rivalInfo -end -function ActPvpData:getRivalInfoHeroes() - return self.rivalHeroEntities -end - -function ActPvpData:getMatchCdEndAt() - return self.matchCdEndAt -end - -function ActPvpData:setMatchCdEndAt(isAd) - self.matchCdEndAt = Time:getServerTime() - if isAd then - self.todayAdCount = self.todayAdCount +1 - end -end - -function ActPvpData:getMatchCdEndTime() - return self.matchCdEndAt - Time:getServerTime() -end - -function ActPvpData:getCanAdRefreshHero() - return self.todayAdCount <= 0 -end - -function ActPvpData:getNeedReMatch() - if not self.rivalInfo or not self.rivalInfo.level then - return true - end - - return false -end - -function ActPvpData:canGetDailyReward(winCount) - if self.todayWinCount >= winCount then - if not self:gotDailyReward(winCount) then - return true - end - end - - return false -end - -function ActPvpData:winCountEnough(winCount) - return self.todayWinCount >= winCount -end - -function ActPvpData:gotDailyReward(winCount) - local index = self:getWinCountMap()[winCount] - if not index then - return false - end - for _, gotId in ipairs(self.dailyRewards) do - if gotId == index then - return true - end - end - - return false -end - -function ActPvpData:setDailyReward(id) - table.insert(self.dailyRewards, id) - self:setDirty() -end - -function ActPvpData:getDailyRewards(winCount) - local cfg = ConfigManager:getConfig("activity_pvp_wingift") - for index, info in ipairs(cfg) do - if info.win == winCount then - return info.reward - end - end -end - -function ActPvpData:getWinCountMap() - if not self.winCountMap then - self.winCountMap = {} - local cfg = ConfigManager:getConfig("activity_pvp_wingift") - for index, info in ipairs(cfg) do - self.winCountMap[info.win] = index - end - end - - return self.winCountMap -end - -function ActPvpData:getTotalFightCount() - return self.totalFightCount -end - -function ActPvpData:getTotalWinCount() - return self.totalWinCount -end - -function ActPvpData:getNeedUpdateData() - return self.needUpdateData -end - -function ActPvpData:setNeedUpdate(need) - self.needUpdateData = need -end - -function ActPvpData:getHeroLv() - local maxlv = ConfigManager:getConfigNum("hero_level") - return math.min(6 + self.winCount, maxlv) -end - -function ActPvpData:getRp() - if self:canGetRankReward() then - return true - end - if self:getBountyRp() then - return true - end - return false -end - -function ActPvpData:addFlushCount() - self.flushCount = self.flushCount + 1 -end - -function ActPvpData:getFlushCount() - return self.flushCount or 0 -end - -function ActPvpData:getCanAdFlush() - return self.flushCount < self:getAdFlushLimit() -end - -function ActPvpData:getAdFlushLimit() - if not self.adFlushLimit then - self.adFlushLimit = GFunc.getConstIntValue("activity_pvp_refresh_ad_times") - end - return self.adFlushLimit -end - -function ActPvpData:getFlushCost() - if not self.flushCost then - self.flushCost = GFunc.getConstReward("activity_pvp_refresh_cost") - end - return self.flushCost -end - -function ActPvpData:getLastTurnWin() - return self.lastTurnWin -end - -function ActPvpData:setLastTurnWin(win) - self.lastTurnWin = win -end - -function ActPvpData:getHeroLevelUp() - return self.heroLevelUp -end - -function ActPvpData:setHeroLevelUp(up) - self.heroLevelUp = up -end - -function ActPvpData:recordLastBountyLevel() - self.lastBountyLevel = self.level - self.lastBountyExp = self.exp -end - -function ActPvpData:getLastBountyLevel() - return self.lastBountyLevel, self.lastBountyExp -end - ----- 排行榜 - -function ActPvpData:updateRankInfo(ranks, selfRank) - self.rankList = ranks - self.selfRank = selfRank - self.lastUpdateRankTs = Time:getServerTime() - self:setDirty() -end - -function ActPvpData:getRankList() - return self.rankList or {} -end - -function ActPvpData:getSelfRank() - return self.selfRank or 0 -end - -function ActPvpData:getNeedUpdateRank() - if not self.lastUpdateRankTs then - return true - end - - return (Time:getServerTime() - self.lastUpdateRankTs) > 10 -- 10秒拉一次 -end - -function ActPvpData:canGetRankReward() - if not self:isFinalDay() then - return false - end - if self.selfRank and self.selfRank <= 0 then - return false - end - return not self.gotRankRewards -end - -function ActPvpData:getGotRankReward() - return self.gotRankRewards -end - -function ActPvpData:setGotRankReward() - self.gotRankRewards = true - self:setDirty() -end - -function ActPvpData:getRankConfig() - return ConfigManager:getConfig("activity_rank") -end - -function ActPvpData:getRankRewardList() - if not self.rankRewardList then - self.rankRewardList = GFunc.getTable(DataManager:getActivityRankByActId(self.activity_id or ACT_ID) or {}) - table.sort(self.rankRewardList, function(a, b) - return a < b - end) - end - return self.rankRewardList -end - - -function ActPvpData:getRankRewards(rank) - if not rank or rank <= 0 then -- 没参加就没有 - return - end - if not self.cacheRankRewardsMap then -- 缓存名次对应的配置表ID - self.cacheRankRewardsMap = {} - end - if not self.cacheRankRewardsMap[rank] then - local cfg = self:getRankConfig() - local list = self:getRankRewardList() - for index, id in ipairs(list) do - local info = cfg[id] - if info.ranking[1] and info.ranking[2] then - if info.ranking[1] <= rank and rank <= info.ranking[2] then - self.cacheRankRewardsMap[rank] = id - end - elseif info.ranking[1] then - if info.ranking[1] <= rank then - self.cacheRankRewardsMap[rank] = id - end - end - end - end - local cfg = self:getRankConfig()[self.cacheRankRewardsMap[rank]] - if cfg then - return cfg.reward - end -end - ----- 战令 - -function ActPvpData:getBountyExp() - return self.exp -end - -function ActPvpData:getBountyLevel() - return self.level -end - -function ActPvpData:setBountyLevel(level) - if level > self.minBountyBaseLv then - level = level - self.minBountyBaseLv - end - self.level = level - self:setDirty() -end - -function ActPvpData:getMaxBountyLevel() - self:getBountyList() - return self.maxBountyLv -end - -function ActPvpData:getBountyCfg() - return ConfigManager:getConfig("activity_bounty_level") -end - -function ActPvpData:getBountyLevelExp(level) - local id = self:getBountyList()[level] - if not id then - return 0 - end - local info = self:getBountyCfg()[id] - if not info then - return 0 - end - return info.exp or 0 -end - -function ActPvpData:getBountyList() - if not self.bountyList then - self.bountyList = GFunc.getTable(DataManager:getActivityBountyLevelByActId(self.activity_id or ACT_ID) or {}) - table.sort(self.bountyList, function(a, b) - return a < b - end) - self.maxBountyLv = #self.bountyList - self.minBountyBaseLv = (self.bountyList[1] or 1) - self.minBountyBaseLv = self.minBountyBaseLv - 1 - end - return self.bountyList -end - -function ActPvpData:getBuyBountyLevelCost() - return GFunc.getConstReward("activity_bounty_cost") -end - -function ActPvpData:getBountyCollected(id, fundType) - if not self.collected[id] then - return false - end - return self.collected[id][fundType] -end - -function ActPvpData:getBountyReward(id, fundType) - local info = self:getBountyCfg()[id] - if not info then - return - end - - if fundType == ActPvpData.BOUNTY_TYPE.NORMAL then - return info.reward - elseif fundType == ActPvpData.BOUNTY_TYPE.SUPERIOR then - return info.reward_pro - elseif fundType == ActPvpData.BOUNTY_TYPE.SUPERIOR_MAX then - return info.reward_pro_max - end -end - -function ActPvpData:setBountyCollected(idGrades) - if not idGrades then - return - end - for id, grade in pairs(idGrades) do - if not self.collected[id] then - self.collected[id] = {} - end - if grade == 0 then - self.collected[id][ActPvpData.BOUNTY_TYPE.NORMAL] = true - elseif grade == 1 then - self.collected[id][ActPvpData.BOUNTY_TYPE.SUPERIOR] = true - elseif grade == 2 then - self.collected[id][ActPvpData.BOUNTY_TYPE.SUPERIOR_MAX] = true - end - end - - self:setDirty() -end - -function ActPvpData:getBountyCanGet(level, bountyType) - if self:getBountyCollected(level, bountyType) then - return false - end - - if bountyType == ActPvpData.BOUNTY_TYPE.SUPERIOR then - if not self:getProBought() then - return false - end - elseif bountyType == ActPvpData.BOUNTY_TYPE.SUPERIOR_MAX then - if not self:getUtralBought() then - return false - end - end - - return self.level + self.minBountyBaseLv >= level -end - -function ActPvpData:getBountyLevelEnough(level) - return self.level + self.minBountyBaseLv >= level -end - -function ActPvpData:getBountyLevelId(level) - return level + self.minBountyBaseLv -end - -function ActPvpData:getProActId() - return PRO_ACT_ID -end - -function ActPvpData:getProPrice() - local cfg = ConfigManager:getConfig("act_gift")[PRO_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function ActPvpData:getProBought() - if not self.proBounght then - if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, PRO_ACT_ID) > 0 then - self.proBounght = true - end - end - - return self.proBounght -end - -function ActPvpData:getUtralActId() - return UTRAL_ACT_ID -end - -function ActPvpData:gettUtralPrice() - local cfg = ConfigManager:getConfig("act_gift")[UTRAL_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function ActPvpData:getUtralBought() - if not self.utralBounght then - if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, UTRAL_ACT_ID) > 0 then - self.utralBounght = true - end - end - return self.utralBounght -end - -function ActPvpData:getBountyRp() - self:getBountyList() - for level = self.minBountyBaseLv + 1, self.level + self.minBountyBaseLv do - for k, bountyType in pairs(ActPvpData.BOUNTY_TYPE) do - if self:getBountyCanGet(level, bountyType) then - return true - end - end - end - - return false -end - -function ActPvpData:getActPvpShowHelpTag() - if self.showHelpTag == nil then - self.showHelpTag = LocalData:getActPvpShowHelpTag(self.activity_id or ACT_ID) == 1 - end - return self.showHelpTag -end - -function ActPvpData:recordActPvpShowHelpTag() - if self.showHelpTag then - return - end - - self.showHelpTag = true - LocalData:recordActPvpShowHelpTag(self.activity_id or ACT_ID) -end - -return ActPvpData \ No newline at end of file diff --git a/lua/app/userdata/activity/act_pvp/act_pvp_data.lua.meta b/lua/app/userdata/activity/act_pvp/act_pvp_data.lua.meta deleted file mode 100644 index b88d260e..00000000 --- a/lua/app/userdata/activity/act_pvp/act_pvp_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: eade72de1be5b1748a1196dd706ef0b2 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/act_pvp.meta b/lua/app/userdata/activity/act_seven_day.meta similarity index 77% rename from lua/app/module/activity/act_pvp.meta rename to lua/app/userdata/activity/act_seven_day.meta index aca3f00c..866a7440 100644 --- a/lua/app/module/activity/act_pvp.meta +++ b/lua/app/userdata/activity/act_seven_day.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 85e1de39dc7234b4e886452c8c5c9f9b +guid: d1b849a5110d64de68d2f08aa28b8f0b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/lua/app/userdata/activity/seven_day/seven_day_data.lua b/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua old mode 100644 new mode 100755 similarity index 100% rename from lua/app/userdata/activity/seven_day/seven_day_data.lua rename to lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua diff --git a/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua.meta b/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua.meta new file mode 100755 index 00000000..34ec1314 --- /dev/null +++ b/lua/app/userdata/activity/act_seven_day/act_seven_day_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8d81172f7a22f3e488a0af552fe9523a +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/fourteen_day.meta b/lua/app/userdata/activity/fourteen_day.meta deleted file mode 100644 index 4a046450..00000000 --- a/lua/app/userdata/activity/fourteen_day.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e7b314b845f319d4fa788528c141dc54 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua b/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua deleted file mode 100644 index 690dc809..00000000 --- a/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua +++ /dev/null @@ -1,638 +0,0 @@ -local FourteenDayData = class("FourteenDayData", BaseData) - --- 新玩家开启 -local OPEN_DAYS = 7 --- 活动持续时间 -local ACTIVE_DAYS = 14 - -function FourteenDayData:ctor() - self:clear() -end - -function FourteenDayData:clear() - DataManager:unregisterCrossDayFunc("FourteenDayData") - DataManager:unregisterTryOpenFunc("FourteenDayData") -end - -function FourteenDayData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function FourteenDayData:init(data) - data = data or GConst.EMPTY_TABLE - - if EDITOR_MODE then - Logger.logHighlight("新手14天乐数据初始化") - Logger.printTable(data) - end - self:initData(data) - - -- 活动开启 - DataManager:registerTryOpenFunc("FourteenDayData", function() - if self:isOpen() then - DataManager:unregisterTryOpenFunc("FourteenDayData") - self:setDirty() - end - end) - -- 跨天 - DataManager:registerCrossDayFunc("FourteenDayData", function() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - if not self.openStatus then - self.needSyncTaskInfo = true - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) - end - self.openStatus = true - - -- Logger.logHighlight("14天乐跨天") - - self.activeDays = self.activeDays + 1 - self:setDirty() - end) - - local endTime = self:getEndTime() - local nowTime = Time:getServerTime() - if endTime > nowTime then - -- 注册任务进度监听 - for id, data in ipairs(self:getTaskCfg()) do - if data.quest then - ModuleManager.TaskManager:registerTask("FourteenDayData", data.quest, function(count) - self:addTaskProgress(data.quest, count) - end) - end - end - end - - self.openStatus = false - if self:isOpen() and self:isActiveTime() then - self.openStatus = true - end -end - -function FourteenDayData:initData(data) - self.openTs = GFunc.formatTimeStep(data.open_at or 0) - self.activeDays = data.active_days or 0-- 活动开启后的登陆天数、阶段数 - self.bountyStatus = data.funds - self.tasksStatus = data.tasks - self.exchangeStatus = data.exchange_info -end - -function FourteenDayData:getOpenStatus() - return self.openStatus -end - -function FourteenDayData:getNeedSyncData() - return self.needSyncTaskInfo -end - -function FourteenDayData:setSyncData() - self.needSyncTaskInfo = true -end - -function FourteenDayData:isOpen() - if GFunc.isShenhe() then - return false - end - -- 开启条件同七天乐 - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - return false - end - - return true -end - --- 是否在活动时间内 -function FourteenDayData:isActiveTime() - local openTime = self:getOpenTime() - local endTime = self:getEndTime() - local nowTime = Time:getServerTime() - - return nowTime >= openTime and nowTime < endTime -end - --- 获取开启时间 -function FourteenDayData:getOpenTime() - local result - if self.openTs and self.openTs > 0 then - result = self.openTs - else - local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs()) - result = math.floor(registerBeginTs + (OPEN_DAYS - 1) * 24 * 60 * 60) - end - - -- Logger.logHighlight("开始时间:"..result) - return result -end - --- 获取结束时间 -function FourteenDayData:getEndTime() - if self.endTs == nil or self.endTs <= 0 then - self.endTs = math.floor(self:getOpenTime() + ACTIVE_DAYS * 24 * 60 * 60) - end - - return self.endTs -end - --- 获取活动结束剩余时间(秒) -function FourteenDayData:getEndRemainTime() - return self:getEndTime() - Time:getServerTime() -end - --- 获取活动开启时的活跃天数 -function FourteenDayData:getActiveDays() - return self.activeDays -end - --- 是否有红点 -function FourteenDayData:hasRedPoint() - if not self:isActiveTime() then - return false - end - - return self:hasBountyRedPoint() or self:hasTaskRedPoint() or self:hasExchangeRedPoint() or self:hasGiftRedPoint() -end - --- 战令---------------------------------------------------------------------------------------------------------------- - --- 是否有战令红点 -function FourteenDayData:hasBountyRedPoint() - for id, data in ipairs(self:getBountyCfg()) do - if self:canGetBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE) then - return true - end - if self:canGetBountyReward(id, GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY) then - return true - end - end - - return false -end - --- 获取战令配置 -function FourteenDayData:getBountyCfg() - return ConfigManager:getConfig("act_fourteen_bounty") -end - --- 档位是否已解锁 -function FourteenDayData:isBountyGradeUnlock(grade) - if grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY then - return DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, GConst.FourteenDayConst.BOUNTY_GIFT_ID) > 0 - else - return true - end -end - --- 获取战令档位奖励 -function FourteenDayData:getBountyGradeReward(id, grade) - local cfg = self:getBountyCfg()[id] - local result - if cfg ~= nil then - if grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE then - result = cfg.reward - elseif grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY then - result = cfg.reward_pro - end - end - - return result -end - --- 战令奖励可领取 -function FourteenDayData:canGetBountyReward(id, grade) - return self:isReachBountyReward(id, grade) and not self:isReceivedBountyReward(id, grade) -end - --- 战令奖励是否满足领取条件 -function FourteenDayData:isReachBountyReward(id, grade) - if self:getActiveDays() >= id then - return self:isBountyGradeUnlock(grade) - else - return false - end -end - --- 战令奖励是否已领取 -function FourteenDayData:isReceivedBountyReward(id, grade) - if self.bountyStatus == nil or self.bountyStatus.free_awarded == nil or self.bountyStatus.pay_awarded == nil then - return false - end - - if grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE then - return table.containValue(self.bountyStatus.free_awarded, id) - elseif grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY then - return table.containValue(self.bountyStatus.pay_awarded, id) - end - - return false -end - --- 战令奖励领取成功 -function FourteenDayData:onReceivedBountyReward(successMap) - for index, data in ipairs(successMap) do - if data.grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.FREE then - table.insert(self.bountyStatus.free_awarded, data.id) - elseif data.grade == GConst.FourteenDayConst.BOUNTY_GRADE_TYPE.PAY then - table.insert(self.bountyStatus.pay_awarded, data.id) - end - end - - self:setDirty() -end - --- 任务---------------------------------------------------------------------------------------------------------------- - --- 是否有任务红点 -function FourteenDayData:hasTaskRedPoint() - local openDay = self:getActiveDays() - for id, data in ipairs(self:getTaskCfg()) do - if data.stage <= openDay then - if self:canGetTaskReward(id) then - return true - end - end - end - - return false -end - --- 获取当前应该显示的阶段 -function FourteenDayData:getTaskShowStage() - for id, data in ipairs(self:getTaskCfg()) do - if self:getActiveDays() >= data.stage and self:canGetTaskReward(id) then - return data.stage - end - end - - local curStage = self:getActiveDays() - local maxStage = self:getTaskMaxStage() - if curStage > maxStage then - curStage = maxStage - end - - return curStage -end - - --- 获取任务配置 -function FourteenDayData:getTaskCfg() - return ConfigManager:getConfig("act_fourteen_quest") -end - --- 获取任务id map结构 -function FourteenDayData:getTaskMap() - if self.taskMap == nil then - self.taskMap = {} - for id, data in ipairs(ConfigManager:getConfig("act_fourteen_quest")) do - if self.taskMap[data.stage] == nil then - self.taskMap[data.stage] = {} - end - - if data.quest ~= nil then - if self.taskMap[data.stage].task == nil then - self.taskMap[data.stage].task = {} - end - table.insert(self.taskMap[data.stage].task, id) - else - self.taskMap[data.stage].stage = id - end - end - end - - return self.taskMap -end - --- 获取任务最大阶段值 -function FourteenDayData:getTaskMaxStage() - return #self:getTaskMap() -end - --- 获取阶段任务id -function FourteenDayData:getStageTaskId(stage) - local taskMap = self:getTaskMap() - - return taskMap[stage] and taskMap[stage].stage or nil -end - --- 获取阶段子任务id列表 -function FourteenDayData:getStageSubTaskIdsSort(stage) - local taskMap = self:getTaskMap() - local result = {} - if taskMap[stage] == nil or taskMap[stage].task == nil then - return result - end - - local canGet = {} - local unfinish = {} - for index, id in ipairs(taskMap[stage].task) do - if self:isTaskFinish(id) then - -- 已完成 - if self:isReceivedTaskReward(id) then - -- 已领取 - table.insert(result, id) - else - -- 未领取 - table.insert(canGet, id) - end - else - --未完成 - table.insert(unfinish, id) - end - end - - unfinish = table.addArray(canGet, unfinish) - result = table.addArray(unfinish, result) - - return result -end - --- 获取任务目标 -function FourteenDayData:getTaskTarget(id) - return self:getTaskCfg()[id].num -end - --- 获取任务类型 -function FourteenDayData:getTaskType(id) - return self:getTaskCfg()[id].quest -end - --- 获取任务阶段 -function FourteenDayData:getTaskStage(id) - return self:getTaskCfg()[id].stage -end - --- 获取任务奖励 -function FourteenDayData:getTaskRewards(id) - return self:getTaskCfg()[id].reward -end - --- 获取任务icon -function FourteenDayData:getTaskIcon(id) - return self:getTaskCfg()[id].icon -end - --- 获取任务描述 -function FourteenDayData:getTaskDesc(id) - local taskType = self:getTaskType(id) - if taskType == GConst.TaskConst.TASK_TYPE.X_ARENA_GRADING then - local grading = DataManager.ArenaData:getGradingName(DataManager.ArenaData:getGradingIdFromScore(self:getTaskTarget(id))) - return I18N:getText("task_type", taskType, "desc", grading) - elseif taskType == GConst.TaskConst.TASK_TYPE.X_DUNGEON_ARMOR then - local cfg = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR):getConfig(id) - return I18N:getText("task_type", taskType, "desc", cfg.chapter, cfg.stage) - else - return I18N:getText("task_type", taskType, "desc", self:getTaskTarget(id)) - end -end - --- 任务奖励是否可领取 -function FourteenDayData:canGetTaskReward(id) - return self:isTaskFinish(id) and not self:isReceivedTaskReward(id) -end - --- 任务是否完成 -function FourteenDayData:isTaskFinish(id) - if self:getTaskType(id) ~= nil then - return self:getTaskProgress(id) >= self:getTaskTarget(id) - else - local ids = self:getStageSubTaskIdsSort(self:getTaskStage(id)) - - local isFinish = true - for idx, taskId in ipairs(ids) do - if not self:isTaskFinish(taskId) then - isFinish = false - break - end - end - - return isFinish - end -end - --- 任务奖励是否已领取 -function FourteenDayData:isReceivedTaskReward(id) - return self.tasksStatus[id] and self.tasksStatus[id].claimed or false -end - --- 获取任务进度 -function FourteenDayData:getTaskProgress(id) - if self:getTaskType(id) == GConst.TaskConst.TASK_TYPE.X_PLAYER_LV_REACH then - -- 玩家等级实时处理 - return DataManager.PlayerData:getLv() - end - return self.tasksStatus[id] and self.tasksStatus[id].progress or 0 -end - --- 添加任务进度 -function FourteenDayData:addTaskProgress(taskType, count) - -- Logger.logHighlight("任务进度改变:"..tostring(taskType)..","..tostring(count)) - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - - for id, data in ipairs(self:getTaskCfg()) do - if data.quest == taskType then - if self.tasksStatus[id] == nil then - self.tasksStatus[id] = {} - self.tasksStatus[id].progress = 0 - end - self.tasksStatus[id].progress = self.tasksStatus[id].progress + count - end - end - - self:setDirty() -end - --- 任务奖励领取成功 -function FourteenDayData:onReceivedTaskReward(id) - if self.tasksStatus[id] == nil then - self.tasksStatus[id] = {} - end - - self.tasksStatus[id].claimed = true - self:setDirty() -end - --- 兑换商店-------------------------------------------------------------------------------------------------------------- - --- 是否有兑换红点 -function FourteenDayData:hasExchangeRedPoint() - return not self:getTodayExchangeCheck() -end - -function FourteenDayData:getTodayExchangeCheck() - if self.todayExchangeChecked == nil then - self.todayExchangeChecked = LocalData:getTodayFourteenDayExchangeWatched() - end - return self.todayExchangeChecked -end - -function FourteenDayData:setTodayExchangeCheck() - if self.todayExchangeChecked then - return - else - LocalData:recordTodayFourteenDayExchangeWatched() - end - self.todayExchangeChecked = true - self:setDirty() -end - --- 获取拥有的兑换道具个数 -function FourteenDayData:getExchangeItemNum() - return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_FOURTEEN_DAY_EXCHANGE) -end - --- 获取兑换配置 -function FourteenDayData:getExchangeCfg() - return ConfigManager:getConfig("act_fourteen_exchange") -end - --- 获取显示的id列表 -function FourteenDayData:getExchangeShowIdsSort() - local result = {} - local ids = table.keys(self:getExchangeCfg()) - for index, id in ipairs(ids) do - local sort = id + 10000000000 - - if self:isExchangeUnlock(id) then - sort = sort - 10000000 - end - - if self:getExchangeRemainTime(id) > 0 then - sort = sort - 10000 - end - table.insert(result, {id = id, sort = sort}) - end - - table.sort(result, function (a, b) - return a.sort < b.sort - end) - - return result -end - --- 获取兑换所需最小道具数 -function FourteenDayData:getExchangeMinNum() - local minExchange - for index, data in ipairs(self:getExchangeShowIdsSort()) do - local temp = self:getExchangeCostNum(data.id) - if minExchange == nil or minExchange > temp then - minExchange = temp - end - end - - return minExchange -end - --- 物品是否可以兑换 -function FourteenDayData:canExchange(id) - return self:isExchangeUnlock(id) and self:getExchangeRemainTime(id) > 0 and self:getExchangeItemNum() >= self:getExchangeCostNum(id) -end - --- 兑换物品是否解锁 -function FourteenDayData:isExchangeUnlock(id) - return self:getActiveDays() >= self:getExchangeUnlockCondition(id) -end - --- 兑换物品的解锁条件 -function FourteenDayData:getExchangeUnlockCondition(id) - return self:getExchangeCfg()[id].stage -end - --- 兑换物品剩余兑换次数 -function FourteenDayData:getExchangeRemainTime(id) - return self:getExchangeCfg()[id].limit - (self.exchangeStatus[id] or 0) -end - --- 获取兑换的消耗道具个数 -function FourteenDayData:getExchangeCostNum(id) - return GFunc.getRewardNum(self:getExchangeCfg()[id].cost) -end - -function FourteenDayData:getExchangeCost(id) - return self:getExchangeCfg()[id].cost -end - --- 获取兑换的奖励道具 -function FourteenDayData:getExchangeReward(id) - return self:getExchangeCfg()[id].reward -end - --- 兑换奖励领取成功 -function FourteenDayData:onReceivedExchangeReward(id, count) - count = count or 1 - if self.exchangeStatus[id] == nil then - self.exchangeStatus[id] = 0 - end - - self.exchangeStatus[id] = self.exchangeStatus[id] + count - self:setDirty() -end - --- 礼包---------------------------------------------------------------------------------------------------------------- - --- 是否有礼包红点 -function FourteenDayData:hasGiftRedPoint() - local gifts = DataManager.ShopData:getGiftsByType(PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT) - for id, data in pairs(gifts) do - if data.recharge_id == nil and self:getGiftRemainTime(id) > 0 then - return true - end - end - - return false -end - --- 是否是免费礼包 -function FourteenDayData:isFreeGift(id) - return DataManager.ShopData:getActGiftConfig()[id].recharge_id == nil -end - --- 获取礼包id列表 -function FourteenDayData:getGiftIdsSort() - local gifts = DataManager.ShopData:getGiftsByType(PayManager.PURCHARSE_ACT_TYPE.FOURTEEN_DAY_GIFT) - - local result = {} - local ids = table.keys(gifts) - for index, id in ipairs(ids) do - local sort = id + 10000000000 - - if self:isFreeGift(id) then - sort = sort - 10000000 - end - - if self:getGiftRemainTime(id) > 0 then - sort = sort - 10000 - end - table.insert(result, {id = id, sort = sort}) - end - - table.sort(result, function (a, b) - return a.sort < b.sort - end) - - return result -end - --- 礼包剩余购买次数 -function FourteenDayData:getGiftRemainTime(giftId) - if self:isFreeGift(giftId) then - local giftData = DataManager.ShopData:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) - if giftData and giftData.buy_count > 0 and giftData.latest_buy_at then - if Time:getBeginningOfOneDay(Time:getServerTime()) == Time:getBeginningOfOneDay(giftData.latest_buy_at // 1000) then - return 0 - end - end - return 1 - else - return DataManager.ShopData:getGiftRemainBuyNum(giftId) - end -end - -return FourteenDayData \ No newline at end of file diff --git a/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua.meta b/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua.meta deleted file mode 100644 index cdbca31c..00000000 --- a/lua/app/userdata/activity/fourteen_day/fourteen_day_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: bfb514a5b5b3c8c43a855a2fd5139977 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/full_moon.meta b/lua/app/userdata/activity/full_moon.meta deleted file mode 100644 index b2749106..00000000 --- a/lua/app/userdata/activity/full_moon.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: aaa5662ae70c08140b8b3f2dde2fb87c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/full_moon/full_moon_data.lua b/lua/app/userdata/activity/full_moon/full_moon_data.lua deleted file mode 100644 index 3faf1bd6..00000000 --- a/lua/app/userdata/activity/full_moon/full_moon_data.lua +++ /dev/null @@ -1,625 +0,0 @@ -local FullMoonData = class("FullMoonData", BaseData) - -function FullMoonData:ctor() - self.data.isDirty = false - - self.taskFinished = 0 - self.curHeroGiftChoose = nil - self.taskStatus = GConst.EMPTY_TABLE - self.taskProgReward = GConst.EMPTY_TABLE - self.chapterSkinClaimed = GConst.EMPTY_TABLE -end - -function FullMoonData:clear() - DataManager:unregisterCrossDayFunc("FullMoonData") - DataManager:unregisterTryOpenFunc("FullMoonData") -end - --- 设置活动数据 -function FullMoonData:setActStatus(data) - data = data or GConst.EMPTY_TABLE - - self.startTime = GFunc.formatTimeStep(data.start_at) - self.endTime = GFunc.formatTimeStep(data.end_at) - - if EDITOR_MODE then - Logger.logHighlight("圆月活动开启时间:") - Logger.printTable(data) - end - - if not self:isOpen() then - -- 活动开启 - DataManager:registerTryOpenFunc("FullMoonData", function() - if not self:isOpen() then - return - end - if not self:isOpenTime() then - return - end - - DataManager:unregisterTryOpenFunc("FullMoonData") - ModuleManager.FullMoonManager:reqActData() - end) - end -end - --- 获取活动数据成功 -function FullMoonData:onGetActData(data) - data = data or GConst.EMPTY_TABLE - - self.taskFinished = data.finished or 0-- 任务奖励总计 - self.taskStatus = data.tasks or GConst.EMPTY_TABLE - self.taskProgReward = data.claimed or GConst.EMPTY_TABLE - self.curHeroGiftChoose = data.custom_gift_choose - self.chapterSkinClaimed = data.chapter_skin_claimed or GConst.EMPTY_TABLE - - if self:isOpenTime() then - -- 注册任务进度监听 - for id, data in ipairs(ConfigManager:getConfig("activity_full_moon_quest")) do - ModuleManager.TaskManager:registerTask("FullMoonData", data.type, function(count) - self:addTaskProgress(data.type, count) - end) - end - end - - if EDITOR_MODE then - Logger.logHighlight("圆月活动数据:") - Logger.printTable(data) - end - -- 跨天 - DataManager:registerCrossDayFunc("FullMoonData", function() - if not self:isOpen() then - return - end - if not self:isOpenTime() then - return - end - - self:setInReset(true) - self:setDirty() - end) - - self.isInitedData = true - self:setDirty() -end - -function FullMoonData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function FullMoonData:isOpen() - if GFunc.isShenhe() then - return false - end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then - return false - end - return true -end - --- 是否在活动配置时间内 -function FullMoonData:isOpenTime() - if self.startTime == nil or self.startTime <= 0 then - return false - end - if self.endTime == nil or self.endTime <= 0 then - return false - end - return Time:getServerTime() >= self.startTime and Time:getServerTime() <= self.endTime -end - --- 获取活动开启剩余时间(秒) -function FullMoonData:getStartRemainTime() - if self.startTime == nil or self.startTime <= 0 then - return 0 - end - return self.startTime - Time:getServerTime() -end - --- 获取活动结束剩余时间(秒) -function FullMoonData:getEndRemainTime() - if self.endTime == nil or self.endTime <= 0 then - return 0 - end - return self.endTime - Time:getServerTime() -end - --- 获取需要展示的活动界面 -function FullMoonData:getNeedShowActPanel() - -- 引导其间不处理 - if DataManager.TutorialData:getIsHaveTutorial() then - return nil - end - if not self:isOpen() then - return nil - end - if not self:isOpenTime() then - return nil - end - if not self.isInitedData then - return nil - end - if self.isWatchedActPanel then - return nil - end - - if not self:isAllBoughtSkinGifts() then - return GConst.FullMoonConst.PANEL_TYPE.SKIN - end - - if not self:isAllBoughtNewHeroGifts() then - return GConst.FullMoonConst.PANEL_TYPE.NEW_HERO - end - - if not self:isAllBoughtChooseHeroGifts() then - return GConst.FullMoonConst.PANEL_TYPE.CHOOSE_HERO - end - - if not self:isTaskAllRewardReceived() then - return GConst.FullMoonConst.PANEL_TYPE.TASK - end - - return nil -end - --- 展示活动界面 -function FullMoonData:showActPanel() - self.isWatchedActPanel = true -end - -function FullMoonData:setInReset(isInReset) - self.isInReset = isInReset -end - -function FullMoonData:getIsInReset() - return self.isInReset -end - --- 是否有入口红点 -function FullMoonData:hasEntryRedPoint() - return self:hasTaskRedPoint() -end - --- 任务-------------------------------------------------------------------------------------------------- - --- 是否奖励全领完 -function FullMoonData:isTaskAllRewardReceived() - for index, id in ipairs(self:getTaskListSort()) do - if not self:isReceivedTaskReward(id) then - return false - end - end - - return true -end - --- 是否有任务红点 -function FullMoonData:hasTaskRedPoint() - for index, id in ipairs(table.keys(ConfigManager:getConfig("activity_full_moon_quest"))) do - if self:canGetTaskReward(id) and not self:isReceivedTaskReward(id) then - return true - end - end - - for index, id in ipairs(table.keys(ConfigManager:getConfig("activity_full_moon_reward"))) do - if self:isReachTaskProgressReward(id) and not self:isReceivedTaskProgressReward(id) then - return true - end - end - - return false -end - --- 获取任务完成个数 -function FullMoonData:getTaskFinishNum() - return self.taskFinished -end - --- 获取任务完成总目标个数 -function FullMoonData:getTaskTotalNum() - local max - for id, value in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - if max == nil or max < value.quest then - max = value.quest - end - end - - return max -end - --- 获取下标对应的任务进度奖励id -function FullMoonData:getTaskProgressRewardIdByIndex(index) - for id, value in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - if index == 1 then - return id - end - index = index - 1 - end -end - --- 获取任务进度奖励总个数 -function FullMoonData:getTaskProgressRewardTotalNum() - return table.nums(ConfigManager:getConfig("activity_full_moon_reward")) -end - --- 获取任务进度奖励 -function FullMoonData:getTaskProgressReward(id) - return ConfigManager:getConfig("activity_full_moon_reward")[id].reward -end - --- 获取任务进度目标 -function FullMoonData:getTaskProgressTarget(id) - return ConfigManager:getConfig("activity_full_moon_reward")[id].quest -end - --- 任务进度奖励是否满足领取条件 -function FullMoonData:isReachTaskProgressReward(id) - return self:getTaskFinishNum() >= self:getTaskProgressTarget(id) -end - --- 任务进度奖励是否已领取 -function FullMoonData:isReceivedTaskProgressReward(id) - return self.taskProgReward[id] -end - --- 获取当前定位的任务进度奖励index -function FullMoonData:getCurTaskProgressRewardIndex() - local index = 0 - - for id, data in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - index = index + 1 - if self:isReachTaskProgressReward(id) and not self:isReceivedTaskProgressReward(id) then - return index - end - end - - index = 0 - local curStage = self:getTaskProgressRewardId() - for id, data in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - index = index + 1 - if curStage == id then - return index - end - end - - return nil -end - --- 获取任务奖励阶段id -function FullMoonData:getTaskProgressRewardId() - local finish = self:getTaskFinishNum() - local curId - for id, data in pairs(ConfigManager:getConfig("activity_full_moon_reward")) do - if finish >= data.quest then - curId = id - else - break - end - finish = finish - data.quest - end - - return curId -end - --- 获取今日任务列表 -function FullMoonData:getTaskListSort() - local ids = {} - - for id, data in pairs(self.taskStatus) do - local sort = id + 10000000 - if self:canGetTaskReward(id) and not self:isReceivedTaskReward(id) then - sort = sort - 100000 - end - if self:isReceivedTaskReward(id) then - sort = sort + 100000 - end - table.insert(ids, {id = id, sort = sort}) - end - table.sort(ids, function (a, b) - return a.sort < b.sort - end) - - -- Logger.logHighlight("任务列表排序:") - -- Logger.printTable(ids) - return ids -end - --- 获取任务类型 -function FullMoonData:getTaskType(id) - return ConfigManager:getConfig("activity_full_moon_quest")[id].type -end - --- 获取任务目标 -function FullMoonData:getTaskTarget(id) - return ConfigManager:getConfig("activity_full_moon_quest")[id].number -end - --- 获取任务奖励 -function FullMoonData:getTaskReward(id) - return ConfigManager:getConfig("activity_full_moon_quest")[id].reward -end - --- 获取任务进度 -function FullMoonData:getTaskProgress(id) - if self:getTaskType(id) == GConst.TaskConst.TASK_TYPE.X_PLAYER_LV_REACH then - -- 玩家等级实时处理 - return DataManager.PlayerData:getLv() - end - - return self.taskStatus[id] and self.taskStatus[id].progress or 0 -end - --- 任务是否完成 -function FullMoonData:canGetTaskReward(id) - return self:getTaskProgress(id) >= self:getTaskTarget(id) -end - --- 任务奖励是否已领取 -function FullMoonData:isReceivedTaskReward(id) - if self.taskStatus[id] == nil then - return false - end - - return self.taskStatus[id].claimed -end - --- 添加任务进度 -function FullMoonData:addTaskProgress(taskType, count) - -- Logger.logHighlight("任务进度改变:"..tostring(taskType)..","..tostring(count)) - if not self:isOpen() then - return - end - if not self:isOpenTime() then - return - end - - -- 检查圆月活动任务更新 - if self:getIsInReset() then - ModuleManager.FullMoonManager:reqActData() - end - - for id, data in pairs(self.taskStatus) do - local tt = self:getTaskType(id) - if tt == taskType then - if self.taskStatus[id] == nil then - self.taskStatus[id] = {} - self.taskStatus[id].progress = 0 - end - self.taskStatus[id].progress = self.taskStatus[id].progress + count - end - end - - self:setDirty() -end - --- 领取任务奖励成功 -function FullMoonData:onReceivedTaskReward(id, finished) - self.taskFinished = finished - if self.taskStatus[id] then - self.taskStatus[id].claimed = true - end - self:setDirty() -end - --- 领取任务进度奖励成功 -function FullMoonData:onReceivedTaskProgressReward(id) - self.taskProgReward[id] = true - self:setDirty() -end - --- 英雄自选连购礼包-------------------------------------------------------------------------------------------------- - --- 所有自选英雄礼包都被购买 -function FullMoonData:isAllBoughtChooseHeroGifts() - for index, id in ipairs(self:getChooseHeroGiftIds()) do - if not self:isGiftBought(id) then - return false - end - end - return true -end - --- 获取英雄自选礼包ids -function FullMoonData:getChooseHeroGiftIds() - if self.chooseHeroIds == nil then - self.chooseHeroIds = table.keys(DataManager.ShopData:getGiftsByType(PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_HERO_GIFT)) - table.sort(self.chooseHeroIds) - end - - return self.chooseHeroIds -end - --- 当前所处的英雄礼包 -function FullMoonData:getCurChooseHeroGiftId() - for index, id in pairs(self:getChooseHeroGiftIds()) do - if not self:isGiftBought(id) then - return id - end - end - - return self:getChooseHeroGiftIds()[#self:getChooseHeroGiftIds()] -end - --- 获取当前组礼包ids -function FullMoonData:getCurStepChooseHeroGiftIds() - local ids = self:getChooseHeroGiftIds() - local curId = self:getCurChooseHeroGiftId() - local result = {} - local step = 1 - - local idx = 0 - for index, value in ipairs(GConst.FullMoonConst.HERO_GIFT_SHOW_STEP) do - result[index] = {} - for i = 1, value do - idx = idx + 1 - if curId == ids[idx] then - step = index - end - if ids[idx] then - table.insert(result[index], ids[idx]) - end - end - end - - return result[step] -end - --- 当前自选英雄的下标 -function FullMoonData:getChooseHeroIndex() - if not self.curHeroGiftChoose or self.curHeroGiftChoose <= 0 then - return nil - end - return self.curHeroGiftChoose -end - --- 获取固定奖励 -function FullMoonData:getFixedRewards(id) - return DataManager.ShopData:getActGiftConfig()[id].reward -end - --- 获取自选奖励 -function FullMoonData:getChooseRewards(id, isAll) - local rewards = {} - - if not isAll then - for index, reward in ipairs(DataManager.ShopData:getActGiftConfig()[id].choose_reward) do - local info = ConfigManager:getConfig("item")[reward.id] - if info.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then - if DataManager.HeroData:getHeroIsActive(info.parameter) then - table.insert(rewards, reward) - end - end - end - else - rewards = DataManager.ShopData:getActGiftConfig()[id].choose_reward - end - - return rewards -end - --- 获取可选择的自选奖励下标对应的全部自选奖励下标 -function FullMoonData:getChooseRewardsIndexByCanChooseIndex(index) - local selectReward = self:getChooseRewards(self:getCurChooseHeroGiftId())[index] - local result = {} - for idx, reward in ipairs(self:getChooseRewards(self:getCurChooseHeroGiftId(), true)) do - if reward == selectReward then - return idx - end - end - - Logger.logError("未找到"..index) - return result -end - --- 自选成功 -function FullMoonData:onChooseHeroSuccess(index) - self.curHeroGiftChoose = index - self:setDirty() -end - --- 新英雄连购礼包-------------------------------------------------------------------------------------------------- - --- 所有新英雄礼包都被购买 -function FullMoonData:isAllBoughtNewHeroGifts() - for index, id in ipairs(self:getNewHeroGiftIds()) do - if not self:isGiftBought(id) then - return false - end - end - return true -end - --- 获取新英雄礼包ids -function FullMoonData:getNewHeroGiftIds() - if self.newHeroIds == nil then - self.newHeroIds = table.keys(DataManager.ShopData:getGiftsByType(PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_NEW_HERO_GIFT)) - table.sort(self.newHeroIds) - end - - return self.newHeroIds -end - --- 当前所处的新英雄礼包 -function FullMoonData:getCurNewHeroGiftId() - for index, id in pairs(self:getNewHeroGiftIds()) do - if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) == 0 then - return id - end - end - - return self:getNewHeroGiftIds()[#self:getNewHeroGiftIds()] -end - --- 获取当前组礼包ids -function FullMoonData:getCurStepNewHeroGiftIds() - local ids = self:getNewHeroGiftIds() - local curId = self:getCurNewHeroGiftId() - local result = {} - local step = 1 - - local idx = 0 - for index, value in ipairs(GConst.FullMoonConst.HERO_GIFT_SHOW_STEP) do - result[index] = {} - for i = 1, value do - idx = idx + 1 - if curId == ids[idx] then - step = index - end - if ids[idx] then - table.insert(result[index], ids[idx]) - end - end - end - - return result[step] -end - --- 皮肤礼包-------------------------------------------------------------------------------------------------- - --- 所有皮肤礼包都被购买 -function FullMoonData:isAllBoughtSkinGifts() - for index, id in ipairs(table.keys(DataManager.ShopData:getGiftsByType(PayManager.PURCHARSE_ACT_TYPE.FULL_MOON_SKIN_GIFT))) do - if not self:isGiftBought(id) then - return false - end - end - return true -end - --- 皮肤礼包剩余购买次数 -function FullMoonData:getSkinGiftRemainBuyNum(id) - return DataManager.ShopData:getGiftRemainBuyNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) -end - --- 获取皮肤挑战首通奖励 -function FullMoonData:getSkinFirstChallengeReward(id) - return ConfigManager:getConfig("chapter_new_skin_fight")[id].reward[1] -end - --- 皮肤挑战首通奖励是否已领取 -function FullMoonData:isReceivedSkinFirstChallengeReward(id) - return self.chapterSkinClaimed[id] -end - --- 设置当前皮肤挑战关卡id -function FullMoonData:setCurSkinChallengeId(id) - self.curSkinChallengeId = id -end - --- 获取当前皮肤挑战关卡id -function FullMoonData:getCurSkinChallengeId() - return self.curSkinChallengeId -end - --- 皮肤挑战奖励领取成功 -function FullMoonData:onReceivedSkinChallengeReward(id) - self.chapterSkinClaimed[id] = true - self:setDirty() -end - --- 礼包是否已购买 -function FullMoonData:isGiftBought(id) - return DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, id) > 0 -end - -return FullMoonData \ No newline at end of file diff --git a/lua/app/userdata/activity/full_moon/full_moon_data.lua.meta b/lua/app/userdata/activity/full_moon/full_moon_data.lua.meta deleted file mode 100644 index d4be7b7f..00000000 --- a/lua/app/userdata/activity/full_moon/full_moon_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 26e9c0c4a4691ed41a638980ce937de9 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/gold_pig.meta b/lua/app/userdata/activity/gold_pig.meta deleted file mode 100644 index e45fb533..00000000 --- a/lua/app/userdata/activity/gold_pig.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1f9faf25e847f994892adf3d644b9969 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua b/lua/app/userdata/activity/gold_pig/gold_pig_data.lua deleted file mode 100644 index c4b655e3..00000000 --- a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua +++ /dev/null @@ -1,256 +0,0 @@ -local GoldPigData = class("GoldPigData", BaseData) - -function GoldPigData:ctor() - self.data.dirty = false - self.data.boughtFlag = false -end - -function GoldPigData:clear() - DataManager:unregisterDataCd("GoldPigData") -end - -function GoldPigData:init(data, initOnLogin) - data = data or GConst.EMPTY_TABLE - self.data.id = data.current_id or 0 - if self.data.id == 0 then - self.data.id = self:getFirstLevelId() - end - self.data.count = data.add_diamond or 0 - self.lastCount = self.data.count - self.data.goldCount = data.add_gold or 0 - self.lastGoldCount = self.data.goldCount - self.maxCount = self:getMaxCount() - self.data.fullTime = (data.full_at or 0) // 1000 - self.data.buyTime = (data.buy_at or 0) // 1000 - self.endTime = 0 - self.nextShowTime = 0 - self.popFlag = false - DataManager:unregisterDataCd("GoldPigData") - self:checkOpen() - if not initOnLogin then - self:markDirty() - end -end - -function GoldPigData:onBought(data) - self:init(data) - self.data.boughtFlag = not self.data.boughtFlag -end - -function GoldPigData:markDirty() - self.data.dirty = not self.data.dirty -end - -function GoldPigData:checkOpen() - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.GOLD_PIG, true) then - self.data.isOpen = false - return - end - local initialCount = self:getInitialCount() - if self.data.count <= initialCount then -- 激活后一定大于初始值,否则说明还没开 - self.data.isOpen = false - local nextShowTime1 = 0 - if self.data.buyTime > 0 then - nextShowTime1 = self.data.buyTime + self:getBoughtCD() - end - local nextShowTime2 = 0 - if self.data.fullTime > 0 then - nextShowTime2 = self.data.fullTime + self:getDuration() + self:getTimeOverCD() - end - if nextShowTime1 == 0 then - self.nextShowTime = nextShowTime2 - elseif nextShowTime2 == 0 then - self.nextShowTime = nextShowTime1 - else - if self.data.buyTime > self.data.fullTime then - self.nextShowTime = nextShowTime1 - else - self.nextShowTime = nextShowTime2 - end - end - elseif self.data.count >= self.maxCount then -- 满了 - self.endTime = self.data.fullTime + self:getDuration() - self.nextShowTime = self.endTime + self:getTimeOverCD() - if Time:getServerTime() >= self.endTime then -- 超过时间该消失了 - self.data.isOpen = false - self:levelDown() - else - self.data.isOpen = true - DataManager:registerDataCd("GoldPigData") - end - else - self.data.isOpen = true - end -end - -function GoldPigData:getId() - return self.data.id -end - -function GoldPigData:getIsOpen() - if GFunc.isShenhe() then - return false - end - return self.data.isOpen -end - -function GoldPigData:getPopFlag() - if not self:getIsOpen() then - return false - end - return self.popFlag -end - -function GoldPigData:markPop() - self.popFlag = false -end - -function GoldPigData:addGoldPigCount() - if not self.data.isOpen and not self:tryActiveGoldPig() then - return - end - local info = self:getCurrLevelInfo() - if info == nil then - return - end - if self.data.count >= info.max_diamond then -- 已经满了 - self.lastCount = self.data.count - self.lastGoldCount = self.data.goldCount - return - end - self.lastCount = self.data.count - self.lastGoldCount = self.data.goldCount - self.data.count = self.data.count + info.battle_diamond - self.data.goldCount = self.data.goldCount + info.battle_gold - if self.data.count >= info.max_diamond then -- 满了 - self.data.count = info.max_diamond - self.data.fullTime = Time:getServerTime() - self.endTime = self.data.fullTime + self:getDuration() - self.nextShowTime = self.endTime + self:getTimeOverCD() - self.popFlag = true - DataManager:registerDataCd("GoldPigData") - end -end - -function GoldPigData:tryActiveGoldPig() - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.GOLD_PIG, true) then - return false - end - if self.nextShowTime > 0 and Time:getServerTime() < self.nextShowTime then - return false - end - self.data.isOpen = true - return true -end - -function GoldPigData:getLastCount() - return self.lastCount -end - -function GoldPigData:getCount() - return self.data.count -end - -function GoldPigData:getGoldCount() - return self.data.goldCount -end - -function GoldPigData:getIsFull() - return self.data.count >= self.maxCount -end - -function GoldPigData:getInitialCount() - local info = self:getCurrLevelInfo() - if info == nil then - return 1 - end - return info.min_diamond -end - -function GoldPigData:getMaxCount() - local info = self:getCurrLevelInfo() - if info == nil then - return 1 - end - return info.max_diamond -end - -function GoldPigData:getRechargeId() - local info = self:getCurrLevelInfo() - if info == nil then - return 0 - end - return info.recharge_id -end - -function GoldPigData:getFirstLevelId() - if self.firstLevelId == nil then - self.firstLevelId = ConfigManager:getConfig("const")["act_gold_pig_first_id"].value - end - return self.firstLevelId -end - -function GoldPigData:getTimeOverCD() - if self.timeOverCD == nil then - self.timeOverCD = ConfigManager:getConfig("const")["act_gold_pig_cd"].value * 3600 - end - return self.timeOverCD -end - -function GoldPigData:getBoughtCD() - if self.boughtCD == nil then - self.boughtCD = ConfigManager:getConfig("const")["act_gold_pig_buy_cd"].value * 3600 - end - return self.boughtCD -end - -function GoldPigData:getCfg() - if self.cfg == nil then - self.cfg = ConfigManager:getConfig("act_gold_pig") - end - return self.cfg -end - -function GoldPigData:getDuration() - if self.duration == nil then - self.duration = ConfigManager:getConfig("const")["act_gold_pig_full_cd"].value * 3600 - end - return self.duration -end - -function GoldPigData:getCurrLevelInfo() - local cfg = self:getCfg() - return cfg[self.data.id] -end - -function GoldPigData:levelDown() - local levelInfo = self:getCurrLevelInfo() - self.data.id = levelInfo.before_id - - local currLevelInfo = self:getCurrLevelInfo() - self.data.count = currLevelInfo.min_diamond - self.data.goldCount = currLevelInfo.min_gold - self.lastCount = self.data.count - self.lastGoldCount = self.data.goldCount - self.maxCount = self:getMaxCount() - self.popFlag = false -end - -function GoldPigData:getEndTime() - return self.endTime -end - -function GoldPigData:updateCd() - if not self.data.isOpen then - DataManager:unregisterDataCd("GoldPigData") - return - end - if self.endTime > 0 and Time:getServerTime() > self.endTime then -- 到时间该消失了 - DataManager:unregisterDataCd("GoldPigData") - self:levelDown() - self.data.isOpen = false - self:markDirty() - end -end - -return GoldPigData \ No newline at end of file diff --git a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua.meta b/lua/app/userdata/activity/gold_pig/gold_pig_data.lua.meta deleted file mode 100644 index 3a12c2ee..00000000 --- a/lua/app/userdata/activity/gold_pig/gold_pig_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f25fb374307a0744fbe9ea15052f86c5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/hero_fund.meta b/lua/app/userdata/activity/hero_fund.meta deleted file mode 100644 index 4399e0f4..00000000 --- a/lua/app/userdata/activity/hero_fund.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8c5f86b5807abb346a0327f5b30d1623 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua deleted file mode 100644 index 2f99f456..00000000 --- a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua +++ /dev/null @@ -1,387 +0,0 @@ -local HeroFundData = class("HeroFundData", BaseData) - -local PRO_ACT_ID = 140403 -local UTRAL_ACT_ID = 140404 -local OPEN_AT_DAY = 3 -local OPEN_DAY = 7 - -HeroFundData.REWARD_TYPE = { - FREE = 1, - PRO = 2, - UTRAL = 3 -} - -function HeroFundData:ctor() - self:clear() -end - -function HeroFundData:clear() - self.data.isDirty = false - self.waveCount = 0 -- 波次 - self.waveLevel = 0 -- 波次等级 可领的最高等级 - self.freeLevel = 0 -- 免费领取过的等级 - self.proLevel = 0 -- 付费1领取过的等级 - self.utralLevel = 0 -- 付费2领取过的等级 - self.free_awarded = {} -- 领取过的免费id - self.pay_low_awarded = {} -- 领取过的付费1id - self.pay_high_awarded = {} -- 领取过的付费2id - self.proBounght = false -- 付费1已购买 - self.utralBounght = false -- 付费2已购买 - self.waveLevelList = {} -- 缓存波次等级 - self.waveLevelListCount = 0 -- 缓存最大等级 - self.endTime = 0 -- 活动结束时间 - - DataManager:unregisterCrossDayFunc("HeroFundData") - DataManager:unregisterTryOpenFunc("HeroFundData") -end - -function HeroFundData:init(data) - data = data or {} - self.waveCount = data.total_wave or 0 - self.endTime = 0 - if data.open_at and data.open_at > 0 then - self.endTime = GFunc.formatTimeStep(data.open_at) + (OPEN_DAY + 1) * 86400 - end - - if data.funds then - if data.funds.free_awarded then - for _, id in ipairs(data.funds.free_awarded) do - self:setFreeGot(id) - end - end - - if data.funds.pay_low_awarded then - for _, id in ipairs(data.funds.pay_low_awarded) do - self:setProGot(id) - end - end - - if data.funds.pay_high_awarded then - for _, id in ipairs(data.funds.pay_high_awarded) do - self:setUtralGot(id) - end - end - end - - local cfg = self:getConfig() - self.waveLevelListCount = 0 - for id, info in ipairs(cfg) do - self.waveLevelList[id] = info.exp - self.waveLevelListCount = self.waveLevelListCount + 1 - end - - for id = 1, self.waveLevelListCount do - local wave = self.waveLevelList[id] - if wave and wave <= self.waveCount then - self.waveLevel = id - else - break - end - end - - self.proBounght = false - self:getProBought() - - self.utralBounght = false - self:getUtralBought() - - self:initTaskListener() - - if self.endTime ~= 0 then -- 开过了 - return - end - - DataManager:registerTryOpenFunc("HeroFundData", function() - if self.endTime ~= 0 then - return - end - - if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - local time = Time:getServerTime() - local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs()) - if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then - self.endTime = time + (OPEN_DAY + 1) * 86400 - end - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) - self:setDirty() - DataManager:unregisterTryOpenFunc("HeroFundData") - end - end) - - DataManager:registerCrossDayFunc("HeroFundData", function() - if self.endTime ~= 0 then -- 开过了 - return - end - - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - return - end - - local time = Time:getServerTime() - local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs()) - if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then - self.endTime = time + (OPEN_DAY + 1) * 86400 - end - EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) - self:setDirty() - end) -end - -function HeroFundData:getConfig() - return ConfigManager:getConfig("activity_herofund") -end - -function HeroFundData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function HeroFundData:getIsOpen() - if GFunc.isShenhe() then - return false - end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - return false - end - - if self.endTime <= 0 then - return false - end - - return self.endTime > Time:getServerTime() -end - -function HeroFundData:getRemainTime() - local remian = math.max(0, self.endTime - Time:getServerTime()) - return remian -end - -function HeroFundData:getWaveLevel() - return self.waveLevel or 0 -end - -function HeroFundData:getLevelWave(level) - return self.waveLevelList[level] or 0 -end - -function HeroFundData:addWaveCount(count) - self.waveCount = self.waveCount + count - - local nextLevel = self.waveLevel + 1 - if self.waveLevelList[nextLevel] and self.waveCount >= self.waveLevelList[nextLevel] then -- 升级了 - for id = nextLevel, self.waveLevelListCount do - local wave = self.waveLevelList[id] - if wave and wave <= self.waveCount then - self.waveLevel = id - else - break - end - end - end - - self:setDirty() -end - -function HeroFundData:getWaveCount() - return self.waveCount or 0 -end - -function HeroFundData:getFreeGot(level) - return self.free_awarded[level] -end - -function HeroFundData:setFreeGot(level) - if not self.free_awarded[level] then - self.freeLevel = self.freeLevel + 1 - end - self.free_awarded[level] = true -end - -function HeroFundData:getProActId() - return PRO_ACT_ID -end - -function HeroFundData:getProPrice() - local cfg = ConfigManager:getConfig("act_gift")[PRO_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function HeroFundData:getProGot(level) - return self.pay_low_awarded[level] -end - -function HeroFundData:setProGot(level) - if not self.pay_low_awarded[level] then - self.proLevel = self.proLevel + 1 - end - self.pay_low_awarded[level] = true -end - -function HeroFundData:getProBought() - if not self.proBounght then - if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, PRO_ACT_ID) > 0 then - self.proBounght = true - end - end - - return self.proBounght -end - -function HeroFundData:setProBought() - self.proBounght = true - self:setDirty() -end - -function HeroFundData:getUtralActId() - return UTRAL_ACT_ID -end - -function HeroFundData:gettUtralPrice() - local cfg = ConfigManager:getConfig("act_gift")[UTRAL_ACT_ID] - if not cfg then - return GConst.EMPTY_STRING - end - return GFunc.getFormatPrice(cfg.recharge_id) -end - -function HeroFundData:getUtralGot(level) - return self.pay_high_awarded[level] -end - -function HeroFundData:setUtralGot(level) - if not self.pay_high_awarded[level] then - self.utralLevel = self.utralLevel + 1 - end - self.pay_high_awarded[level] = true -end - -function HeroFundData:getUtralBought() - if not self.utralBounght then - if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, UTRAL_ACT_ID) > 0 then - self.utralBounght = true - end - end - return self.utralBounght -end - -function HeroFundData:setUtralBought() - self.utralBounght = true - self:setDirty() -end - -function HeroFundData:gotReward(heroIdWithLv) - if not heroIdWithLv then - return - end - - for _, info in ipairs(heroIdWithLv) do - if info.grade == 0 then - self:setFreeGot(info.id) - elseif info.grade == 1 then - self:setProGot(info.id) - elseif info.grade == 2 then - self:setUtralGot(info.id) - end - end - - self:setDirty() -end - -function HeroFundData:getFreeCanGet(level) - if self:getFreeGot(level) then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function HeroFundData:getProCanGet(level) - if self:getProGot(level) then - return false - end - - if not self.proBounght then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function HeroFundData:getUtralCanGet(level) - if self:getUtralGot(level) then - return false - end - - if not self.utralBounght then - return false - end - - if self.waveLevel < level then - return false - end - - return true -end - -function HeroFundData:getHaveReward() - if self.freeLevel < self.waveLevel then - return true - end - - if self.proBounght then - if self.proLevel < self.waveLevel then - return true - end - end - - if self.utralBounght then - if self.utralLevel < self.waveLevel then - return true - end - end - - return false -end - -function HeroFundData:getReward(level, rewardType) - local cfg = self:getConfig()[level] - if not cfg then - return - end - - if rewardType == HeroFundData.REWARD_TYPE.FREE then - return cfg.reward - elseif rewardType == HeroFundData.REWARD_TYPE.PRO then - return cfg.reward_pro - elseif rewardType == HeroFundData.REWARD_TYPE.UTRAL then - return cfg.reward_pro_max - end -end - -function HeroFundData:initTaskListener() - local nowTime = Time:getServerTime() - -- 活动结束就不用监听了 - if self.endTime > 0 and self.endTime < nowTime then - ModuleManager.TaskManager:unRegisterAllModuleTask("HeroFundData") - return false - end - - ModuleManager.TaskManager:registerTask("HeroFundData", GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, function(count) - if not self:getIsOpen() then - return - end - self:addWaveCount(count) - end) -end - -return HeroFundData \ No newline at end of file diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta deleted file mode 100644 index e37873dc..00000000 --- a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4ff7774557580a94bbc8207796f61ece -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/seven_day.meta b/lua/app/userdata/activity/seven_day.meta deleted file mode 100644 index f8c69467..00000000 --- a/lua/app/userdata/activity/seven_day.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 94af4a46c89697843a6f28e41e14a7e8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/seven_day/seven_day_data.lua.meta b/lua/app/userdata/activity/seven_day/seven_day_data.lua.meta deleted file mode 100644 index f76e4484..00000000 --- a/lua/app/userdata/activity/seven_day/seven_day_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 0e7a1584508c3f64dba2bdf419b1ddf5 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/tourn_arena.meta b/lua/app/userdata/activity/tourn_arena.meta deleted file mode 100644 index 5e1c9e09..00000000 --- a/lua/app/userdata/activity/tourn_arena.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a333fbe6fb2c2ed43aac6d319fb913fa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua b/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua deleted file mode 100644 index c77713cf..00000000 --- a/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua +++ /dev/null @@ -1,620 +0,0 @@ -local TournArenaData = class("TournArenaData", BaseData) - -function TournArenaData:ctor() - self.data.isDirty = false - - self.bountyLevel = 1 - self.bountyExp = 0 - self.bountyCollected = {} - self.rankStep = 1 - self.rankStepEndTime = 0 - self.rankCollected = {} -end - -function TournArenaData:clear() - DataManager:unregisterTryOpenFunc("TournArenaData") - DataManager:unregisterCrossDayFunc("TournArenaData") -end - --- 设置活动数据 -function TournArenaData:setActStatus(data) - data = data or GConst.EMPTY_TABLE - - self.actId = data.id - self.startTime = GFunc.formatTimeStep(data.start_at) - self.endTime = GFunc.formatTimeStep(data.end_at) - - if EDITOR_MODE then - Logger.logHighlight("竞技场锦标赛活动开启时间:") - Logger.printTable(data) - end - - if not self:isOpen() then - -- 活动开启 - DataManager:registerTryOpenFunc("TournArenaData", function() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - - DataManager:unregisterTryOpenFunc("TournArenaData") - ModuleManager.TournArenaManager:reqActData() - end) - end -end - --- 获取活动数据成功 -function TournArenaData:onGetActData(data) - data = data or GConst.EMPTY_TABLE - if EDITOR_MODE then - Logger.logHighlight("竞技场锦标赛活动数据:") - Logger.printTable(data) - end - - -- 战令 - self.bountyLevel = data.level or 1 - self.bountyExp = data.exp or 0 - self.bountyCollected = data.collected or {} - -- 排行榜 - self.rankStep = data.present_turn or 1 - self.rankStepEndTime = GFunc.formatTimeStep(data.turn_end_at) or 0 - self.rankCollected = data.rank_reward_claimed or {} - - -- 跨天 - DataManager:registerCrossDayFunc("TournArenaData", function() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - - self.rankStep = self:isFinalDay() and 0 or self.rankStep + 1 - self.rankStepEndTime = self:isFinalDay() and -1 or (self.rankStepEndTime + 86400 * 2) - self.ranks = nil - self:setInReset(true) - self:setDirty() - end) - - self:setDirty() -end - -function TournArenaData:setInReset(isInReset) - self.isInReset = isInReset -end - -function TournArenaData:getIsInReset() - return self.isInReset -end - -function TournArenaData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function TournArenaData:isOpen() - if GFunc.isShenhe() then - return false - end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then - return false - end - if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到 - return false - end - return true -end - --- 是否在活动配置时间内 -function TournArenaData:isActiveTime() - if self.startTime == nil or self.startTime <= 0 then - return false - end - if self.endTime == nil or self.endTime <= 0 then - return false - end - return Time:getServerTime() >= self.startTime and Time:getServerTime() <= self.endTime -end - --- 获取活动开启剩余时间(秒) -function TournArenaData:getStartRemainTime() - if self.startTime == nil or self.startTime <= 0 then - return 0 - end - return self.startTime - Time:getServerTime() -end - --- 获取活动结束剩余时间(秒) -function TournArenaData:getEndRemainTime() - if self.endTime == nil or self.endTime <= 0 then - return 0 - end - return self.endTime - Time:getServerTime() -end - --- 是否是活动最后一天 -function TournArenaData:isFinalDay() - return self:getEndRemainTime() <= 86400 -end - --- 当前为活动第几天 -function TournArenaData:getActDay() - local days = Time:getDistanceDays(self.startTime) - if days < 0 then - days = -days - end - return days + 1 -end - -function TournArenaData:getConditionDay() - if not self.conditionDay then - self.conditionDay = GFunc.getConstIntValue('activity_recurring_day') - self.conditionDay = (self.conditionDay - 1) * 86400 - end - - return self.conditionDay -end - --- 是否有入口红点 -function TournArenaData:hasEntryRedPoint() - return self:hasBountyRedPoint() or self:hasRankRedPoint() or self:hasGiftRedPoint() -end - --- 战令-------------------------------------------------------------------------------------------------- - --- 是否有战令红点 -function TournArenaData:hasBountyRedPoint() - if self:getFirstCanGetBountyRewardLevel() ~= nil then - return true - end - - return false -end - --- 获取首个可领取奖励的战令等级 -function TournArenaData:getFirstCanGetBountyRewardLevel() - local curLevel = self:getBountyLevel() - - for level, data in ipairs(self:getBountyIdList()) do - if level > curLevel then - break - end - - if self:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE) then - return true - end - if self:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1) then - return true - end - if self:canGetBountyReward(level, GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2) then - return true - end - end - - return nil -end - --- -function TournArenaData:getBountyIdList() - if not self.bountyIdList then - self.bountyIdList = GFunc.getTable(DataManager:getActivityBountyLevelByActId(self.actId) or {}) - table.sort(self.bountyIdList, function(a, b) - return a < b - end) - end - return self.bountyIdList -end - --- 获取对应等级的配置 -function TournArenaData:getBountyCfgByLevel(level) - return ConfigManager:getConfig("activity_bounty_level")[self:getBountyIdList()[level]] -end - --- 获取战令档位礼包配置 -function TournArenaData:getBountyGradeGiftCfg(gradeType) - if gradeType == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1 then - return DataManager.ShopData:getActGiftConfig()[GConst.TournArenaConst.BOUNTY_GIFT_ID_1] - elseif gradeType == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2 then - return DataManager.ShopData:getActGiftConfig()[GConst.TournArenaConst.BOUNTY_GIFT_ID_2] - end -end - --- 战令档位是否已解锁 -function TournArenaData:isBountyGradeUnlock(grade) - local giftId - if grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE then - return true - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1 then - giftId = GConst.TournArenaConst.BOUNTY_GIFT_ID_1 - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2 then - giftId = GConst.TournArenaConst.BOUNTY_GIFT_ID_2 - end - - local giftData = DataManager.ShopData:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) - if giftData and giftData.buy_count > 0 and giftData.latest_buy_at then - local time = giftData.latest_buy_at // 1000 - if time > self.startTime and time < self.endTime then - return true - end - end - return false -end - --- 战令最大等级 -function TournArenaData:getBountyMaxLevel() - return #self:getBountyIdList() -end - --- 获取当前战令等级 -function TournArenaData:getBountyLevel() - if self.bountyLevel <= self:getBountyMaxLevel() then - return self.bountyLevel - else - return self:getBountyMaxLevel() - end -end - --- 获取当前等级战令积分 -function TournArenaData:getBountyLevelScore() - return self.bountyExp -end - --- 获取当前总积分 -function TournArenaData:getBountyTotalScore() - return self:getBountyLevelScore() + (self:getBountyCfgByLevel(self:getBountyLevel()).exp or 0) -end - --- 获取等级所需总积分 -function TournArenaData:getLevelTotalScore(level) - local cfg = self:getBountyCfgByLevel(level) - return cfg and cfg.exp or 0 -end - --- 是否满足购买战令等级的条件 -function TournArenaData:canBuyBountyLevel() - if self:getBountyLevel() >= self:getBountyMaxLevel() then - return false - end - - local intervalDay = Time:getDistanceDays(self.endTime) - if intervalDay < 0 then - intervalDay = -intervalDay - end - return intervalDay <= 1 -end - --- 购买战令等级的消耗 -function TournArenaData:getBuyBountyLevelCost() - return GFunc.getConstReward("activity_bounty_cost") -end - --- 获取战令档位奖励 -function TournArenaData:getBountyGradeReward(level, grade) - local cfg = self:getBountyCfgByLevel(level) - local result - if cfg then - if grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE then - result = cfg.reward - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1 then - result = cfg.reward_pro - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2 then - result = cfg.reward_pro_max - end - end - return result -end - --- 战令奖励可领取 -function TournArenaData:canGetBountyReward(level, grade) - return self:isReachBountyReward(level, grade) and not self:isReceivedBountyReward(level, grade) -end - --- 战令奖励是否满足领取条件 -function TournArenaData:isReachBountyReward(level, grade) - local curLevel = self:getBountyLevel() - if curLevel >= level then - return self:isBountyGradeUnlock(grade) - else - return false - end -end - --- 战令奖励是否已领取 -function TournArenaData:isReceivedBountyReward(level, grade) - local id = self:getBountyIdList()[level] - if self.bountyCollected[id] == nil then - return false - end - - if grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE then - return self.bountyCollected[id].normal - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1 then - return self.bountyCollected[id].superior - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2 then - return self.bountyCollected[id].superior_max - end -end - --- 获取奖励档位收集进度 -function TournArenaData:getBountyProgress(level) - local cur = self:getBountyTotalScore() - local rangeMin = self:getBountyLevelRangeMin(level) - local rangeMax = self:getBountyLevelRangeMax(level) - -- Logger.logHighlight(level.."范围:"..rangeMin.."->"..rangeMax) - - if cur >= rangeMax then - -- 超过进度条 - return 1 - elseif cur < rangeMin then - --低于进度条 - return -1 - elseif cur == rangeMin then - -- 进度最低值 - return 0 - else - -- 在进度条范围内 - return (cur - rangeMin) / (rangeMax - rangeMin) - end -end - --- 获取档位范围最低值 -function TournArenaData:getBountyLevelRangeMin(level) - local rangeMin = 0 - local curScore = self:getLevelTotalScore(level) - local lastScore = self:getLevelTotalScore(level - 1) - if lastScore > 0 then - rangeMin = curScore - math.floor((curScore - lastScore) / 2) - else - rangeMin = curScore / 2 - end - return rangeMin -end - --- 获取档位范围最高值 -function TournArenaData:getBountyLevelRangeMax(level) - local rangeMax = 0 - local curScore = self:getLevelTotalScore(level) - local nextScore = self:getLevelTotalScore(level + 1) - if nextScore > 0 then - rangeMax = curScore + math.floor((nextScore - curScore) / 2) - else - rangeMax = curScore - end - return rangeMax -end - --- 战令奖励领取成功 -function TournArenaData:onReceivedBountyReward(successMap) - for id, grade in pairs(successMap) do - if self.bountyCollected[id] == nil then - self.bountyCollected[id] = {} - end - - if grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.FREE then - self.bountyCollected[id].normal = true - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY1 then - self.bountyCollected[id].superior = true - elseif grade == GConst.TournArenaConst.BOUNTY_GRADE_TYPE.PAY2 then - self.bountyCollected[id].superior_max = true - end - end - - self:setDirty() -end - --- 解锁战令等级成功 -function TournArenaData:onBoughtBountyLevel() - self.bountyLevel = self.bountyLevel + 1 - self:setDirty() -end - --- 排行榜-------------------------------------------------------------------------------------------------- - --- 是否有排行榜红点 -function TournArenaData:hasRankRedPoint() - for rank, id in ipairs(self:getRankIdList()) do - if self:isReachRankReward(rank) and not self:isReceivedRankReward(rank) then - return true - end - end - - return false -end - --- -function TournArenaData:getRankIdList() - if not self.rankIdList then - self.rankIdList = GFunc.getTable(DataManager:getActivityRankByActId(self.actId) or {}) - table.sort(self.rankIdList, function(a, b) - return a < b - end) - end - return self.rankIdList -end - --- 获取排行榜的配置 -function TournArenaData:getRankCfgByIndex(index) - return ConfigManager:getConfig("activity_rank")[self:getRankIdList()[index]] -end - --- 活动总轮次数 -function TournArenaData:getTotalTurnCount() - local totalTime = self.endTime - self.startTime - local day = totalTime / 86400 - - return math.floor(day / GConst.TournWaveConst.PRESENT_TURN_DAY) -end - --- 获取当前排行榜阶段 -function TournArenaData:getCurRankStep() - return self.rankStep -end - --- 获取排名相应的奖励 -function TournArenaData:getRewardByRank(rank) - for index, id in ipairs(self:getRankIdList()) do - local cfg = ConfigManager:getConfig("activity_rank")[id] - if rank >= cfg.ranking[1] and rank <= cfg.ranking[2] then - return cfg.reward - end - end - return nil -end - --- 获取当前排行榜阶段剩余时间 -function TournArenaData:getCurRankStepRemainTime() - return self.rankStepEndTime - Time:getServerTime() -end - --- 获取排行榜数据 -function TournArenaData:getRankListData(step) - if self.ranks == nil then - return nil - end - - return self.ranks[step] and self.ranks[step].ranks or {} -end - --- 获取自己的排名 -function TournArenaData:getSelfRank(step) - if self.ranks == nil or self.ranks[step] == nil then - return 0 - end - - return self.ranks[step].ownRank -end - --- 获取自己的积分 -function TournArenaData:getSelfScore(step) - if self.ranks == nil or self.ranks[step] == nil then - return 0 - end - - return self.ranks[step].ownSorce -end - --- 是否满足段位奖励条件 -function TournArenaData:isReachRankReward() - if self:getCurRankStep() == 1 then - return false - end - - local lastRank - if self:isFinalDay() then - lastRank = self:getSelfRank(self:getTotalTurnCount()) - else - lastRank = self:getSelfRank(self:getCurRankStep() - 1) - end - - if lastRank and lastRank <= 0 then - return false - end - return not self:isReceivedRankReward() -end - --- 是否已领取段位奖励 -function TournArenaData:isReceivedRankReward() - if self:getCurRankStep() == 1 then - return false - end - - local lastStep - if self:isFinalDay() then - lastStep = self:getTotalTurnCount() - else - lastStep = self:getCurRankStep() - 1 - end - - return self.rankCollected[lastStep] or false -end - --- 获取排行榜数据成功 -function TournArenaData:onGetRankData(step, ranks, score, ownRank) - if self.ranks == nil then - self.ranks = {} - end - self.ranks[step] = {ownRank = ownRank, ownSorce = score, ranks = ranks} - - self:setDirty() -end - --- 领取排名奖励成功 -function TournArenaData:onReceivedRankReward() - local lastStep - if self:isFinalDay() then - lastStep = self:getTotalTurnCount() - else - lastStep = self:getCurRankStep() - 1 - end - - self.rankCollected[lastStep] = true - - self:setDirty() -end - - --- 礼包--------------------------------------------------------------------------------------------------- - --- 是否有礼包红点 -function TournArenaData:hasGiftRedPoint() - local ids = GConst.TournArenaConst.GIFT_IDS - for index, id in pairs(ids) do - if self:isFreeGift(id) and self:getGiftRemainTime(id) > 0 then - return true - end - end - - return false -end - --- 获取礼包配置 -function TournArenaData:getGiftCfg(giftId) - return DataManager.ShopData:getActGiftConfig()[giftId] -end - --- 是否是免费礼包 -function TournArenaData:isFreeGift(id) - return DataManager.ShopData:getActGiftConfig()[id].recharge_id == nil -end - --- 获取礼包id列表 -function TournArenaData:getGiftIdsSort() - local result = {} - local ids = GConst.TournArenaConst.GIFT_IDS - for index, id in ipairs(ids) do - local sort = id + 10000000000 - - if self:isFreeGift(id) then - sort = sort - 10000000 - end - - if self:getGiftRemainTime(id) > 0 then - sort = sort - 10000 - end - table.insert(result, {id = id, sort = sort}) - end - - table.sort(result, function (a, b) - return a.sort < b.sort - end) - - return result -end - --- 礼包剩余购买次数 -function TournArenaData:getGiftRemainTime(giftId) - if self:isFreeGift(giftId) then - local giftData = DataManager.ShopData:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) - if giftData and giftData.buy_count > 0 and giftData.latest_buy_at then - if Time:getBeginningOfOneDay(Time:getServerTime()) == Time:getBeginningOfOneDay(giftData.latest_buy_at // 1000) then - return 0 - end - end - return 1 - else - return DataManager.ShopData:getGiftRemainBuyNum(giftId) or 0 - end -end - -return TournArenaData \ No newline at end of file diff --git a/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua.meta b/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua.meta deleted file mode 100644 index a253e759..00000000 --- a/lua/app/userdata/activity/tourn_arena/tourn_arena_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c33e1d5bdb494e84cab9ccd418e3083f -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/tourn_wave.meta b/lua/app/userdata/activity/tourn_wave.meta deleted file mode 100644 index 0b8cef7c..00000000 --- a/lua/app/userdata/activity/tourn_wave.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8ef93c36d00ed70449ca5eddabc0d378 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua b/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua deleted file mode 100644 index 88b4134a..00000000 --- a/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua +++ /dev/null @@ -1,659 +0,0 @@ -local TournWaveData = class("TournWaveData", BaseData) - -function TournWaveData:ctor() - self.data.isDirty = false - - self.bountyLevel = 1 - self.bountyExp = 0 - self.bountyCollected = {} - self.rankStep = 1 - self.rankStepEndTime = 0 - self.rankCollected = {} -end - -function TournWaveData:clear() - DataManager:unregisterTryOpenFunc("TournWaveData") - DataManager:unregisterCrossDayFunc("TournWaveData") -end - --- 设置活动数据 -function TournWaveData:setActStatus(data) - data = data or GConst.EMPTY_TABLE - - self.actId = data.id - self.startTime = GFunc.formatTimeStep(data.start_at) - self.endTime = GFunc.formatTimeStep(data.end_at) - - if EDITOR_MODE then - Logger.logHighlight("波次锦标赛活动开启时间:") - Logger.printTable(data) - end - - if not self:isOpen() then - -- 活动开启 - DataManager:registerTryOpenFunc("TournWaveData", function() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - - DataManager:unregisterTryOpenFunc("TournWaveData") - ModuleManager.TournWaveManager:reqActData() - end) - end -end - --- 获取活动数据成功 -function TournWaveData:onGetActData(data) - data = data or GConst.EMPTY_TABLE - if EDITOR_MODE then - Logger.logHighlight("波次锦标赛活动数据:") - Logger.printTable(data) - end - - -- 战令 - self.bountyLevel = data.level or 1 - self.bountyExp = data.exp or 0 - self.bountyCollected = data.collected or {} - -- 排行榜 - self.rankStep = data.present_turn or 1 - self.rankStepEndTime = GFunc.formatTimeStep(data.turn_end_at) or 0 - self.rankCollected = data.rank_reward_claimed or {} - - -- 跨天 - DataManager:registerCrossDayFunc("TournWaveData", function() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - return - end - - self.rankStep = self:isFinalDay() and 0 or self.rankStep + 1 - self.rankStepEndTime = self:isFinalDay() and -1 or (self.rankStepEndTime + 86400 * 2) - self.ranks = nil - self:setInReset(true) - self:initTaskListener() - self:setDirty() - end) - - self:initTaskListener() - self:setDirty() -end - -function TournWaveData:initTaskListener() - if not self:isOpen() then - return - end - if not self:isActiveTime() then - ModuleManager.TaskManager:unRegisterAllModuleTask("TournWaveData") - return - end - - ModuleManager.TaskManager:registerTask("TournWaveData", GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, function(count) - self:addWaveCount(count) - end) -end - -function TournWaveData:setInReset(isInReset) - self.isInReset = isInReset -end - -function TournWaveData:getIsInReset() - return self.isInReset -end - -function TournWaveData:setDirty() - self.data.isDirty = not self.data.isDirty -end - -function TournWaveData:isOpen() - if GFunc.isShenhe() then - return false - end - if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ACTIVITY, true) then - return false - end - if Time:getServerTime() <= DataManager:getRegisterTs() + self:getConditionDay() then -- 前14天的号,看不到 - return false - end - return true -end - --- 是否在活动配置时间内 -function TournWaveData:isActiveTime() - if self.startTime == nil or self.startTime <= 0 then - return false - end - if self.endTime == nil or self.endTime <= 0 then - return false - end - return Time:getServerTime() >= self.startTime and Time:getServerTime() <= self.endTime -end - --- 获取活动开启剩余时间(秒) -function TournWaveData:getStartRemainTime() - if self.startTime == nil or self.startTime <= 0 then - return 0 - end - return self.startTime - Time:getServerTime() -end - --- 获取活动结束剩余时间(秒) -function TournWaveData:getEndRemainTime() - if self.endTime == nil or self.endTime <= 0 then - return 0 - end - return self.endTime - Time:getServerTime() -end - --- 是否是活动最后一天 -function TournWaveData:isFinalDay() - return self:getEndRemainTime() <= 86400 -end - --- 当前为活动第几天 -function TournWaveData:getActDay() - local days = Time:getDistanceDays(self.startTime) - if days < 0 then - days = -days - end - return days + 1 -end - -function TournWaveData:getConditionDay() - if not self.conditionDay then - self.conditionDay = GFunc.getConstIntValue('activity_recurring_day') - self.conditionDay = (self.conditionDay - 1) * 86400 - end - - return self.conditionDay -end - --- 是否有入口红点 -function TournWaveData:hasEntryRedPoint() - return self:hasBountyRedPoint() or self:hasRankRedPoint() or self:hasGiftRedPoint() -end - --- 战令-------------------------------------------------------------------------------------------------- - --- 是否有战令红点 -function TournWaveData:hasBountyRedPoint() - if self:getFirstCanGetBountyRewardLevel() ~= nil then - return true - end - - return false -end - --- 获取首个可领取奖励的战令等级 -function TournWaveData:getFirstCanGetBountyRewardLevel() - local curLevel = self:getBountyLevel() - - for level, data in ipairs(self:getBountyIdList()) do - if level > curLevel then - break - end - - if self:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE) then - return true - end - if self:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1) then - return true - end - if self:canGetBountyReward(level, GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2) then - return true - end - end - - return nil -end - --- -function TournWaveData:getBountyIdList() - if not self.bountyIdList then - self.bountyIdList = GFunc.getTable(DataManager:getActivityBountyLevelByActId(self.actId) or {}) - table.sort(self.bountyIdList, function(a, b) - return a < b - end) - end - return self.bountyIdList -end - --- 获取对应等级的配置 -function TournWaveData:getBountyCfgByLevel(level) - return ConfigManager:getConfig("activity_bounty_level")[self:getBountyIdList()[level]] -end - --- 获取战令档位礼包配置 -function TournWaveData:getBountyGradeGiftCfg(gradeType) - if gradeType == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1 then - return DataManager.ShopData:getActGiftConfig()[GConst.TournWaveConst.BOUNTY_GIFT_ID_1] - elseif gradeType == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2 then - return DataManager.ShopData:getActGiftConfig()[GConst.TournWaveConst.BOUNTY_GIFT_ID_2] - end -end - --- 战令档位是否已解锁 -function TournWaveData:isBountyGradeUnlock(grade) - local giftId - if grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE then - return true - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1 then - giftId = GConst.TournWaveConst.BOUNTY_GIFT_ID_1 - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2 then - giftId = GConst.TournWaveConst.BOUNTY_GIFT_ID_2 - end - - local giftData = DataManager.ShopData:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) - if giftData and giftData.buy_count > 0 and giftData.latest_buy_at then - local time = giftData.latest_buy_at // 1000 - if time > self.startTime and time < self.endTime then - return true - end - end - return false -end - --- 战令最大等级 -function TournWaveData:getBountyMaxLevel() - return #self:getBountyIdList() -end - --- 获取当前战令等级 -function TournWaveData:getBountyLevel() - if self.bountyLevel <= self:getBountyMaxLevel() then - return self.bountyLevel - else - return self:getBountyMaxLevel() - end -end - --- 获取当前等级战令积分 -function TournWaveData:getBountyLevelScore() - return self.bountyExp -end - --- 获取当前总波次 -function TournWaveData:getBountyTotalScore() - return self:getBountyLevelScore() + (self:getBountyCfgByLevel(self:getBountyLevel()).exp or 0) -end - --- 获取等级所需总积分 -function TournWaveData:getLevelTotalScore(level) - local cfg = self:getBountyCfgByLevel(level) - return cfg and cfg.exp or 0 -end - --- 是否满足购买战令等级的条件 -function TournWaveData:canBuyBountyLevel() - if self:getBountyLevel() >= self:getBountyMaxLevel() then - return false - end - - local intervalDay = Time:getDistanceDays(self.endTime) - if intervalDay < 0 then - intervalDay = -intervalDay - end - return intervalDay <= 1 -end - --- 购买战令等级的消耗 -function TournWaveData:getBuyBountyLevelCost() - return GFunc.getConstReward("activity_bounty_cost") -end - --- 获取战令档位奖励 -function TournWaveData:getBountyGradeReward(level, grade) - local cfg = self:getBountyCfgByLevel(level) - local result - if cfg then - if grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE then - result = cfg.reward - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1 then - result = cfg.reward_pro - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2 then - result = cfg.reward_pro_max - end - end - return result -end - --- 战令奖励可领取 -function TournWaveData:canGetBountyReward(level, grade) - return self:isReachBountyReward(level, grade) and not self:isReceivedBountyReward(level, grade) -end - --- 战令奖励是否满足领取条件 -function TournWaveData:isReachBountyReward(level, grade) - local curLevel = self:getBountyLevel() - if curLevel >= level then - return self:isBountyGradeUnlock(grade) - else - return false - end -end - --- 战令奖励是否已领取 -function TournWaveData:isReceivedBountyReward(level, grade) - local id = self:getBountyIdList()[level] - if self.bountyCollected[id] == nil then - return false - end - - if grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE then - return self.bountyCollected[id].normal - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1 then - return self.bountyCollected[id].superior - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2 then - return self.bountyCollected[id].superior_max - end -end - --- 获取奖励档位收集进度 -function TournWaveData:getBountyProgress(level) - local cur = self:getBountyTotalScore() - local rangeMin = self:getBountyLevelRangeMin(level) - local rangeMax = self:getBountyLevelRangeMax(level) - -- Logger.logHighlight(level.."范围:"..rangeMin.."->"..rangeMax) - - if cur >= rangeMax then - -- 超过进度条 - return 1 - elseif cur < rangeMin then - --低于进度条 - return -1 - elseif cur == rangeMin then - -- 进度最低值 - return 0 - else - -- 在进度条范围内 - return (cur - rangeMin) / (rangeMax - rangeMin) - end -end - --- 获取档位范围最低值 -function TournWaveData:getBountyLevelRangeMin(level) - local rangeMin = 0 - local curScore = self:getLevelTotalScore(level) - local lastScore = self:getLevelTotalScore(level - 1) - if lastScore > 0 then - rangeMin = curScore - math.floor((curScore - lastScore) / 2) - else - rangeMin = curScore / 2 - end - return rangeMin -end - --- 获取档位范围最高值 -function TournWaveData:getBountyLevelRangeMax(level) - local rangeMax = 0 - local curScore = self:getLevelTotalScore(level) - local nextScore = self:getLevelTotalScore(level + 1) - if nextScore > 0 then - rangeMax = curScore + math.floor((nextScore - curScore) / 2) - else - rangeMax = curScore - end - return rangeMax -end - --- 战令奖励领取成功 -function TournWaveData:onReceivedBountyReward(successMap) - Logger.logHighlight("战令奖励领取成功") - Logger.printTable(successMap) - for id, grade in pairs(successMap) do - if self.bountyCollected[id] == nil then - self.bountyCollected[id] = {} - end - - if grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.FREE then - self.bountyCollected[id].normal = true - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY1 then - self.bountyCollected[id].superior = true - elseif grade == GConst.TournWaveConst.BOUNTY_GRADE_TYPE.PAY2 then - self.bountyCollected[id].superior_max = true - end - end - - self:setDirty() -end - --- 解锁战令等级成功 -function TournWaveData:onBoughtBountyLevel() - self.bountyLevel = self.bountyLevel + 1 - self:setDirty() -end - --- 战令波次改变 -function TournWaveData:addWaveCount(count) - if self:isFinalDay() then - return - end - - self.bountyExp = self.bountyExp + count - - local curCfg = self:getBountyCfgByLevel(self:getBountyLevel()) - local nextCfg = self:getBountyCfgByLevel(self:getBountyLevel() + 1) - if curCfg and nextCfg then - local diff = nextCfg.exp - curCfg.exp - if self.bountyExp >= diff then - self.bountyExp = self.bountyExp - diff - self.bountyLevel = self.bountyLevel + 1 - end - end - - self:setDirty() -end - --- 排行榜-------------------------------------------------------------------------------------------------- - --- 是否有排行榜红点 -function TournWaveData:hasRankRedPoint() - for rank, id in ipairs(self:getRankIdList()) do - if self:isReachRankReward(rank) and not self:isReceivedRankReward(rank) then - return true - end - end - - return false -end - --- -function TournWaveData:getRankIdList() - if not self.rankIdList then - self.rankIdList = GFunc.getTable(DataManager:getActivityRankByActId(self.actId) or {}) - table.sort(self.rankIdList, function(a, b) - return a < b - end) - end - return self.rankIdList -end - --- 获取排行榜的配置 -function TournWaveData:getRankCfgByIndex(index) - return ConfigManager:getConfig("activity_rank")[self:getRankIdList()[index]] -end - --- 活动总轮次数 -function TournWaveData:getTotalTurnCount() - local totalTime = self.endTime - self.startTime - local day = totalTime / 86400 - - return math.floor(day / GConst.TournWaveConst.PRESENT_TURN_DAY) -end - --- 获取当前排行榜阶段 -function TournWaveData:getCurRankStep() - return self.rankStep -end - --- 获取排名相应的奖励 -function TournWaveData:getRewardByRank(rank) - for index, id in ipairs(self:getRankIdList()) do - local cfg = ConfigManager:getConfig("activity_rank")[id] - if rank >= cfg.ranking[1] and rank <= cfg.ranking[2] then - return cfg.reward - end - end - return nil -end - --- 获取当前排行榜阶段剩余时间 -function TournWaveData:getCurRankStepRemainTime() - return self.rankStepEndTime - Time:getServerTime() -end - --- 获取排行榜数据 -function TournWaveData:getRankListData(step) - if self.ranks == nil then - return nil - end - - return self.ranks[step] and self.ranks[step].ranks or {} -end - --- 获取自己的排名 -function TournWaveData:getSelfRank(step) - if self.ranks == nil or self.ranks[step] == nil then - return 0 - end - - return self.ranks[step].ownRank -end - --- 获取自己的积分 -function TournWaveData:getSelfScore(step) - if self.ranks == nil or self.ranks[step] == nil then - return 0 - end - - return self.ranks[step].ownSorce -end - --- 是否满足段位奖励条件 -function TournWaveData:isReachRankReward() - if self:getCurRankStep() == 1 then - return false - end - - local lastRank - if self:isFinalDay() then - lastRank = self:getSelfRank(self:getTotalTurnCount()) - else - lastRank = self:getSelfRank(self:getCurRankStep() - 1) - end - - if lastRank and lastRank <= 0 then - return false - end - return not self:isReceivedRankReward() -end - --- 是否已领取段位奖励 -function TournWaveData:isReceivedRankReward() - if self:getCurRankStep() == 1 then - return false - end - - local lastStep - if self:isFinalDay() then - lastStep = self:getTotalTurnCount() - else - lastStep = self:getCurRankStep() - 1 - end - - return self.rankCollected[lastStep] or false -end - --- 获取排行榜数据成功 -function TournWaveData:onGetRankData(step, ranks, score, ownRank) - if self.ranks == nil then - self.ranks = {} - end - self.ranks[step] = {ownRank = ownRank, ownSorce = score, ranks = ranks} - - self:setDirty() -end - --- 领取排名奖励成功 -function TournWaveData:onReceivedRankReward() - local lastStep - if self:isFinalDay() then - lastStep = self:getTotalTurnCount() - else - lastStep = self:getCurRankStep() - 1 - end - - self.rankCollected[lastStep] = true - - self:setDirty() -end - - --- 礼包--------------------------------------------------------------------------------------------------- - --- 是否有礼包红点 -function TournWaveData:hasGiftRedPoint() - local ids = GConst.TournWaveConst.GIFT_IDS - for index, id in pairs(ids) do - if self:isFreeGift(id) and self:getGiftRemainTime(id) > 0 then - return true - end - end - - return false -end - --- 获取礼包配置 -function TournWaveData:getGiftCfg(giftId) - return DataManager.ShopData:getActGiftConfig()[giftId] -end - --- 是否是免费礼包 -function TournWaveData:isFreeGift(id) - return DataManager.ShopData:getActGiftConfig()[id].recharge_id == nil -end - --- 获取礼包id列表 -function TournWaveData:getGiftIdsSort() - local result = {} - local ids = GConst.TournWaveConst.GIFT_IDS - for index, id in ipairs(ids) do - local sort = id + 10000000000 - - if self:isFreeGift(id) then - sort = sort - 10000000 - end - - if self:getGiftRemainTime(id) > 0 then - sort = sort - 10000 - end - table.insert(result, {id = id, sort = sort}) - end - - table.sort(result, function (a, b) - return a.sort < b.sort - end) - - return result -end - --- 礼包剩余购买次数 -function TournWaveData:getGiftRemainTime(giftId) - if self:isFreeGift(giftId) then - local giftData = DataManager.ShopData:getActGiftDetailData(PayManager.PURCHARSE_TYPE.ACT_GIFT, giftId) - if giftData and giftData.buy_count > 0 and giftData.latest_buy_at then - if Time:getBeginningOfOneDay(Time:getServerTime()) == Time:getBeginningOfOneDay(giftData.latest_buy_at // 1000) then - return 0 - end - end - return 1 - else - return DataManager.ShopData:getGiftRemainBuyNum(giftId) - end -end - -return TournWaveData \ No newline at end of file diff --git a/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua.meta b/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua.meta deleted file mode 100644 index 56c052b1..00000000 --- a/lua/app/userdata/activity/tourn_wave/tourn_wave_data.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 788cab35c3ef4184386df9d940a38560 -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/arena/arena_data.lua b/lua/app/userdata/arena/arena_data.lua index 7b578edd..f153d9a6 100644 --- a/lua/app/userdata/arena/arena_data.lua +++ b/lua/app/userdata/arena/arena_data.lua @@ -184,7 +184,7 @@ end function ArenaData:getSeasonRewards(id) local cfg = ConfigManager:getConfig("arena_rank") if cfg[id] == nil then - Logger.logError("未找到段位[%d]相关数据", id) + Logger.logHighlight("未找到段位[%d]相关数据", id) return nil end return cfg[id].season_reward @@ -269,7 +269,7 @@ end function ArenaData:getGradingIconName(id) local cfg = ConfigManager:getConfig("arena_rank") if cfg[id] == nil then - Logger.logError("未找到段位[%d]相关数据", id) + Logger.logHighlight("未找到段位[%d]相关数据", id) return nil end return cfg[id].rank_icon @@ -279,7 +279,7 @@ end function ArenaData:getGradingNumName(id) local cfg = ConfigManager:getConfig("arena_rank") if cfg[id] == nil then - Logger.logError("未找到段位[%d]相关数据", id) + Logger.logHighlight("未找到段位[%d]相关数据", id) return nil end return cfg[id].rank_show @@ -289,7 +289,7 @@ end function ArenaData:getGradingName(id) local cfg = ConfigManager:getConfig("arena_rank") if id == nil or cfg[id] == nil then - Logger.logError("未找到段位[%d]相关数据", id) + Logger.logHighlight("未找到段位[%d]相关数据", id) return nil end return I18N:getGlobalText(cfg[id].name_txt) @@ -343,7 +343,7 @@ function ArenaData:getRankData(rank) end) if info == nil then - Logger.logError("没有找到排行榜第%d名数据", rank) + Logger.logHighlight("没有找到排行榜第%d名数据", rank) end return info