循环活动的一些处理

This commit is contained in:
xiekaidong 2023-09-18 14:43:04 +08:00
parent b9dcd70ffe
commit 4badcc0064
10 changed files with 1717 additions and 14 deletions

View File

@ -482,8 +482,25 @@ function DataManager:dealOpenActivity(activityInfo)
return return
end end
local dealTypeMap = {} local newActivityList = {}
local map = {}
for _, info in ipairs(activityInfo) do for _, info in ipairs(activityInfo) do
if info.type then
if not map[info.type] then
map[info.type] = info
else
if map[info.type].start_at > info.start_at then
map[info.type] = info
end
end
end
end
for actType, info in pairs(map) do
table.insert(newActivityList, info)
end
local dealTypeMap = {}
for _, info in ipairs(newActivityList) do
local startTime = GFunc.formatTimeStep(info.start_at) local startTime = GFunc.formatTimeStep(info.start_at)
if startTime <= curTime and curTime <= GFunc.formatTimeStep(info.end_at) then if startTime <= curTime and curTime <= GFunc.formatTimeStep(info.end_at) then
local reqFunc = DataManager.activityOpenFunc[info.type] local reqFunc = DataManager.activityOpenFunc[info.type]
@ -503,8 +520,8 @@ end
DataManager.activityOpenFunc = { DataManager.activityOpenFunc = {
[2] = function(params) [2] = function(params)
ModuleManager.ActBossRushManager:reqActData()
DataManager.ActBossRushData:setActivityInfo(params) DataManager.ActBossRushData:setActivityInfo(params)
ModuleManager.ActBossRushManager:reqActData()
end, end,
[3] = function(params) [3] = function(params)
DataManager.ActPvpData:init({}) -- 默认初始化 DataManager.ActPvpData:init({}) -- 默认初始化

View File

@ -16,7 +16,7 @@ local activity = {
}, },
[406]={ [406]={
["act_type"]=4, ["act_type"]=4,
["start_time"]="2023-09-28 00:00:00", ["start_time"]="2023-09-18 00:00:00",
["end_time"]="2023-10-08 00:00:00" ["end_time"]="2023-10-08 00:00:00"
}, },
[506]={ [506]={

View File

@ -1,5 +1,6 @@
local activity_boss_rush_rank = { local activity_boss_rush_rank = {
[1]={ [1]={
["activity"]=206,
["ranking"]={ ["ranking"]={
1, 1,
1 1
@ -24,6 +25,7 @@ local activity_boss_rush_rank = {
} }
}, },
[2]={ [2]={
["activity"]=206,
["ranking"]={ ["ranking"]={
2, 2,
2 2
@ -48,6 +50,7 @@ local activity_boss_rush_rank = {
} }
}, },
[3]={ [3]={
["activity"]=206,
["ranking"]={ ["ranking"]={
3, 3,
3 3
@ -72,6 +75,7 @@ local activity_boss_rush_rank = {
} }
}, },
[4]={ [4]={
["activity"]=206,
["ranking"]={ ["ranking"]={
4, 4,
10 10
@ -96,6 +100,7 @@ local activity_boss_rush_rank = {
} }
}, },
[5]={ [5]={
["activity"]=206,
["ranking"]={ ["ranking"]={
11, 11,
50 50
@ -120,6 +125,7 @@ local activity_boss_rush_rank = {
} }
}, },
[6]={ [6]={
["activity"]=206,
["ranking"]={ ["ranking"]={
51, 51,
500 500
@ -144,6 +150,182 @@ local activity_boss_rush_rank = {
} }
}, },
[7]={ [7]={
["activity"]=206,
["ranking"]={
501,
99999999
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=20,
["num_for_nothing"]="VAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=20,
["num_for_nothing"]="VAg="
}
}
},
[101]={
["activity"]=506,
["ranking"]={
1,
1
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=100,
["num_for_nothing"]="Vwhc"
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=47,
["id_for_nothing"]="Ug8=",
["num"]=6,
["num_for_nothing"]="UA=="
}
}
},
[102]={
["activity"]=506,
["ranking"]={
2,
2
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=80,
["num_for_nothing"]="Xgg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=47,
["id_for_nothing"]="Ug8=",
["num"]=5,
["num_for_nothing"]="Uw=="
}
}
},
[103]={
["activity"]=506,
["ranking"]={
3,
3
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=70,
["num_for_nothing"]="UQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=47,
["id_for_nothing"]="Ug8=",
["num"]=4,
["num_for_nothing"]="Ug=="
}
}
},
[104]={
["activity"]=506,
["ranking"]={
4,
10
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=6,
["id_for_nothing"]="UA==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
}
},
[105]={
["activity"]=506,
["ranking"]={
11,
50
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=40,
["num_for_nothing"]="Ugg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=6,
["id_for_nothing"]="UA==",
["num"]=2,
["num_for_nothing"]="VA=="
}
}
},
[106]={
["activity"]=506,
["ranking"]={
51,
500
},
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=52,
["id_for_nothing"]="Uwo=",
["num"]=30,
["num_for_nothing"]="VQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=6,
["id_for_nothing"]="UA==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[107]={
["activity"]=506,
["ranking"]={ ["ranking"]={
501, 501,
99999999 99999999
@ -169,6 +351,6 @@ local activity_boss_rush_rank = {
} }
} }
local config = { local config = {
data=activity_boss_rush_rank,count=7 data=activity_boss_rush_rank,count=14
} }
return config return config

File diff suppressed because it is too large Load Diff

View File

@ -8,11 +8,11 @@ local activity_pvp_robot = {
["avatar_frame"]=1000, ["avatar_frame"]=1000,
["hero_id"]={ ["hero_id"]={
{ {
12001, 14002,
6 6
}, },
{ {
22001, 24002,
6 6
}, },
{ {
@ -20,11 +20,11 @@ local activity_pvp_robot = {
6 6
}, },
{ {
42001, 44002,
6 6
}, },
{ {
52001, 54003,
6 6
} }
} }

View File

@ -613,6 +613,7 @@ local LocalizationGlobalConst =
ACT_PVP_TALK_DESC_7 = "ACT_PVP_TALK_DESC_7", ACT_PVP_TALK_DESC_7 = "ACT_PVP_TALK_DESC_7",
ACT_PVP_TALK_DESC_8 = "ACT_PVP_TALK_DESC_8", ACT_PVP_TALK_DESC_8 = "ACT_PVP_TALK_DESC_8",
ACT_PVP_TALK_DESC_9 = "ACT_PVP_TALK_DESC_9", ACT_PVP_TALK_DESC_9 = "ACT_PVP_TALK_DESC_9",
ACT_PVP_DESC_24 = "ACT_PVP_DESC_24",
} }
return LocalizationGlobalConst return LocalizationGlobalConst

View File

@ -520,7 +520,7 @@ local skin_skill = {
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=300111, ["fx_self"]=300111,
["bullet_time"]={ ["bullet_time"]={
1333, 2433,
3000, 3000,
400 400
}, },
@ -590,7 +590,7 @@ local skin_skill = {
["name_act"]="skill01", ["name_act"]="skill01",
["fx_self"]=300164, ["fx_self"]=300164,
["bullet_time"]={ ["bullet_time"]={
1666, 1866,
3000, 3000,
400 400
}, },

View File

@ -604,7 +604,6 @@ local localization_global =
["ACT_PVP_DESC_21"] = "帮助文本1", ["ACT_PVP_DESC_21"] = "帮助文本1",
["ACT_PVP_DESC_22"] = "帮助文本2", ["ACT_PVP_DESC_22"] = "帮助文本2",
["ACT_PVP_DESC_23"] = "帮助文本3", ["ACT_PVP_DESC_23"] = "帮助文本3",
["ACT_PVP_DESC_24"] = "停业中",
["ACT_PVP_TALK_DESC_1"] = "嗨~今天想来一局吗?", ["ACT_PVP_TALK_DESC_1"] = "嗨~今天想来一局吗?",
["ACT_PVP_TALK_DESC_2"] = "强者,每天可以领取累胜奖励!", ["ACT_PVP_TALK_DESC_2"] = "强者,每天可以领取累胜奖励!",
["ACT_PVP_TALK_DESC_3"] = "嗯,这听起来很有趣,我们开始吧!", ["ACT_PVP_TALK_DESC_3"] = "嗯,这听起来很有趣,我们开始吧!",
@ -614,6 +613,7 @@ local localization_global =
["ACT_PVP_TALK_DESC_7"] = "梦魔我今日可算见着厉害的人了10胜的大人欢迎再来", ["ACT_PVP_TALK_DESC_7"] = "梦魔我今日可算见着厉害的人了10胜的大人欢迎再来",
["ACT_PVP_TALK_DESC_8"] = "被打败啦?别灰心~再来呀!", ["ACT_PVP_TALK_DESC_8"] = "被打败啦?别灰心~再来呀!",
["ACT_PVP_TALK_DESC_9"] = "失败了没关系,下次用我梦魔出场一定赢。", ["ACT_PVP_TALK_DESC_9"] = "失败了没关系,下次用我梦魔出场一定赢。",
["ACT_PVP_DESC_24"] = "停业中",
} }
return localization_global return localization_global

View File

@ -34,7 +34,9 @@ function ActBossRushRankUI:ctor()
self.rankRewardList = {} self.rankRewardList = {}
self.rankRewardListCount = 0 self.rankRewardListCount = 0
local cfg = DataManager.ActBossRushData:getRankConfig() local cfg = DataManager.ActBossRushData:getRankConfig()
for id, info in ipairs(cfg) do 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}) table.insert(self.rankRewardList, {id = id, ranking1 = info.ranking[1], ranking2 = info.ranking[2], rewards = info.reward})
self.rankRewardListCount = self.rankRewardListCount + 1 self.rankRewardListCount = self.rankRewardListCount + 1
end end

View File

@ -302,6 +302,22 @@ function ActBossRushData:getRankConfig()
return ConfigManager:getConfig("activity_boss_rush_rank") return ConfigManager:getConfig("activity_boss_rush_rank")
end end
function ActBossRushData:getRankRewardList()
if not self.rankRewardList then
self.rankRewardList = {}
local cfg = self:getRankConfig()
for id, info in ipairs(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) function ActBossRushData:getRankRewards(rank)
if not rank or rank <= 0 then -- 没参加就没有 if not rank or rank <= 0 then -- 没参加就没有
return return
@ -311,7 +327,9 @@ function ActBossRushData:getRankRewards(rank)
end end
if not self.cacheRankRewardsMap[rank] then if not self.cacheRankRewardsMap[rank] then
local cfg = self:getRankConfig() local cfg = self:getRankConfig()
for id, info in ipairs(cfg) do 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] and info.ranking[2] then
if info.ranking[1] <= rank and rank <= info.ranking[2] then if info.ranking[1] <= rank and rank <= info.ranking[2] then
self.cacheRankRewardsMap[rank] = id self.cacheRankRewardsMap[rank] = id