|
|
@@ -184,7 +184,7 @@ end
|
|
|
function getTaskLeftTime(actStartTime, mainType)
|
|
|
local time = getTaskTime(mainType)
|
|
|
if not time then return end
|
|
|
- local actLeftTime = getActLeftTime(actStartTime)
|
|
|
+ local actLeftTime = getActLeftTime()
|
|
|
return actLeftTime % time
|
|
|
end
|
|
|
|
|
|
@@ -195,7 +195,7 @@ function isOpen(human)
|
|
|
if openDay and openDay < absActConfig.openDay then
|
|
|
return
|
|
|
end
|
|
|
- if not getActStartTime(human) then
|
|
|
+ if not getActStartTime() then
|
|
|
return
|
|
|
end
|
|
|
return true
|
|
|
@@ -381,7 +381,7 @@ function addJifen(human, value)
|
|
|
end
|
|
|
local lvdefine = lvConfigs[1]
|
|
|
checkDB(human, actStartTime,groupID)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ if not next(human.db.heroGrowUp) then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -407,7 +407,7 @@ end
|
|
|
|
|
|
-- 设置购买
|
|
|
function setBuyKing(human, actStartTime)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ if not next(human.db.heroGrowUp) then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -416,7 +416,8 @@ end
|
|
|
|
|
|
-- 设置领奖
|
|
|
function setGetReward(human,lv)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ local actStartTime = getActStartTime()
|
|
|
+ if not next(human.db.heroGrowUp) then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -460,7 +461,8 @@ end
|
|
|
|
|
|
-- 设置领奖
|
|
|
function setGetExReward(human,lv)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ local actStartTime = getActStartTime()
|
|
|
+ if not next(human.db.heroGrowUp) then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -484,7 +486,7 @@ end
|
|
|
|
|
|
-- 设置已领取
|
|
|
function setGetTask(human, actStartTime, id, cf)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ if not next(human.db.heroGrowUp)then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -525,7 +527,7 @@ end
|
|
|
|
|
|
-- 更新进度
|
|
|
function updateValue(human, actStartTime, mainType, taskType, key, value)
|
|
|
- if not human.db.heroGrowUp then
|
|
|
+ if not next(human.db.heroGrowUp) then
|
|
|
initDB(human, actStartTime)
|
|
|
end
|
|
|
local heroGrowUpDB = human.db.heroGrowUp
|
|
|
@@ -590,7 +592,7 @@ end
|
|
|
-------------------------------------------- msg -------------------------------------------------------
|
|
|
-- 封装基础信息
|
|
|
function fontBaseNet(net, human, actStartTime, lvdefine)
|
|
|
- net.leftTime = getActLeftTime(actStartTime)
|
|
|
+ net.leftTime = getActLeftTime()
|
|
|
net.lv = getLv(human)
|
|
|
net.jifen = getJifen(human)
|
|
|
net.maxJifen = lvdefine.needJifen
|