task
This commit is contained in:
parent
eedbffda2e
commit
93cd085ccf
@ -180,6 +180,8 @@ BIReport.ITEM_GET_TYPE = {
|
|||||||
FULL_MOON_TASK = "FullMoonTask",
|
FULL_MOON_TASK = "FullMoonTask",
|
||||||
FULL_MOON_TASK_PROG_REWARD = "FullMoonTaskProgReward",
|
FULL_MOON_TASK_PROG_REWARD = "FullMoonTaskProgReward",
|
||||||
FULL_MOON_SKIN_CHALLENGE_REWARD = "FullMoonSkinChallengeReward",
|
FULL_MOON_SKIN_CHALLENGE_REWARD = "FullMoonSkinChallengeReward",
|
||||||
|
|
||||||
|
TASK_ACHIEVEMENT = "task_achievement",
|
||||||
}
|
}
|
||||||
|
|
||||||
BIReport.ADS_CLICK_TYPE = {
|
BIReport.ADS_CLICK_TYPE = {
|
||||||
@ -378,6 +380,12 @@ local EVENT_BOX_OPEN = "client_box_open"
|
|||||||
local EVENT_ACT_OPT = "client_act_opt"
|
local EVENT_ACT_OPT = "client_act_opt"
|
||||||
local EVENT_NAME_RUNES = "client_runes"
|
local EVENT_NAME_RUNES = "client_runes"
|
||||||
|
|
||||||
|
BIReport.TASK_OPT = {
|
||||||
|
TASK_REWARD = "TaskReward",
|
||||||
|
STAGE_REWARD = "StageReward",
|
||||||
|
ACHIEVEMENT_REWARD = "AchievementReward",
|
||||||
|
}
|
||||||
|
|
||||||
function BIReport:setIsNewPlayer(isNewPlayer)
|
function BIReport:setIsNewPlayer(isNewPlayer)
|
||||||
self.isNewPlayer = isNewPlayer
|
self.isNewPlayer = isNewPlayer
|
||||||
end
|
end
|
||||||
@ -1460,6 +1468,16 @@ function BIReport:postDailyTaskFinish(taskType, cfgId, taskId, refresh)
|
|||||||
self:report(EVENT_NAME_DAILY_TASK, args)
|
self:report(EVENT_NAME_DAILY_TASK, args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BIReport:postTaskAchievementOpt(id, stage, rewards)
|
||||||
|
local args = {
|
||||||
|
opt_type = BIReport.TASK_OPT.ACHIEVEMENT_REWARD,
|
||||||
|
achievement_id = id,
|
||||||
|
achievement_stage = stage,
|
||||||
|
reward_str = rewards and GFunc.getRewardsStr(rewards) or nil,
|
||||||
|
}
|
||||||
|
self:report(EVENT_NAME_DAILY_TASK, args)
|
||||||
|
end
|
||||||
|
|
||||||
-- 邮箱
|
-- 邮箱
|
||||||
function BIReport:postMailOpen(mailId)
|
function BIReport:postMailOpen(mailId)
|
||||||
-- IsNew 是否是新用户
|
-- IsNew 是否是新用户
|
||||||
|
|||||||
@ -174,7 +174,7 @@ function DataManager:initWithServerData(data)
|
|||||||
self.ArenaBountyData:init(data.arena_bounty)
|
self.ArenaBountyData:init(data.arena_bounty)
|
||||||
self.ArenaData:initGiftInfo(data.act_arena_gift, true)
|
self.ArenaData:initGiftInfo(data.act_arena_gift, true)
|
||||||
-- 任务要在BountyData之后初始化,依赖BountyData的数据
|
-- 任务要在BountyData之后初始化,依赖BountyData的数据
|
||||||
self.DailyTaskData:init(data.task_daily)
|
self.DailyTaskData:init(data.task_daily, data.task_achievement)
|
||||||
self.IdleData:init(data.idle)
|
self.IdleData:init(data.idle)
|
||||||
self.SevenDayData:init(data.seven_day)
|
self.SevenDayData:init(data.seven_day)
|
||||||
self.ShopData:initBase()
|
self.ShopData:initBase()
|
||||||
|
|||||||
@ -5,10 +5,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=8,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Xg==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=1,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -18,10 +18,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=23002,
|
["id"]=40,
|
||||||
["id_for_nothing"]="VAtcA2c=",
|
["id_for_nothing"]="Ugg=",
|
||||||
["num"]=10,
|
["num"]=30,
|
||||||
["num_for_nothing"]="Vwg="
|
["num_for_nothing"]="VQg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -31,8 +31,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=10,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Vwg=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -44,10 +44,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=5000,
|
["num"]=5,
|
||||||
["num_for_nothing"]="UwhcAw=="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -57,10 +57,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=50,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Uwg="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -70,10 +70,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=10,
|
["id"]=41,
|
||||||
["id_for_nothing"]="Vwg=",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=1,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -96,10 +96,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=10000,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VwhcA2U="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -109,10 +109,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=11,
|
["id"]=40,
|
||||||
["id_for_nothing"]="Vwk=",
|
["id_for_nothing"]="Ugg=",
|
||||||
["num"]=1,
|
["num"]=30,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="VQg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -122,10 +122,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=41,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=60,
|
["num"]=5,
|
||||||
["num_for_nothing"]="UAg="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -135,10 +135,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=54003,
|
["id"]=6,
|
||||||
["id_for_nothing"]="UwxcA2Y=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=3,
|
["num"]=1,
|
||||||
["num_for_nothing"]="VQ=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -148,10 +148,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=15000,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Vw1cA2U="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -161,10 +161,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=11,
|
["id"]=40,
|
||||||
["id_for_nothing"]="Vwk=",
|
["id_for_nothing"]="Ugg=",
|
||||||
["num"]=1,
|
["num"]=30,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="VQg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -174,10 +174,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=80,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Xgg="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -187,10 +187,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=34003,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VQxcA2Y=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=3,
|
["num"]=1,
|
||||||
["num_for_nothing"]="VQ=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -200,10 +200,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=18000,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VwBcA2U="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -213,10 +213,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=40,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="Ugg=",
|
||||||
["num"]=1,
|
["num"]=30,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="VQg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -226,10 +226,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=41,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=100,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Vwhc"
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -239,10 +239,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=24003,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VAxcA2Y=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=3,
|
["num"]=1,
|
||||||
["num_for_nothing"]="VQ=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -252,10 +252,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=20000,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VAhcA2U="
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -265,10 +265,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=40,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="Ugg=",
|
||||||
["num"]=1,
|
["num"]=30,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="VQg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -278,10 +278,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=120,
|
["num"]=5,
|
||||||
["num_for_nothing"]="Vwpc"
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -291,10 +291,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=47,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Ug8=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=5,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Uw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -304,10 +304,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=24000,
|
["num"]=10,
|
||||||
["num_for_nothing"]="VAxcA2U="
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -317,8 +317,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -330,10 +330,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=41,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=150,
|
["num"]=10,
|
||||||
["num_for_nothing"]="Vw1c"
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -343,10 +343,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=47,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Ug8=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=8,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Xg=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -356,10 +356,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=30000,
|
["num"]=10,
|
||||||
["num_for_nothing"]="VQhcA2U="
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -369,8 +369,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -382,10 +382,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=180,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VwBc"
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -395,10 +395,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=41,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=30000,
|
["num"]=10,
|
||||||
["num_for_nothing"]="VQhcA2U="
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -408,8 +408,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=14,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Vww=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -421,10 +421,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=47,
|
["id"]=17,
|
||||||
["id_for_nothing"]="Ug8=",
|
["id_for_nothing"]="Vw8=",
|
||||||
["num"]=10,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vwg="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -434,10 +434,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=40000,
|
["num"]=10,
|
||||||
["num_for_nothing"]="UghcA2U="
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -447,8 +447,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -460,10 +460,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=200,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VAhc"
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -473,10 +473,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=41,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=40000,
|
["num"]=15,
|
||||||
["num_for_nothing"]="UghcA2U="
|
["num_for_nothing"]="Vw0="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -486,8 +486,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=15,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Vw0=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -499,10 +499,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=47,
|
["id"]=17,
|
||||||
["id_for_nothing"]="Ug8=",
|
["id_for_nothing"]="Vw8=",
|
||||||
["num"]=12,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vwo="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -512,10 +512,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=5,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Uw==",
|
||||||
["num"]=50000,
|
["num"]=10,
|
||||||
["num_for_nothing"]="UwhcA2U="
|
["num_for_nothing"]="Vwg="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -525,8 +525,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=18,
|
["id"]=6,
|
||||||
["id_for_nothing"]="VwA=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -538,10 +538,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=2,
|
["id"]=16,
|
||||||
["id_for_nothing"]="VA==",
|
["id_for_nothing"]="Vw4=",
|
||||||
["num"]=300,
|
["num"]=5,
|
||||||
["num_for_nothing"]="VQhc"
|
["num_for_nothing"]="Uw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -551,10 +551,10 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=1,
|
["id"]=41,
|
||||||
["id_for_nothing"]="Vw==",
|
["id_for_nothing"]="Ugk=",
|
||||||
["num"]=50000,
|
["num"]=15,
|
||||||
["num_for_nothing"]="UwhcA2U="
|
["num_for_nothing"]="Vw0="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -564,8 +564,8 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=15,
|
["id"]=6,
|
||||||
["id_for_nothing"]="Vw0=",
|
["id_for_nothing"]="UA==",
|
||||||
["num"]=1,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw=="
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
@ -577,15 +577,262 @@ local arena_gift = {
|
|||||||
{
|
{
|
||||||
["type"]=1,
|
["type"]=1,
|
||||||
["type_for_nothing"]="Vw==",
|
["type_for_nothing"]="Vw==",
|
||||||
["id"]=47,
|
["id"]=17,
|
||||||
["id_for_nothing"]="Ug8=",
|
["id_for_nothing"]="Vw8=",
|
||||||
["num"]=15,
|
["num"]=1,
|
||||||
["num_for_nothing"]="Vw0="
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[46]={
|
||||||
|
["score"]=3200,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=5,
|
||||||
|
["id_for_nothing"]="Uw==",
|
||||||
|
["num"]=10,
|
||||||
|
["num_for_nothing"]="Vwg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[47]={
|
||||||
|
["score"]=3300,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[48]={
|
||||||
|
["score"]=3400,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=16,
|
||||||
|
["id_for_nothing"]="Vw4=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[49]={
|
||||||
|
["score"]=3500,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=42,
|
||||||
|
["id_for_nothing"]="Ugo=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[50]={
|
||||||
|
["score"]=3600,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[51]={
|
||||||
|
["score"]=3700,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=17,
|
||||||
|
["id_for_nothing"]="Vw8=",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[52]={
|
||||||
|
["score"]=3800,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=5,
|
||||||
|
["id_for_nothing"]="Uw==",
|
||||||
|
["num"]=10,
|
||||||
|
["num_for_nothing"]="Vwg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[53]={
|
||||||
|
["score"]=3900,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[54]={
|
||||||
|
["score"]=4000,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=16,
|
||||||
|
["id_for_nothing"]="Vw4=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[55]={
|
||||||
|
["score"]=4100,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=42,
|
||||||
|
["id_for_nothing"]="Ugo=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[56]={
|
||||||
|
["score"]=4200,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[57]={
|
||||||
|
["score"]=4300,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=17,
|
||||||
|
["id_for_nothing"]="Vw8=",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[58]={
|
||||||
|
["score"]=4400,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=5,
|
||||||
|
["id_for_nothing"]="Uw==",
|
||||||
|
["num"]=10,
|
||||||
|
["num_for_nothing"]="Vwg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[59]={
|
||||||
|
["score"]=4500,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[60]={
|
||||||
|
["score"]=4600,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=16,
|
||||||
|
["id_for_nothing"]="Vw4=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[61]={
|
||||||
|
["score"]=4700,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=42,
|
||||||
|
["id_for_nothing"]="Ugo=",
|
||||||
|
["num"]=5,
|
||||||
|
["num_for_nothing"]="Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[62]={
|
||||||
|
["score"]=4800,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=6,
|
||||||
|
["id_for_nothing"]="UA==",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[63]={
|
||||||
|
["score"]=4900,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=5,
|
||||||
|
["id_for_nothing"]="Uw==",
|
||||||
|
["num"]=10,
|
||||||
|
["num_for_nothing"]="Vwg="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[64]={
|
||||||
|
["score"]=5000,
|
||||||
|
["reward"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["type_for_nothing"]="Vw==",
|
||||||
|
["id"]=17,
|
||||||
|
["id_for_nothing"]="Vw8=",
|
||||||
|
["num"]=1,
|
||||||
|
["num_for_nothing"]="Vw=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=arena_gift,count=45
|
data=arena_gift,count=64
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -200,123 +200,123 @@ local fx = {
|
|||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100001]={
|
[100001]={
|
||||||
["res"]="sfx_m10001_b01",
|
["res"]="sfx_c1_m10001_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100002]={
|
[100002]={
|
||||||
["res"]="sfx_m10001_b02",
|
["res"]="sfx_c1_m10001_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100003]={
|
[100003]={
|
||||||
["res"]="sfx_m10001_b03",
|
["res"]="sfx_c1_m10001_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100004]={
|
[100004]={
|
||||||
["res"]="sfx_m10002_b01",
|
["res"]="sfx_c1_m10002_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100005]={
|
[100005]={
|
||||||
["res"]="sfx_m10002_b02",
|
["res"]="sfx_c1_m10002_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100006]={
|
[100006]={
|
||||||
["res"]="sfx_m10002_b03",
|
["res"]="sfx_c1_m10002_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100007]={
|
[100007]={
|
||||||
["res"]="sfx_m10003_b01",
|
["res"]="sfx_c1_m10003_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100008]={
|
[100008]={
|
||||||
["res"]="sfx_m10003_b02",
|
["res"]="sfx_c1_m10003_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100009]={
|
[100009]={
|
||||||
["res"]="sfx_m10003_b03",
|
["res"]="sfx_c1_m10003_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100010]={
|
[100010]={
|
||||||
["res"]="sfx_m10004_b01",
|
["res"]="sfx_c1_m10004_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100011]={
|
[100011]={
|
||||||
["res"]="sfx_m10004_b02",
|
["res"]="sfx_c1_m10004_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100012]={
|
[100012]={
|
||||||
["res"]="sfx_m10004_b03",
|
["res"]="sfx_c1_m10004_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100013]={
|
[100013]={
|
||||||
["res"]="sfx_m10005_b01",
|
["res"]="sfx_c1_m10005_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100014]={
|
[100014]={
|
||||||
["res"]="sfx_m10009_b01",
|
["res"]="sfx_c1_m10005_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100015]={
|
[100015]={
|
||||||
["res"]="sfx_m10009_b02",
|
["res"]="sfx_c1_m10005_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100016]={
|
[100016]={
|
||||||
["res"]="sfx_m10009_b03",
|
["res"]="sfx_c1_m10006_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100017]={
|
[100017]={
|
||||||
["res"]="sfx_m10010_b01",
|
["res"]="sfx_c1_m10006_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100018]={
|
[100018]={
|
||||||
["res"]="sfx_m10010_b02",
|
["res"]="sfx_c1_m10006_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100019]={
|
[100019]={
|
||||||
["res"]="sfx_m10010_b03",
|
["res"]="sfx_c1_m10007_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100020]={
|
[100020]={
|
||||||
["res"]="sfx_m10012_b01",
|
["res"]="sfx_c1_m10007_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100021]={
|
[100021]={
|
||||||
["res"]="sfx_m10012_b02",
|
["res"]="sfx_c1_m10007_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100022]={
|
[100022]={
|
||||||
["res"]="sfx_m10013_b01",
|
["res"]="sfx_c1_m10008_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100023]={
|
[100023]={
|
||||||
["res"]="sfx_m10013_b02",
|
["res"]="sfx_c1_m10008_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100024]={
|
[100024]={
|
||||||
["res"]="sfx_m10014_b01",
|
["res"]="sfx_c1_m10008_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100025]={
|
[100025]={
|
||||||
["res"]="sfx_m10014_b02",
|
["res"]="sfx_c1_m10009_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100026]={
|
[100026]={
|
||||||
["res"]="sfx_m10015_b01",
|
["res"]="sfx_c1_m10009_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100027]={
|
[100027]={
|
||||||
["res"]="sfx_m10015_b02",
|
["res"]="sfx_c1_m10009_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100028]={
|
[100028]={
|
||||||
["res"]="sfx_m10016_b01",
|
["res"]="sfx_c1_m10012_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100029]={
|
[100029]={
|
||||||
["res"]="sfx_m10016_b02",
|
["res"]="sfx_c1_m10012_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100030]={
|
[100030]={
|
||||||
["res"]="sfx_m10016_b03",
|
["res"]="sfx_c1_m10012_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[100031]={
|
[100031]={
|
||||||
@ -1668,7 +1668,7 @@ local fx = {
|
|||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300023]={
|
[300023]={
|
||||||
["res"]="sfx_c1_p25002_04",
|
["res"]="sfx_c1_p25002_05",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300024]={
|
[300024]={
|
||||||
@ -1692,63 +1692,83 @@ local fx = {
|
|||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300029]={
|
[300029]={
|
||||||
["res"]="sfx_c1_p53001_01",
|
["res"]="sfx_c1_p55001_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300030]={
|
[300030]={
|
||||||
["res"]="sfx_c1_p53001_02",
|
["res"]="sfx_c1_p55001_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300031]={
|
[300031]={
|
||||||
["res"]="sfx_c1_p53001_03",
|
["res"]="sfx_c1_p55001_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300032]={
|
[300032]={
|
||||||
["res"]="sfx_c1_p53001_04",
|
["res"]="sfx_c1_p55001_04",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300033]={
|
[300033]={
|
||||||
["res"]="sfx_c1_p53001_05",
|
["res"]="sfx_c1_p55001_05",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[300034]={
|
||||||
|
["res"]="sfx_c1_p14001_01",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[300035]={
|
||||||
|
["res"]="sfx_c1_p14001_02",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[300036]={
|
||||||
|
["res"]="sfx_c1_p14001_03",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[300037]={
|
||||||
|
["res"]="sfx_c1_p14001_04",
|
||||||
|
["bind"]="root"
|
||||||
|
},
|
||||||
|
[300038]={
|
||||||
|
["res"]="sfx_c1_p14001_05",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300039]={
|
[300039]={
|
||||||
["res"]="sfx_p0009_b05",
|
["res"]="sfx_c1_p15001_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300040]={
|
[300040]={
|
||||||
["res"]="sfx_p0010_b01",
|
["res"]="sfx_c1_p15001_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300041]={
|
[300041]={
|
||||||
["res"]="sfx_p0010_b02",
|
["res"]="sfx_c1_p15001_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300042]={
|
[300042]={
|
||||||
["res"]="sfx_p0010_b03",
|
["res"]="sfx_c1_p15001_04",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300043]={
|
[300043]={
|
||||||
["res"]="sfx_p0010_b04",
|
["res"]="sfx_c1_p15001_05",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300044]={
|
[300044]={
|
||||||
["res"]="sfx_p0010_b05",
|
["res"]="sfx_c1_p16001_01",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300045]={
|
[300045]={
|
||||||
["res"]="sfx_p0011_b01",
|
["res"]="sfx_c1_p16001_02",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300046]={
|
[300046]={
|
||||||
["res"]="sfx_p0011_b02",
|
["res"]="sfx_c1_p16001_03",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300047]={
|
[300047]={
|
||||||
["res"]="sfx_p0011_b03",
|
["res"]="sfx_c1_p16001_04",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300048]={
|
[300048]={
|
||||||
["res"]="sfx_p0011_b04",
|
["res"]="sfx_c1_p16001_05",
|
||||||
["bind"]="root"
|
["bind"]="root"
|
||||||
},
|
},
|
||||||
[300049]={
|
[300049]={
|
||||||
@ -3257,6 +3277,6 @@ local fx = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=fx,count=761
|
data=fx,count=766
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -131,6 +131,894 @@ local item = {
|
|||||||
["qlt"]=4,
|
["qlt"]=4,
|
||||||
["icon"]="20"
|
["icon"]="20"
|
||||||
},
|
},
|
||||||
|
[21]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=2,
|
||||||
|
["icon"]="21",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[22]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=2,
|
||||||
|
["icon"]="22",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[23]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=3,
|
||||||
|
["icon"]="23",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[24]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=3,
|
||||||
|
["icon"]="24",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[25]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=3,
|
||||||
|
["icon"]="25",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[26]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=4,
|
||||||
|
["icon"]="26",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[27]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=4,
|
||||||
|
["icon"]="27",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[28]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=4,
|
||||||
|
["icon"]="28",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[29]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=4,
|
||||||
|
["icon"]="29",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[30]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="30",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[31]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="31",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[32]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="32",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[33]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="33",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[34]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="34",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[35]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=6,
|
||||||
|
["icon"]="35",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[36]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=6,
|
||||||
|
["icon"]="36",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[37]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=6,
|
||||||
|
["icon"]="37",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[38]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=6,
|
||||||
|
["icon"]="38",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[39]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=6,
|
||||||
|
["icon"]="39",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[40]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=4,
|
||||||
|
["icon"]="40",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[41]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="41",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[42]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="42",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[43]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="43",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[44]={
|
||||||
|
["type"]=6,
|
||||||
|
["qlt"]=5,
|
||||||
|
["icon"]="44",
|
||||||
|
["box_drop"]={
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=9,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=10,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=11,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=12,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
["type"]=1,
|
||||||
|
["id"]=13,
|
||||||
|
["num"]=1,
|
||||||
|
["weight"]=100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
[13001]={
|
[13001]={
|
||||||
["type"]=5,
|
["type"]=5,
|
||||||
["parameter"]=13001,
|
["parameter"]=13001,
|
||||||
@ -265,6 +1153,6 @@ local item = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
data=item,count=42
|
data=item,count=66
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
@ -95,42 +95,42 @@ local monster_base = {
|
|||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20001]={
|
[20001]={
|
||||||
["model_id"]="m10001",
|
["model_id"]="m20001",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20002]={
|
[20002]={
|
||||||
["model_id"]="m10002",
|
["model_id"]="m20002",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20003]={
|
[20003]={
|
||||||
["model_id"]="m10003",
|
["model_id"]="m20003",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20004]={
|
[20004]={
|
||||||
["model_id"]="m10004",
|
["model_id"]="m20004",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20005]={
|
[20005]={
|
||||||
["model_id"]="m10005",
|
["model_id"]="m20005",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20006]={
|
[20006]={
|
||||||
["model_id"]="m10006",
|
["model_id"]="m20006",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20007]={
|
[20007]={
|
||||||
["model_id"]="m10007",
|
["model_id"]="m20007",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
[20008]={
|
[20008]={
|
||||||
["model_id"]="m10008",
|
["model_id"]="m20008",
|
||||||
["body"]=1,
|
["body"]=1,
|
||||||
["model_ui"]=1.0
|
["model_ui"]=1.0
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,8 @@ local talent = {
|
|||||||
["type"]="atk_all",
|
["type"]="atk_all",
|
||||||
["num"]=200000
|
["num"]=200000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_1"
|
||||||
},
|
},
|
||||||
[2]={
|
[2]={
|
||||||
["qlt"]=1,
|
["qlt"]=1,
|
||||||
@ -15,7 +16,8 @@ local talent = {
|
|||||||
["type"]="attr_hp_all",
|
["type"]="attr_hp_all",
|
||||||
["num"]=600000
|
["num"]=600000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_2"
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
["qlt"]=1,
|
["qlt"]=1,
|
||||||
@ -24,7 +26,8 @@ local talent = {
|
|||||||
["type"]="attr_dmgdec_all",
|
["type"]="attr_dmgdec_all",
|
||||||
["num"]=20000
|
["num"]=20000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_3"
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
@ -33,7 +36,8 @@ local talent = {
|
|||||||
["type"]="atk_all",
|
["type"]="atk_all",
|
||||||
["num"]=300000
|
["num"]=300000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_4"
|
||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
@ -42,7 +46,8 @@ local talent = {
|
|||||||
["type"]="attr_hp_all",
|
["type"]="attr_hp_all",
|
||||||
["num"]=900000
|
["num"]=900000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_5"
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
@ -51,7 +56,8 @@ local talent = {
|
|||||||
["type"]="attr_dmgdec_all",
|
["type"]="attr_dmgdec_all",
|
||||||
["num"]=30000
|
["num"]=30000
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_6"
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
@ -60,7 +66,8 @@ local talent = {
|
|||||||
["type"]="attr_crit_all",
|
["type"]="attr_crit_all",
|
||||||
["num"]=100
|
["num"]=100
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_7"
|
||||||
},
|
},
|
||||||
[8]={
|
[8]={
|
||||||
["qlt"]=2,
|
["qlt"]=2,
|
||||||
@ -69,27 +76,32 @@ local talent = {
|
|||||||
["type"]="attr_crit_time_all",
|
["type"]="attr_crit_time_all",
|
||||||
["num"]=500
|
["num"]=500
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_8"
|
||||||
},
|
},
|
||||||
[9]={
|
[9]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["value"]=1,
|
["value"]=1,
|
||||||
["fight"]=1000
|
["fight"]=1000,
|
||||||
|
["icon"]="talent_9"
|
||||||
},
|
},
|
||||||
[10]={
|
[10]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["value"]=500000,
|
["value"]=500000,
|
||||||
["fight"]=500
|
["fight"]=500,
|
||||||
|
["icon"]="talent_10"
|
||||||
},
|
},
|
||||||
[11]={
|
[11]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["value"]=1,
|
["value"]=1,
|
||||||
["fight"]=1000
|
["fight"]=1000,
|
||||||
|
["icon"]="talent_11"
|
||||||
},
|
},
|
||||||
[12]={
|
[12]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["value"]=500,
|
["value"]=500,
|
||||||
["fight"]=1000
|
["fight"]=1000,
|
||||||
|
["icon"]="talent_12"
|
||||||
},
|
},
|
||||||
[13]={
|
[13]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
@ -98,7 +110,8 @@ local talent = {
|
|||||||
["type"]="attr_normal_hurtp_all",
|
["type"]="attr_normal_hurtp_all",
|
||||||
["num"]=500
|
["num"]=500
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_13"
|
||||||
},
|
},
|
||||||
[14]={
|
[14]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
@ -107,7 +120,8 @@ local talent = {
|
|||||||
["type"]="attr_skill_hurtp_all",
|
["type"]="attr_skill_hurtp_all",
|
||||||
["num"]=500
|
["num"]=500
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_14"
|
||||||
},
|
},
|
||||||
[15]={
|
[15]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
@ -116,12 +130,14 @@ local talent = {
|
|||||||
["type"]="attr_atkp_all",
|
["type"]="attr_atkp_all",
|
||||||
["num"]=500
|
["num"]=500
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
["icon"]="talent_15"
|
||||||
},
|
},
|
||||||
[16]={
|
[16]={
|
||||||
["qlt"]=3,
|
["qlt"]=3,
|
||||||
["value"]=1000,
|
["value"]=1000,
|
||||||
["fight"]=1000
|
["fight"]=1000,
|
||||||
|
["icon"]="talent_16"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -1977,4 +1977,35 @@ function GFunc.getFinalAttrValue(allAttrs, fixedId, factorId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---- 返回一个显示等间距,但是数值不等间距的sliderValue
|
||||||
|
-- defaultValue 值代表第一段少了平均每段的值
|
||||||
|
function GFunc.getUnevenSliderValue(list, value, defaultValue)
|
||||||
|
local count = #list
|
||||||
|
if count <= 0 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
local pervalue = 1 / (count - (defaultValue or 0))
|
||||||
|
local firstValue = 1 / (defaultValue or 1)
|
||||||
|
local per = 0
|
||||||
|
local pervalue2 = 0
|
||||||
|
for index, v in ipairs(list) do
|
||||||
|
if index == 1 then
|
||||||
|
pervalue2 = pervalue / firstValue
|
||||||
|
else
|
||||||
|
pervalue2 = pervalue
|
||||||
|
end
|
||||||
|
if v <= value then
|
||||||
|
per = per + pervalue2
|
||||||
|
else
|
||||||
|
local before = list[index - 1]
|
||||||
|
if not before then
|
||||||
|
before = 0
|
||||||
|
end
|
||||||
|
per = per + (value - before) / math.max((v - before), 1) * pervalue2
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return per
|
||||||
|
end
|
||||||
|
|
||||||
return GFunc
|
return GFunc
|
||||||
@ -1,5 +1,11 @@
|
|||||||
local TaskConst = {}
|
local TaskConst = {}
|
||||||
|
|
||||||
|
-- 周期类型
|
||||||
|
TaskConst.ROUTINE_TYPE = {
|
||||||
|
DAILY = 1,
|
||||||
|
ACHIEVEMENT = 2,
|
||||||
|
}
|
||||||
|
|
||||||
TaskConst.TASK_TYPE = {
|
TaskConst.TASK_TYPE = {
|
||||||
X_WATCH_AD = 1,
|
X_WATCH_AD = 1,
|
||||||
X_GOLD_GOT = 2,
|
X_GOLD_GOT = 2,
|
||||||
|
|||||||
@ -132,9 +132,6 @@ function TaskManager:addTaskProgress(type, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function TaskManager:dispatchTask(type, count)
|
function TaskManager:dispatchTask(type, count)
|
||||||
if DataManager.DailyTaskData:getIfCanReset() then -- 跨天了
|
|
||||||
ModuleManager.TaskManager:resetDailyTask()
|
|
||||||
end
|
|
||||||
if not self.registerTaskInfo then
|
if not self.registerTaskInfo then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -149,6 +146,29 @@ function TaskManager:dispatchTask(type, count)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--@region 成就
|
||||||
|
function TaskManager:onTaskAchievementReq(taskId, stage)
|
||||||
|
stage = stage - 1-- 服务器从0开始
|
||||||
|
-- 一键领取处理
|
||||||
|
taskId = nil
|
||||||
|
stage = nil
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.TaskAchievementReq, {task_id = taskId, stage = stage}, {}, self.onTaskAchievementRsp, BIReport.ITEM_GET_TYPE.TASK_ACHIEVEMENT)
|
||||||
|
end
|
||||||
|
|
||||||
|
function TaskManager:onTaskAchievementRsp(result)
|
||||||
|
if result.err_code ~= GConst.ERROR_STR.SUCCESS then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
GFunc.showRewardBox(result.rewards)
|
||||||
|
if result.reqData.task_id and result.reqData.stage then
|
||||||
|
DataManager.DailyTaskData:onAchievementClaimed(result.reqData.task_id, result.reqData.stage + 1)
|
||||||
|
else
|
||||||
|
DataManager.DailyTaskData:onAchievementClaimed()
|
||||||
|
end
|
||||||
|
BIReport:postTaskAchievementOpt(result.reqData.task_id, result.reqData.stage, result.rewards)
|
||||||
|
end
|
||||||
|
--@endregion
|
||||||
------------------------------------------------------ 处理任务 ------------------------------------------------------
|
------------------------------------------------------ 处理任务 ------------------------------------------------------
|
||||||
function TaskManager:xKillMonster(count)
|
function TaskManager:xKillMonster(count)
|
||||||
self:dispatchTask(GConst.TaskConst.TASK_TYPE.X_KILL_MONSTER, count)
|
self:dispatchTask(GConst.TaskConst.TASK_TYPE.X_KILL_MONSTER, count)
|
||||||
|
|||||||
@ -3,8 +3,8 @@ local ArenaGradingRewardCell = class("ArenaGradingRewardCell", BaseCell)
|
|||||||
-- 光效
|
-- 光效
|
||||||
local EFFECT_LIGHT = "assets/prefabs/effects/ui/vfx_ui_arena_gift_b01.prefab"
|
local EFFECT_LIGHT = "assets/prefabs/effects/ui/vfx_ui_arena_gift_b01.prefab"
|
||||||
|
|
||||||
local COMMON_GRADING_POSY = 265
|
local COMMON_GRADING_POSY = 242
|
||||||
local UNLOCK_GRADING_POSY = 375
|
local UNLOCK_GRADING_POSY = 346
|
||||||
|
|
||||||
function ArenaGradingRewardCell:init()
|
function ArenaGradingRewardCell:init()
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
@ -30,14 +30,6 @@ function ArenaGradingRewardCell:init()
|
|||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
table.insert(self.rewards, uiMap["arena_grading_reward_cell.common_reward.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
|
table.insert(self.rewards, uiMap["arena_grading_reward_cell.common_reward.rewards.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL))
|
||||||
end
|
end
|
||||||
-- 英雄解锁
|
|
||||||
self.heroUnlock = uiMap["arena_grading_reward_cell.hero_unlock"]
|
|
||||||
self.txUnlock = uiMap["arena_grading_reward_cell.hero_unlock.tx_unlock"]
|
|
||||||
self.heroList = uiMap["arena_grading_reward_cell.hero_unlock.hero_list"]
|
|
||||||
self.heros = {}
|
|
||||||
for i = 1, 6 do
|
|
||||||
table.insert(self.heros, uiMap["arena_grading_reward_cell.hero_unlock.hero_list.item_hero_" .. i])
|
|
||||||
end
|
|
||||||
|
|
||||||
self.commonReward:addClickListener(function()
|
self.commonReward:addClickListener(function()
|
||||||
if DataManager.ArenaData:canGetGradingReward(self.id) and not DataManager.ArenaData:isReceivedGradingReward(self.id) then
|
if DataManager.ArenaData:canGetGradingReward(self.id) and not DataManager.ArenaData:isReceivedGradingReward(self.id) then
|
||||||
@ -60,12 +52,12 @@ function ArenaGradingRewardCell:refresh(id)
|
|||||||
|
|
||||||
-- Logger.logHighlight(id.."当前进度:"..cfg.score.."/" .. curProg .."/"..maxProg)
|
-- Logger.logHighlight(id.."当前进度:"..cfg.score.."/" .. curProg .."/"..maxProg)
|
||||||
|
|
||||||
self.spineGradingRoot:removeAllChildren()
|
-- self.spineGradingRoot:removeAllChildren()
|
||||||
local gradingId = DataManager.ArenaData:getGradingIdFromScore(cfg.score)
|
local gradingId = DataManager.ArenaData:getGradingIdFromScore(cfg.score)
|
||||||
SpineManager:loadUISpineWidgetAsync(DataManager.ArenaData:getGradingIconName(gradingId).."_spine", self.spineGradingRoot, function(spineObject)
|
-- SpineManager:loadUISpineWidgetAsync(DataManager.ArenaData:getGradingIconName(gradingId).."_spine", self.spineGradingRoot, function(spineObject)
|
||||||
spineObject:setSkin(DataManager.ArenaData:getGradingNumName(gradingId))
|
-- spineObject:setSkin(DataManager.ArenaData:getGradingNumName(gradingId))
|
||||||
spineObject:playAnim("idle", true)
|
-- spineObject:playAnim("idle", true)
|
||||||
end)
|
-- end)
|
||||||
self.txGrading:setText(DataManager.ArenaData:getGradingName(gradingId))
|
self.txGrading:setText(DataManager.ArenaData:getGradingName(gradingId))
|
||||||
|
|
||||||
self.baseObject:setSizeDeltaY(DataManager.ArenaData:getGradingRewardItemHeight(self.id))
|
self.baseObject:setSizeDeltaY(DataManager.ArenaData:getGradingRewardItemHeight(self.id))
|
||||||
@ -75,7 +67,6 @@ function ArenaGradingRewardCell:refresh(id)
|
|||||||
else
|
else
|
||||||
self.gradingNode:setActive(false)
|
self.gradingNode:setActive(false)
|
||||||
end
|
end
|
||||||
self.heroUnlock:setActive(false)
|
|
||||||
|
|
||||||
local minScore = DataManager.ArenaData:getSeasonGradingMinScore()
|
local minScore = DataManager.ArenaData:getSeasonGradingMinScore()
|
||||||
self.txTag:setText(curPoint - minScore)
|
self.txTag:setText(curPoint - minScore)
|
||||||
@ -116,10 +107,10 @@ function ArenaGradingRewardCell:refresh(id)
|
|||||||
|
|
||||||
self.rootEffect:removeAllChildren()
|
self.rootEffect:removeAllChildren()
|
||||||
if canGet and not isReceived then
|
if canGet and not isReceived then
|
||||||
EffectManager:loadUIEffectAsync(EFFECT_LIGHT, self.uiRoot, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
-- EffectManager:loadUIEffectAsync(EFFECT_LIGHT, self.uiRoot, self.rootEffect, GConst.UI_EFFECT_ORDER.LEVEL5, function(obj)
|
||||||
obj:setAnchoredPosition(0, 0)
|
-- obj:setAnchoredPosition(0, 0)
|
||||||
obj:play()
|
-- obj:play()
|
||||||
end)
|
-- end)
|
||||||
end
|
end
|
||||||
|
|
||||||
for idx, reward in ipairs(self.rewards) do
|
for idx, reward in ipairs(self.rewards) do
|
||||||
|
|||||||
@ -145,8 +145,7 @@ function MainComp:init()
|
|||||||
self:refresh()
|
self:refresh()
|
||||||
end)
|
end)
|
||||||
self.leftBtn:addClickListener(function()
|
self.leftBtn:addClickListener(function()
|
||||||
-- GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_DESC_2))
|
ModuleManager.IdleManager:showIdleDropUI()
|
||||||
GFunc.showToast("游历")
|
|
||||||
end)
|
end)
|
||||||
self.rightBtn:addClickListener(function()
|
self.rightBtn:addClickListener(function()
|
||||||
GFunc.showToast("限时祈愿")
|
GFunc.showToast("限时祈愿")
|
||||||
|
|||||||
@ -787,7 +787,7 @@ function MainCityUI:refreshTask()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.taskBtn:setVisible(true)
|
self.taskBtn:setVisible(true)
|
||||||
local showRedPoint = DataManager.DailyTaskData:getIsShowRedPoint()
|
local showRedPoint = DataManager.DailyTaskData:showRedPoint()
|
||||||
if showRedPoint then
|
if showRedPoint then
|
||||||
self.taskBtn:addRedPoint(38, 34, 0.7)
|
self.taskBtn:addRedPoint(38, 34, 0.7)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -10,7 +10,6 @@ function PopHeroCell:init()
|
|||||||
self.progressTx = uiMap["pop_hero_cell.progress_bg.progress_tx"]
|
self.progressTx = uiMap["pop_hero_cell.progress_bg.progress_tx"]
|
||||||
self.lvUpArrow = uiMap["pop_hero_cell.effect_node.ui_spine_obj"]
|
self.lvUpArrow = uiMap["pop_hero_cell.effect_node.ui_spine_obj"]
|
||||||
self.fragmenImg = uiMap["pop_hero_cell.progress_bg.fragment_img"]
|
self.fragmenImg = uiMap["pop_hero_cell.progress_bg.fragment_img"]
|
||||||
self.sImg = uiMap["pop_hero_cell.s"]
|
|
||||||
self.newBg = uiMap["pop_hero_cell.new_bg"]
|
self.newBg = uiMap["pop_hero_cell.new_bg"]
|
||||||
self.newTx = uiMap["pop_hero_cell.new_bg.text"]
|
self.newTx = uiMap["pop_hero_cell.new_bg.text"]
|
||||||
self.numTx = uiMap["pop_hero_cell.num_tx"]
|
self.numTx = uiMap["pop_hero_cell.num_tx"]
|
||||||
@ -91,7 +90,6 @@ function PopHeroCell:_refresh(heroInfo)
|
|||||||
self.bg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[heroInfo.qlt])
|
self.bg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[heroInfo.qlt])
|
||||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
|
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, tostring(heroInfo.icon))
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroInfo.position])
|
||||||
self.sImg:setVisible(heroInfo.qlt >= 4)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function PopHeroCell:addClickListener(callback)
|
function PopHeroCell:addClickListener(callback)
|
||||||
|
|||||||
73
lua/app/ui/task/cell/achievement_task_cell.lua
Normal file
73
lua/app/ui/task/cell/achievement_task_cell.lua
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
local AchievementTaskCell = class("AchievementTaskCell", BaseCell)
|
||||||
|
|
||||||
|
function AchievementTaskCell:init()
|
||||||
|
local uiMap = self.baseObject:genAllChildren()
|
||||||
|
self.nameTx = uiMap["achievement_cell.name_tx"]
|
||||||
|
self.progress = uiMap["achievement_cell.progress_bg.progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||||
|
self.progressTx = uiMap["achievement_cell.progress_bg.progress_tx"]
|
||||||
|
self.getBtn = uiMap["achievement_cell.get_btn"]
|
||||||
|
self.getBtnTx = uiMap["achievement_cell.get_btn.text"]
|
||||||
|
self.progressBg = uiMap["achievement_cell.progress_bg"]
|
||||||
|
|
||||||
|
self.rewardCells = {}
|
||||||
|
for i = 1, 3 do
|
||||||
|
self.rewardCells[i] = CellManager:addCellComp(uiMap["achievement_cell.reward_cell_" .. i], GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.getBtn:addClickListener(function()
|
||||||
|
if DataManager.DailyTaskData:canClaimAchievement(self.taskId, self.taskStage) then
|
||||||
|
ModuleManager.TaskManager:onTaskAchievementReq(self.taskId, self.taskStage)
|
||||||
|
else
|
||||||
|
-- ModuleManager.TaskManager:goToTask(self.taskType)
|
||||||
|
ModuleManager.TaskManager:onTaskAchievementReq(self.taskId, self.taskStage)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function AchievementTaskCell:refresh(taskId)
|
||||||
|
self.taskId = taskId
|
||||||
|
self.taskType = DataManager.DailyTaskData:getTaskTypeByAchievementId(self.taskId)
|
||||||
|
self.taskStage = DataManager.DailyTaskData:getAchievementStage(self.taskId)
|
||||||
|
local taskTarget = DataManager.DailyTaskData:getAchievementCondition(self.taskId, self.taskStage)
|
||||||
|
local taskProg = DataManager.DailyTaskData:getAchievementProg(self.taskId)
|
||||||
|
taskProg = taskProg > taskTarget and taskTarget or taskProg
|
||||||
|
|
||||||
|
self.progress.value = taskProg / taskTarget
|
||||||
|
self.progressTx:setText(taskProg.."/"..taskTarget)
|
||||||
|
|
||||||
|
local rewards = {DataManager.DailyTaskData:getAchievementReward(self.taskId, self.taskStage)}
|
||||||
|
for i = 1, 3 do
|
||||||
|
if rewards[i] then
|
||||||
|
self.rewardCells[i]:setActive(true)
|
||||||
|
self.rewardCells[i]:refreshByConfig(rewards[i])
|
||||||
|
else
|
||||||
|
self.rewardCells[i]:setActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if DataManager.DailyTaskData:isAchievementReceived(self.taskId, self.taskStage) then
|
||||||
|
-- 已完成
|
||||||
|
-- self.mask:setActive(true)
|
||||||
|
self.getBtn:setTouchEnable(false)
|
||||||
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE))
|
||||||
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||||
|
-- self.nameTx:setText("<color=#574A40>" .. GFunc.getTaskDesc(self.taskType, taskTarget) .. "</color>")
|
||||||
|
self.nameTx:setText(GFunc.getTaskDesc(self.taskType, taskTarget))
|
||||||
|
else
|
||||||
|
-- 未完成 or 可领取
|
||||||
|
-- self.mask:setActive(false)
|
||||||
|
self.getBtn:setTouchEnable(true)
|
||||||
|
-- self.nameTx:setText("<color=#5C3A2D>" .. GFunc.getTaskDesc(self.taskType, taskTarget) .. "</color>")
|
||||||
|
self.nameTx:setText(GFunc.getTaskDesc(self.taskType, taskTarget))
|
||||||
|
|
||||||
|
if DataManager.DailyTaskData:isAchievementFinished(self.taskId, self.taskStage) then
|
||||||
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
|
||||||
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
|
||||||
|
else
|
||||||
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_21))
|
||||||
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return AchievementTaskCell
|
||||||
10
lua/app/ui/task/cell/achievement_task_cell.lua.meta
Normal file
10
lua/app/ui/task/cell/achievement_task_cell.lua.meta
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f40fcf9dd2dca4562a70efd453825092
|
||||||
|
ScriptedImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||||
@ -5,115 +5,56 @@ function DailyTaskCell:init()
|
|||||||
self.icon = uiMap["task_cell.icon"]
|
self.icon = uiMap["task_cell.icon"]
|
||||||
self.nameTx = uiMap["task_cell.name_tx"]
|
self.nameTx = uiMap["task_cell.name_tx"]
|
||||||
self.progressBg = uiMap["task_cell.progress_bg"]
|
self.progressBg = uiMap["task_cell.progress_bg"]
|
||||||
self.progress = uiMap["task_cell.progress_bg.progress"]
|
self.progress = uiMap["task_cell.progress_bg.progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||||
self.progressTx = uiMap["task_cell.progress_bg.progress_tx"]
|
self.progressTx = uiMap["task_cell.progress_bg.progress_tx"]
|
||||||
self.getBtnRoot = uiMap["task_cell.get_btn"]
|
self.pointTx = uiMap["task_cell.point_tx"]
|
||||||
local getBtn = uiMap["task_cell.get_btn.btn"]
|
self.getBtn = uiMap["task_cell.get_btn"]
|
||||||
getBtn:addClickListener(function()
|
self.getBtnTx = uiMap["task_cell.get_btn.text"]
|
||||||
if self.taskId then
|
self.getBtn:addClickListener(function()
|
||||||
|
if DataManager.DailyTaskData:canClaimTask(self.taskId) then
|
||||||
ModuleManager.TaskManager:claimDailyTask(self.taskId)
|
ModuleManager.TaskManager:claimDailyTask(self.taskId)
|
||||||
|
else
|
||||||
|
-- ModuleManager.TaskManager:goToTask(self.taskType)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self.getBtnTx = uiMap["task_cell.get_btn.btn.text"]
|
end
|
||||||
|
|
||||||
|
function DailyTaskCell:refresh(taskId)
|
||||||
|
self.taskId = taskId
|
||||||
|
self.taskType = DataManager.DailyTaskData:getTaskType(self.taskId)
|
||||||
|
-- local icon = DataManager.DailyTaskData:getDailyTaskIcon(task.id)
|
||||||
|
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_TASK, icon)
|
||||||
|
|
||||||
|
local taskTarget = DataManager.DailyTaskData:getTaskTarget(self.taskId)
|
||||||
|
local taskProg = DataManager.DailyTaskData:getTaskProg(self.taskId)
|
||||||
|
taskProg = taskProg > taskTarget and taskTarget or taskProg
|
||||||
|
|
||||||
|
self.pointTx:setText(DataManager.DailyTaskData:getTaskPoint(self.taskId))
|
||||||
|
self.progress.value = taskProg / taskTarget
|
||||||
|
self.progressTx:setText(taskProg.."/"..taskTarget)
|
||||||
|
|
||||||
|
if DataManager.DailyTaskData:isTaskReceived(self.taskId) then
|
||||||
|
-- 已完成
|
||||||
|
-- self.mask:setActive(true)
|
||||||
|
self.getBtn:setTouchEnable(false)
|
||||||
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DONE))
|
||||||
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_1")
|
||||||
|
-- self.nameTx:setText("<color=#574A40>" .. GFunc.getTaskDesc(self.taskType, taskTarget) .. "</color>")
|
||||||
|
self.nameTx:setText(GFunc.getTaskDesc(self.taskType, taskTarget))
|
||||||
|
else
|
||||||
|
-- 未完成 or 可领取
|
||||||
|
-- self.mask:setActive(false)
|
||||||
|
self.getBtn:setTouchEnable(true)
|
||||||
|
-- self.nameTx:setText("<color=#5C3A2D>" .. GFunc.getTaskDesc(self.taskType, taskTarget) .. "</color>")
|
||||||
|
self.nameTx:setText(GFunc.getTaskDesc(self.taskType, taskTarget))
|
||||||
|
|
||||||
|
if DataManager.DailyTaskData:isTaskFinished(self.taskId) then
|
||||||
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
|
||||||
self.refreshBtnRoot = uiMap["task_cell.refresh_btn"]
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_1")
|
||||||
local refreshBtn = uiMap["task_cell.refresh_btn.btn"]
|
|
||||||
refreshBtn:addClickListener(function()
|
|
||||||
if self.taskId then
|
|
||||||
ModuleManager.TaskManager:refreshDailyTask(self.taskId)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
self.adBtnRoot = uiMap["task_cell.ad_btn"]
|
|
||||||
local adBtn = uiMap["task_cell.ad_btn.btn"]
|
|
||||||
adBtn:addClickListener(function()
|
|
||||||
if self.taskId then
|
|
||||||
ModuleManager.TaskManager:watchTaskSpecialAd()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
self.refreshBtnTx = uiMap["task_cell.refresh_btn.btn.text"]
|
|
||||||
self.refreshBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_REFRESH))
|
|
||||||
self.rewardCellComp = uiMap["task_cell.reward_cell"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
|
||||||
self.lockNode = uiMap["task_cell.lock_node"]
|
|
||||||
self.lockBg = uiMap["task_cell.lock_bg"]
|
|
||||||
local lockBtn = uiMap["task_cell.lock_node.lock_btn.btn"]
|
|
||||||
lockBtn:addClickListener(function()
|
|
||||||
if DataManager.BountyData:getIsOpen() then
|
|
||||||
DataManager.BountyData:clearPopBought()
|
|
||||||
ModuleManager.BountyManager:showBountyMainUI()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
local lockBtnTx = uiMap["task_cell.lock_node.lock_btn.btn.text"]
|
|
||||||
lockBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_UNLOCK))
|
|
||||||
local lockTx = uiMap["task_cell.lock_node.lock_tx"]
|
|
||||||
lockTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_DESC_1))
|
|
||||||
self.completeNode = uiMap["task_cell.complete"]
|
|
||||||
local completeTx = uiMap["task_cell.complete.text"]
|
|
||||||
completeTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_COMPLETED))
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskCell:refresh(task)
|
|
||||||
self.taskId = task.id
|
|
||||||
local icon = DataManager.DailyTaskData:getDailyTaskIcon(task.id)
|
|
||||||
self.icon:setSprite(GConst.ATLAS_PATH.ICON_TASK, icon)
|
|
||||||
local taskDesc = DataManager.DailyTaskData:getDailyTaskDesc(task.id)
|
|
||||||
self.nameTx:setText(taskDesc)
|
|
||||||
|
|
||||||
if task.lock then
|
|
||||||
self.lockNode:setVisible(true)
|
|
||||||
self.lockBg:setVisible(true)
|
|
||||||
self.progressBg:setVisible(false)
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
self.getBtnRoot:setVisible(false)
|
|
||||||
self.adBtnRoot:setVisible(false)
|
|
||||||
self.completeNode:setVisible(false)
|
|
||||||
else
|
else
|
||||||
self.lockBg:setVisible(false)
|
self.getBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_21))
|
||||||
self.lockNode:setVisible(false)
|
self.getBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_yellow_1")
|
||||||
self.progressBg:setVisible(true)
|
|
||||||
local count = task.progress
|
|
||||||
local needCount = task.needProgress
|
|
||||||
if task.claimed then -- 已经领过了
|
|
||||||
self.completeNode:setVisible(true)
|
|
||||||
self.getBtnRoot:setVisible(false)
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
self.adBtnRoot:setVisible(false)
|
|
||||||
if count >= needCount then
|
|
||||||
count = needCount
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
self.completeNode:setVisible(false)
|
|
||||||
if count >= needCount then
|
|
||||||
count = needCount
|
|
||||||
self.getBtnRoot:setVisible(true)
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
self.adBtnRoot:setVisible(false)
|
|
||||||
else
|
|
||||||
self.getBtnRoot:setVisible(false)
|
|
||||||
local isAdType = DataManager.DailyTaskData:getDailyTaskIsAdType(task.id)
|
|
||||||
if isAdType then
|
|
||||||
self.adBtnRoot:setVisible(true)
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
else
|
|
||||||
self.adBtnRoot:setVisible(false)
|
|
||||||
local canRefresh = DataManager.DailyTaskData:getDailyTaskCanRefresh(task.id)
|
|
||||||
if canRefresh then
|
|
||||||
if task.refresh then -- 刷过了
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
else
|
|
||||||
self.refreshBtnRoot:setVisible(true)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
self.refreshBtnRoot:setVisible(false)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.progressTx:setText(count .. "/" .. needCount)
|
|
||||||
self.progress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = count/needCount
|
|
||||||
end
|
|
||||||
local reward = DataManager.DailyTaskData:getDailyTaskReward(task.id)
|
|
||||||
if reward and reward[1] then
|
|
||||||
self.rewardCellComp:refreshByConfig(reward[1])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,52 +1,13 @@
|
|||||||
local TaskMainUI = class("TaskMainUI", BaseUI)
|
local TaskMainUI = class("TaskMainUI", BaseUI)
|
||||||
|
|
||||||
local PAGE_DAILY = 1
|
local PAGE_DAILY = 1
|
||||||
local PAGE_CHALLENGE = 2
|
|
||||||
local TASK_TYPE_DAILY = 1
|
|
||||||
local DAILY_TASK_CELL = "app/ui/task/cell/daily_task_cell"
|
local DAILY_TASK_CELL = "app/ui/task/cell/daily_task_cell"
|
||||||
|
local ACHIEVEMENT_TASK_CELL = "app/ui/task/cell/achievement_task_cell"
|
||||||
local function sortTask(taskList)
|
|
||||||
table.sort(taskList, function(a, b)
|
|
||||||
if a.claimed == b.claimed then
|
|
||||||
if a.claimed then
|
|
||||||
return a.id < b.id
|
|
||||||
else
|
|
||||||
local completeA = a.progress >= a.needProgress
|
|
||||||
local completeB = b.progress >= b.needProgress
|
|
||||||
if completeA == completeB then
|
|
||||||
if completeA then
|
|
||||||
return a.id < b.id
|
|
||||||
else -- 没有完成的优先显示战令解锁
|
|
||||||
if a.lock == b.lock then
|
|
||||||
return a.id < b.id
|
|
||||||
else
|
|
||||||
return b.lock
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
return completeA
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
return b.claimed
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:onPressBackspace()
|
function TaskMainUI:onPressBackspace()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:ctor(params)
|
|
||||||
self.page = params and params.page or PAGE_DAILY
|
|
||||||
self.dailyTaskList = {}
|
|
||||||
self.challengeTaskList = {}
|
|
||||||
self:initTaskList()
|
|
||||||
if DataManager.DailyTaskData:getIfCanReset() then
|
|
||||||
ModuleManager.TaskManager:resetDailyTask()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:isFullScreen()
|
function TaskMainUI:isFullScreen()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -55,44 +16,6 @@ function TaskMainUI:getPrefabPath()
|
|||||||
return "assets/prefabs/ui/task/task_main_ui.prefab"
|
return "assets/prefabs/ui/task/task_main_ui.prefab"
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:initTaskList()
|
|
||||||
for i = 1, #self.dailyTaskList do
|
|
||||||
table.remove(self.dailyTaskList)
|
|
||||||
end
|
|
||||||
for i = 1, #self.challengeTaskList do
|
|
||||||
table.remove(self.challengeTaskList)
|
|
||||||
end
|
|
||||||
local taskAdId = DataManager.DailyTaskData:getDailyTaskAdId()
|
|
||||||
local taskFinalId = DataManager.DailyTaskData:getDailyTaskFinalId()
|
|
||||||
local dailyTasks = DataManager.DailyTaskData:getDailyTasks()
|
|
||||||
for k, v in pairs(dailyTasks) do
|
|
||||||
if k ~= taskAdId and k ~= taskFinalId then
|
|
||||||
if v.type == TASK_TYPE_DAILY then
|
|
||||||
table.insert(self.dailyTaskList, v)
|
|
||||||
else
|
|
||||||
table.insert(self.challengeTaskList, v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
sortTask(self.dailyTaskList)
|
|
||||||
sortTask(self.challengeTaskList)
|
|
||||||
-- 审核模式不显示战令任务
|
|
||||||
if GFunc.isShenhe() then
|
|
||||||
for i = #self.dailyTaskList, 1, -1 do
|
|
||||||
local task = self.dailyTaskList[i]
|
|
||||||
if task.lock then
|
|
||||||
table.remove(self.dailyTaskList, i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for i = #self.challengeTaskList, 1, -1 do
|
|
||||||
local task = self.challengeTaskList[i]
|
|
||||||
if task.lock then
|
|
||||||
table.remove(self.challengeTaskList, i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:onClose()
|
function TaskMainUI:onClose()
|
||||||
if self.menuOneRedPointTween then
|
if self.menuOneRedPointTween then
|
||||||
self.menuOneRedPointTween:Kill()
|
self.menuOneRedPointTween:Kill()
|
||||||
@ -102,107 +25,67 @@ function TaskMainUI:onClose()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TaskMainUI:ctor(params)
|
||||||
|
self.page = params and params.page or PAGE_DAILY
|
||||||
|
self.dailyTaskList = {}
|
||||||
|
self.achievementTaskList = {}
|
||||||
|
end
|
||||||
|
|
||||||
function TaskMainUI:onLoadRootComplete()
|
function TaskMainUI:onLoadRootComplete()
|
||||||
self.uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
self.uiMap["task_main_ui.bg.close_btn"]:addClickListener(function()
|
uiMap["task_main_ui.bg.close_btn"]:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self:initTitle()
|
self.titleTx = uiMap["task_main_ui.bg.title_tx"]
|
||||||
self:initPage()
|
|
||||||
self:initCountDown()
|
|
||||||
self:bindData()
|
|
||||||
self:scheduleGlobal(function()
|
|
||||||
self:updateTime()
|
|
||||||
end, 1)
|
|
||||||
self:updateTime()
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initTitle()
|
self.btnTxs = {
|
||||||
self.titleTx = self.uiMap["task_main_ui.bg.title"]
|
I18N:getGlobalText(I18N.GlobalConst.TASK_DAILY),
|
||||||
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME))
|
I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE),
|
||||||
end
|
}
|
||||||
|
self.pageBtns = {}
|
||||||
function TaskMainUI:initPage()
|
self.pageBtnTxs = {}
|
||||||
self.menuOne = self.uiMap["task_main_ui.bg.menu_1"]
|
for i = 1, 2 do
|
||||||
self.menuOne:addClickListener(function()
|
self.pageBtns[i] = uiMap["task_main_ui.bg.page_btn_" .. i]
|
||||||
self:switchPage(PAGE_DAILY)
|
self.pageBtnTxs[i] = uiMap["task_main_ui.bg.page_btn_" .. i .. ".text"]
|
||||||
|
self.pageBtns[i] :addClickListener(function()
|
||||||
|
-- if not self:getIsOpen(i) or self.page == i then
|
||||||
|
-- return
|
||||||
|
-- end
|
||||||
|
self.page = i
|
||||||
|
self:onRefresh()
|
||||||
end)
|
end)
|
||||||
self.menuOneOn = self.uiMap["task_main_ui.bg.menu_1.on"]
|
end
|
||||||
self.menuOneOff = self.uiMap["task_main_ui.bg.menu_1.off"]
|
self.menuOneRedPoint = uiMap["task_main_ui.bg.red_point_1"]
|
||||||
local menuOneOnTx = self.uiMap["task_main_ui.bg.menu_1.on.text"]
|
self.menuTwoRedPoint = uiMap["task_main_ui.bg.red_point_2"]
|
||||||
menuOneOnTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_DAILY))
|
|
||||||
local menuOneOffTx = self.uiMap["task_main_ui.bg.menu_1.off.text"]
|
|
||||||
menuOneOffTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_DAILY))
|
|
||||||
self.menuOneRedPoint = self.uiMap["task_main_ui.bg.red_point_1"]
|
|
||||||
|
|
||||||
self.menuTwo = self.uiMap["task_main_ui.bg.menu_2"]
|
self.dailyNode = uiMap["task_main_ui.bg.daily"]
|
||||||
self.menuTwo:addClickListener(function()
|
self.dailyTaskFinalCellNameTx = uiMap["task_main_ui.bg.daily.task_final_cell.name_tx"]
|
||||||
self:switchPage(PAGE_CHALLENGE)
|
self.dailyTaskFinalCellProgress = uiMap["task_main_ui.bg.daily.task_final_cell.progress"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
|
||||||
end)
|
self.dailyTaskFinalCellProgressTx = uiMap["task_main_ui.bg.daily.task_final_cell.progress_tx"]
|
||||||
self.menuTwoOn = self.uiMap["task_main_ui.bg.menu_2.on"]
|
self.boxBtns = {}
|
||||||
self.menuTwoOff = self.uiMap["task_main_ui.bg.menu_2.off"]
|
self.boxBtnTxs = {}
|
||||||
local menuTwoOnTx = self.uiMap["task_main_ui.bg.menu_2.on.text"]
|
local stageIds = DataManager.DailyTaskData:getStageIds()
|
||||||
menuTwoOnTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
|
for i = 1, 5 do
|
||||||
local menuTwoOffTx = self.uiMap["task_main_ui.bg.menu_2.off.text"]
|
self.boxBtns[i] = uiMap["task_main_ui.bg.daily.task_final_cell.box_" .. i]
|
||||||
menuTwoOffTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_CHALLENGE))
|
self.boxBtnTxs[i] = uiMap["task_main_ui.bg.daily.task_final_cell.box_" .. i .. ".text"]
|
||||||
self.menuTwoRedPoint = self.uiMap["task_main_ui.bg.red_point_2"]
|
self.boxBtnTxs[i]:setText(DataManager.DailyTaskData:getStageCondition(stageIds[i]))
|
||||||
self:initDaily()
|
-- self.boxBtns[i]:addClickListener(function()
|
||||||
self:initChallenge()
|
-- GFunc.showToast(i)
|
||||||
|
-- -- local taskId = DataManager.DailyTaskData:getDailyTaskFinalId()
|
||||||
|
-- -- if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
||||||
|
-- -- ModuleManager.TaskManager:claimDailyTask(taskId)
|
||||||
|
-- -- else
|
||||||
|
-- -- local reward = DataManager.DailyTaskData:getDailyTaskFinalReward()
|
||||||
|
-- -- if reward and reward[1] then
|
||||||
|
-- -- local rewardId = GFunc.getRewardId(reward[1])
|
||||||
|
-- -- local rewardType = GFunc.getRewardType(reward[1])
|
||||||
|
-- -- ModuleManager.TipsManager:showRewardTips(rewardId, rewardType, self.dailyTaskFinalCellBox)
|
||||||
|
-- -- end
|
||||||
|
-- -- end
|
||||||
|
-- end)
|
||||||
end
|
end
|
||||||
|
self.dailyTaskScrollRect = uiMap["task_main_ui.bg.daily.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
||||||
function TaskMainUI:initDaily()
|
|
||||||
self.dailyNode = self.uiMap["task_main_ui.bg.daily"]
|
|
||||||
self:initDailyTaskAdCell()
|
|
||||||
self:initDailyTaskFinalCell()
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initDailyTaskAdCell()
|
|
||||||
self.dailyTaskAdCellNameTx = self.uiMap["task_main_ui.bg.daily.task_ad_cell.name_tx"]
|
|
||||||
self.dailyTaskAdCellProgress = self.uiMap["task_main_ui.bg.daily.task_ad_cell.progress"]
|
|
||||||
self.dailyTaskAdCellProgressTx = self.uiMap["task_main_ui.bg.daily.task_ad_cell.progress_tx"]
|
|
||||||
self.dailyTaskAdCellBox = self.uiMap["task_main_ui.bg.daily.task_ad_cell.box"]
|
|
||||||
self.dailyTaskAdCellBox:addClickListener(function()
|
|
||||||
local taskId = DataManager.DailyTaskData:getDailyTaskAdId()
|
|
||||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
|
||||||
ModuleManager.TaskManager:claimDailyTask(taskId)
|
|
||||||
else
|
|
||||||
local reward = DataManager.DailyTaskData:getDailyTaskAdReward()
|
|
||||||
if reward and reward[1] then
|
|
||||||
local rewardId = GFunc.getRewardId(reward[1])
|
|
||||||
local rewardType = GFunc.getRewardType(reward[1])
|
|
||||||
ModuleManager.TipsManager:showRewardTips(rewardId, rewardType, self.dailyTaskAdCellBox)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
self.dailyTaskAdCellBoxInfo = self.uiMap["task_main_ui.bg.daily.task_ad_cell.box.info"]
|
|
||||||
self.adBoxSpineObj = self.uiMap["task_main_ui.bg.daily.task_ad_cell.box.ui_spine_obj"]
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initDailyTaskFinalCell()
|
|
||||||
self.dailyTaskFinalCellNameTx = self.uiMap["task_main_ui.bg.daily.task_final_cell.name_tx"]
|
|
||||||
self.dailyTaskFinalCellProgress = self.uiMap["task_main_ui.bg.daily.task_final_cell.progress"]
|
|
||||||
self.dailyTaskFinalCellProgressTx = self.uiMap["task_main_ui.bg.daily.task_final_cell.progress_tx"]
|
|
||||||
self.dailyTaskFinalCellBox = self.uiMap["task_main_ui.bg.daily.task_final_cell.box"]
|
|
||||||
self.dailyTaskFinalCellBox:addClickListener(function()
|
|
||||||
local taskId = DataManager.DailyTaskData:getDailyTaskFinalId()
|
|
||||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
|
||||||
ModuleManager.TaskManager:claimDailyTask(taskId)
|
|
||||||
else
|
|
||||||
local reward = DataManager.DailyTaskData:getDailyTaskFinalReward()
|
|
||||||
if reward and reward[1] then
|
|
||||||
local rewardId = GFunc.getRewardId(reward[1])
|
|
||||||
local rewardType = GFunc.getRewardType(reward[1])
|
|
||||||
ModuleManager.TipsManager:showRewardTips(rewardId, rewardType, self.dailyTaskFinalCellBox)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
self.dailyTaskFinalCellBoxInfo = self.uiMap["task_main_ui.bg.daily.task_final_cell.box.info"]
|
|
||||||
self.finalBoxSpineObj = self.uiMap["task_main_ui.bg.daily.task_final_cell.box.ui_spine_obj"]
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initDailyTasks()
|
|
||||||
self.dailyTaskScrollRect = self.uiMap["task_main_ui.bg.daily.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
|
||||||
self.dailyTaskScrollRect:addInitCallback(function()
|
self.dailyTaskScrollRect:addInitCallback(function()
|
||||||
return DAILY_TASK_CELL
|
return DAILY_TASK_CELL
|
||||||
end)
|
end)
|
||||||
@ -210,231 +93,173 @@ function TaskMainUI:initDailyTasks()
|
|||||||
cell:refresh(self.dailyTaskList[index])
|
cell:refresh(self.dailyTaskList[index])
|
||||||
end)
|
end)
|
||||||
self.dailyTaskScrollRect:clearCells()
|
self.dailyTaskScrollRect:clearCells()
|
||||||
self.dailyTaskScrollRect:refillCells(#self.dailyTaskList)
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initChallenge()
|
self.challengeNode = uiMap["task_main_ui.bg.challenge"]
|
||||||
self.challengeNode = self.uiMap["task_main_ui.bg.challenge"]
|
self.challengeTaskScrollRect = uiMap["task_main_ui.bg.challenge.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initChallengeTasks()
|
|
||||||
self.challengeTaskScrollRect = self.uiMap["task_main_ui.bg.challenge.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
|
||||||
self.challengeTaskScrollRect:addInitCallback(function()
|
self.challengeTaskScrollRect:addInitCallback(function()
|
||||||
return DAILY_TASK_CELL
|
return ACHIEVEMENT_TASK_CELL
|
||||||
end)
|
end)
|
||||||
self.challengeTaskScrollRect:addRefreshCallback(function(index, cell)
|
self.challengeTaskScrollRect:addRefreshCallback(function(index, cell)
|
||||||
cell:refresh(self.challengeTaskList[index])
|
cell:refresh(self.achievementTaskList[index])
|
||||||
end)
|
end)
|
||||||
self.challengeTaskScrollRect:clearCells()
|
self.challengeTaskScrollRect:clearCells()
|
||||||
self.challengeTaskScrollRect:refillCells(#self.challengeTaskList)
|
self.challengeTaskScrollRect:refillCells(#self.achievementTaskList)
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:initCountDown()
|
self.timeTx = uiMap["task_main_ui.bg.daily.time_tx"]
|
||||||
local helpBtn = self.uiMap["task_main_ui.bg.time_btn"]
|
|
||||||
helpBtn:addClickListener(function()
|
self:bindData()
|
||||||
self:showHelp()
|
self:scheduleGlobal(function()
|
||||||
end)
|
self:updateTime()
|
||||||
self.timeTx = self.uiMap["task_main_ui.bg.time_tx"]
|
end, 1)
|
||||||
|
self:updateTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:bindData()
|
function TaskMainUI:bindData()
|
||||||
self:bind(DataManager.DailyTaskData, "dailyTaskDirty", function()
|
self:bind(DataManager.DailyTaskData, "isDirty", function()
|
||||||
if self.delayRefreshSid then
|
|
||||||
self:unscheduleGlobal(self.delayRefreshSid)
|
|
||||||
end
|
|
||||||
self.delayRefreshSid = self:performWithDelayGlobal(function()
|
|
||||||
self.delayRefreshSid = nil
|
|
||||||
sortTask(self.dailyTaskList)
|
|
||||||
sortTask(self.challengeTaskList)
|
|
||||||
self:onRefresh()
|
self:onRefresh()
|
||||||
end, 0.1)
|
|
||||||
end)
|
end)
|
||||||
self:bind(DataManager.DailyTaskData, "resetFlag", function()
|
|
||||||
if self.delayRefreshSid then
|
|
||||||
self:unscheduleGlobal(self.delayRefreshSid)
|
|
||||||
end
|
end
|
||||||
self.delayRefreshSid = self:performWithDelayGlobal(function()
|
|
||||||
self.delayRefreshSid = nil
|
function TaskMainUI:updateTime()
|
||||||
self:initTaskList()
|
if self.page ~= PAGE_DAILY then
|
||||||
self:onRefresh()
|
return
|
||||||
end, 0.1)
|
end
|
||||||
end)
|
self.timeTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_22, Time:formatNumTimeStr(Time:getTodaySurplusTime())))
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:onRefresh()
|
function TaskMainUI:onRefresh()
|
||||||
self:switchPage(self.page)
|
self:refreshPageBtn()
|
||||||
|
self:refreshPageInfo()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:switchPage(page)
|
function TaskMainUI:refreshPageBtn()
|
||||||
self.page = page
|
for i = 1, 2 do
|
||||||
if page == PAGE_DAILY then
|
if self.page == i then
|
||||||
self.menuOneOn:setVisible(true)
|
self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_1")
|
||||||
self.menuOneOff:setVisible(false)
|
self.pageBtnTxs[i]:setText(self.btnTxs[i])
|
||||||
self.menuTwoOn:setVisible(false)
|
else
|
||||||
self.menuTwoOff:setVisible(true)
|
self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_2")
|
||||||
self.dailyNode:setAnchoredPositionX(0)
|
self.pageBtnTxs[i]:setText("<color=#72778C>" .. self.btnTxs[i] .. "</color>")
|
||||||
self.challengeNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function TaskMainUI:refreshPageInfo()
|
||||||
|
self.dailyNode:setActive(self.page == PAGE_DAILY)
|
||||||
|
self.challengeNode:setActive(self.page ~= PAGE_DAILY)
|
||||||
|
if self.page == PAGE_DAILY then
|
||||||
self:refreshDaily()
|
self:refreshDaily()
|
||||||
if DataManager.DailyTaskData:getIsShowChallengeTaskRedPoint() then
|
|
||||||
self.menuTwoRedPoint:setVisible(true)
|
|
||||||
if self.menuTwoRedPointTween == nil then
|
|
||||||
self.menuTwoRedPointTween = self:getShakeTween(self.menuTwoRedPoint)
|
|
||||||
else
|
else
|
||||||
self.menuTwoRedPointTween:Restart()
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if self.menuTwoRedPointTween then
|
|
||||||
self.menuTwoRedPointTween:Pause()
|
|
||||||
end
|
|
||||||
self.menuTwoRedPoint:setVisible(false)
|
|
||||||
end
|
|
||||||
if self.menuOneRedPointTween then
|
|
||||||
self.menuOneRedPointTween:Pause()
|
|
||||||
end
|
|
||||||
self.menuOneRedPoint:setVisible(false)
|
|
||||||
else
|
|
||||||
self.menuOneOn:setVisible(false)
|
|
||||||
self.menuOneOff:setVisible(true)
|
|
||||||
self.menuTwoOn:setVisible(true)
|
|
||||||
self.menuTwoOff:setVisible(false)
|
|
||||||
self.dailyNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS)
|
|
||||||
self.challengeNode:setAnchoredPositionX(0)
|
|
||||||
self:refreshChallenge()
|
self:refreshChallenge()
|
||||||
if DataManager.DailyTaskData:getIsShowDailyTaskRedPoint() then
|
|
||||||
self.menuOneRedPoint:setVisible(true)
|
|
||||||
if self.menuOneRedPointTween == nil then
|
|
||||||
self.menuOneRedPointTween = self:getShakeTween(self.menuOneRedPoint)
|
|
||||||
else
|
|
||||||
self.menuOneRedPointTween:Restart()
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if self.menuOneRedPointTween then
|
|
||||||
self.menuOneRedPointTween:Pause()
|
|
||||||
end
|
|
||||||
self.menuOneRedPoint:setVisible(false)
|
|
||||||
end
|
|
||||||
if self.menuTwoRedPointTween then
|
|
||||||
self.menuTwoRedPointTween:Pause()
|
|
||||||
end
|
|
||||||
self.menuTwoRedPoint:setVisible(false)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:refreshDaily()
|
function TaskMainUI:refreshDaily()
|
||||||
self:refreshDailyTaskAdCell()
|
self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME))
|
||||||
self:refreshDailyTaskFinalCell()
|
local stageIds = DataManager.DailyTaskData:getStageIds()
|
||||||
self:refreshDailyTasks()
|
local curScore = DataManager.DailyTaskData:getCurStageScore()
|
||||||
end
|
local targetList = DataManager.DailyTaskData:getStageTargetList()
|
||||||
|
self.dailyTaskFinalCellProgressTx:setText(curScore)
|
||||||
|
self.dailyTaskFinalCellProgress.value = GFunc.getUnevenSliderValue(targetList, curScore)
|
||||||
|
|
||||||
function TaskMainUI:refreshDailyTaskAdCell()
|
for i, item in ipairs(self.boxBtns) do
|
||||||
local taskId = DataManager.DailyTaskData:getDailyTaskAdId()
|
local stageId = stageIds[i]
|
||||||
local taskDesc = DataManager.DailyTaskData:getDailyTaskDesc(taskId)
|
if stageId then
|
||||||
self.dailyTaskAdCellNameTx:setText(taskDesc)
|
item:setActive(true)
|
||||||
local count, needCount = DataManager.DailyTaskData:getDailyTaskProgress(taskId)
|
-- item:initPrefabHelper()
|
||||||
if count >= needCount then
|
-- local map = item:genAllChildren()
|
||||||
count = needCount
|
-- local spineBox = map["box.spine_box"]
|
||||||
end
|
-- local txNum = map["box.tx_num"]
|
||||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
|
||||||
self.dailyTaskAdCellBoxInfo:setVisible(false)
|
|
||||||
self.dailyTaskAdCellBox:addRedPoint(40, 28, 0.7)
|
|
||||||
self.adBoxSpineObj:playAnim("ready", true, false)
|
|
||||||
self.curAdCanGet = true
|
|
||||||
else
|
|
||||||
self.dailyTaskAdCellBoxInfo:setVisible(true)
|
|
||||||
self.dailyTaskAdCellBox:removeRedPoint()
|
|
||||||
|
|
||||||
if self.curAdCanGet then
|
-- txNum:setText(DataManager.DailyTaskData:getStageCondition(stageId))
|
||||||
self.adBoxSpineObj:playAnimComplete("open", false, true, function()
|
|
||||||
self.adBoxSpineObj:playAnim("idle01", true, false)
|
-- if DataManager.DailyTaskData:canClaimStage(stageId) then
|
||||||
|
-- spineBox:playAnim("ready", true, false, false)
|
||||||
|
-- elseif DataManager.DailyTaskData:isStageReceived(stageId) then
|
||||||
|
-- spineBox:playAnim("idle02", true, false, false)
|
||||||
|
-- else
|
||||||
|
-- spineBox:playAnim("idle01", true, false, false)
|
||||||
|
-- end
|
||||||
|
|
||||||
|
if DataManager.DailyTaskData:canClaimStage(stageId) then
|
||||||
|
item:addClickListener(function()
|
||||||
|
self:onClickBox()
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
self.adBoxSpineObj:playAnim("idle01", true, false)
|
item:addClickListener(function()
|
||||||
end
|
ModuleManager.TipsManager:showRewardsTips(DataManager.DailyTaskData:getStageReward(stageId), nil, item)
|
||||||
|
|
||||||
self.curAdCanGet = false
|
|
||||||
end
|
|
||||||
self.dailyTaskAdCellProgressTx:setText(count .. "/" .. needCount)
|
|
||||||
self.dailyTaskAdCellProgress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = count/needCount
|
|
||||||
end
|
|
||||||
|
|
||||||
function TaskMainUI:refreshDailyTaskFinalCell()
|
|
||||||
local taskId = DataManager.DailyTaskData:getDailyTaskFinalId()
|
|
||||||
local taskDesc = DataManager.DailyTaskData:getDailyTaskDesc(taskId)
|
|
||||||
self.dailyTaskFinalCellNameTx:setText(taskDesc)
|
|
||||||
local count, needCount = DataManager.DailyTaskData:getDailyTaskProgress(taskId)
|
|
||||||
if count > needCount then
|
|
||||||
count = needCount
|
|
||||||
end
|
|
||||||
if DataManager.DailyTaskData:getDailyTaskCanClaimTask(taskId) then
|
|
||||||
self.dailyTaskFinalCellBoxInfo:setVisible(false)
|
|
||||||
self.dailyTaskFinalCellBox:addRedPoint(40, 28, 0.7)
|
|
||||||
self.finalBoxSpineObj:playAnim("ready", true, false)
|
|
||||||
self.curFinalCanGet = true
|
|
||||||
else
|
|
||||||
self.dailyTaskFinalCellBoxInfo:setVisible(true)
|
|
||||||
self.dailyTaskFinalCellBox:removeRedPoint()
|
|
||||||
if DataManager.DailyTaskData:getDailyTaskCalaimed(taskId) then
|
|
||||||
if self.curFinalCanGet then
|
|
||||||
self.finalBoxSpineObj:playAnimComplete("open", false, true, function()
|
|
||||||
self.finalBoxSpineObj:playAnim("idle02", true, false)
|
|
||||||
end)
|
end)
|
||||||
else
|
|
||||||
self.finalBoxSpineObj:playAnim("idle02", true, false)
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self.finalBoxSpineObj:playAnim("idle01", true, false)
|
item:setActive(false)
|
||||||
end
|
end
|
||||||
self.curFinalCanGet = false
|
|
||||||
end
|
|
||||||
self.dailyTaskFinalCellProgressTx:setText(count .. "/" .. needCount)
|
|
||||||
self.dailyTaskFinalCellProgress:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = count/needCount
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:refreshDailyTasks()
|
self.dailyTaskList = DataManager.DailyTaskData:getTaskIdsSort()
|
||||||
if self.dailyTaskScrollRect == nil then
|
|
||||||
self:initDailyTasks()
|
|
||||||
else
|
|
||||||
if self.dailyTaskScrollRect:getTotalCount() == #self.dailyTaskList then
|
|
||||||
self.dailyTaskScrollRect:updateAllCell()
|
|
||||||
else
|
|
||||||
self.dailyTaskScrollRect:clearCells()
|
|
||||||
self.dailyTaskScrollRect:refillCells(#self.dailyTaskList)
|
self.dailyTaskScrollRect:refillCells(#self.dailyTaskList)
|
||||||
|
-- if DataManager.DailyTaskData:getIsShowDailyTaskRedPoint() then
|
||||||
|
-- self.menuOneRedPoint:setActive(true)
|
||||||
|
-- if self.menuOneRedPointTween == nil then
|
||||||
|
-- self.menuOneRedPointTween = self:getShakeTween(self.menuOneRedPoint)
|
||||||
|
-- else
|
||||||
|
-- self.menuOneRedPointTween:Restart()
|
||||||
|
-- end
|
||||||
|
-- else
|
||||||
|
-- if self.menuOneRedPointTween then
|
||||||
|
-- self.menuOneRedPointTween:Pause()
|
||||||
|
-- end
|
||||||
|
-- self.menuOneRedPoint:setActive(false)
|
||||||
|
-- end
|
||||||
|
-- if self.menuTwoRedPointTween then
|
||||||
|
-- self.menuTwoRedPointTween:Pause()
|
||||||
|
-- end
|
||||||
|
-- self.menuTwoRedPoint:setActive(false)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
function TaskMainUI:onClickBox()
|
||||||
|
-- local isFirst = true
|
||||||
|
-- local stageIds = DataManager.DailyTaskData:getStageIds()
|
||||||
|
-- for i, item in ipairs(self.boxItems) do
|
||||||
|
-- local stageId = stageIds[i]
|
||||||
|
-- if stageId and DataManager.DailyTaskData:canClaimStage(stageId) then
|
||||||
|
-- item:initPrefabHelper()
|
||||||
|
-- local map = item:genAllChildren()
|
||||||
|
-- local spineBox = map["box.spine_box"]
|
||||||
|
|
||||||
|
-- if isFirst then
|
||||||
|
-- isFirst = false
|
||||||
|
-- spineBox:playAnimComplete("open", false, true, function()
|
||||||
|
-- ModuleManager.TaskManager:reqTaskStageReward(stageId)
|
||||||
|
-- end)
|
||||||
|
-- else
|
||||||
|
-- spineBox:playAnimComplete("open", false, true)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:refreshChallenge()
|
function TaskMainUI:refreshChallenge()
|
||||||
if self.challengeTaskScrollRect == nil then
|
-- self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.TASK_NAME))
|
||||||
self:initChallengeTasks()
|
self.titleTx:setText("成就")
|
||||||
else
|
self.achievementTaskList = DataManager.DailyTaskData:getAchievementIdsSort()
|
||||||
if self.challengeTaskScrollRect:getTotalCount() == #self.challengeTaskList then
|
self.challengeTaskScrollRect:refillCells(#self.achievementTaskList)
|
||||||
self.challengeTaskScrollRect:updateAllCell()
|
-- if DataManager.DailyTaskData:getIsShowChallengeTaskRedPoint() then
|
||||||
else
|
-- self.menuTwoRedPoint:setActive(true)
|
||||||
self.challengeTaskScrollRect:clearCells()
|
-- if self.menuTwoRedPointTween == nil then
|
||||||
self.challengeTaskScrollRect:refillCells(#self.challengeTaskList)
|
-- self.menuTwoRedPointTween = self:getShakeTween(self.menuTwoRedPoint)
|
||||||
end
|
-- else
|
||||||
end
|
-- self.menuTwoRedPointTween:Restart()
|
||||||
end
|
-- end
|
||||||
|
-- else
|
||||||
function TaskMainUI:showHelp()
|
-- if self.menuTwoRedPointTween then
|
||||||
local params = {
|
-- self.menuTwoRedPointTween:Pause()
|
||||||
content = I18N:getGlobalText(I18N.GlobalConst.TASK_HELP_1),
|
-- end
|
||||||
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK,
|
-- self.menuTwoRedPoint:setActive(false)
|
||||||
okText = I18N:getGlobalText(I18N.GlobalConst.BTN_TEXT_OK),
|
-- end
|
||||||
}
|
-- if self.menuOneRedPointTween then
|
||||||
GFunc.showMessageBox(params)
|
-- self.menuOneRedPointTween:Pause()
|
||||||
end
|
-- end
|
||||||
|
-- self.menuOneRedPoint:setActive(false)
|
||||||
function TaskMainUI:updateTime()
|
|
||||||
local time = DataManager.DailyTaskData:getDailyResetTime()
|
|
||||||
if self.resetTime == time then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if DataManager.DailyTaskData:getIfCanReset() then -- 跨天了
|
|
||||||
ModuleManager.TaskManager:resetDailyTask()
|
|
||||||
end
|
|
||||||
self.resetTime = time
|
|
||||||
self.timeTx:setText(GFunc.getTimeStrWithHMS2(self.resetTime))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function TaskMainUI:getShakeTween(obj)
|
function TaskMainUI:getShakeTween(obj)
|
||||||
|
|||||||
@ -1,432 +1,451 @@
|
|||||||
local DailyTaskData = class("DailyTaskData", BaseData)
|
local DailyTaskData = class("DailyTaskData", BaseData)
|
||||||
|
|
||||||
local DAILY_TASK_AD_ID = 1
|
local TaskDailyCfg = ConfigManager:getConfig("task_daily")
|
||||||
local DAILY_TASK_FINAL_ID = 2
|
local TaskDailyStageCfg = ConfigManager:getConfig("task_daily_stage")
|
||||||
local DATA_NAME = "DailyTaskData"
|
local TaskAchievementCfg = ConfigManager:getConfig("task_achievement")
|
||||||
|
|
||||||
function DailyTaskData:ctor()
|
function DailyTaskData:ctor()
|
||||||
self.data.dailyTaskDirty = false
|
self.data.isDirty = false
|
||||||
self.data.resetFlag = false
|
|
||||||
self.data.redPointFlag = false
|
|
||||||
self.dailyTaskRedPoint = 0
|
|
||||||
self.challengeTaskRedPoint = 0
|
|
||||||
self.isInReset = false
|
|
||||||
self.taskTypeMap = {}
|
|
||||||
self.dailyTasks = {}
|
|
||||||
self.isUnlockBountyDailyTask = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:init(data)
|
function DailyTaskData:clear()
|
||||||
local tasks = data and data.tasks
|
DataManager:unregisterCrossDayFunc("DailyTaskData")
|
||||||
local cfg = self:getDailyTaskCfg()
|
ModuleManager.TaskManager:unRegisterAllModuleTask("DailyTaskData")
|
||||||
local taskCfg = self:getTaskCfg()
|
|
||||||
for k, v in pairs(self.dailyTasks) do
|
|
||||||
self.dailyTasks[k] = nil
|
|
||||||
end
|
|
||||||
for k, v in pairs(self.taskTypeMap) do
|
|
||||||
for i = 1, #v do
|
|
||||||
table.remove(v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.isUnlockBountyDailyTask = DataManager.BountyData:getBought()
|
|
||||||
local dailyRedPoint = 0
|
|
||||||
local challengeRedPoint = 0
|
|
||||||
ModuleManager.TaskManager:unRegisterAllModuleTask(DATA_NAME)
|
|
||||||
for k, v in pairs(cfg) do
|
|
||||||
local task = tasks and tasks[k] or GConst.EMPTY_TABLE
|
|
||||||
local taskInfo = taskCfg[task.task_id]
|
|
||||||
if taskInfo then
|
|
||||||
local dailyTaskObj = {
|
|
||||||
id = k,
|
|
||||||
taskId = task.task_id,
|
|
||||||
progress = task.progress,
|
|
||||||
needProgress = taskInfo.number,
|
|
||||||
refresh = task.refresh,
|
|
||||||
claimed = task.claimed,
|
|
||||||
type = v.type,
|
|
||||||
reset = v.reset
|
|
||||||
}
|
|
||||||
if v.bounty then
|
|
||||||
if self.isUnlockBountyDailyTask then
|
|
||||||
dailyTaskObj.lock = false
|
|
||||||
else
|
|
||||||
dailyTaskObj.lock = true
|
|
||||||
end
|
|
||||||
else
|
|
||||||
dailyTaskObj.lock = false
|
|
||||||
end
|
|
||||||
if dailyTaskObj.lock then
|
|
||||||
dailyTaskObj.redPoint = false
|
|
||||||
else
|
|
||||||
if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then
|
|
||||||
dailyTaskObj.redPoint = true
|
|
||||||
if dailyTaskObj.type == 1 then
|
|
||||||
dailyRedPoint = dailyRedPoint + 1
|
|
||||||
else
|
|
||||||
challengeRedPoint = challengeRedPoint + 1
|
|
||||||
end
|
|
||||||
else
|
|
||||||
dailyTaskObj.redPoint = false
|
|
||||||
end
|
|
||||||
local list = self.taskTypeMap[taskInfo.type]
|
|
||||||
if list == nil then
|
|
||||||
list = {}
|
|
||||||
self.taskTypeMap[taskInfo.type] = list
|
|
||||||
end
|
|
||||||
table.insert(list, dailyTaskObj)
|
|
||||||
if #list == 1 then
|
|
||||||
self:registerTaskWithType(taskInfo.type)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.dailyTasks[k] = dailyTaskObj
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self.initDay = Time:getBeginningOfServerToday()
|
|
||||||
self.isInReset = false
|
|
||||||
self.data.resetFlag = not self.data.resetFlag
|
|
||||||
|
|
||||||
local redPointDirty = false
|
|
||||||
if self.dailyTaskRedPoint ~= dailyRedPoint then
|
|
||||||
if self.dailyTaskRedPoint > 0 and dailyRedPoint > 0 then
|
|
||||||
self.dailyTaskRedPoint = dailyRedPoint
|
|
||||||
else
|
|
||||||
self.dailyTaskRedPoint = dailyRedPoint
|
|
||||||
redPointDirty = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if self.challengeTaskRedPoint ~= challengeRedPoint then
|
|
||||||
if self.challengeTaskRedPoint > 0 and challengeRedPoint > 0 then
|
|
||||||
self.challengeTaskRedPoint = challengeRedPoint
|
|
||||||
else
|
|
||||||
self.challengeTaskRedPoint = challengeRedPoint
|
|
||||||
redPointDirty = true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if redPointDirty then
|
|
||||||
self.data.redPointFlag = not self.data.redPointFlag
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:refreshDailyTask(task)
|
function DailyTaskData:setDirty()
|
||||||
local id = task.id
|
self.data.isDirty = not self.data.isDirty
|
||||||
local dailyTaskObj = self.dailyTasks[id]
|
|
||||||
if dailyTaskObj == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local taskInfo = self:getTaskCfg()[task.task_id]
|
|
||||||
if taskInfo == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local originTaskInfo = self:getTaskCfg()[dailyTaskObj.taskId]
|
|
||||||
if originTaskInfo == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local dailyTaskInfo = self:getDailyTaskCfg()[id]
|
|
||||||
if dailyTaskInfo == nil then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
dailyTaskObj.id = task.id
|
|
||||||
dailyTaskObj.taskId = task.task_id
|
|
||||||
dailyTaskObj.progress = task.progress
|
|
||||||
dailyTaskObj.needProgress = taskInfo.number
|
|
||||||
dailyTaskObj.refresh = task.refresh
|
|
||||||
dailyTaskObj.claimed = task.claimed
|
|
||||||
dailyTaskObj.type = dailyTaskInfo.type
|
|
||||||
dailyTaskObj.reset = dailyTaskInfo.reset
|
|
||||||
local redPoint = false
|
|
||||||
if not dailyTaskObj.lock and not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then
|
|
||||||
redPoint = true
|
|
||||||
end
|
|
||||||
local originTaskType = originTaskInfo.type
|
|
||||||
if not dailyTaskObj.lock and originTaskType ~= taskInfo.type then -- 任务类型变了
|
|
||||||
self:unregisterTask(id, originTaskType)
|
|
||||||
self:registerTask(dailyTaskObj, taskInfo.type)
|
|
||||||
end
|
|
||||||
self:markDailyTaskDirty()
|
|
||||||
|
|
||||||
if dailyTaskObj.redPoint ~= redPoint then
|
|
||||||
dailyTaskObj.redPoint = redPoint
|
|
||||||
if redPoint then
|
|
||||||
if dailyTaskObj.type == 1 then
|
|
||||||
self.dailyTaskRedPoint = self.dailyTaskRedPoint + 1
|
|
||||||
else
|
|
||||||
self.challengeTaskRedPoint = self.challengeTaskRedPoint + 1
|
|
||||||
end
|
|
||||||
if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 1 then
|
|
||||||
self.data.redPointFlag = not self.data.redPointFlag
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if dailyTaskObj.type == 1 then
|
|
||||||
self.dailyTaskRedPoint = self.dailyTaskRedPoint - 1
|
|
||||||
else
|
|
||||||
self.challengeTaskRedPoint = self.challengeTaskRedPoint - 1
|
|
||||||
end
|
|
||||||
if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 0 then
|
|
||||||
self.data.redPointFlag = not self.data.redPointFlag
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIsOpen()
|
function DailyTaskData:init(daily, achievement)
|
||||||
return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.TASK, true)
|
daily = daily or {}
|
||||||
end
|
achievement = achievement or {}
|
||||||
|
|
||||||
function DailyTaskData:getDailyResetTime()
|
--任务领取状态&进度
|
||||||
return 86400 - Time:getServerTime() % 86400
|
self.dailyTaskData = daily.tasks or {}
|
||||||
end
|
-- 活跃度
|
||||||
|
self.dayPoint = daily.point or 0
|
||||||
|
-- 活跃度领奖
|
||||||
|
self.progRewardData = daily.stage_reward_claimed or {}
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskAdReward()
|
-- 成就任务
|
||||||
local task = self.dailyTasks[DAILY_TASK_AD_ID]
|
self.achievementData = achievement.tasks or {}
|
||||||
if task == nil then
|
self.achievementRewardData = achievement.task_claimed_stages or {}
|
||||||
return nil
|
|
||||||
end
|
|
||||||
local cfg = self:getTaskCfg()
|
|
||||||
return cfg[task.taskId].reward
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskAdId()
|
-- 任务配置
|
||||||
return DAILY_TASK_AD_ID
|
self.dailyTaskIds = {}
|
||||||
|
for id, info in pairs(TaskDailyCfg) do
|
||||||
|
table.insert(self.dailyTaskIds, id)
|
||||||
end
|
end
|
||||||
|
table.sort(self.dailyTaskIds)
|
||||||
|
-- 阶段配置
|
||||||
|
self.dailyStageIds = {}
|
||||||
|
for id, info in pairs(TaskDailyStageCfg) do
|
||||||
|
table.insert(self.dailyStageIds, id)
|
||||||
|
end
|
||||||
|
table.sort(self.dailyStageIds)
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskFinalReward()
|
-- 监听任务
|
||||||
local task = self.dailyTasks[DAILY_TASK_FINAL_ID]
|
for id, info in pairs(TaskDailyCfg) do
|
||||||
if task == nil then
|
ModuleManager.TaskManager:registerTask("DailyTaskData", info.task_type, function(count)
|
||||||
return nil
|
self:addTaskProgress(info.task_type, count)
|
||||||
end
|
|
||||||
local cfg = self:getTaskCfg()
|
|
||||||
return cfg[task.taskId].reward
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskFinalId()
|
|
||||||
return DAILY_TASK_FINAL_ID
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:markDailyTaskDirty()
|
|
||||||
self.data.dailyTaskDirty = not self.data.dailyTaskDirty
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskProgress(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return 0, 1
|
|
||||||
end
|
|
||||||
return task.progress, task.needProgress
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskDesc(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return GConst.EMPTY_STRING
|
|
||||||
end
|
|
||||||
local cfg = self:getTaskI18NCfg()
|
|
||||||
return cfg[task.taskId].desc
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskIsLock(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
return task.lock
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskCanRefresh(id)
|
|
||||||
local cfg = self:getDailyTaskCfg()[id]
|
|
||||||
if cfg == nil then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return cfg.ad_refresh
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskIsAdType(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
local cfg = self:getTaskCfg()
|
|
||||||
return cfg[task.taskId].type == GConst.TaskConst.TASK_TYPE.DAILY_TASK_WATCH_AD_SPECIAL
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskCanClaimTask(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return self:getIfCanClaimTask(task)
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskIcon(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return GConst.EMPTY_STRING
|
|
||||||
end
|
|
||||||
local cfg = self:getTaskCfg()
|
|
||||||
return cfg[task.taskId].icon
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskReward(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if task == nil then
|
|
||||||
return GConst.EMPTY_STRING
|
|
||||||
end
|
|
||||||
local cfg = self:getTaskCfg()
|
|
||||||
return cfg[task.taskId].reward
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTasks()
|
|
||||||
return self.dailyTasks
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getTaskI18NCfg()
|
|
||||||
return I18N:getConfig("task")
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getTaskCfg()
|
|
||||||
if self.taskCfg == nil then
|
|
||||||
self.taskCfg = ConfigManager:getConfig("task")
|
|
||||||
end
|
|
||||||
return self.taskCfg
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskCfg()
|
|
||||||
if self.dailyTaskCfg == nil then
|
|
||||||
self.dailyTaskCfg = ConfigManager:getConfig("task_daily")
|
|
||||||
end
|
|
||||||
return self.dailyTaskCfg
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getTaskListByType(taskType)
|
|
||||||
return self.taskTypeMap[taskType] or GConst.EMPTY_TABLE
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getDailyTaskCalaimed(id)
|
|
||||||
local task = self.dailyTasks[id]
|
|
||||||
if not task then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return task.claimed
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:getIfCanClaimTask(task)
|
|
||||||
if task.claimed then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return task.progress >= task.needProgress
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:addTaskProgress(task, taskType, count)
|
|
||||||
if task.lock then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local currProgress = task.progress
|
|
||||||
if currProgress >= task.needProgress then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local can = self:getIfCanClaimTask(task)
|
|
||||||
task.progress = task.progress + count
|
|
||||||
if not can and self:getIfCanClaimTask(task) then
|
|
||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.DAILY_TASK_COMPLETE, task.id, task.taskId, currProgress, task.needProgress)
|
|
||||||
if task.type == 1 and task.reset == 1 and taskType ~= GConst.TaskConst.TASK_TYPE.COMPLETED_DALY_TASK then
|
|
||||||
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.COMPLETED_DALY_TASK)
|
|
||||||
end
|
|
||||||
BIReport:postDailyTaskFinish(BIReport.TASK_TYPE.DAILY, task.id, task.taskId, task.refresh)
|
|
||||||
task.redPoint = true
|
|
||||||
if task.type == 1 then
|
|
||||||
self.dailyTaskRedPoint = self.dailyTaskRedPoint + 1
|
|
||||||
else
|
|
||||||
self.challengeTaskRedPoint = self.challengeTaskRedPoint + 1
|
|
||||||
end
|
|
||||||
if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 1 then
|
|
||||||
self.data.redPointFlag = not self.data.redPointFlag
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self:markDailyTaskDirty()
|
|
||||||
end
|
|
||||||
|
|
||||||
function DailyTaskData:registerTaskWithType(taskType)
|
|
||||||
ModuleManager.TaskManager:registerTask(DATA_NAME, taskType, function(count)
|
|
||||||
local list = self:getTaskListByType(taskType)
|
|
||||||
if #list > 0 then
|
|
||||||
for _, task in ipairs(list) do
|
|
||||||
self:addTaskProgress(task, taskType, count)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
for id, info in pairs(TaskAchievementCfg) do
|
||||||
|
ModuleManager.TaskManager:registerTask("DailyTaskData", info.type, function(count)
|
||||||
|
self:addTaskProgress(info.type, count)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
-- 跨天
|
||||||
|
DataManager:registerCrossDayFunc("DailyTaskData", function()
|
||||||
|
-- 重置任务数据
|
||||||
|
for id, data in pairs(self.dailyTaskData) do
|
||||||
|
data.claimed = 0
|
||||||
|
data.progress = 0
|
||||||
|
end
|
||||||
|
-- 重置进度奖励数据
|
||||||
|
for id, claimed in pairs(self.progRewardData) do
|
||||||
|
self.progRewardData[id] = false
|
||||||
|
end
|
||||||
|
|
||||||
function DailyTaskData:unregisterTask(id, taskType)
|
self.dayPoint = 0
|
||||||
local taskList = self.taskTypeMap[taskType]
|
self:setDirty()
|
||||||
if taskList then
|
end)
|
||||||
for k, v in ipairs(taskList) do
|
self.dailyRedState = nil
|
||||||
if v.id == id then
|
self.achievementRedState = nil
|
||||||
table.remove(taskList, k)
|
self:showRedPoint()
|
||||||
break
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:getIsOpen(showToast)
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.TASK, not showToast) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:showRedPoint()
|
||||||
|
if self.dailyRedState == nil and self.achievementRedState == nil then
|
||||||
|
return self:showDailyRedPoint() or self:showAchievementRedPoint()
|
||||||
|
end
|
||||||
|
return self.dailyRedState or self.achievementRedState
|
||||||
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:showDailyRedPoint()
|
||||||
|
for idx, id in pairs(self.dailyTaskIds) do
|
||||||
|
if self:canClaimTask(id) then
|
||||||
|
self.dailyRedState = true
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if #taskList == 0 then
|
|
||||||
self:unregisterTaskWithType(taskType)
|
for idx, id in pairs(self.dailyStageIds) do
|
||||||
|
if self:canClaimStage(id) then
|
||||||
|
self.dailyRedState = true
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self.dailyRedState = false
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:showAchievementRedPoint()
|
||||||
|
for id, info in pairs(TaskAchievementCfg) do
|
||||||
|
for stage = 1, self:getAchievementTotalStage(id) do
|
||||||
|
if self:canClaimAchievement(id, stage) then
|
||||||
|
self.achievementRedState = true
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.achievementRedState = false
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 是否完成全部每日任务
|
||||||
|
function DailyTaskData:isAllDailyTaskFinished()
|
||||||
|
for idx, id in pairs(self.dailyTaskIds) do
|
||||||
|
if not self:isTaskReceived(id) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for idx, id in pairs(self.dailyStageIds) do
|
||||||
|
if not self:isStageReceived(id) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 任务 -----------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- 任务是否开启
|
||||||
|
function DailyTaskData:isTaskOpen(taskId)
|
||||||
|
if TaskDailyCfg[taskId].func_open == nil then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return ModuleManager:getIsOpen(TaskDailyCfg[taskId].func_open, true)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务类型
|
||||||
|
function DailyTaskData:getTaskType(taskId)
|
||||||
|
return TaskDailyCfg[taskId].task_type
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务循环类型
|
||||||
|
function DailyTaskData:getTaskRoutineType(taskId)
|
||||||
|
return TaskDailyCfg[taskId].routine_type
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务目标
|
||||||
|
function DailyTaskData:getTaskTarget(taskId)
|
||||||
|
return TaskDailyCfg[taskId].number
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务奖励点数
|
||||||
|
function DailyTaskData:getTaskPoint(taskId)
|
||||||
|
return TaskDailyCfg[taskId].value
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务当前进度
|
||||||
|
function DailyTaskData:getTaskProg(taskId)
|
||||||
|
taskId = tonumber(taskId)
|
||||||
|
return self.dailyTaskData[taskId] and self.dailyTaskData[taskId].progress or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 任务是否已领取
|
||||||
|
function DailyTaskData:isTaskReceived(taskId)
|
||||||
|
taskId = tonumber(taskId)
|
||||||
|
return self.dailyTaskData[taskId] and self.dailyTaskData[taskId].claimed and self.dailyTaskData[taskId].claimed > 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 任务是否已完成
|
||||||
|
function DailyTaskData:isTaskFinished(taskId)
|
||||||
|
return self:getTaskProg(taskId) >= self:getTaskTarget(taskId)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 任务是否可领取
|
||||||
|
function DailyTaskData:canClaimTask(taskId)
|
||||||
|
return self:isTaskFinished(taskId) and not self:isTaskReceived(taskId)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取可领奖的所有任务id
|
||||||
|
function DailyTaskData:getCanClaimTaskIds()
|
||||||
|
local ids = {}
|
||||||
|
for idx, taskId in pairs(self.dailyTaskIds) do
|
||||||
|
if self:canClaimTask(taskId) then
|
||||||
|
table.insert(ids, taskId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return ids
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取可展示的每日任务id列表
|
||||||
|
function DailyTaskData:getTaskIdsSort()
|
||||||
|
local taskids = self.dailyTaskIds or {}
|
||||||
|
|
||||||
|
local temp = {}
|
||||||
|
for i, id in ipairs(taskids) do
|
||||||
|
if self:isTaskOpen(id) then
|
||||||
|
local info = {id = id, sort = id}
|
||||||
|
if self:canClaimTask(id) then
|
||||||
|
info.sort = info.sort - 10000
|
||||||
|
end
|
||||||
|
if self:isTaskReceived(id) then
|
||||||
|
info.sort = info.sort + 10000
|
||||||
|
end
|
||||||
|
table.insert(temp, info)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(temp, function(a, b)
|
||||||
|
return a.sort < b.sort
|
||||||
|
end)
|
||||||
|
|
||||||
|
local ids = {}
|
||||||
|
for i, data in ipairs(temp) do
|
||||||
|
table.insert(ids, data.id)
|
||||||
|
end
|
||||||
|
return ids
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 任务进度变化
|
||||||
|
function DailyTaskData:addTaskProgress(taskType, count)
|
||||||
|
for taskId, info in pairs(TaskDailyCfg) do
|
||||||
|
if self:getTaskType(taskId) == taskType then
|
||||||
|
if self.dailyTaskData[taskId] == nil then
|
||||||
|
self.dailyTaskData[taskId] = {}
|
||||||
|
end
|
||||||
|
if not self:isTaskFinished(taskId) then
|
||||||
|
-- if table.containValue(GConst.TaskConst.TASK_TARGRT_TYPE, taskType) then
|
||||||
|
-- self.dailyTaskData[taskId].progress = math.max(self.dailyTaskData[taskId].progress or 0, count)
|
||||||
|
-- else
|
||||||
|
self.dailyTaskData[taskId].progress = (self.dailyTaskData[taskId].progress or 0) + count
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for achievementId, info in pairs(TaskAchievementCfg) do
|
||||||
|
if self:getTaskTypeByAchievementId(achievementId) == taskType then
|
||||||
|
if not self:isAchievementFinished(achievementId, self:getAchievementTotalStage(achievementId)) then
|
||||||
|
-- if table.containValue(GConst.TaskConst.TASK_TARGRT_TYPE, taskType) then
|
||||||
|
-- self.achievementData[achievementId] = math.max(self.achievementData[achievementId] or 0, count)
|
||||||
|
-- else
|
||||||
|
self.achievementData[achievementId] = (self.achievementData[achievementId] or 0) + count
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:unregisterTaskWithType(taskType)
|
self:setDirty()
|
||||||
ModuleManager.TaskManager:unRegisterTask(DATA_NAME, taskType)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:registerTask(dailyTaskObj, taskType)
|
-- 领奖成功
|
||||||
local taskList = self.taskTypeMap[taskType]
|
function DailyTaskData:onTaskClaimed(dayPoint)
|
||||||
if taskList == nil then
|
self.dayPoint = dayPoint or self.dayPoint
|
||||||
taskList = {}
|
|
||||||
self.taskTypeMap[taskType] = taskList
|
for idx, taskId in pairs(self:getCanClaimTaskIds()) do
|
||||||
end
|
self.dailyTaskData[taskId].claimed = 1
|
||||||
table.insert(taskList, dailyTaskObj)
|
|
||||||
if #taskList == 1 then
|
|
||||||
self:registerTaskWithType(taskType)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIfCanReset()
|
self.dailyRedState = nil
|
||||||
return self.initDay < Time:getBeginningOfServerToday()
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:setInReset(isInReset)
|
-- 阶段 -----------------------------------------------------------------------------------------------------------------------------------------
|
||||||
self.isInReset = isInReset
|
|
||||||
|
-- 领取条件
|
||||||
|
function DailyTaskData:getStageCondition(stageId)
|
||||||
|
return TaskDailyStageCfg[stageId].point
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIsInReset()
|
-- 获取奖励
|
||||||
return self.isInReset
|
function DailyTaskData:getStageReward(stageId)
|
||||||
|
return TaskDailyStageCfg[stageId].reward
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIsShowRedPoint()
|
-- 获取循环类型
|
||||||
return self.dailyTaskRedPoint > 0 or self.challengeTaskRedPoint > 0
|
function DailyTaskData:getStageRoutineType(stageId)
|
||||||
|
return TaskDailyStageCfg[stageId].routine_type
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIsShowDailyTaskRedPoint()
|
-- 获取阶段id列表
|
||||||
return self.dailyTaskRedPoint > 0
|
function DailyTaskData:getStageIds()
|
||||||
|
return self.dailyStageIds
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:getIsShowChallengeTaskRedPoint()
|
-- 获取阶段奖励目标list
|
||||||
return self.challengeTaskRedPoint > 0
|
function DailyTaskData:getStageTargetList()
|
||||||
|
local targetList = {}
|
||||||
|
for i, id in ipairs(self.dailyStageIds) do
|
||||||
|
table.insert(targetList, self:getStageCondition(id))
|
||||||
end
|
end
|
||||||
|
|
||||||
function DailyTaskData:unlockBountyTask()
|
table.sort(targetList, function(a, b)
|
||||||
if self.isUnlockBountyDailyTask then
|
return a < b
|
||||||
return
|
end)
|
||||||
|
|
||||||
|
return targetList
|
||||||
end
|
end
|
||||||
self.isUnlockBountyDailyTask = true
|
|
||||||
local dirty = false
|
-- 获取当前活跃积分
|
||||||
local taskCfg = self:getTaskCfg()
|
function DailyTaskData:getCurStageScore()
|
||||||
for k, v in pairs(self.dailyTasks) do
|
return self.dayPoint
|
||||||
if v.lock then -- 有锁的要解锁
|
end
|
||||||
v.lock = false
|
|
||||||
dirty = true
|
-- 是否已领奖
|
||||||
self:registerTask(v, taskCfg[v.taskId].type)
|
function DailyTaskData:isStageReceived(stageId)
|
||||||
|
stageId = tonumber(stageId)
|
||||||
|
return self.progRewardData[stageId] or false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 是否可领奖
|
||||||
|
function DailyTaskData:canClaimStage(stageId)
|
||||||
|
return self:getCurStageScore() >= self:getStageCondition(stageId) and not self:isStageReceived(stageId)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 领奖成功
|
||||||
|
function DailyTaskData:onStageClaimed(type, stageId)
|
||||||
|
if type and stageId == 0 then
|
||||||
|
for k, id in pairs(self:getStageIdsByType(type)) do
|
||||||
|
if self:canClaimStage(id) then
|
||||||
|
self.progRewardData[id] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if dirty then
|
else
|
||||||
self:markDailyTaskDirty()
|
self.progRewardData[stageId] = true
|
||||||
end
|
end
|
||||||
|
self.dailyRedState = nil
|
||||||
|
self:setDirty()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 成就 ---------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
-- 获取领奖条件
|
||||||
|
function DailyTaskData:getAchievementCondition(achievementId, stage)
|
||||||
|
return TaskAchievementCfg[achievementId].number[stage]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取奖励
|
||||||
|
function DailyTaskData:getAchievementReward(achievementId, stage)
|
||||||
|
return TaskAchievementCfg[achievementId].reward[stage]
|
||||||
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:getTaskTypeByAchievementId(achievementId)
|
||||||
|
return TaskAchievementCfg[achievementId].type
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取当前进度
|
||||||
|
function DailyTaskData:getAchievementProg(achievementId)
|
||||||
|
return self.achievementData[achievementId] or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 获取任务总共阶段
|
||||||
|
function DailyTaskData:getAchievementTotalStage(achievementId)
|
||||||
|
return #TaskAchievementCfg[achievementId].number
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 当前所处阶段
|
||||||
|
function DailyTaskData:getAchievementStage(achievementId)
|
||||||
|
local cfg = TaskAchievementCfg[achievementId]
|
||||||
|
local stageNum = #cfg.number
|
||||||
|
for stage = 1, stageNum do
|
||||||
|
if self:canClaimAchievement(achievementId, stage) then
|
||||||
|
return stage
|
||||||
|
end
|
||||||
|
if not self:isAchievementFinished(achievementId, stage) then
|
||||||
|
return stage
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return stageNum
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 是否已完成
|
||||||
|
function DailyTaskData:isAchievementFinished(achievementId, stage)
|
||||||
|
return self:getAchievementProg(achievementId) >= self:getAchievementCondition(achievementId, stage)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 是否已领奖
|
||||||
|
function DailyTaskData:isAchievementReceived(achievementId, stage)
|
||||||
|
achievementId = tonumber(achievementId)
|
||||||
|
return self.achievementRewardData[achievementId] and self.achievementRewardData[achievementId] >= stage or false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 是否可领奖
|
||||||
|
function DailyTaskData:canClaimAchievement(achievementId, stage)
|
||||||
|
if self:isAchievementReceived(achievementId, stage) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if not self:isAchievementFinished(achievementId, stage) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function DailyTaskData:getAchievementIdsSort()
|
||||||
|
local temp = {}
|
||||||
|
for id, info in ipairs(TaskAchievementCfg) do
|
||||||
|
local info = {id = id, sort = id}
|
||||||
|
local stage = self:getAchievementStage(id)
|
||||||
|
if self:canClaimAchievement(id, stage) then
|
||||||
|
info.sort = info.sort - 10000
|
||||||
|
end
|
||||||
|
if self:isAchievementReceived(id, stage) then
|
||||||
|
info.sort = info.sort + 10000
|
||||||
|
end
|
||||||
|
table.insert(temp, info)
|
||||||
|
end
|
||||||
|
table.sort(temp, function(a, b)
|
||||||
|
return a.sort < b.sort
|
||||||
|
end)
|
||||||
|
|
||||||
|
local ids = {}
|
||||||
|
for i, data in ipairs(temp) do
|
||||||
|
table.insert(ids, data.id)
|
||||||
|
end
|
||||||
|
return ids
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 领奖成功
|
||||||
|
function DailyTaskData:onAchievementClaimed(achievementId, stage)
|
||||||
|
if achievementId == nil or stage == nil then
|
||||||
|
-- 一键领取
|
||||||
|
for achievementId, info in ipairs(TaskAchievementCfg) do
|
||||||
|
for stage = self:getAchievementStage(achievementId), self:getAchievementTotalStage(achievementId) do
|
||||||
|
if self:canClaimAchievement(achievementId, stage) then
|
||||||
|
self.achievementRewardData[achievementId] = stage
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.achievementRewardData[achievementId] = stage
|
||||||
|
end
|
||||||
|
self.achievementRedState = nil
|
||||||
|
self:setDirty()
|
||||||
end
|
end
|
||||||
|
|
||||||
return DailyTaskData
|
return DailyTaskData
|
||||||
Loading…
x
Reference in New Issue
Block a user