Core/Config: allow to specify daily quest reset hour in config.

Also default it to 3:00AM, as that's when daily quests used to reset during WotLK.
This commit is contained in:
SnapperRy
2016-09-30 15:27:31 +02:00
parent 3bccffeeaf
commit e9870fb1fc
3 changed files with 12 additions and 2 deletions

View File

@@ -872,6 +872,7 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_CAST_UNSTUCK] = sConfigMgr->GetBoolDefault("CastUnstuck", true);
m_int_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfigMgr->GetIntDefault("Instance.ResetTimeHour", 4);
m_int_configs[CONFIG_INSTANCE_UNLOAD_DELAY] = sConfigMgr->GetIntDefault("Instance.UnloadDelay", 30 * MINUTE * IN_MILLISECONDS);
m_int_configs[CONFIG_DAILY_QUEST_RESET_TIME_HOUR] = sConfigMgr->GetIntDefault("Quests.DailyResetTime", 3);
m_int_configs[CONFIG_MAX_PRIMARY_TRADE_SKILL] = sConfigMgr->GetIntDefault("MaxPrimaryTradeSkill", 2);
m_int_configs[CONFIG_MIN_PETITION_SIGNS] = sConfigMgr->GetIntDefault("MinPetitionSigns", 9);
@@ -2948,12 +2949,11 @@ void World::InitDailyQuestResetTime(bool loading)
}
}
// client built-in time for reset is 6:00 AM
// FIX ME: client not show day start time
time_t curTime = time(NULL);
tm localTm;
localtime_r(&curTime, &localTm);
localTm.tm_hour = 6;
localTm.tm_hour = getIntConfig(CONFIG_DAILY_QUEST_RESET_TIME_HOUR);
localTm.tm_min = 0;
localTm.tm_sec = 0;

View File

@@ -242,6 +242,7 @@ enum WorldIntConfigs
CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE,
CONFIG_INSTANCE_RESET_TIME_HOUR,
CONFIG_INSTANCE_UNLOAD_DELAY,
CONFIG_DAILY_QUEST_RESET_TIME_HOUR,
CONFIG_MAX_PRIMARY_TRADE_SKILL,
CONFIG_MIN_PETITION_SIGNS,
CONFIG_GM_LOGIN_STATE,

View File

@@ -1017,6 +1017,15 @@ Quests.IgnoreAutoAccept = 0
Quests.IgnoreAutoComplete = 0
#
# Quests.DailyResetTime
# Description: Hour of the day when daily quest reset occurs.
# Range: 0-23
# Default: 3 - (3:00 AM, Blizzlike)
#
Quests.DailyResetTime = 3
#
# Guild.EventLogRecordsCount
# Description: Number of log entries for guild events that are stored per guild. Old entries