1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- ConditionHandler:register(ConditionId.combineServer["合服天数>"], "合服天数>", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local nowSec = getbaseinfo("nowsec")
- return nowSec > combineSec + (tonumber(param)) * 60 * 60 * 24
- end)
- ConditionHandler:register(ConditionId.combineServer["合服天数>="], "合服天数>=", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local nowSec= getbaseinfo("nowsec")
- return nowSec >= combineSec + (tonumber(param) - 1) * 60 * 60 * 24
- end)
- ConditionHandler:register(ConditionId.combineServer["合服天数=="], "合服天数==", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local resultTime = combineSec + (tonumber(param) - 1) * 60 * 60 * 24 + 1
- local nowSec= getbaseinfo("nowsec")
- return TimeUtil.isSameDay(resultTime, nowSec)
- end)
- ConditionHandler:register(ConditionId.combineServer["合服天数<="], "合服天数<=", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local nowSec= getbaseinfo("nowsec")
- return nowSec <= combineSec + (tonumber(param)) * 60 * 60 * 24
- end)
- ConditionHandler:register(ConditionId.combineServer["合服天数<"], "合服天数<", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local nowSec= getbaseinfo("nowsec")
- return nowSec < combineSec + (tonumber(param) - 1) * 60 * 60 * 24 + 1
- end)
- ConditionHandler:register(ConditionId.combineServer["合服天数~="], "合服天数~=", function(actor, param)
- local combineTime = getbaseinfo("combinetime")
- if string.isNullOrEmpty(combineTime) then
- return false
- end
- local combineSec = TimeUtil.getDawnSec(combineTime)
- local nowSec= getbaseinfo("nowsec")
- local resultTime = combineSec + (tonumber(param) - 1) * 60 * 60 * 24 + 1
- return not TimeUtil.isSameDay(resultTime, nowSec)
- end)
|