AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
World Class Reference

The World. More...

#include "World.h"

Inheritance diagram for World:
IWorld

Public Member Functions

 World ()
 World constructor.
 
 ~World () override
 World destructor.
 
bool IsClosed () const override
 Deny clients?
 
void SetClosed (bool val) override
 Close world.
 
AccountTypes GetPlayerSecurityLimit () const override
 Security level limitations.
 
void SetPlayerSecurityLimit (AccountTypes sec) override
 
void LoadDBAllowedSecurityLevel () override
 
bool getAllowMovement () const override
 
void SetAllowMovement (bool allow) override
 Allow/Disallow object movements.
 
void SetNewCharString (std::string const &str) override
 Set the string for new characters (first login)
 
std::string const & GetNewCharString () const override
 Get the string for new characters (first login)
 
LocaleConstant GetDefaultDbcLocale () const override
 
std::string const & GetDataPath () const override
 Get the path where data (dbc, maps) are stored on disk.
 
Seconds GetNextDailyQuestsResetTime () const override
 Next daily quests and random bg reset time.
 
Seconds GetNextWeeklyQuestsResetTime () const override
 
Seconds GetNextRandomBGResetTime () const override
 
uint16 GetConfigMaxSkillValue () const override
 Get the maximum skill level a player can reach.
 
void SetInitialWorldSettings () override
 Initialize the World.
 
void LoadConfigSettings (bool reload=false) override
 Initialize config values.
 
bool IsShuttingDown () const override
 Are we in the middle of a shutdown?
 
uint32 GetShutDownTimeLeft () const override
 
void ShutdownServ (uint32 time, uint32 options, uint8 exitcode, std::string const &reason=std::string()) override
 Shutdown the server.
 
void ShutdownCancel () override
 Cancel a planned server shutdown.
 
void ShutdownMsg (bool show=false, Player *player=nullptr, std::string const &reason=std::string()) override
 Displays a shutdown message at specific intervals or immediately if required.
 
void Update (uint32 diff) override
 Update the World !
 
void setRate (Rates rate, float value) override
 Set a server rate (see Rates)
 
float getRate (Rates rate) const override
 Get a server rate (see Rates)
 
void setBoolConfig (WorldBoolConfigs index, bool value) override
 Set a server configuration element (see #WorldConfigs)
 
bool getBoolConfig (WorldBoolConfigs index) const override
 Get a server configuration element (see #WorldConfigs)
 
void setFloatConfig (WorldFloatConfigs index, float value) override
 Set a server configuration element (see #WorldConfigs)
 
float getFloatConfig (WorldFloatConfigs index) const override
 Get a server configuration element (see #WorldConfigs)
 
void setIntConfig (WorldIntConfigs index, uint32 value) override
 Set a server configuration element (see #WorldConfigs)
 
uint32 getIntConfig (WorldIntConfigs index) const override
 Get a server configuration element (see #WorldConfigs)
 
void setWorldState (uint32 index, uint64 value) override
 
uint64 getWorldState (uint32 index) const override
 
void LoadWorldStates () override
 
bool IsPvPRealm () const override
 Are we on a "Player versus Player" server?
 
bool IsFFAPvPRealm () const override
 
uint32 GetNextWhoListUpdateDelaySecs () override
 
void ProcessCliCommands () override
 
void QueueCliCommand (CliCommandHolder *commandHolder) override
 
void ForceGameEventUpdate () override
 
void UpdateRealmCharCount (uint32 accid) override
 
LocaleConstant GetAvailableDbcLocale (LocaleConstant locale) const override
 
void LoadDBVersion () override
 
char const * GetDBVersion () const override
 
void UpdateAreaDependentAuras () override
 
uint32 GetCleaningFlags () const override
 
void SetCleaningFlags (uint32 flags) override
 
void ResetEventSeasonalQuests (uint16 event_id) override
 
std::string const & GetRealmName () const override
 
void SetRealmName (std::string name) override
 
void RemoveOldCorpses () override
 
- Public Member Functions inherited from IWorld
virtual ~IWorld ()=default
 

Static Public Member Functions

static Worldinstance ()
 
static uint8 GetExitCode ()
 
static void StopNow (uint8 exitcode)
 
static bool IsStopped ()
 
static float GetMaxVisibleDistanceOnContinents ()
 
static float GetMaxVisibleDistanceInInstances ()
 
static float GetMaxVisibleDistanceInBGArenas ()
 

Static Public Attributes

static uint32 m_worldLoopCounter = 0
 

Protected Member Functions

void _UpdateGameTime ()
 Update the game time.
 
void _UpdateRealmCharCount (PreparedQueryResult resultCharCount, uint32 accountId)
 
void InitDailyQuestResetTime ()
 
void InitWeeklyQuestResetTime ()
 
void InitMonthlyQuestResetTime ()
 
void InitRandomBGResetTime ()
 
void InitCalendarOldEventsDeletionTime ()
 
void InitGuildResetTime ()
 
void ResetDailyQuests ()
 
void ResetWeeklyQuests ()
 
void ResetMonthlyQuests ()
 
void ResetRandomBG ()
 
void CalendarDeleteOldEvents ()
 
void ResetGuildCap ()
 

Private Types

typedef std::map< uint32, uint64WorldStatesMap
 

Private Member Functions

void DetectDBCLang ()
 
void ProcessQueryCallbacks ()
 
void FinalizePlayerWorldSession (WorldSession *session)
 Executed when a World Session is being finalized. Be it from a normal login or via queue popping.
 

Private Attributes

uint32 _shutdownTimer
 
uint32 _shutdownMask
 
std::string _shutdownReason
 
uint32 _cleaningFlags
 
bool _isClosed
 
IntervalTimer _timers [WUPDATE_COUNT]
 
Seconds _mail_expire_check_timer
 
std::string _newCharString
 
float _rate_values [MAX_RATES]
 
uint32 _int_configs [INT_CONFIG_VALUE_COUNT]
 
bool _bool_configs [BOOL_CONFIG_VALUE_COUNT]
 
float _float_configs [FLOAT_CONFIG_VALUE_COUNT]
 
WorldStatesMap _worldstates
 
AccountTypes _allowedSecurityLevel
 
LocaleConstant _defaultDbcLocale
 
uint32 _availableDbcLocaleMask
 
bool _allowMovement
 
std::string _dataPath
 
std::string _realmName
 
LockedQueue< CliCommandHolder * > _cliCmdQueue
 
Seconds _nextDailyQuestReset
 
Seconds _nextWeeklyQuestReset
 
Seconds _nextMonthlyQuestReset
 
Seconds _nextRandomBGReset
 
Seconds _nextCalendarOldEventsDeletionTime
 
Seconds _nextGuildReset
 
std::string _dbVersion
 
QueryCallbackProcessor _queryProcessor
 

Static Private Attributes

static std::atomic_long _stopEvent = false
 
static uint8 _exitCode = SHUTDOWN_EXIT_CODE
 
static float _maxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE
 
static float _maxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE
 
static float _maxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS
 

Detailed Description

The World.

Member Typedef Documentation

◆ WorldStatesMap

typedef std::map<uint32, uint64> World::WorldStatesMap
private

Constructor & Destructor Documentation

◆ World()

World::World ( )

World constructor.

115{
117 _allowMovement = true;
118 _shutdownMask = 0;
119 _shutdownTimer = 0;
125 _nextGuildReset = 0s;
128 _isClosed = false;
129 _cleaningFlags = 0;
130
131 memset(_rate_values, 0, sizeof(_rate_values));
132 memset(_int_configs, 0, sizeof(_int_configs));
133 memset(_bool_configs, 0, sizeof(_bool_configs));
134 memset(_float_configs, 0, sizeof(_float_configs));
135}
@ LOCALE_enUS
Definition Common.h:66
@ SEC_PLAYER
Definition Common.h:57
Seconds _nextGuildReset
Definition World.h:346
uint32 _shutdownMask
Definition World.h:305
bool _bool_configs[BOOL_CONFIG_VALUE_COUNT]
Definition World.h:319
uint32 _cleaningFlags
Definition World.h:308
float _float_configs[FLOAT_CONFIG_VALUE_COUNT]
Definition World.h:320
LocaleConstant _defaultDbcLocale
Definition World.h:324
float _rate_values[MAX_RATES]
Definition World.h:317
Seconds _nextDailyQuestReset
Definition World.h:341
bool _isClosed
Definition World.h:310
Seconds _nextMonthlyQuestReset
Definition World.h:343
uint32 _int_configs[INT_CONFIG_VALUE_COUNT]
Definition World.h:318
Seconds _nextCalendarOldEventsDeletionTime
Definition World.h:345
Seconds _nextWeeklyQuestReset
Definition World.h:342
uint32 _shutdownTimer
Definition World.h:304
Seconds _nextRandomBGReset
Definition World.h:344
bool _allowMovement
Definition World.h:327
AccountTypes _allowedSecurityLevel
Definition World.h:323
Seconds _mail_expire_check_timer
Definition World.h:313

References _allowedSecurityLevel, _allowMovement, _bool_configs, _cleaningFlags, _defaultDbcLocale, _float_configs, _int_configs, _isClosed, _mail_expire_check_timer, _nextCalendarOldEventsDeletionTime, _nextDailyQuestReset, _nextGuildReset, _nextMonthlyQuestReset, _nextRandomBGReset, _nextWeeklyQuestReset, _rate_values, _shutdownMask, _shutdownTimer, LOCALE_enUS, and SEC_PLAYER.

◆ ~World()

World::~World ( )
override

World destructor.

139{
140 CliCommandHolder* command = nullptr;
141 while (_cliCmdQueue.next(command))
142 delete command;
143
146}
bool next(T &result)
Gets the next item in the queue and removes it.
Definition LockedQueue.h:77
static void clear()
Definition MMapFactory.cpp:48
static void clear()
Definition VMapFactory.cpp:39
LockedQueue< CliCommandHolder * > _cliCmdQueue
Definition World.h:338
Storage class for commands issued for delayed execution.
Definition IWorld.h:34

References _cliCmdQueue, MMAP::MMapFactory::clear(), VMAP::VMapFactory::clear(), and LockedQueue< T, StorageType >::next().

Member Function Documentation

◆ _UpdateGameTime()

void World::_UpdateGameTime ( )
protected

Update the game time.

  • update the time
  • if there is a shutdown timer
  • ... and it is overdue, stop the world (set m_stopEvent)
  • ... else decrease it and if necessary display a shutdown countdown to the users
2352{
2354 Seconds lastGameTime = GameTime::GetGameTime();
2356
2357 Seconds elapsed = GameTime::GetGameTime() - lastGameTime;
2358
2360 if (!IsStopped() && _shutdownTimer > 0 && elapsed > 0s)
2361 {
2363 if (_shutdownTimer <= elapsed.count())
2364 {
2365 if (!(_shutdownMask & SHUTDOWN_MASK_IDLE) || sWorldSessionMgr->GetActiveAndQueuedSessionCount() == 0)
2366 _stopEvent = true; // exist code already set
2367 else
2368 _shutdownTimer = 1; // minimum timer value to wait idle state
2369 }
2371 else
2372 {
2373 _shutdownTimer -= elapsed.count();
2374
2375 ShutdownMsg();
2376 }
2377 }
2378}
std::chrono::seconds Seconds
Seconds shorthand typedef.
Definition Duration.h:30
#define sWorldSessionMgr
Definition WorldSessionMgr.h:110
void ShutdownMsg(bool show=false, Player *player=nullptr, std::string const &reason=std::string()) override
Displays a shutdown message at specific intervals or immediately if required.
Definition World.cpp:2423
static std::atomic_long _stopEvent
Definition World.h:302
static bool IsStopped()
Definition World.h:196
@ SHUTDOWN_MASK_IDLE
Definition World.h:48
void UpdateGameTimers()
Update all timers.
Definition GameTime.cpp:63
Seconds GetGameTime()
Definition GameTime.cpp:38

References _shutdownMask, _shutdownTimer, _stopEvent, GameTime::GetGameTime(), IsStopped(), SHUTDOWN_MASK_IDLE, ShutdownMsg(), sWorldSessionMgr, and GameTime::UpdateGameTimers().

Referenced by Update().

◆ _UpdateRealmCharCount()

void World::_UpdateRealmCharCount ( PreparedQueryResult  resultCharCount,
uint32  accountId 
)
protected
2499{
2500 uint8 charCount{0};
2501 if (resultCharCount)
2502 {
2503 Field* fields = resultCharCount->Fetch();
2504 charCount = uint8(fields[1].Get<uint64>());
2505 }
2506
2507 LoginDatabaseTransaction trans = LoginDatabase.BeginTransaction();
2508
2510 stmt->SetData(0, charCount);
2511 stmt->SetData(1, accountId);
2512 stmt->SetData(2, realm.Id.Realm);
2513 trans->Append(stmt);
2514
2515 LoginDatabase.CommitTransaction(trans);
2516}
SQLTransaction< LoginDatabaseConnection > LoginDatabaseTransaction
Definition DatabaseEnvFwd.h:70
DatabaseWorkerPool< LoginDatabaseConnection > LoginDatabase
Accessor to the realm/login database.
Definition DatabaseEnv.cpp:22
std::uint8_t uint8
Definition Define.h:109
@ LOGIN_REP_REALM_CHARACTERS
Definition LoginDatabase.h:63
Class used to access individual fields of database query result.
Definition Field.h:98
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition PreparedStatement.h:77
Definition PreparedStatement.h:157
AC_GAME_API Realm realm
Definition World.cpp:111
uint32 Realm
Definition Realm.h:43
RealmHandle Id
Definition Realm.h:69

References Realm::Id, LOGIN_REP_REALM_CHARACTERS, LoginDatabase, realm, RealmHandle::Realm, and PreparedStatementBase::SetData().

Referenced by UpdateRealmCharCount().

◆ CalendarDeleteOldEvents()

void World::CalendarDeleteOldEvents ( )
protected
2682{
2683 LOG_INFO("server.worldserver", "Calendar deletion of old events.");
2684
2687 sCalendarMgr->DeleteOldEvents();
2688}
#define sCalendarMgr
Definition CalendarMgr.h:344
@ CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR
Definition IWorld.h:354
#define LOG_INFO(filterType__,...)
Definition Log.h:165
@ WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME
Definition WorldStateDefines.h:619
uint32 getIntConfig(WorldIntConfigs index) const override
Get a server configuration element (see #WorldConfigs)
Definition World.h:239
#define sWorld
Definition World.h:363
AC_COMMON_API time_t GetNextTimeWithDayAndHour(int8 dayOfWeek, int8 hour)
Definition Timer.cpp:302

References _nextCalendarOldEventsDeletionTime, CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR, getIntConfig(), Acore::Time::GetNextTimeWithDayAndHour(), LOG_INFO, sCalendarMgr, sWorld, and WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME.

Referenced by Update().

◆ DetectDBCLang()

void World::DetectDBCLang ( )
private
2007{
2008 uint8 m_lang_confid = sConfigMgr->GetOption<int32>("DBC.Locale", 255);
2009
2010 if (m_lang_confid != 255 && m_lang_confid >= TOTAL_LOCALES)
2011 {
2012 LOG_ERROR("server.loading", "Incorrect DBC.Locale! Must be >= 0 and < {} (set to 0)", TOTAL_LOCALES);
2013 m_lang_confid = LOCALE_enUS;
2014 }
2015
2016 ChrRacesEntry const* race = sChrRacesStore.LookupEntry(1);
2017 std::string availableLocalsStr;
2018
2019 uint8 default_locale = TOTAL_LOCALES;
2020 for (uint8 i = default_locale - 1; i < TOTAL_LOCALES; --i) // -1 will be 255 due to uint8
2021 {
2022 if (race->name[i][0] != '\0') // check by race names
2023 {
2024 default_locale = i;
2025 _availableDbcLocaleMask |= (1 << i);
2026 availableLocalsStr += localeNames[i];
2027 availableLocalsStr += " ";
2028 }
2029 }
2030
2031 if (default_locale != m_lang_confid && m_lang_confid < TOTAL_LOCALES &&
2032 (_availableDbcLocaleMask & (1 << m_lang_confid)))
2033 {
2034 default_locale = m_lang_confid;
2035 }
2036
2037 if (default_locale >= TOTAL_LOCALES)
2038 {
2039 LOG_ERROR("server.loading", "Unable to determine your DBC Locale! (corrupt DBC?)");
2040 exit(1);
2041 }
2042
2043 _defaultDbcLocale = LocaleConstant(default_locale);
2044
2045 LOG_INFO("server.loading", "Using {} DBC Locale As Default. All Available DBC locales: {}", localeNames[GetDefaultDbcLocale()], availableLocalsStr.empty() ? "<none>" : availableLocalsStr);
2046 LOG_INFO("server.loading", " ");
2047}
char const * localeNames[TOTAL_LOCALES]
Definition Common.cpp:20
LocaleConstant
Definition Common.h:65
@ TOTAL_LOCALES
Definition Common.h:76
#define sConfigMgr
Definition Config.h:74
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
std::int32_t int32
Definition Define.h:103
#define LOG_ERROR(filterType__,...)
Definition Log.h:157
uint32 _availableDbcLocaleMask
Definition World.h:325
LocaleConstant GetDefaultDbcLocale() const override
Definition World.h:168
Definition DBCStructure.h:678
char const * name[16]
Definition DBCStructure.h:690

References _availableDbcLocaleMask, _defaultDbcLocale, GetDefaultDbcLocale(), LOCALE_enUS, localeNames, LOG_ERROR, LOG_INFO, ChrRacesEntry::name, sChrRacesStore, sConfigMgr, and TOTAL_LOCALES.

Referenced by SetInitialWorldSettings().

◆ FinalizePlayerWorldSession()

void World::FinalizePlayerWorldSession ( WorldSession session)
inlineprivate

Executed when a World Session is being finalized. Be it from a normal login or via queue popping.

Parameters
sessionThe World Session that we are finalizing.

◆ ForceGameEventUpdate()

void World::ForceGameEventUpdate ( )
overridevirtual

Implements IWorld.

2298{
2299 _timers[WUPDATE_EVENTS].Reset(); // to give time for Update() to be processed
2300 uint32 nextGameEvent = sGameEventMgr->Update();
2301 _timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);
2303}
std::uint32_t uint32
Definition Define.h:107
#define sGameEventMgr
Definition GameEventMgr.h:201
IntervalTimer _timers[WUPDATE_COUNT]
Definition World.h:312
@ WUPDATE_EVENTS
Definition World.h:64
void SetInterval(time_t interval)
Definition Timer.h:179
void Reset()
Definition Timer.h:166

References _timers, IntervalTimer::Reset(), IntervalTimer::SetInterval(), sGameEventMgr, and WUPDATE_EVENTS.

◆ getAllowMovement()

bool World::getAllowMovement ( ) const
inlineoverridevirtual
Todo:
Actions on m_allowMovement still to be implemented Is movement allowed?

Implements IWorld.

159{ return _allowMovement; }

References _allowMovement.

◆ GetAvailableDbcLocale()

LocaleConstant World::GetAvailableDbcLocale ( LocaleConstant  locale) const
inlineoverridevirtual

Implements IWorld.

267{ if (_availableDbcLocaleMask & (1 << locale)) return locale; else return _defaultDbcLocale; }

References _availableDbcLocaleMask, and _defaultDbcLocale.

◆ getBoolConfig()

bool World::getBoolConfig ( WorldBoolConfigs  index) const
inlineoverridevirtual

Get a server configuration element (see #WorldConfigs)

Implements IWorld.

214 {
215 return index < BOOL_CONFIG_VALUE_COUNT ? _bool_configs[index] : false;
216 }
@ BOOL_CONFIG_VALUE_COUNT
Definition IWorld.h:184

References _bool_configs, and BOOL_CONFIG_VALUE_COUNT.

◆ GetCleaningFlags()

uint32 World::GetCleaningFlags ( ) const
inlineoverridevirtual

Implements IWorld.

275{ return _cleaningFlags; }

References _cleaningFlags.

◆ GetConfigMaxSkillValue()

uint16 World::GetConfigMaxSkillValue ( ) const
inlineoverridevirtual

Get the maximum skill level a player can reach.

Implements IWorld.

180 {
182 return lvl > 60 ? 300 + ((lvl - 60) * 75) / 10 : lvl * 5;
183 }
std::uint16_t uint16
Definition Define.h:108
@ CONFIG_MAX_PLAYER_LEVEL
Definition IWorld.h:235

References CONFIG_MAX_PLAYER_LEVEL, and getIntConfig().

◆ GetDataPath()

std::string const & World::GetDataPath ( ) const
inlineoverridevirtual

Get the path where data (dbc, maps) are stored on disk.

Implements IWorld.

171{ return _dataPath; }
std::string _dataPath
Definition World.h:328

References _dataPath.

◆ GetDBVersion()

char const * World::GetDBVersion ( ) const
inlineoverridevirtual

Implements IWorld.

271{ return _dbVersion.c_str(); }
std::string _dbVersion
Definition World.h:349

References _dbVersion.

◆ GetDefaultDbcLocale()

LocaleConstant World::GetDefaultDbcLocale ( ) const
inlineoverridevirtual

Implements IWorld.

168{ return _defaultDbcLocale; }

References _defaultDbcLocale.

Referenced by DetectDBCLang(), and SetInitialWorldSettings().

◆ GetExitCode()

static uint8 World::GetExitCode ( )
inlinestatic
194{ return _exitCode; }
static uint8 _exitCode
Definition World.h:303

References _exitCode.

Referenced by main().

◆ getFloatConfig()

float World::getFloatConfig ( WorldFloatConfigs  index) const
inlineoverridevirtual

Get a server configuration element (see #WorldConfigs)

Implements IWorld.

227 {
228 return index < FLOAT_CONFIG_VALUE_COUNT ? _float_configs[index] : 0;
229 }
@ FLOAT_CONFIG_VALUE_COUNT
Definition IWorld.h:204

References _float_configs, and FLOAT_CONFIG_VALUE_COUNT.

◆ getIntConfig()

uint32 World::getIntConfig ( WorldIntConfigs  index) const
inlineoverridevirtual

Get a server configuration element (see #WorldConfigs)

Implements IWorld.

240 {
241 return index < INT_CONFIG_VALUE_COUNT ? _int_configs[index] : 0;
242 }
@ INT_CONFIG_VALUE_COUNT
Definition IWorld.h:429

References _int_configs, and INT_CONFIG_VALUE_COUNT.

Referenced by CalendarDeleteOldEvents(), GetConfigMaxSkillValue(), InitCalendarOldEventsDeletionTime(), IsFFAPvPRealm(), IsPvPRealm(), and SetInitialWorldSettings().

◆ GetMaxVisibleDistanceInBGArenas()

static float World::GetMaxVisibleDistanceInBGArenas ( )
inlinestatic
static float _maxVisibleDistanceInBGArenas
Definition World.h:333

References _maxVisibleDistanceInBGArenas.

Referenced by Battleground::_ProcessJoin(), and BattlegroundMap::InitVisibilityDistance().

◆ GetMaxVisibleDistanceInInstances()

static float World::GetMaxVisibleDistanceInInstances ( )
inlinestatic
static float _maxVisibleDistanceInInstances
Definition World.h:332

References _maxVisibleDistanceInInstances.

Referenced by InstanceMap::InitVisibilityDistance().

◆ GetMaxVisibleDistanceOnContinents()

static float World::GetMaxVisibleDistanceOnContinents ( )
inlinestatic
static float _maxVisibleDistanceOnContinents
Definition World.h:331

References _maxVisibleDistanceOnContinents.

Referenced by Map::InitVisibilityDistance().

◆ GetNewCharString()

std::string const & World::GetNewCharString ( ) const
inlineoverridevirtual

Get the string for new characters (first login)

Implements IWorld.

166{ return _newCharString; }
std::string _newCharString
Definition World.h:315

References _newCharString.

◆ GetNextDailyQuestsResetTime()

Seconds World::GetNextDailyQuestsResetTime ( ) const
inlineoverridevirtual

Next daily quests and random bg reset time.

Implements IWorld.

174{ return _nextDailyQuestReset; }

References _nextDailyQuestReset.

◆ GetNextRandomBGResetTime()

Seconds World::GetNextRandomBGResetTime ( ) const
inlineoverridevirtual

Implements IWorld.

176{ return _nextRandomBGReset; }

References _nextRandomBGReset.

◆ GetNextWeeklyQuestsResetTime()

Seconds World::GetNextWeeklyQuestsResetTime ( ) const
inlineoverridevirtual

Implements IWorld.

175{ return _nextWeeklyQuestReset; }

References _nextWeeklyQuestReset.

◆ GetNextWhoListUpdateDelaySecs()

uint32 World::GetNextWhoListUpdateDelaySecs ( )
overridevirtual

Implements IWorld.

2800{
2801 if (_timers[WUPDATE_5_SECS].Passed())
2802 return 1;
2803
2805 t = std::min(t, (uint32)_timers[WUPDATE_5_SECS].GetInterval());
2806
2807 return uint32(std::ceil(t / 1000.0f));
2808}
@ WUPDATE_5_SECS
Definition World.h:69
time_t GetCurrent() const
Definition Timer.h:189
time_t GetInterval() const
Definition Timer.h:184

References _timers, IntervalTimer::GetCurrent(), IntervalTimer::GetInterval(), and WUPDATE_5_SECS.

◆ GetPlayerSecurityLimit()

AccountTypes World::GetPlayerSecurityLimit ( ) const
inlineoverridevirtual

Security level limitations.

Implements IWorld.

153{ return _allowedSecurityLevel; }

References _allowedSecurityLevel.

◆ getRate()

float World::getRate ( Rates  rate) const
inlineoverridevirtual

Get a server rate (see Rates)

Implements IWorld.

203{ return _rate_values[rate]; }

References _rate_values.

Referenced by LoadConfigSettings().

◆ GetRealmName()

std::string const & World::GetRealmName ( ) const
inlineoverridevirtual

Implements IWorld.

279{ return _realmName; } // pussywizard
std::string _realmName
Definition World.h:335

References _realmName.

◆ GetShutDownTimeLeft()

uint32 World::GetShutDownTimeLeft ( ) const
inlineoverridevirtual

Implements IWorld.

190{ return _shutdownTimer; }

References _shutdownTimer.

◆ getWorldState()

uint64 World::getWorldState ( uint32  index) const
overridevirtual

Implements IWorld.

2774{
2775 auto const& itr = _worldstates.find(index);
2776 return itr != _worldstates.end() ? itr->second : 0;
2777}
WorldStatesMap _worldstates
Definition World.h:322

References _worldstates.

Referenced by InitCalendarOldEventsDeletionTime(), and InitGuildResetTime().

◆ InitCalendarOldEventsDeletionTime()

void World::InitCalendarOldEventsDeletionTime ( )
protected
2563{
2565 Seconds nextDeletionTime = currentDeletionTime > 0s ? currentDeletionTime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, getIntConfig(CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR)));
2566
2567 if (currentDeletionTime == 0s)
2568 {
2569 sWorld->setWorldState(WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME, nextDeletionTime.count());
2570 }
2571}
uint64 getWorldState(uint32 index) const override
Definition World.cpp:2773

References CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR, getIntConfig(), Acore::Time::GetNextTimeWithDayAndHour(), getWorldState(), sWorld, and WORLD_STATE_CUSTOM_DAILY_CALENDAR_DELETION_OLD_EVENTS_TIME.

Referenced by SetInitialWorldSettings().

◆ InitDailyQuestResetTime()

void World::InitDailyQuestResetTime ( )
protected
2530{
2533
2534 if (wstime == 0s)
2535 {
2537 }
2538}
@ WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME
Definition WorldStateDefines.h:616

References _nextDailyQuestReset, Acore::Time::GetNextTimeWithDayAndHour(), sWorld, and WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ InitGuildResetTime()

void World::InitGuildResetTime ( )
protected
2574{
2576 _nextGuildReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
2577
2578 if (wstime == 0s)
2579 {
2581 }
2582}
@ WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME
Definition WorldStateDefines.h:617

References _nextGuildReset, Acore::Time::GetNextTimeWithDayAndHour(), getWorldState(), sWorld, and WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ InitMonthlyQuestResetTime()

void World::InitMonthlyQuestResetTime ( )
protected
2541{
2544
2545 if (wstime == 0s)
2546 {
2548 }
2549}
@ WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME
Definition WorldStateDefines.h:618

References _nextMonthlyQuestReset, Acore::Time::GetNextTimeWithDayAndHour(), sWorld, and WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ InitRandomBGResetTime()

void World::InitRandomBGResetTime ( )
protected
2552{
2554 _nextRandomBGReset = wstime > 0s ? wstime : Seconds(Acore::Time::GetNextTimeWithDayAndHour(-1, 6));
2555
2556 if (wstime == 0s)
2557 {
2559 }
2560}
@ WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME
Definition WorldStateDefines.h:614

References _nextRandomBGReset, Acore::Time::GetNextTimeWithDayAndHour(), sWorld, and WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ InitWeeklyQuestResetTime()

void World::InitWeeklyQuestResetTime ( )
protected
2519{
2522
2523 if (wstime == 0s)
2524 {
2526 }
2527}
@ WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME
Definition WorldStateDefines.h:613

References _nextWeeklyQuestReset, Acore::Time::GetNextTimeWithDayAndHour(), sWorld, and WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ instance()

static World * World::instance ( )
static

◆ IsClosed()

bool World::IsClosed ( ) const
overridevirtual

Deny clients?

Implements IWorld.

155{
156 return _isClosed;
157}

References _isClosed.

◆ IsFFAPvPRealm()

bool World::IsFFAPvPRealm ( ) const
overridevirtual

Implements IWorld.

2795{
2797}
@ CONFIG_GAME_TYPE
Definition IWorld.h:217
@ REALM_TYPE_FFA_PVP
Definition Realm.h:62

References CONFIG_GAME_TYPE, getIntConfig(), and REALM_TYPE_FFA_PVP.

Referenced by SetInitialWorldSettings().

◆ IsPvPRealm()

bool World::IsPvPRealm ( ) const
overridevirtual

Are we on a "Player versus Player" server?

Implements IWorld.

2790{
2792}
@ REALM_TYPE_RPPVP
Definition Realm.h:58
@ REALM_TYPE_PVP
Definition Realm.h:55

References CONFIG_GAME_TYPE, getIntConfig(), REALM_TYPE_FFA_PVP, REALM_TYPE_PVP, and REALM_TYPE_RPPVP.

◆ IsShuttingDown()

bool World::IsShuttingDown ( ) const
inlineoverridevirtual

Are we in the middle of a shutdown?

Implements IWorld.

189{ return _shutdownTimer > 0; }

References _shutdownTimer.

◆ IsStopped()

static bool World::IsStopped ( )
inlinestatic

◆ LoadConfigSettings()

void World::LoadConfigSettings ( bool  reload = false)
overridevirtual

Initialize config values.

  • Read the player limit and the Message of the day from the config file
  • Read ticket system setting from the config file
  • Get string for new logins (newly created characters)
  • Send server info on login?
  • Read all rates from the config file
  • Read other configuration items from the config file
Todo:
Add MonsterSight in worldserver.conf or put it as define
  • Load the CharDelete related config options
  • Load the ItemDelete related config options
  • Read the "Data" directory from the config file

Implements IWorld.

169{
170 if (reload)
171 {
172 if (!sConfigMgr->Reload())
173 {
174 LOG_ERROR("server.loading", "World settings reload fail: can't read settings.");
175 return;
176 }
177
178 sLog->LoadFromConfig();
179 sMetric->LoadFromConfigs();
180 }
181
182 // Set realm id and enable db logging
183 sLog->SetRealmId(realm.Id.Realm);
184
185 sScriptMgr->OnBeforeConfigLoad(reload);
186
187 // load update time related configs
189
191 if (!reload)
192 sWorldSessionMgr->SetPlayerAmountLimit(sConfigMgr->GetOption<int32>("PlayerLimit", 1000));
193
195 _bool_configs[CONFIG_ALLOW_TICKETS] = sConfigMgr->GetOption<bool>("AllowTickets", true);
196 _bool_configs[CONFIG_DELETE_CHARACTER_TICKET_TRACE] = sConfigMgr->GetOption<bool>("DeletedCharacterTicketTrace", false);
197
199 SetNewCharString(sConfigMgr->GetOption<std::string>("PlayerStart.String", ""));
200
202 _int_configs[CONFIG_ENABLE_SINFO_LOGIN] = sConfigMgr->GetOption<int32>("Server.LoginInfo", 0);
203
205 _rate_values[RATE_HEALTH] = sConfigMgr->GetOption<float>("Rate.Health", 1);
206 if (_rate_values[RATE_HEALTH] < 0)
207 {
208 LOG_ERROR("server.loading", "Rate.Health ({}) must be > 0. Using 1 instead.", _rate_values[RATE_HEALTH]);
210 }
211 _rate_values[RATE_POWER_MANA] = sConfigMgr->GetOption<float>("Rate.Mana", 1);
213 {
214 LOG_ERROR("server.loading", "Rate.Mana ({}) must be > 0. Using 1 instead.", _rate_values[RATE_POWER_MANA]);
216 }
217 _rate_values[RATE_POWER_RAGE_INCOME] = sConfigMgr->GetOption<float>("Rate.Rage.Income", 1);
218 _rate_values[RATE_POWER_RAGE_LOSS] = sConfigMgr->GetOption<float>("Rate.Rage.Loss", 1);
220 {
221 LOG_ERROR("server.loading", "Rate.Rage.Loss ({}) must be > 0. Using 1 instead.", _rate_values[RATE_POWER_RAGE_LOSS]);
223 }
224 _rate_values[RATE_POWER_RUNICPOWER_INCOME] = sConfigMgr->GetOption<float>("Rate.RunicPower.Income", 1);
225 _rate_values[RATE_POWER_RUNICPOWER_LOSS] = sConfigMgr->GetOption<float>("Rate.RunicPower.Loss", 1);
227 {
228 LOG_ERROR("server.loading", "Rate.RunicPower.Loss ({}) must be > 0. Using 1 instead.", _rate_values[RATE_POWER_RUNICPOWER_LOSS]);
230 }
231 _rate_values[RATE_POWER_FOCUS] = sConfigMgr->GetOption<float>("Rate.Focus", 1.0f);
232 _rate_values[RATE_POWER_ENERGY] = sConfigMgr->GetOption<float>("Rate.Energy", 1.0f);
233
234 _rate_values[RATE_SKILL_DISCOVERY] = sConfigMgr->GetOption<float>("Rate.Skill.Discovery", 1.0f);
235
236 _rate_values[RATE_DROP_ITEM_POOR] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Poor", 1.0f);
237 _rate_values[RATE_DROP_ITEM_NORMAL] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Normal", 1.0f);
238 _rate_values[RATE_DROP_ITEM_UNCOMMON] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Uncommon", 1.0f);
239 _rate_values[RATE_DROP_ITEM_RARE] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Rare", 1.0f);
240 _rate_values[RATE_DROP_ITEM_EPIC] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Epic", 1.0f);
241 _rate_values[RATE_DROP_ITEM_LEGENDARY] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Legendary", 1.0f);
242 _rate_values[RATE_DROP_ITEM_ARTIFACT] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Artifact", 1.0f);
243 _rate_values[RATE_DROP_ITEM_REFERENCED] = sConfigMgr->GetOption<float>("Rate.Drop.Item.Referenced", 1.0f);
244 _rate_values[RATE_DROP_ITEM_REFERENCED_AMOUNT] = sConfigMgr->GetOption<float>("Rate.Drop.Item.ReferencedAmount", 1.0f);
245 _rate_values[RATE_DROP_ITEM_GROUP_AMOUNT] = sConfigMgr->GetOption<float>("Rate.Drop.Item.GroupAmount", 1.0f);
246 _rate_values[RATE_DROP_MONEY] = sConfigMgr->GetOption<float>("Rate.Drop.Money", 1.0f);
247
248 _rate_values[RATE_REWARD_QUEST_MONEY] = sConfigMgr->GetOption<float>("Rate.RewardQuestMoney", 1.0f);
249 _rate_values[RATE_REWARD_BONUS_MONEY] = sConfigMgr->GetOption<float>("Rate.RewardBonusMoney", 1.0f);
250 _rate_values[RATE_XP_KILL] = sConfigMgr->GetOption<float>("Rate.XP.Kill", 1.0f);
251 _rate_values[RATE_XP_BG_KILL_AV] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillAV", 1.0f);
252 _rate_values[RATE_XP_BG_KILL_WSG] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillWSG", 1.0f);
253 _rate_values[RATE_XP_BG_KILL_AB] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillAB", 1.0f);
254 _rate_values[RATE_XP_BG_KILL_EOTS] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillEOTS", 1.0f);
255 _rate_values[RATE_XP_BG_KILL_SOTA] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillSOTA", 1.0f);
256 _rate_values[RATE_XP_BG_KILL_IC] = sConfigMgr->GetOption<float>("Rate.XP.BattlegroundKillIC", 1.0f);
257 _rate_values[RATE_XP_QUEST] = sConfigMgr->GetOption<float>("Rate.XP.Quest", 1.0f);
258 _rate_values[RATE_XP_QUEST_DF] = sConfigMgr->GetOption<float>("Rate.XP.Quest.DF", 1.0f);
259 _rate_values[RATE_XP_EXPLORE] = sConfigMgr->GetOption<float>("Rate.XP.Explore", 1.0f);
260 _rate_values[RATE_XP_PET] = sConfigMgr->GetOption<float>("Rate.XP.Pet", 1.0f);
261 _rate_values[RATE_XP_PET_NEXT_LEVEL] = sConfigMgr->GetOption<float>("Rate.Pet.LevelXP", 0.05f);
262 _rate_values[RATE_REPAIRCOST] = sConfigMgr->GetOption<float>("Rate.RepairCost", 1.0f);
263
264 _rate_values[RATE_SELLVALUE_ITEM_POOR] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Poor", 1.0f);
265 _rate_values[RATE_SELLVALUE_ITEM_NORMAL] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Normal", 1.0f);
266 _rate_values[RATE_SELLVALUE_ITEM_UNCOMMON] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Uncommon", 1.0f);
267 _rate_values[RATE_SELLVALUE_ITEM_RARE] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Rare", 1.0f);
268 _rate_values[RATE_SELLVALUE_ITEM_EPIC] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Epic", 1.0f);
269 _rate_values[RATE_SELLVALUE_ITEM_LEGENDARY] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Legendary", 1.0f);
270 _rate_values[RATE_SELLVALUE_ITEM_ARTIFACT] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Artifact", 1.0f);
271 _rate_values[RATE_SELLVALUE_ITEM_HEIRLOOM] = sConfigMgr->GetOption<float>("Rate.SellValue.Item.Heirloom", 1.0f);
272
273 _rate_values[ RATE_BUYVALUE_ITEM_POOR] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Poor", 1.0f);
274 _rate_values[ RATE_BUYVALUE_ITEM_NORMAL] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Normal", 1.0f);
275 _rate_values[ RATE_BUYVALUE_ITEM_UNCOMMON] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Uncommon", 1.0f);
276 _rate_values[ RATE_BUYVALUE_ITEM_RARE] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Rare", 1.0f);
277 _rate_values[ RATE_BUYVALUE_ITEM_EPIC] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Epic", 1.0f);
278 _rate_values[ RATE_BUYVALUE_ITEM_LEGENDARY] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Legendary", 1.0f);
279 _rate_values[RATE_BUYVALUE_ITEM_ARTIFACT] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Artifact", 1.0f);
280 _rate_values[RATE_BUYVALUE_ITEM_HEIRLOOM] = sConfigMgr->GetOption<float>("Rate.BuyValue.Item.Heirloom", 1.0f);
281
282 if (_rate_values[RATE_REPAIRCOST] < 0.0f)
283 {
284 LOG_ERROR("server.loading", "Rate.RepairCost ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_REPAIRCOST]);
286 }
287 _rate_values[RATE_REPUTATION_GAIN] = sConfigMgr->GetOption<float>("Rate.Reputation.Gain", 1.0f);
288 _rate_values[RATE_REPUTATION_LOWLEVEL_KILL] = sConfigMgr->GetOption<float>("Rate.Reputation.LowLevel.Kill", 1.0f);
289 _rate_values[RATE_REPUTATION_LOWLEVEL_QUEST] = sConfigMgr->GetOption<float>("Rate.Reputation.LowLevel.Quest", 1.0f);
290 _rate_values[RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS] = sConfigMgr->GetOption<float>("Rate.Reputation.RecruitAFriendBonus", 0.1f);
291 _rate_values[RATE_CREATURE_NORMAL_DAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Normal.Damage", 1.0f);
292 _rate_values[RATE_CREATURE_ELITE_ELITE_DAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.Elite.Damage", 1.0f);
293 _rate_values[RATE_CREATURE_ELITE_RAREELITE_DAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RAREELITE.Damage", 1.0f);
294 _rate_values[RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.WORLDBOSS.Damage", 1.0f);
295 _rate_values[RATE_CREATURE_ELITE_RARE_DAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RARE.Damage", 1.0f);
296 _rate_values[RATE_CREATURE_NORMAL_HP] = sConfigMgr->GetOption<float>("Rate.Creature.Normal.HP", 1.0f);
297 _rate_values[RATE_CREATURE_ELITE_ELITE_HP] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.Elite.HP", 1.0f);
298 _rate_values[RATE_CREATURE_ELITE_RAREELITE_HP] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RAREELITE.HP", 1.0f);
299 _rate_values[RATE_CREATURE_ELITE_WORLDBOSS_HP] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.WORLDBOSS.HP", 1.0f);
300 _rate_values[RATE_CREATURE_ELITE_RARE_HP] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RARE.HP", 1.0f);
301 _rate_values[RATE_CREATURE_NORMAL_SPELLDAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Normal.SpellDamage", 1.0f);
302 _rate_values[RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.Elite.SpellDamage", 1.0f);
303 _rate_values[RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RAREELITE.SpellDamage", 1.0f);
304 _rate_values[RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.WORLDBOSS.SpellDamage", 1.0f);
305 _rate_values[RATE_CREATURE_ELITE_RARE_SPELLDAMAGE] = sConfigMgr->GetOption<float>("Rate.Creature.Elite.RARE.SpellDamage", 1.0f);
306 _rate_values[RATE_CREATURE_AGGRO] = sConfigMgr->GetOption<float>("Rate.Creature.Aggro", 1.0f);
307 _rate_values[RATE_REST_INGAME] = sConfigMgr->GetOption<float>("Rate.Rest.InGame", 1.0f);
308 _rate_values[RATE_REST_OFFLINE_IN_TAVERN_OR_CITY] = sConfigMgr->GetOption<float>("Rate.Rest.Offline.InTavernOrCity", 1.0f);
309 _rate_values[RATE_REST_OFFLINE_IN_WILDERNESS] = sConfigMgr->GetOption<float>("Rate.Rest.Offline.InWilderness", 1.0f);
310 _rate_values[RATE_REST_MAX_BONUS] = sConfigMgr->GetOption<float>("Rate.Rest.MaxBonus", 1.5f);
311 _rate_values[RATE_DAMAGE_FALL] = sConfigMgr->GetOption<float>("Rate.Damage.Fall", 1.0f);
312 _rate_values[RATE_AUCTION_TIME] = sConfigMgr->GetOption<float>("Rate.Auction.Time", 1.0f);
313 _rate_values[RATE_AUCTION_DEPOSIT] = sConfigMgr->GetOption<float>("Rate.Auction.Deposit", 1.0f);
314 _rate_values[RATE_AUCTION_CUT] = sConfigMgr->GetOption<float>("Rate.Auction.Cut", 1.0f);
315 _rate_values[RATE_HONOR] = sConfigMgr->GetOption<float>("Rate.Honor", 1.0f);
316 _rate_values[RATE_ARENA_POINTS] = sConfigMgr->GetOption<float>("Rate.ArenaPoints", 1.0f);
317 _rate_values[RATE_INSTANCE_RESET_TIME] = sConfigMgr->GetOption<float>("Rate.InstanceResetTime", 1.0f);
318
319 _rate_values[RATE_MISS_CHANCE_MULTIPLIER_TARGET_CREATURE] = sConfigMgr->GetOption<float>("Rate.MissChanceMultiplier.TargetCreature", 11.0f);
320 _rate_values[RATE_MISS_CHANCE_MULTIPLIER_TARGET_PLAYER] = sConfigMgr->GetOption<float>("Rate.MissChanceMultiplier.TargetPlayer", 7.0f);
321 _bool_configs[CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS] = sConfigMgr->GetOption<bool>("Rate.MissChanceMultiplier.OnlyAffectsPlayer", false);
322
323 _rate_values[RATE_TALENT] = sConfigMgr->GetOption<float>("Rate.Talent", 1.0f);
324 if (_rate_values[RATE_TALENT] < 0.0f)
325 {
326 LOG_ERROR("server.loading", "Rate.Talent ({}) must be > 0. Using 1 instead.", _rate_values[RATE_TALENT]);
328 }
329 _rate_values[RATE_TALENT_PET] = sConfigMgr->GetOption<float>("Rate.Talent.Pet", 1.0f);
330 if (_rate_values[RATE_TALENT_PET] < 0.0f)
331 {
332 LOG_ERROR("server.loading", "Rate.Talent.Pet ({}) must be > 0. Using 1 instead.", _rate_values[RATE_TALENT_PET]);
334 }
335 // Controls Player movespeed rate.
336 _rate_values[RATE_MOVESPEED_PLAYER] = sConfigMgr->GetOption<float>("Rate.MoveSpeed.Player", 1.0f);
338 {
339 LOG_ERROR("server.loading", "Rate.MoveSpeed.Player ({}) must be > 0. Using 1 instead.", _rate_values[RATE_MOVESPEED_PLAYER]);
341 }
343
344 // Controls all npc movespeed rate.
345 _rate_values[RATE_MOVESPEED_NPC] = sConfigMgr->GetOption<float>("Rate.MoveSpeed.NPC", 1.0f);
347 {
348 LOG_ERROR("server.loading", "Rate.MoveSpeed.NPC ({}) must be > 0. Using 1 instead.", _rate_values[RATE_MOVESPEED_NPC]);
350 }
352
353 _rate_values[RATE_CORPSE_DECAY_LOOTED] = sConfigMgr->GetOption<float>("Rate.Corpse.Decay.Looted", 0.5f);
354
355 _rate_values[RATE_DURABILITY_LOSS_ON_DEATH] = sConfigMgr->GetOption<float>("DurabilityLoss.OnDeath", 10.0f);
357 {
358 LOG_ERROR("server.loading", "DurabilityLoss.OnDeath ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
360 }
362 {
363 LOG_ERROR("server.loading", "DurabilityLoss.OnDeath ({}) must be <= 100. Using 100.0 instead.", _rate_values[RATE_DURABILITY_LOSS_ON_DEATH]);
365 }
367
368 _rate_values[RATE_DURABILITY_LOSS_DAMAGE] = sConfigMgr->GetOption<float>("DurabilityLossChance.Damage", 0.5f);
370 {
371 LOG_ERROR("server.loading", "DurabilityLossChance.Damage ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_DURABILITY_LOSS_DAMAGE]);
373 }
374 _rate_values[RATE_DURABILITY_LOSS_ABSORB] = sConfigMgr->GetOption<float>("DurabilityLossChance.Absorb", 0.5f);
376 {
377 LOG_ERROR("server.loading", "DurabilityLossChance.Absorb ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_DURABILITY_LOSS_ABSORB]);
379 }
380 _rate_values[RATE_DURABILITY_LOSS_PARRY] = sConfigMgr->GetOption<float>("DurabilityLossChance.Parry", 0.05f);
382 {
383 LOG_ERROR("server.loading", "DurabilityLossChance.Parry ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_DURABILITY_LOSS_PARRY]);
385 }
386 _rate_values[RATE_DURABILITY_LOSS_BLOCK] = sConfigMgr->GetOption<float>("DurabilityLossChance.Block", 0.05f);
388 {
389 LOG_ERROR("server.loading", "DurabilityLossChance.Block ({}) must be >=0. Using 0.0 instead.", _rate_values[RATE_DURABILITY_LOSS_BLOCK]);
391 }
392
394
395 _bool_configs[CONFIG_DURABILITY_LOSS_IN_PVP] = sConfigMgr->GetOption<bool>("DurabilityLoss.InPvP", false);
396
397 _int_configs[CONFIG_COMPRESSION] = sConfigMgr->GetOption<int32>("Compression", 1);
399 {
400 LOG_ERROR("server.loading", "Compression level ({}) must be in range 1..9. Using default compression level (1).", _int_configs[CONFIG_COMPRESSION]);
402 }
403 _bool_configs[CONFIG_ADDON_CHANNEL] = sConfigMgr->GetOption<bool>("AddonChannel", true);
404 _bool_configs[CONFIG_CLEAN_CHARACTER_DB] = sConfigMgr->GetOption<bool>("CleanCharacterDB", false);
405 _int_configs[CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS] = sConfigMgr->GetOption<int32>("PersistentCharacterCleanFlags", 0);
406 _int_configs[CONFIG_CHAT_CHANNEL_LEVEL_REQ] = sConfigMgr->GetOption<int32>("ChatLevelReq.Channel", 1);
407 _int_configs[CONFIG_CHAT_WHISPER_LEVEL_REQ] = sConfigMgr->GetOption<int32>("ChatLevelReq.Whisper", 1);
408 _int_configs[CONFIG_CHAT_SAY_LEVEL_REQ] = sConfigMgr->GetOption<int32>("ChatLevelReq.Say", 1);
409 _int_configs[CONFIG_PARTY_LEVEL_REQ] = sConfigMgr->GetOption<int32>("PartyLevelReq", 1);
410 _int_configs[CONFIG_TRADE_LEVEL_REQ] = sConfigMgr->GetOption<int32>("LevelReq.Trade", 1);
411 _int_configs[CONFIG_TICKET_LEVEL_REQ] = sConfigMgr->GetOption<int32>("LevelReq.Ticket", 1);
412 _int_configs[CONFIG_AUCTION_LEVEL_REQ] = sConfigMgr->GetOption<int32>("LevelReq.Auction", 1);
413 _int_configs[CONFIG_MAIL_LEVEL_REQ] = sConfigMgr->GetOption<int32>("LevelReq.Mail", 1);
414 _bool_configs[CONFIG_ALLOW_PLAYER_COMMANDS] = sConfigMgr->GetOption<bool>("AllowPlayerCommands", 1);
415 _bool_configs[CONFIG_PRESERVE_CUSTOM_CHANNELS] = sConfigMgr->GetOption<bool>("PreserveCustomChannels", false);
416 _int_configs[CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION] = sConfigMgr->GetOption<int32>("PreserveCustomChannelDuration", 14);
417 _int_configs[CONFIG_INTERVAL_SAVE] = sConfigMgr->GetOption<int32>("PlayerSaveInterval", 15 * MINUTE * IN_MILLISECONDS);
418 _int_configs[CONFIG_INTERVAL_DISCONNECT_TOLERANCE] = sConfigMgr->GetOption<int32>("DisconnectToleranceInterval", 0);
419 _bool_configs[CONFIG_STATS_SAVE_ONLY_ON_LOGOUT] = sConfigMgr->GetOption<bool>("PlayerSave.Stats.SaveOnlyOnLogout", true);
420
421 _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE] = sConfigMgr->GetOption<int32>("PlayerSave.Stats.MinLevel", 0);
423 {
424 LOG_ERROR("server.loading", "PlayerSave.Stats.MinLevel ({}) must be in range 0..80. Using default, do not save character stats (0).", _int_configs[CONFIG_MIN_LEVEL_STAT_SAVE]);
426 }
427
428 _int_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfigMgr->GetOption<int32>("MapUpdateInterval", 10);
430 {
431 LOG_ERROR("server.loading", "MapUpdateInterval ({}) must be greater {}. Use this minimal value.", _int_configs[CONFIG_INTERVAL_MAPUPDATE], MIN_MAP_UPDATE_DELAY);
433 }
434 if (reload)
435 sMapMgr->SetMapUpdateInterval(_int_configs[CONFIG_INTERVAL_MAPUPDATE]);
436
437 _int_configs[CONFIG_INTERVAL_CHANGEWEATHER] = sConfigMgr->GetOption<int32>("ChangeWeatherInterval", 10 * MINUTE * IN_MILLISECONDS);
438
439 if (reload)
440 {
441 uint32 val = sConfigMgr->GetOption<int32>("WorldServerPort", 8085);
443 LOG_ERROR("server.loading", "WorldServerPort option can't be changed at worldserver.conf reload, using current value ({}).", _int_configs[CONFIG_PORT_WORLD]);
444 }
445 else
446 _int_configs[CONFIG_PORT_WORLD] = sConfigMgr->GetOption<int32>("WorldServerPort", 8085);
447
448 _bool_configs[CONFIG_CLOSE_IDLE_CONNECTIONS] = sConfigMgr->GetOption<bool>("CloseIdleConnections", true);
449 _int_configs[CONFIG_SOCKET_TIMEOUTTIME] = sConfigMgr->GetOption<int32>("SocketTimeOutTime", 900000);
450 _int_configs[CONFIG_SOCKET_TIMEOUTTIME_ACTIVE] = sConfigMgr->GetOption<int32>("SocketTimeOutTimeActive", 60000);
451 _int_configs[CONFIG_SESSION_ADD_DELAY] = sConfigMgr->GetOption<int32>("SessionAddDelay", 10000);
452
453 _float_configs[CONFIG_GROUP_XP_DISTANCE] = sConfigMgr->GetOption<float>("MaxGroupXPDistance", 74.0f);
454 _float_configs[CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE] = sConfigMgr->GetOption<float>("MaxRecruitAFriendBonusDistance", 100.0f);
455
457 _float_configs[CONFIG_SIGHT_MONSTER] = sConfigMgr->GetOption<float>("MonsterSight", 50);
458
459 if (reload)
460 {
461 uint32 val = sConfigMgr->GetOption<int32>("GameType", 0);
462 if (val != _int_configs[CONFIG_GAME_TYPE])
463 LOG_ERROR("server.loading", "GameType option can't be changed at worldserver.conf reload, using current value ({}).", _int_configs[CONFIG_GAME_TYPE]);
464 }
465 else
466 _int_configs[CONFIG_GAME_TYPE] = sConfigMgr->GetOption<int32>("GameType", 0);
467
468 if (reload)
469 {
470 uint32 val = sConfigMgr->GetOption<int32>("RealmZone", REALM_ZONE_DEVELOPMENT);
472 LOG_ERROR("server.loading", "RealmZone option can't be changed at worldserver.conf reload, using current value ({}).", _int_configs[CONFIG_REALM_ZONE]);
473 }
474 else
476
477 _bool_configs[CONFIG_STRICT_NAMES_RESERVED] = sConfigMgr->GetOption<bool> ("StrictNames.Reserved", true);
478 _bool_configs[CONFIG_STRICT_NAMES_PROFANITY] = sConfigMgr->GetOption<bool> ("StrictNames.Profanity", true);
479 _int_configs[CONFIG_STRICT_PLAYER_NAMES] = sConfigMgr->GetOption<int32> ("StrictPlayerNames", 0);
480 _int_configs[CONFIG_STRICT_CHARTER_NAMES] = sConfigMgr->GetOption<int32> ("StrictCharterNames", 0);
481 _int_configs[CONFIG_STRICT_CHANNEL_NAMES] = sConfigMgr->GetOption<int32> ("StrictChannelNames", 0);
482 _int_configs[CONFIG_STRICT_PET_NAMES] = sConfigMgr->GetOption<int32> ("StrictPetNames", 0);
483
484 _bool_configs[CONFIG_ALLOW_TWO_SIDE_ACCOUNTS] = sConfigMgr->GetOption<bool>("AllowTwoSide.Accounts", true);
485 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Calendar", false);
486 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Chat", false);
487 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Channel", false);
488 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Group", false);
489 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Guild", false);
490 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_ARENA] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Arena", false);
491 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Auction", false);
492 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Mail", false);
493 _bool_configs[CONFIG_ALLOW_TWO_SIDE_WHO_LIST] = sConfigMgr->GetOption<bool>("AllowTwoSide.WhoList", false);
494 _bool_configs[CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND] = sConfigMgr->GetOption<bool>("AllowTwoSide.AddFriend", false);
495 _bool_configs[CONFIG_ALLOW_TWO_SIDE_TRADE] = sConfigMgr->GetOption<bool>("AllowTwoSide.Trade", false);
496 _bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_EMOTE] = sConfigMgr->GetOption<bool>("AllowTwoSide.Interaction.Emote", false);
497
498 _int_configs[CONFIG_MIN_PLAYER_NAME] = sConfigMgr->GetOption<int32> ("MinPlayerName", 2);
500 {
501 LOG_ERROR("server.loading", "MinPlayerName ({}) must be in range 1..{}. Set to 2.", _int_configs[CONFIG_MIN_PLAYER_NAME], MAX_PLAYER_NAME);
503 }
504
505 _int_configs[CONFIG_MIN_CHARTER_NAME] = sConfigMgr->GetOption<int32> ("MinCharterName", 2);
507 {
508 LOG_ERROR("server.loading", "MinCharterName ({}) must be in range 1..{}. Set to 2.", _int_configs[CONFIG_MIN_CHARTER_NAME], MAX_CHARTER_NAME);
510 }
511
512 _int_configs[CONFIG_MIN_PET_NAME] = sConfigMgr->GetOption<int32> ("MinPetName", 2);
514 {
515 LOG_ERROR("server.loading", "MinPetName ({}) must be in range 1..{}. Set to 2.", _int_configs[CONFIG_MIN_PET_NAME], MAX_PET_NAME);
517 }
518
519 _int_configs[CONFIG_CHARTER_COST_GUILD] = sConfigMgr->GetOption<int32>("Guild.CharterCost", 1000);
520 _int_configs[CONFIG_CHARTER_COST_ARENA_2v2] = sConfigMgr->GetOption<int32>("ArenaTeam.CharterCost.2v2", 800000);
521 _int_configs[CONFIG_CHARTER_COST_ARENA_3v3] = sConfigMgr->GetOption<int32>("ArenaTeam.CharterCost.3v3", 1200000);
522 _int_configs[CONFIG_CHARTER_COST_ARENA_5v5] = sConfigMgr->GetOption<int32>("ArenaTeam.CharterCost.5v5", 2000000);
523
524 _int_configs[CONFIG_MAX_WHO_LIST_RETURN] = sConfigMgr->GetOption<int32>("MaxWhoListReturns", 49);
525
526 _int_configs[CONFIG_CHARACTER_CREATING_DISABLED] = sConfigMgr->GetOption<int32>("CharacterCreating.Disabled", 0);
527 _int_configs[CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK] = sConfigMgr->GetOption<int32>("CharacterCreating.Disabled.RaceMask", 0);
528
529 _int_configs[CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK] = sConfigMgr->GetOption<int32>("CharacterCreating.Disabled.ClassMask", 0);
530
531 _int_configs[CONFIG_CHARACTERS_PER_REALM] = sConfigMgr->GetOption<int32>("CharactersPerRealm", 10);
533 {
534 LOG_ERROR("server.loading", "CharactersPerRealm ({}) must be in range 1..10. Set to 10.", _int_configs[CONFIG_CHARACTERS_PER_REALM]);
536 }
537
538 // must be after CONFIG_CHARACTERS_PER_REALM
539 _int_configs[CONFIG_CHARACTERS_PER_ACCOUNT] = sConfigMgr->GetOption<int32>("CharactersPerAccount", 50);
541 {
542 LOG_ERROR("server.loading", "CharactersPerAccount ({}) can't be less than CharactersPerRealm ({}).", _int_configs[CONFIG_CHARACTERS_PER_ACCOUNT], _int_configs[CONFIG_CHARACTERS_PER_REALM]);
544 }
545
546 _int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfigMgr->GetOption<int32>("HeroicCharactersPerRealm", 1);
548 {
549 LOG_ERROR("server.loading", "HeroicCharactersPerRealm ({}) must be in range 0..10. Set to 1.", _int_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);
551 }
552
553 _int_configs[CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER] = sConfigMgr->GetOption<int32>("CharacterCreating.MinLevelForHeroicCharacter", 55);
554
555 _int_configs[CONFIG_SKIP_CINEMATICS] = sConfigMgr->GetOption<int32>("SkipCinematics", 0);
557 {
558 LOG_ERROR("server.loading", "SkipCinematics ({}) must be in range 0..2. Set to 0.", _int_configs[CONFIG_SKIP_CINEMATICS]);
560 }
561
562 if (reload)
563 {
564 uint32 val = sConfigMgr->GetOption<int32>("MaxPlayerLevel", DEFAULT_MAX_LEVEL);
566 LOG_ERROR("server.loading", "MaxPlayerLevel option can't be changed at config reload, using current value ({}).", _int_configs[CONFIG_MAX_PLAYER_LEVEL]);
567 }
568 else
570
572 {
573 LOG_ERROR("server.loading", "MaxPlayerLevel ({}) must be in range 1..{}. Set to {}.", _int_configs[CONFIG_MAX_PLAYER_LEVEL], MAX_LEVEL, MAX_LEVEL);
575 }
576
577 _int_configs[CONFIG_MIN_DUALSPEC_LEVEL] = sConfigMgr->GetOption<int32>("MinDualSpecLevel", 40);
578
579 _int_configs[CONFIG_START_PLAYER_LEVEL] = sConfigMgr->GetOption<int32>("StartPlayerLevel", 1);
581 {
582 LOG_ERROR("server.loading", "StartPlayerLevel ({}) must be in range 1..MaxPlayerLevel({}). Set to 1.", _int_configs[CONFIG_START_PLAYER_LEVEL], _int_configs[CONFIG_MAX_PLAYER_LEVEL]);
584 }
585
586 _int_configs[CONFIG_START_HEROIC_PLAYER_LEVEL] = sConfigMgr->GetOption<int32>("StartHeroicPlayerLevel", 55);
588 {
589 LOG_ERROR("server.loading", "StartHeroicPlayerLevel ({}) must be in range 1..MaxPlayerLevel({}). Set to 55.",
592 }
593
594 _int_configs[CONFIG_START_PLAYER_MONEY] = sConfigMgr->GetOption<int32>("StartPlayerMoney", 0);
596 {
597 LOG_ERROR("server.loading", "StartPlayerMoney ({}) must be in range 0..{}. Set to {}.", _int_configs[CONFIG_START_PLAYER_MONEY], MAX_MONEY_AMOUNT, 0);
599 }
600
601 _int_configs[CONFIG_START_HEROIC_PLAYER_MONEY] = sConfigMgr->GetOption<int32>("StartHeroicPlayerMoney", 2000);
603 {
604 LOG_ERROR("server.loading", "StartHeroicPlayerMoney ({}) must be in range 0..{}. Set to {}.", _int_configs[CONFIG_START_HEROIC_PLAYER_MONEY], MAX_MONEY_AMOUNT, 2000);
606 }
607
608 _int_configs[CONFIG_MAX_HONOR_POINTS] = sConfigMgr->GetOption<int32>("MaxHonorPoints", 75000);
610 {
611 LOG_ERROR("server.loading", "MaxHonorPoints ({}) can't be negative. Set to 0.", _int_configs[CONFIG_MAX_HONOR_POINTS]);
613 }
614
615 _int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT] = sConfigMgr->GetOption<int32>("MaxHonorPointsMoneyPerPoint", 0);
617 {
618 LOG_ERROR("server.loading", "MaxHonorPointsMoneyPerPoint ({}) can't be negative. Set to 0.", _int_configs[CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT]);
620 }
621
622 _int_configs[CONFIG_START_HONOR_POINTS] = sConfigMgr->GetOption<int32>("StartHonorPoints", 0);
624 {
625 LOG_ERROR("server.loading", "StartHonorPoints ({}) must be in range 0..MaxHonorPoints({}). Set to {}.",
628 }
629
630 _int_configs[CONFIG_MAX_ARENA_POINTS] = sConfigMgr->GetOption<int32>("MaxArenaPoints", 10000);
632 {
633 LOG_ERROR("server.loading", "MaxArenaPoints ({}) can't be negative. Set to 0.", _int_configs[CONFIG_MAX_ARENA_POINTS]);
635 }
636
637 _int_configs[CONFIG_START_ARENA_POINTS] = sConfigMgr->GetOption<int32>("StartArenaPoints", 0);
639 {
640 LOG_ERROR("server.loading", "StartArenaPoints ({}) must be in range 0..MaxArenaPoints({}). Set to {}.",
643 }
644
645 _int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL] = sConfigMgr->GetOption<int32>("RecruitAFriend.MaxLevel", 60);
648 {
649 LOG_ERROR("server.loading", "RecruitAFriend.MaxLevel ({}) must be in the range 0..MaxLevel({}). Set to {}.",
652 }
653
654 _int_configs[CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE] = sConfigMgr->GetOption<int32>("RecruitAFriend.MaxDifference", 4);
655 _bool_configs[CONFIG_ALL_TAXI_PATHS] = sConfigMgr->GetOption<bool>("AllFlightPaths", false);
656 _int_configs[CONFIG_INSTANT_TAXI] = sConfigMgr->GetOption<int32>("InstantFlightPaths", 0);
657
658 _bool_configs[CONFIG_INSTANCE_IGNORE_LEVEL] = sConfigMgr->GetOption<bool>("Instance.IgnoreLevel", false);
659 _bool_configs[CONFIG_INSTANCE_IGNORE_RAID] = sConfigMgr->GetOption<bool>("Instance.IgnoreRaid", false);
660 _bool_configs[CONFIG_INSTANCE_GMSUMMON_PLAYER] = sConfigMgr->GetOption<bool>("Instance.GMSummonPlayer", false);
661 _bool_configs[CONFIG_INSTANCE_SHARED_ID] = sConfigMgr->GetOption<bool>("Instance.SharedNormalHeroicId", false);
662
663 _int_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfigMgr->GetOption<int32>("Instance.ResetTimeHour", 4);
664 _int_configs[CONFIG_INSTANCE_RESET_TIME_RELATIVE_TIMESTAMP] = sConfigMgr->GetOption<int32>("Instance.ResetTimeRelativeTimestamp", 1135814400);
665 _int_configs[CONFIG_INSTANCE_UNLOAD_DELAY] = sConfigMgr->GetOption<int32>("Instance.UnloadDelay", 30 * MINUTE * IN_MILLISECONDS);
666
667 _int_configs[CONFIG_MAX_PRIMARY_TRADE_SKILL] = sConfigMgr->GetOption<int32>("MaxPrimaryTradeSkill", 2);
668 _int_configs[CONFIG_MIN_PETITION_SIGNS] = sConfigMgr->GetOption<int32>("MinPetitionSigns", 9);
670 {
671 LOG_ERROR("server.loading", "MinPetitionSigns ({}) must be in range 0..9. Set to 9.", _int_configs[CONFIG_MIN_PETITION_SIGNS]);
673 }
674
675 _int_configs[CONFIG_GM_LOGIN_STATE] = sConfigMgr->GetOption<int32>("GM.LoginState", 2);
676 _int_configs[CONFIG_GM_VISIBLE_STATE] = sConfigMgr->GetOption<int32>("GM.Visible", 2);
677 _int_configs[CONFIG_GM_CHAT] = sConfigMgr->GetOption<int32>("GM.Chat", 2);
678 _int_configs[CONFIG_GM_WHISPERING_TO] = sConfigMgr->GetOption<int32>("GM.WhisperingTo", 2);
679
680 _int_configs[CONFIG_GM_LEVEL_IN_GM_LIST] = sConfigMgr->GetOption<int32>("GM.InGMList.Level", SEC_ADMINISTRATOR);
681 _int_configs[CONFIG_GM_LEVEL_IN_WHO_LIST] = sConfigMgr->GetOption<int32>("GM.InWhoList.Level", SEC_ADMINISTRATOR);
682 _int_configs[CONFIG_START_GM_LEVEL] = sConfigMgr->GetOption<int32>("GM.StartLevel", 1);
684 {
685 LOG_ERROR("server.loading", "GM.StartLevel ({}) must be in range StartPlayerLevel({})..{}. Set to {}.",
688 }
690 {
691 LOG_ERROR("server.loading", "GM.StartLevel ({}) must be in range 1..{}. Set to {}.", _int_configs[CONFIG_START_GM_LEVEL], MAX_LEVEL, MAX_LEVEL);
693 }
694 _bool_configs[CONFIG_ALLOW_GM_GROUP] = sConfigMgr->GetOption<bool>("GM.AllowInvite", false);
695 _bool_configs[CONFIG_ALLOW_GM_FRIEND] = sConfigMgr->GetOption<bool>("GM.AllowFriend", false);
696 _bool_configs[CONFIG_GM_LOWER_SECURITY] = sConfigMgr->GetOption<bool>("GM.LowerSecurity", false);
697 _float_configs[CONFIG_CHANCE_OF_GM_SURVEY] = sConfigMgr->GetOption<float>("GM.TicketSystem.ChanceOfGMSurvey", 50.0f);
698
699 _int_configs[CONFIG_GROUP_VISIBILITY] = sConfigMgr->GetOption<int32>("Visibility.GroupMode", 1);
700
701 _bool_configs[CONFIG_OBJECT_SPARKLES] = sConfigMgr->GetOption<bool>("Visibility.ObjectSparkles", true);
702
703 _bool_configs[CONFIG_LOW_LEVEL_REGEN_BOOST] = sConfigMgr->GetOption<bool>("EnableLowLevelRegenBoost", true);
704
705 _bool_configs[CONFIG_OBJECT_QUEST_MARKERS] = sConfigMgr->GetOption<bool>("Visibility.ObjectQuestMarkers", true);
706
707 _int_configs[CONFIG_MAIL_DELIVERY_DELAY] = sConfigMgr->GetOption<int32>("MailDeliveryDelay", HOUR);
708
709 _int_configs[CONFIG_UPTIME_UPDATE] = sConfigMgr->GetOption<int32>("UpdateUptimeInterval", 10);
711 {
712 LOG_ERROR("server.loading", "UpdateUptimeInterval ({}) must be > 0, set to default 10.", _int_configs[CONFIG_UPTIME_UPDATE]);
714 }
715
716 if (reload)
717 {
720 }
721
722 // log db cleanup interval
723 _int_configs[CONFIG_LOGDB_CLEARINTERVAL] = sConfigMgr->GetOption<int32>("LogDB.Opt.ClearInterval", 10);
725 {
726 LOG_ERROR("server.loading", "LogDB.Opt.ClearInterval ({}) must be > 0, set to default 10.", _int_configs[CONFIG_LOGDB_CLEARINTERVAL]);
728 }
729 if (reload)
730 {
733 }
734 _int_configs[CONFIG_LOGDB_CLEARTIME] = sConfigMgr->GetOption<int32>("LogDB.Opt.ClearTime", 1209600); // 14 days default
735 LOG_INFO("server.loading", "Will clear `logs` table of entries older than {} seconds every {} minutes.",
737
738 _int_configs[CONFIG_TELEPORT_TIMEOUT_NEAR] = sConfigMgr->GetOption<int32>("TeleportTimeoutNear", 25); // pussywizard
739 _int_configs[CONFIG_TELEPORT_TIMEOUT_FAR] = sConfigMgr->GetOption<int32>("TeleportTimeoutFar", 45); // pussywizard
740 _int_configs[CONFIG_MAX_ALLOWED_MMR_DROP] = sConfigMgr->GetOption<int32>("MaxAllowedMMRDrop", 500); // pussywizard
741 _bool_configs[CONFIG_ENABLE_LOGIN_AFTER_DC] = sConfigMgr->GetOption<bool>("EnableLoginAfterDC", true); // pussywizard
742 _bool_configs[CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS] = sConfigMgr->GetOption<bool>("DontCacheRandomMovementPaths", false);
743
744 _int_configs[CONFIG_SKILL_CHANCE_ORANGE] = sConfigMgr->GetOption<int32>("SkillChance.Orange", 100);
745 _int_configs[CONFIG_SKILL_CHANCE_YELLOW] = sConfigMgr->GetOption<int32>("SkillChance.Yellow", 75);
746 _int_configs[CONFIG_SKILL_CHANCE_GREEN] = sConfigMgr->GetOption<int32>("SkillChance.Green", 25);
747 _int_configs[CONFIG_SKILL_CHANCE_GREY] = sConfigMgr->GetOption<int32>("SkillChance.Grey", 0);
748
749 _int_configs[CONFIG_SKILL_CHANCE_MINING_STEPS] = sConfigMgr->GetOption<int32>("SkillChance.MiningSteps", 0);
750 _int_configs[CONFIG_SKILL_CHANCE_SKINNING_STEPS] = sConfigMgr->GetOption<int32>("SkillChance.SkinningSteps", 0);
751
752 _bool_configs[CONFIG_SKILL_PROSPECTING] = sConfigMgr->GetOption<bool>("SkillChance.Prospecting", false);
753 _bool_configs[CONFIG_SKILL_MILLING] = sConfigMgr->GetOption<bool>("SkillChance.Milling", false);
754
755 _int_configs[CONFIG_SKILL_GAIN_CRAFTING] = sConfigMgr->GetOption<int32>("SkillGain.Crafting", 1);
756
757 _int_configs[CONFIG_SKILL_GAIN_DEFENSE] = sConfigMgr->GetOption<int32>("SkillGain.Defense", 1);
758
759 _int_configs[CONFIG_SKILL_GAIN_GATHERING] = sConfigMgr->GetOption<int32>("SkillGain.Gathering", 1);
760
761 _int_configs[CONFIG_SKILL_GAIN_WEAPON] = sConfigMgr->GetOption<int32>("SkillGain.Weapon", 1);
762
763 _int_configs[CONFIG_MAX_OVERSPEED_PINGS] = sConfigMgr->GetOption<int32>("MaxOverspeedPings", 2);
765 {
766 LOG_ERROR("server.loading", "MaxOverspeedPings ({}) must be in range 2..infinity (or 0 to disable check). Set to 2.", _int_configs[CONFIG_MAX_OVERSPEED_PINGS]);
768 }
769
770 _bool_configs[CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY] = sConfigMgr->GetOption<bool>("SaveRespawnTimeImmediately", true);
771 _bool_configs[CONFIG_WEATHER] = sConfigMgr->GetOption<bool>("ActivateWeather", true);
772
773 _int_configs[CONFIG_DISABLE_BREATHING] = sConfigMgr->GetOption<int32>("DisableWaterBreath", SEC_CONSOLE);
774
775 _bool_configs[CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL] = sConfigMgr->GetOption<bool>("AlwaysMaxSkillForLevel", false);
776
777 if (reload)
778 {
779 uint32 val = sConfigMgr->GetOption<int32>("Expansion", 2);
780 if (val != _int_configs[CONFIG_EXPANSION])
781 LOG_ERROR("server.loading", "Expansion option can't be changed at worldserver.conf reload, using current value ({}).", _int_configs[CONFIG_EXPANSION]);
782 }
783 else
784 _int_configs[CONFIG_EXPANSION] = sConfigMgr->GetOption<int32>("Expansion", 2);
785
786 _int_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfigMgr->GetOption<int32>("ChatFlood.MessageCount", 10);
787 _int_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfigMgr->GetOption<int32>("ChatFlood.MessageDelay", 1);
788 _int_configs[CONFIG_CHATFLOOD_ADDON_MESSAGE_COUNT] = sConfigMgr->GetOption<int32>("ChatFlood.AddonMessageCount", 100);
789 _int_configs[CONFIG_CHATFLOOD_ADDON_MESSAGE_DELAY] = sConfigMgr->GetOption<int32>("ChatFlood.AddonMessageDelay", 1);
790 _int_configs[CONFIG_CHATFLOOD_MUTE_TIME] = sConfigMgr->GetOption<int32>("ChatFlood.MuteTime", 10);
791 _bool_configs[CONFIG_CHAT_MUTE_FIRST_LOGIN] = sConfigMgr->GetOption<bool>("Chat.MuteFirstLogin", false);
792 _int_configs[CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN] = sConfigMgr->GetOption<int32>("Chat.MuteTimeFirstLogin", 120);
793
794 _int_configs[CONFIG_EVENT_ANNOUNCE] = sConfigMgr->GetOption<int32>("Event.Announce", 0);
795
796 _float_configs[CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS] = sConfigMgr->GetOption<float>("CreatureFamilyFleeAssistanceRadius", 30.0f);
797 _float_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS] = sConfigMgr->GetOption<float>("CreatureFamilyAssistanceRadius", 10.0f);
798 _int_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY] = sConfigMgr->GetOption<int32>("CreatureFamilyAssistanceDelay", 2000);
799 _int_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD] = sConfigMgr->GetOption<int32>("CreatureFamilyAssistancePeriod", 3000);
800 _int_configs[CONFIG_CREATURE_FAMILY_FLEE_DELAY] = sConfigMgr->GetOption<int32>("CreatureFamilyFleeDelay", 7000);
801
802 _int_configs[CONFIG_WORLD_BOSS_LEVEL_DIFF] = sConfigMgr->GetOption<int32>("WorldBossLevelDiff", 3);
803
804 _bool_configs[CONFIG_QUEST_ENABLE_QUEST_TRACKER] = sConfigMgr->GetOption<bool>("Quests.EnableQuestTracker", false);
805
806 // note: disable value (-1) will assigned as 0xFFFFFFF, to prevent overflow at calculations limit it to max possible player level MAX_LEVEL(100)
807 _int_configs[CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF] = sConfigMgr->GetOption<int32>("Quests.LowLevelHideDiff", 4);
810 _int_configs[CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF] = sConfigMgr->GetOption<int32>("Quests.HighLevelHideDiff", 7);
813 _bool_configs[CONFIG_QUEST_IGNORE_RAID] = sConfigMgr->GetOption<bool>("Quests.IgnoreRaid", false);
814 _bool_configs[CONFIG_QUEST_IGNORE_AUTO_ACCEPT] = sConfigMgr->GetOption<bool>("Quests.IgnoreAutoAccept", false);
815 _bool_configs[CONFIG_QUEST_IGNORE_AUTO_COMPLETE] = sConfigMgr->GetOption<bool>("Quests.IgnoreAutoComplete", false);
816
817 _int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = sConfigMgr->GetOption<int32>("Battleground.Random.ResetHour", 6);
819 {
820 LOG_ERROR("server.loading", "Battleground.Random.ResetHour ({}) can't be load. Set to 6.", _int_configs[CONFIG_RANDOM_BG_RESET_HOUR]);
822 }
823
824 _int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR] = sConfigMgr->GetOption<int32>("Calendar.DeleteOldEventsHour", 6);
826 {
827 LOG_ERROR("server.loading", "Calendar.DeleteOldEventsHour ({}) can't be load. Set to 6.", _int_configs[CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR]);
829 }
830
831 _int_configs[CONFIG_GUILD_RESET_HOUR] = sConfigMgr->GetOption<int32>("Guild.ResetHour", 6);
833 {
834 LOG_ERROR("server.loading", "Guild.ResetHour ({}) can't be load. Set to 6.", _int_configs[CONFIG_GUILD_RESET_HOUR]);
836 }
837
838 _int_configs[CONFIG_GUILD_BANK_INITIAL_TABS] = sConfigMgr->GetOption<int32>("Guild.BankInitialTabs", 0);
839 _int_configs[CONFIG_GUILD_BANK_TAB_COST_0] = sConfigMgr->GetOption<int32>("Guild.BankTabCost0", 1000000);
840 _int_configs[CONFIG_GUILD_BANK_TAB_COST_1] = sConfigMgr->GetOption<int32>("Guild.BankTabCost1", 2500000);
841 _int_configs[CONFIG_GUILD_BANK_TAB_COST_2] = sConfigMgr->GetOption<int32>("Guild.BankTabCost2", 5000000);
842 _int_configs[CONFIG_GUILD_BANK_TAB_COST_3] = sConfigMgr->GetOption<int32>("Guild.BankTabCost3", 10000000);
843 _int_configs[CONFIG_GUILD_BANK_TAB_COST_4] = sConfigMgr->GetOption<int32>("Guild.BankTabCost4", 25000000);
844 _int_configs[CONFIG_GUILD_BANK_TAB_COST_5] = sConfigMgr->GetOption<int32>("Guild.BankTabCost5", 50000000);
845
846 _bool_configs[CONFIG_DETECT_POS_COLLISION] = sConfigMgr->GetOption<bool>("DetectPosCollision", true);
847
848 _bool_configs[CONFIG_RESTRICTED_LFG_CHANNEL] = sConfigMgr->GetOption<bool>("Channel.RestrictedLfg", true);
849 _bool_configs[CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL] = sConfigMgr->GetOption<bool>("Channel.SilentlyGMJoin", false);
850
851 _bool_configs[CONFIG_TALENTS_INSPECTING] = sConfigMgr->GetOption<bool>("TalentsInspecting", true);
852 _bool_configs[CONFIG_CHAT_FAKE_MESSAGE_PREVENTING] = sConfigMgr->GetOption<bool>("ChatFakeMessagePreventing", true);
853 _int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY] = sConfigMgr->GetOption<int32>("ChatStrictLinkChecking.Severity", 0);
854 _int_configs[CONFIG_CHAT_STRICT_LINK_CHECKING_KICK] = sConfigMgr->GetOption<int32>("ChatStrictLinkChecking.Kick", 0);
855
856 _int_configs[CONFIG_CORPSE_DECAY_NORMAL] = sConfigMgr->GetOption<int32>("Corpse.Decay.NORMAL", 60);
857 _int_configs[CONFIG_CORPSE_DECAY_RARE] = sConfigMgr->GetOption<int32>("Corpse.Decay.RARE", 300);
858 _int_configs[CONFIG_CORPSE_DECAY_ELITE] = sConfigMgr->GetOption<int32>("Corpse.Decay.ELITE", 300);
859 _int_configs[CONFIG_CORPSE_DECAY_RAREELITE] = sConfigMgr->GetOption<int32>("Corpse.Decay.RAREELITE", 300);
860 _int_configs[CONFIG_CORPSE_DECAY_WORLDBOSS] = sConfigMgr->GetOption<int32>("Corpse.Decay.WORLDBOSS", 3600);
861
862 _int_configs[CONFIG_DEATH_SICKNESS_LEVEL] = sConfigMgr->GetOption<int32> ("Death.SicknessLevel", 11);
863 _bool_configs[CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP] = sConfigMgr->GetOption<bool>("Death.CorpseReclaimDelay.PvP", true);
864 _bool_configs[CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE] = sConfigMgr->GetOption<bool>("Death.CorpseReclaimDelay.PvE", true);
865 _bool_configs[CONFIG_DEATH_BONES_WORLD] = sConfigMgr->GetOption<bool>("Death.Bones.World", true);
866 _bool_configs[CONFIG_DEATH_BONES_BG_OR_ARENA] = sConfigMgr->GetOption<bool>("Death.Bones.BattlegroundOrArena", true);
867
868 _bool_configs[CONFIG_DIE_COMMAND_MODE] = sConfigMgr->GetOption<bool>("Die.Command.Mode", true);
869
870 // always use declined names in the russian client
872 (_int_configs[CONFIG_REALM_ZONE] == REALM_ZONE_RUSSIAN) ? true : sConfigMgr->GetOption<bool>("DeclinedNames", false);
873
874 _float_configs[CONFIG_LISTEN_RANGE_SAY] = sConfigMgr->GetOption<float>("ListenRange.Say", 25.0f);
875 _float_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfigMgr->GetOption<float>("ListenRange.TextEmote", 25.0f);
876 _float_configs[CONFIG_LISTEN_RANGE_YELL] = sConfigMgr->GetOption<float>("ListenRange.Yell", 300.0f);
877
878 _int_configs[CONFIG_BATTLEGROUND_OVERRIDE_LOWLEVELS_MINPLAYERS] = sConfigMgr->GetOption<uint32>("Battleground.Override.LowLevels.MinPlayers", 0);
879 _bool_configs[CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG] = sConfigMgr->GetOption<bool>("Battleground.DisableQuestShareInBG", false);
880 _bool_configs[CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG] = sConfigMgr->GetOption<bool>("Battleground.DisableReadyCheckInBG", false);
881 _bool_configs[CONFIG_BATTLEGROUND_CAST_DESERTER] = sConfigMgr->GetOption<bool>("Battleground.CastDeserter", true);
882 _bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetOption<bool>("Battleground.QueueAnnouncer.Enable", false);
883 _int_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_LEVEL] = sConfigMgr->GetOption<uint32>("Battleground.QueueAnnouncer.Limit.MinLevel", 0);
884 _int_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_PLAYERS] = sConfigMgr->GetOption<uint32>("Battleground.QueueAnnouncer.Limit.MinPlayers", 3);
885 _int_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_SPAM_DELAY] = sConfigMgr->GetOption<uint32>("Battleground.QueueAnnouncer.SpamProtection.Delay", 30);
886 _bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetOption<bool>("Battleground.QueueAnnouncer.PlayerOnly", false);
887 _bool_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMED] = sConfigMgr->GetOption<bool>("Battleground.QueueAnnouncer.Timed", false);
888 _int_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMER] = sConfigMgr->GetOption<uint32>("Battleground.QueueAnnouncer.Timer", 30000);
889 _bool_configs[CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE] = sConfigMgr->GetOption<bool>("Battleground.StoreStatistics.Enable", false);
890 _bool_configs[CONFIG_BATTLEGROUND_TRACK_DESERTERS] = sConfigMgr->GetOption<bool>("Battleground.TrackDeserters.Enable", false);
891 _int_configs[CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER] = sConfigMgr->GetOption<int32> ("Battleground.PrematureFinishTimer", 5 * MINUTE * IN_MILLISECONDS);
892 _int_configs[CONFIG_BATTLEGROUND_INVITATION_TYPE] = sConfigMgr->GetOption<int32>("Battleground.InvitationType", 0);
893 _int_configs[CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH] = sConfigMgr->GetOption<int32> ("Battleground.PremadeGroupWaitForMatch", 30 * MINUTE * IN_MILLISECONDS);
894 _bool_configs[CONFIG_BG_XP_FOR_KILL] = sConfigMgr->GetOption<bool>("Battleground.GiveXPForKills", false);
895 _int_configs[CONFIG_BATTLEGROUND_REPORT_AFK_TIMER] = sConfigMgr->GetOption<int32>("Battleground.ReportAFK.Timer", 4);
896 _int_configs[CONFIG_BATTLEGROUND_REPORT_AFK] = sConfigMgr->GetOption<int32>("Battleground.ReportAFK", 3);
898 {
899 LOG_ERROR("server.loading", "Battleground.ReportAFK ({}) must be >0. Using 3 instead.", _int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
901 }
903 {
904 LOG_ERROR("server.loading", "Battleground.ReportAFK ({}) must be <10. Using 3 instead.", _int_configs[CONFIG_BATTLEGROUND_REPORT_AFK]);
906 }
907 _int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.PlayerRespawn", 30);
909 {
910 LOG_ERROR("server.loading", "Battleground.PlayerRespawn ({}) must be >2. Using 30 instead.", _int_configs[CONFIG_BATTLEGROUND_PLAYER_RESPAWN]);
912 }
913 _int_configs[CONFIG_BATTLEGROUND_RESTORATION_BUFF_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.RestorationBuffRespawn", 20);
915 {
916 LOG_ERROR("server.loading", "Battleground.RestorationBuffRespawn ({}) must be > 0. Using 20 instead.", _int_configs[CONFIG_BATTLEGROUND_RESTORATION_BUFF_RESPAWN]);
918 }
919 _int_configs[CONFIG_BATTLEGROUND_BERSERKING_BUFF_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.BerserkingBuffRespawn", 120);
921 {
922 LOG_ERROR("server.loading", "Battleground.BerserkingBuffRespawn ({}) must be > 0. Using 120 instead.", _int_configs[CONFIG_BATTLEGROUND_BERSERKING_BUFF_RESPAWN]);
924 }
925 _int_configs[CONFIG_BATTLEGROUND_SPEED_BUFF_RESPAWN] = sConfigMgr->GetOption<int32>("Battleground.SpeedBuffRespawn", 150);
927 {
928 LOG_ERROR("server.loading", "Battleground.SpeedBuffRespawn ({}) must be > 0. Using 150 instead.", _int_configs[CONFIG_BATTLEGROUND_SPEED_BUFF_RESPAWN]);
930 }
931
932 _int_configs[CONFIG_BATTLEGROUND_WARSONG_FLAGS] = sConfigMgr->GetOption<uint32>("Battleground.Warsong.Flags", 3);
933 _int_configs[CONFIG_BATTLEGROUND_ARATHI_CAPTUREPOINTS] = sConfigMgr->GetOption<uint32>("Battleground.Arathi.CapturePoints", 1600);
934 _int_configs[CONFIG_BATTLEGROUND_ALTERAC_REINFORCEMENTS] = sConfigMgr->GetOption<uint32>("Battleground.Alterac.Reinforcements", 600);
935 _int_configs[CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH] = sConfigMgr->GetOption<uint32>("Battleground.Alterac.ReputationOnBossDeath", 350);
936 _int_configs[CONFIG_BATTLEGROUND_EYEOFTHESTORM_CAPTUREPOINTS] = sConfigMgr->GetOption<uint32>("Battleground.EyeOfTheStorm.CapturePoints", 1600);
937
938 _int_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfigMgr->GetOption<uint32>("Arena.MaxRatingDifference", 150);
939 _int_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfigMgr->GetOption<uint32>("Arena.RatingDiscardTimer", 10 * MINUTE * IN_MILLISECONDS);
940 _int_configs[CONFIG_ARENA_PREV_OPPONENTS_DISCARD_TIMER] = sConfigMgr->GetOption<uint32>("Arena.PreviousOpponentsDiscardTimer", 2 * MINUTE * IN_MILLISECONDS);
941 _bool_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS] = sConfigMgr->GetOption<bool>("Arena.AutoDistributePoints", false);
942 _int_configs[CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS] = sConfigMgr->GetOption<uint32>("Arena.AutoDistributeInterval", 7); // pussywizard: spoiled by implementing constant day and hour, always 7 now
943 _int_configs[CONFIG_ARENA_GAMES_REQUIRED] = sConfigMgr->GetOption<uint32>("Arena.GamesRequired", 10);
944 _int_configs[CONFIG_ARENA_START_RATING] = sConfigMgr->GetOption<uint32>("Arena.ArenaStartRating", 0);
945 _int_configs[CONFIG_LEGACY_ARENA_POINTS_CALC] = sConfigMgr->GetOption<uint32>("Arena.LegacyArenaPoints", 0);
946 _int_configs[CONFIG_ARENA_START_PERSONAL_RATING] = sConfigMgr->GetOption<uint32>("Arena.ArenaStartPersonalRating", 0);
947 _int_configs[CONFIG_ARENA_START_MATCHMAKER_RATING] = sConfigMgr->GetOption<uint32>("Arena.ArenaStartMatchmakerRating", 1500);
948 _float_configs[CONFIG_ARENA_WIN_RATING_MODIFIER_1] = sConfigMgr->GetOption<float>("Arena.ArenaWinRatingModifier1", 48.0f);
949 _float_configs[CONFIG_ARENA_WIN_RATING_MODIFIER_2] = sConfigMgr->GetOption<float>("Arena.ArenaWinRatingModifier2", 24.0f);
950 _float_configs[CONFIG_ARENA_LOSE_RATING_MODIFIER] = sConfigMgr->GetOption<float>("Arena.ArenaLoseRatingModifier", 24.0f);
951 _float_configs[CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER] = sConfigMgr->GetOption<float>("Arena.ArenaMatchmakerRatingModifier", 24.0f);
952 _bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfigMgr->GetOption<bool>("Arena.QueueAnnouncer.Enable", false);
953 _bool_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY] = sConfigMgr->GetOption<bool>("Arena.QueueAnnouncer.PlayerOnly", false);
954 _int_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL] = sConfigMgr->GetOption<uint32>("Arena.QueueAnnouncer.Detail", 3);
955
956 _bool_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfigMgr->GetOption<bool>("OffhandCheckAtSpellUnlearn", true);
957 _int_configs[CONFIG_CREATURE_STOP_FOR_PLAYER] = sConfigMgr->GetOption<uint32>("Creature.MovingStopTimeForPlayer", 3 * MINUTE * IN_MILLISECONDS);
958
959 _int_configs[CONFIG_WATER_BREATH_TIMER] = sConfigMgr->GetOption<uint32>("WaterBreath.Timer", 180000);
961 {
962 LOG_ERROR("server.loading", "WaterBreath.Timer ({}) must be > 0. Using 180000 instead.", _int_configs[CONFIG_WATER_BREATH_TIMER]);
964 }
965
966 if (int32 clientCacheId = sConfigMgr->GetOption<int32>("ClientCacheVersion", 0))
967 {
968 // overwrite DB/old value
969 if (clientCacheId > 0)
970 {
972 LOG_INFO("server.loading", "Client cache version set to: {}", clientCacheId);
973 }
974 else
975 LOG_ERROR("server.loading", "ClientCacheVersion can't be negative {}, ignored.", clientCacheId);
976 }
977
978 _int_configs[CONFIG_INSTANT_LOGOUT] = sConfigMgr->GetOption<int32>("InstantLogout", SEC_MODERATOR);
979
980 _int_configs[CONFIG_GUILD_EVENT_LOG_COUNT] = sConfigMgr->GetOption<int32>("Guild.EventLogRecordsCount", GUILD_EVENTLOG_MAX_RECORDS);
983 _int_configs[CONFIG_GUILD_BANK_EVENT_LOG_COUNT] = sConfigMgr->GetOption<int32>("Guild.BankEventLogRecordsCount", GUILD_BANKLOG_MAX_RECORDS);
986
987 //visibility on continents
988 _maxVisibleDistanceOnContinents = sConfigMgr->GetOption<float>("Visibility.Distance.Continents", DEFAULT_VISIBILITY_DISTANCE);
989 if (_maxVisibleDistanceOnContinents < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
990 {
991 LOG_ERROR("server.loading", "Visibility.Distance.Continents can't be less max aggro radius {}", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
993 }
995 {
996 LOG_ERROR("server.loading", "Visibility.Distance.Continents can't be greater {}", MAX_VISIBILITY_DISTANCE);
998 }
999
1000 //visibility in instances
1001 _maxVisibleDistanceInInstances = sConfigMgr->GetOption<float>("Visibility.Distance.Instances", DEFAULT_VISIBILITY_INSTANCE);
1002 if (_maxVisibleDistanceInInstances < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
1003 {
1004 LOG_ERROR("server.loading", "Visibility.Distance.Instances can't be less max aggro radius {}", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
1006 }
1008 {
1009 LOG_ERROR("server.loading", "Visibility.Distance.Instances can't be greater {}", MAX_VISIBILITY_DISTANCE);
1011 }
1012
1013 //visibility in BG/Arenas
1014 _maxVisibleDistanceInBGArenas = sConfigMgr->GetOption<float>("Visibility.Distance.BGArenas", DEFAULT_VISIBILITY_BGARENAS);
1015 if (_maxVisibleDistanceInBGArenas < 45 * sWorld->getRate(RATE_CREATURE_AGGRO))
1016 {
1017 LOG_ERROR("server.loading", "Visibility.Distance.BGArenas can't be less max aggro radius {}", 45 * sWorld->getRate(RATE_CREATURE_AGGRO));
1019 }
1021 {
1022 LOG_ERROR("server.loading", "Visibility.Distance.BGArenas can't be greater {}", MAX_VISIBILITY_DISTANCE);
1024 }
1025
1027 _int_configs[CONFIG_CHARDELETE_METHOD] = sConfigMgr->GetOption<int32>("CharDelete.Method", 0);
1028 _int_configs[CONFIG_CHARDELETE_MIN_LEVEL] = sConfigMgr->GetOption<int32>("CharDelete.MinLevel", 0);
1029 _int_configs[CONFIG_CHARDELETE_KEEP_DAYS] = sConfigMgr->GetOption<int32>("CharDelete.KeepDays", 30);
1030
1032 _bool_configs[CONFIG_ITEMDELETE_METHOD] = sConfigMgr->GetOption<bool>("ItemDelete.Method", 0);
1033 _bool_configs[CONFIG_ITEMDELETE_VENDOR] = sConfigMgr->GetOption<bool>("ItemDelete.Vendor", 0);
1034 _int_configs[CONFIG_ITEMDELETE_QUALITY] = sConfigMgr->GetOption<int32>("ItemDelete.Quality", 3);
1035 _int_configs[CONFIG_ITEMDELETE_ITEM_LEVEL] = sConfigMgr->GetOption<int32>("ItemDelete.ItemLevel", 80);
1036 _int_configs[CONFIG_ITEMDELETE_KEEP_DAYS] = sConfigMgr->GetOption<int32>("ItemDelete.KeepDays", 0);
1037
1038 _int_configs[CONFIG_FFA_PVP_TIMER] = sConfigMgr->GetOption<int32>("FFAPvPTimer", 30);
1039
1040 _int_configs[CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION] = sConfigMgr->GetOption<int32>("LootNeedBeforeGreedILvlRestriction", 70);
1041
1042 _bool_configs[CONFIG_PLAYER_SETTINGS_ENABLED] = sConfigMgr->GetOption<bool>("EnablePlayerSettings", 0);
1043
1044 _bool_configs[CONFIG_ALLOW_JOIN_BG_AND_LFG] = sConfigMgr->GetOption<bool>("JoinBGAndLFG.Enable", false);
1045
1046 _bool_configs[CONFIG_LEAVE_GROUP_ON_LOGOUT] = sConfigMgr->GetOption<bool>("LeaveGroupOnLogout.Enabled", false);
1047
1048 _bool_configs[CONFIG_QUEST_POI_ENABLED] = sConfigMgr->GetOption<bool>("QuestPOI.Enabled", true);
1049
1050 _int_configs[CONFIG_CHANGE_FACTION_MAX_MONEY] = sConfigMgr->GetOption<uint32>("ChangeFaction.MaxMoney", 0);
1051
1052 _bool_configs[CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH] = sConfigMgr->GetOption<bool>("Pet.RankMod.Health", true);
1053
1054 _bool_configs[CONFIG_MUNCHING_BLIZZLIKE] = sConfigMgr->GetOption<bool>("MunchingBlizzlike.Enabled", true);
1055
1056 _bool_configs[CONFIG_ENABLE_DAZE] = sConfigMgr->GetOption<bool>("Daze.Enabled", true);
1057
1058 _int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption<uint32>("DailyRBGArenaPoints.MinLevel", 71);
1059
1060 // Respawn
1061 _float_configs[CONFIG_RESPAWN_DYNAMICRATE_CREATURE] = sConfigMgr->GetOption<float>("Respawn.DynamicRateCreature", 1.0f);
1062 _int_configs[CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE] = sConfigMgr->GetOption<int32>("Respawn.DynamicMinimumCreature", 10);
1063
1064 _float_configs[CONFIG_RESPAWN_DYNAMICRATE_GAMEOBJECT] = sConfigMgr->GetOption<float>("Respawn.DynamicRateGameObject", 1.0f);
1065 _int_configs[CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT] = sConfigMgr->GetOption<int32>("Respawn.DynamicMinimumGameObject", 10);
1066
1068 std::string dataPath = sConfigMgr->GetOption<std::string>("DataDir", "./");
1069 if (dataPath.empty() || (dataPath.at(dataPath.length() - 1) != '/' && dataPath.at(dataPath.length() - 1) != '\\'))
1070 dataPath.push_back('/');
1071
1072#if AC_PLATFORM == AC_PLATFORM_UNIX || AC_PLATFORM == AC_PLATFORM_APPLE
1073 if (dataPath[0] == '~')
1074 {
1075 const char* home = getenv("HOME");
1076 if (home)
1077 dataPath.replace(0, 1, home);
1078 }
1079#endif
1080
1081 if (reload)
1082 {
1083 if (dataPath != _dataPath)
1084 LOG_ERROR("server.loading", "DataDir option can't be changed at worldserver.conf reload, using current value ({}).", _dataPath);
1085 }
1086 else
1087 {
1088 _dataPath = dataPath;
1089 LOG_INFO("server.loading", "Using DataDir {}", _dataPath);
1090 }
1091
1092 bool enableIndoor = sConfigMgr->GetOption<bool>("vmap.enableIndoorCheck", true);
1094 bool enableLOS = sConfigMgr->GetOption<bool>("vmap.enableLOS", true);
1095 bool enableHeight = sConfigMgr->GetOption<bool>("vmap.enableHeight", true);
1096 bool enablePetLOS = sConfigMgr->GetOption<bool>("vmap.petLOS", true);
1097 _bool_configs[CONFIG_VMAP_BLIZZLIKE_PVP_LOS] = sConfigMgr->GetOption<bool>("vmap.BlizzlikePvPLOS", true);
1098 _bool_configs[CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD] = sConfigMgr->GetOption<bool>("vmap.BlizzlikeLOSInOpenWorld", true);
1099
1100 if (!enableHeight)
1101 LOG_ERROR("server.loading", "VMap height checking disabled! Creatures movements and other various things WILL be broken! Expect no support.");
1102
1105 LOG_INFO("server.loading", "WORLD: VMap support included. LineOfSight:{}, getHeight:{}, indoorCheck:{} PetLOS:{}", enableLOS, enableHeight, enableIndoor, enablePetLOS);
1106
1107 _bool_configs[CONFIG_PET_LOS] = enablePetLOS;
1108 _bool_configs[CONFIG_START_CUSTOM_SPELLS] = sConfigMgr->GetOption<bool>("PlayerStart.CustomSpells", false);
1109 _int_configs[CONFIG_HONOR_AFTER_DUEL] = sConfigMgr->GetOption<int32>("HonorPointsAfterDuel", 0);
1110 _bool_configs[CONFIG_START_ALL_EXPLORED] = sConfigMgr->GetOption<bool>("PlayerStart.MapsExplored", false);
1111 _bool_configs[CONFIG_START_ALL_REP] = sConfigMgr->GetOption<bool>("PlayerStart.AllReputation", false);
1112 _bool_configs[CONFIG_ALWAYS_MAXSKILL] = sConfigMgr->GetOption<bool>("AlwaysMaxWeaponSkill", false);
1113 _bool_configs[CONFIG_PVP_TOKEN_ENABLE] = sConfigMgr->GetOption<bool>("PvPToken.Enable", false);
1114 _int_configs[CONFIG_PVP_TOKEN_MAP_TYPE] = sConfigMgr->GetOption<int32>("PvPToken.MapAllowType", 4);
1115 _int_configs[CONFIG_PVP_TOKEN_ID] = sConfigMgr->GetOption<int32>("PvPToken.ItemID", 29434);
1116 _int_configs[CONFIG_PVP_TOKEN_COUNT] = sConfigMgr->GetOption<int32>("PvPToken.ItemCount", 1);
1119
1120 _bool_configs[CONFIG_NO_RESET_TALENT_COST] = sConfigMgr->GetOption<bool>("NoResetTalentsCost", false);
1121 _int_configs[CONFIG_TOGGLE_XP_COST] = sConfigMgr->GetOption<int32>("ToggleXP.Cost", 100000);
1122 _bool_configs[CONFIG_SHOW_KICK_IN_WORLD] = sConfigMgr->GetOption<bool>("ShowKickInWorld", false);
1123 _bool_configs[CONFIG_SHOW_MUTE_IN_WORLD] = sConfigMgr->GetOption<bool>("ShowMuteInWorld", false);
1124 _bool_configs[CONFIG_SHOW_BAN_IN_WORLD] = sConfigMgr->GetOption<bool>("ShowBanInWorld", false);
1125 _int_configs[CONFIG_NUMTHREADS] = sConfigMgr->GetOption<int32>("MapUpdate.Threads", 1);
1126 _int_configs[CONFIG_MAX_RESULTS_LOOKUP_COMMANDS] = sConfigMgr->GetOption<int32>("Command.LookupMaxResults", 0);
1127
1128 // Warden
1129 _bool_configs[CONFIG_WARDEN_ENABLED] = sConfigMgr->GetOption<bool>("Warden.Enabled", true);
1130 _int_configs[CONFIG_WARDEN_NUM_MEM_CHECKS] = sConfigMgr->GetOption<int32>("Warden.NumMemChecks", 3);
1131 _int_configs[CONFIG_WARDEN_NUM_LUA_CHECKS] = sConfigMgr->GetOption<int32>("Warden.NumLuaChecks", 1);
1132 _int_configs[CONFIG_WARDEN_NUM_OTHER_CHECKS] = sConfigMgr->GetOption<int32>("Warden.NumOtherChecks", 7);
1133 _int_configs[CONFIG_WARDEN_CLIENT_BAN_DURATION] = sConfigMgr->GetOption<int32>("Warden.BanDuration", 86400);
1134 _int_configs[CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF] = sConfigMgr->GetOption<int32>("Warden.ClientCheckHoldOff", 30);
1135 _int_configs[CONFIG_WARDEN_CLIENT_FAIL_ACTION] = sConfigMgr->GetOption<int32>("Warden.ClientCheckFailAction", 0);
1136 _int_configs[CONFIG_WARDEN_CLIENT_RESPONSE_DELAY] = sConfigMgr->GetOption<int32>("Warden.ClientResponseDelay", 600);
1137
1138 // Dungeon finder
1139 _int_configs[CONFIG_LFG_OPTIONSMASK] = sConfigMgr->GetOption<int32>("DungeonFinder.OptionsMask", 5);
1140
1141 _bool_configs[CONFIG_LFG_CAST_DESERTER] = sConfigMgr->GetOption<int32>("DungeonFinder.CastDeserter", true);
1142
1143 // DBC_ItemAttributes
1144 _bool_configs[CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES] = sConfigMgr->GetOption<bool>("DBC.EnforceItemAttributes", true);
1145
1146 // Max instances per hour
1147 _int_configs[CONFIG_MAX_INSTANCES_PER_HOUR] = sConfigMgr->GetOption<int32>("AccountInstancesPerHour", 5);
1148
1149 // AutoBroadcast
1150 _bool_configs[CONFIG_AUTOBROADCAST] = sConfigMgr->GetOption<bool>("AutoBroadcast.On", false);
1151 _int_configs[CONFIG_AUTOBROADCAST_CENTER] = sConfigMgr->GetOption<int32>("AutoBroadcast.Center", 0);
1152 _int_configs[CONFIG_AUTOBROADCAST_INTERVAL] = sConfigMgr->GetOption<int32>("AutoBroadcast.Timer", 60000);
1153 _int_configs[CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE] = sConfigMgr->GetOption<int32>("AutoBroadcast.MinDisableLevel", 0);
1154 if (reload)
1155 {
1158 }
1159
1160 // MySQL ping time interval
1161 _int_configs[CONFIG_DB_PING_INTERVAL] = sConfigMgr->GetOption<int32>("MaxPingTime", 30);
1162
1163 // misc
1164 _bool_configs[CONFIG_PDUMP_NO_PATHS] = sConfigMgr->GetOption<bool>("PlayerDump.DisallowPaths", true);
1165 _bool_configs[CONFIG_PDUMP_NO_OVERWRITE] = sConfigMgr->GetOption<bool>("PlayerDump.DisallowOverwrite", true);
1166 _bool_configs[CONFIG_ENABLE_MMAPS] = sConfigMgr->GetOption<bool>("MoveMaps.Enable", true);
1168
1169 // Wintergrasp
1170 _int_configs[CONFIG_WINTERGRASP_ENABLE] = sConfigMgr->GetOption<int32>("Wintergrasp.Enable", 1);
1171 _int_configs[CONFIG_WINTERGRASP_PLR_MAX] = sConfigMgr->GetOption<int32>("Wintergrasp.PlayerMax", 120);
1172 _int_configs[CONFIG_WINTERGRASP_PLR_MIN] = sConfigMgr->GetOption<int32>("Wintergrasp.PlayerMin", 0);
1173 _int_configs[CONFIG_WINTERGRASP_PLR_MIN_LVL] = sConfigMgr->GetOption<int32>("Wintergrasp.PlayerMinLvl", 75);
1174 _int_configs[CONFIG_WINTERGRASP_BATTLETIME] = sConfigMgr->GetOption<int32>("Wintergrasp.BattleTimer", 30);
1175 _int_configs[CONFIG_WINTERGRASP_NOBATTLETIME] = sConfigMgr->GetOption<int32>("Wintergrasp.NoBattleTimer", 150);
1176 _int_configs[CONFIG_WINTERGRASP_RESTART_AFTER_CRASH] = sConfigMgr->GetOption<int32>("Wintergrasp.CrashRestartTimer", 10);
1177
1178 _int_configs[CONFIG_BIRTHDAY_TIME] = sConfigMgr->GetOption<int32>("BirthdayTime", 1222964635);
1179 _bool_configs[CONFIG_MINIGOB_MANABONK] = sConfigMgr->GetOption<bool>("Minigob.Manabonk.Enable", true);
1180
1181 _bool_configs[CONFIG_ENABLE_CONTINENT_TRANSPORT] = sConfigMgr->GetOption<bool>("IsContinentTransport.Enabled", true);
1182 _bool_configs[CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING] = sConfigMgr->GetOption<bool>("IsPreloadedContinentTransport.Enabled", false);
1183
1184 _bool_configs[CONFIG_IP_BASED_ACTION_LOGGING] = sConfigMgr->GetOption<bool>("Allow.IP.Based.Action.Logging", false);
1185
1186 // Whether to use LoS from game objects
1187 _bool_configs[CONFIG_CHECK_GOBJECT_LOS] = sConfigMgr->GetOption<bool>("CheckGameObjectLoS", true);
1188
1189 _bool_configs[CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA] = sConfigMgr->GetOption<bool>("Calculate.Creature.Zone.Area.Data", false);
1190 _bool_configs[CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA] = sConfigMgr->GetOption<bool>("Calculate.Gameoject.Zone.Area.Data", false);
1191
1192 // Player can join LFG anywhere
1193 _bool_configs[CONFIG_LFG_LOCATION_ALL] = sConfigMgr->GetOption<bool>("LFG.Location.All", false);
1194
1195 // Prevent players AFK from being logged out
1196 _int_configs[CONFIG_AFK_PREVENT_LOGOUT] = sConfigMgr->GetOption<int32>("PreventAFKLogout", 0);
1197
1198 // Preload all grids of all non-instanced maps
1199 _bool_configs[CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS] = sConfigMgr->GetOption<bool>("PreloadAllNonInstancedMapGrids", false);
1200
1201 // ICC buff override
1202 _int_configs[CONFIG_ICC_BUFF_HORDE] = sConfigMgr->GetOption<int32>("ICC.Buff.Horde", 73822);
1203 _int_configs[CONFIG_ICC_BUFF_ALLIANCE] = sConfigMgr->GetOption<int32>("ICC.Buff.Alliance", 73828);
1204
1205 _bool_configs[CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE] = sConfigMgr->GetOption<bool>("SetAllCreaturesWithWaypointMovementActive", false);
1206
1207 // packet spoof punishment
1208 _int_configs[CONFIG_PACKET_SPOOF_BANMODE] = sConfigMgr->GetOption<int32>("PacketSpoof.BanMode", (uint32)0);
1211
1212 _int_configs[CONFIG_PACKET_SPOOF_BANDURATION] = sConfigMgr->GetOption<int32>("PacketSpoof.BanDuration", 86400);
1213
1214 // Random Battleground Rewards
1215 _int_configs[CONFIG_BG_REWARD_WINNER_HONOR_FIRST] = sConfigMgr->GetOption<int32>("Battleground.RewardWinnerHonorFirst", 30);
1216 _int_configs[CONFIG_BG_REWARD_WINNER_ARENA_FIRST] = sConfigMgr->GetOption<int32>("Battleground.RewardWinnerArenaFirst", 25);
1217 _int_configs[CONFIG_BG_REWARD_WINNER_HONOR_LAST] = sConfigMgr->GetOption<int32>("Battleground.RewardWinnerHonorLast", 15);
1218 _int_configs[CONFIG_BG_REWARD_WINNER_ARENA_LAST] = sConfigMgr->GetOption<int32>("Battleground.RewardWinnerArenaLast", 0);
1219 _int_configs[CONFIG_BG_REWARD_LOSER_HONOR_FIRST] = sConfigMgr->GetOption<int32>("Battleground.RewardLoserHonorFirst", 5);
1220 _int_configs[CONFIG_BG_REWARD_LOSER_HONOR_LAST] = sConfigMgr->GetOption<int32>("Battleground.RewardLoserHonorLast", 5);
1221
1222 _int_configs[CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER] = sConfigMgr->GetOption<int32>("WaypointMovementStopTimeForPlayer", 120);
1223
1224 _int_configs[CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PRINT_MODE] = sConfigMgr->GetOption<int32>("DungeonAccessRequirements.PrintMode", 1);
1225 _bool_configs[CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL] = sConfigMgr->GetOption<bool>("DungeonAccessRequirements.PortalAvgIlevelCheck", false);
1226 _bool_configs[CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE] = sConfigMgr->GetOption<bool>("DungeonAccessRequirements.LFGLevelDBCOverride", false);
1227 _int_configs[CONFIG_DUNGEON_ACCESS_REQUIREMENTS_OPTIONAL_STRING_ID] = sConfigMgr->GetOption<int32>("DungeonAccessRequirements.OptionalStringID", 0);
1228 _int_configs[CONFIG_NPC_EVADE_IF_NOT_REACHABLE] = sConfigMgr->GetOption<int32>("NpcEvadeIfTargetIsUnreachable", 5);
1229 _int_configs[CONFIG_NPC_REGEN_TIME_IF_NOT_REACHABLE_IN_RAID] = sConfigMgr->GetOption<int32>("NpcRegenHPTimeIfTargetIsUnreachable", 10);
1230 _bool_configs[CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID] = sConfigMgr->GetOption<bool>("NpcRegenHPIfTargetIsUnreachable", true);
1231
1232 //Debug
1233 _bool_configs[CONFIG_DEBUG_BATTLEGROUND] = sConfigMgr->GetOption<bool>("Debug.Battleground", false);
1234 _bool_configs[CONFIG_DEBUG_ARENA] = sConfigMgr->GetOption<bool>("Debug.Arena", false);
1235
1236 _int_configs[CONFIG_GM_LEVEL_CHANNEL_MODERATION] = sConfigMgr->GetOption<int32>("Channel.ModerationGMLevel", 1);
1237
1238 _bool_configs[CONFIG_SET_BOP_ITEM_TRADEABLE] = sConfigMgr->GetOption<bool>("Item.SetItemTradeable", true);
1239
1240 // Specifies if IP addresses can be logged to the database
1241 _bool_configs[CONFIG_ALLOW_LOGGING_IP_ADDRESSES_IN_DATABASE] = sConfigMgr->GetOption<bool>("AllowLoggingIPAddressesInDatabase", true, true);
1242
1243 // LFG group mechanics.
1244 _int_configs[CONFIG_LFG_MAX_KICK_COUNT] = sConfigMgr->GetOption<int32>("LFG.MaxKickCount", 2);
1246 {
1248 LOG_ERROR("server.loading", "LFG.MaxKickCount can't be higher than 3.");
1249 }
1250
1251 _int_configs[CONFIG_LFG_KICK_PREVENTION_TIMER] = sConfigMgr->GetOption<int32>("LFG.KickPreventionTimer", 15 * MINUTE * IN_MILLISECONDS) * IN_MILLISECONDS;
1253 {
1255 LOG_ERROR("server.loading", "LFG.KickPreventionTimer can't be higher than 15 minutes.");
1256 }
1257
1258 // Realm Availability
1259 _bool_configs[CONFIG_REALM_LOGIN_ENABLED] = sConfigMgr->GetOption<bool>("World.RealmAvailability", true);
1260
1261 // AH Worker threads
1262 _int_configs[CONFIG_AUCTIONHOUSE_WORKERTHREADS] = sConfigMgr->GetOption<int32>("AuctionHouse.WorkerThreads", 1);
1263
1264 // SpellQueue
1265 _bool_configs[CONFIG_SPELL_QUEUE_ENABLED] = sConfigMgr->GetOption<bool>("SpellQueue.Enabled", true);
1266 _int_configs[CONFIG_SPELL_QUEUE_WINDOW] = sConfigMgr->GetOption<uint32>("SpellQueue.Window", 400);
1267
1268 _int_configs[CONFIG_SUNSREACH_COUNTER_MAX] = sConfigMgr->GetOption<uint32>("Sunsreach.CounterMax", 10000);
1269
1270 // call ScriptMgr if we're reloading the configuration
1271 sScriptMgr->OnAfterConfigLoad(reload);
1272}
constexpr auto IN_MILLISECONDS
Definition Common.h:53
constexpr auto HOUR
Definition Common.h:48
@ SEC_ADMINISTRATOR
Definition Common.h:60
@ SEC_MODERATOR
Definition Common.h:58
@ SEC_CONSOLE
Definition Common.h:61
constexpr auto MINUTE
Definition Common.h:47
#define MAX_LEVEL
Definition DBCEnums.h:39
#define DEFAULT_MAX_LEVEL
Definition DBCEnums.h:35
#define MIN_MAP_UPDATE_DELAY
Definition GridDefines.h:40
@ CONFIG_AUTOBROADCAST_CENTER
Definition IWorld.h:359
@ CONFIG_CHANGE_FACTION_MAX_MONEY
Definition IWorld.h:421
@ CONFIG_ARENA_START_MATCHMAKER_RATING
Definition IWorld.h:335
@ CONFIG_MAX_ALLOWED_MMR_DROP
Definition IWorld.h:348
@ CONFIG_BATTLEGROUND_PLAYER_RESPAWN
Definition IWorld.h:315
@ CONFIG_START_HEROIC_PLAYER_MONEY
Definition IWorld.h:240
@ CONFIG_CORPSE_DECAY_ELITE
Definition IWorld.h:301
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_LEVEL
Definition IWorld.h:319
@ CONFIG_ARENA_GAMES_REQUIRED
Definition IWorld.h:331
@ CONFIG_MAX_INSTANCES_PER_HOUR
Definition IWorld.h:367
@ CONFIG_GUILD_EVENT_LOG_COUNT
Definition IWorld.h:350
@ CONFIG_ARENA_START_RATING
Definition IWorld.h:332
@ CONFIG_SOCKET_TIMEOUTTIME
Definition IWorld.h:215
@ CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH
Definition IWorld.h:324
@ CONFIG_BATTLEGROUND_REPORT_AFK_TIMER
Definition IWorld.h:312
@ CONFIG_MAX_OVERSPEED_PINGS
Definition IWorld.h:274
@ CONFIG_WARDEN_NUM_LUA_CHECKS
Definition IWorld.h:381
@ CONFIG_BATTLEGROUND_BERSERKING_BUFF_RESPAWN
Definition IWorld.h:317
@ CONFIG_CHARDELETE_METHOD
Definition IWorld.h:357
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_SPAM_DELAY
Definition IWorld.h:308
@ CONFIG_SESSION_ADD_DELAY
Definition IWorld.h:216
@ CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE
Definition IWorld.h:361
@ CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK
Definition IWorld.h:228
@ CONFIG_WARDEN_CLIENT_BAN_DURATION
Definition IWorld.h:379
@ CONFIG_CLIENTCACHE_VERSION
Definition IWorld.h:349
@ CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD
Definition IWorld.h:423
@ CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF
Definition IWorld.h:286
@ CONFIG_SKILL_CHANCE_ORANGE
Definition IWorld.h:264
@ CONFIG_GM_CHAT
Definition IWorld.h:256
@ CONFIG_LFG_KICK_PREVENTION_TIMER
Definition IWorld.h:420
@ CONFIG_FFA_PVP_TIMER
Definition IWorld.h:417
@ CONFIG_CHATFLOOD_MUTE_TIME
Definition IWorld.h:280
@ CONFIG_BATTLEGROUND_EYEOFTHESTORM_CAPTUREPOINTS
Definition IWorld.h:325
@ CONFIG_STRICT_PET_NAMES
Definition IWorld.h:222
@ CONFIG_CHARACTER_CREATING_DISABLED
Definition IWorld.h:226
@ CONFIG_MIN_PET_NAME
Definition IWorld.h:225
@ CONFIG_ITEMDELETE_KEEP_DAYS
Definition IWorld.h:391
@ CONFIG_LOGDB_CLEARTIME
Definition IWorld.h:345
@ CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION
Definition IWorld.h:418
@ CONFIG_INSTANCE_RESET_TIME_RELATIVE_TIMESTAMP
Definition IWorld.h:249
@ CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF
Definition IWorld.h:287
@ CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK
Definition IWorld.h:227
@ CONFIG_INTERVAL_CHANGEWEATHER
Definition IWorld.h:211
@ CONFIG_GUILD_BANK_TAB_COST_4
Definition IWorld.h:411
@ CONFIG_NPC_EVADE_IF_NOT_REACHABLE
Definition IWorld.h:415
@ CONFIG_EVENT_ANNOUNCE
Definition IWorld.h:281
@ CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION
Definition IWorld.h:364
@ CONFIG_GM_WHISPERING_TO
Definition IWorld.h:257
@ CONFIG_SKILL_CHANCE_SKINNING_STEPS
Definition IWorld.h:269
@ CONFIG_INSTANT_LOGOUT
Definition IWorld.h:305
@ CONFIG_SKILL_CHANCE_YELLOW
Definition IWorld.h:265
@ CONFIG_BATTLEGROUND_RESTORATION_BUFF_RESPAWN
Definition IWorld.h:316
@ CONFIG_DUNGEON_ACCESS_REQUIREMENTS_OPTIONAL_STRING_ID
Definition IWorld.h:405
@ CONFIG_AUTOBROADCAST_INTERVAL
Definition IWorld.h:360
@ CONFIG_MAX_HONOR_POINTS
Definition IWorld.h:241
@ CONFIG_PVP_TOKEN_MAP_TYPE
Definition IWorld.h:338
@ CONFIG_ENABLE_SINFO_LOGIN
Definition IWorld.h:341
@ CONFIG_CHARTER_COST_GUILD
Definition IWorld.h:398
@ CONFIG_CHARDELETE_MIN_LEVEL
Definition IWorld.h:358
@ CONFIG_WARDEN_NUM_MEM_CHECKS
Definition IWorld.h:380
@ CONFIG_MAX_ARENA_POINTS
Definition IWorld.h:244
@ CONFIG_ARENA_MAX_RATING_DIFFERENCE
Definition IWorld.h:327
@ CONFIG_BG_REWARD_LOSER_HONOR_LAST
Definition IWorld.h:397
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_PLAYERS
Definition IWorld.h:320
@ CONFIG_BATTLEGROUND_SPEED_BUFF_RESPAWN
Definition IWorld.h:318
@ CONFIG_START_GM_LEVEL
Definition IWorld.h:260
@ CONFIG_MAIL_LEVEL_REQ
Definition IWorld.h:298
@ CONFIG_SKILL_GAIN_DEFENSE
Definition IWorld.h:271
@ CONFIG_MIN_PETITION_SIGNS
Definition IWorld.h:252
@ CONFIG_SPELL_QUEUE_WINDOW
Definition IWorld.h:425
@ CONFIG_BIRTHDAY_TIME
Definition IWorld.h:383
@ CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF
Definition IWorld.h:377
@ CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE
Definition IWorld.h:428
@ CONFIG_PARTY_LEVEL_REQ
Definition IWorld.h:293
@ CONFIG_MIN_LEVEL_STAT_SAVE
Definition IWorld.h:352
@ CONFIG_START_HEROIC_PLAYER_LEVEL
Definition IWorld.h:238
@ CONFIG_BATTLEGROUND_INVITATION_TYPE
Definition IWorld.h:314
@ CONFIG_GUILD_BANK_TAB_COST_3
Definition IWorld.h:410
@ CONFIG_START_ARENA_POINTS
Definition IWorld.h:245
@ CONFIG_MIN_CHARTER_NAME
Definition IWorld.h:224
@ CONFIG_NPC_REGEN_TIME_IF_NOT_REACHABLE_IN_RAID
Definition IWorld.h:416
@ CONFIG_CHAT_CHANNEL_LEVEL_REQ
Definition IWorld.h:290
@ CONFIG_STRICT_CHANNEL_NAMES
Definition IWorld.h:221
@ CONFIG_BG_REWARD_WINNER_ARENA_FIRST
Definition IWorld.h:393
@ CONFIG_CHARACTERS_PER_ACCOUNT
Definition IWorld.h:229
@ CONFIG_DEATH_SICKNESS_LEVEL
Definition IWorld.h:304
@ CONFIG_BATTLEGROUND_ALTERAC_REINFORCEMENTS
Definition IWorld.h:323
@ CONFIG_CHARTER_COST_ARENA_5v5
Definition IWorld.h:401
@ CONFIG_INSTANCE_RESET_TIME_HOUR
Definition IWorld.h:248
@ CONFIG_GM_LEVEL_CHANNEL_MODERATION
Definition IWorld.h:413
@ CONFIG_WINTERGRASP_PLR_MIN_LVL
Definition IWorld.h:370
@ CONFIG_PVP_TOKEN_ID
Definition IWorld.h:339
@ CONFIG_GUILD_RESET_HOUR
Definition IWorld.h:355
@ CONFIG_SKILL_GAIN_WEAPON
Definition IWorld.h:273
@ CONFIG_MAIL_DELIVERY_DELAY
Definition IWorld.h:262
@ CONFIG_WINTERGRASP_BATTLETIME
Definition IWorld.h:371
@ CONFIG_WINTERGRASP_NOBATTLETIME
Definition IWorld.h:372
@ CONFIG_PVP_TOKEN_COUNT
Definition IWorld.h:340
@ CONFIG_PACKET_SPOOF_BANDURATION
Definition IWorld.h:375
@ CONFIG_WATER_BREATH_TIMER
Definition IWorld.h:422
@ CONFIG_INSTANT_TAXI
Definition IWorld.h:385
@ CONFIG_SKILL_CHANCE_MINING_STEPS
Definition IWorld.h:268
@ CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS
Definition IWorld.h:330
@ CONFIG_START_PLAYER_MONEY
Definition IWorld.h:239
@ CONFIG_GUILD_BANK_EVENT_LOG_COUNT
Definition IWorld.h:351
@ CONFIG_TRADE_LEVEL_REQ
Definition IWorld.h:295
@ CONFIG_BG_REWARD_WINNER_ARENA_LAST
Definition IWorld.h:395
@ CONFIG_ICC_BUFF_ALLIANCE
Definition IWorld.h:388
@ CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH
Definition IWorld.h:311
@ CONFIG_CORPSE_DECAY_NORMAL
Definition IWorld.h:299
@ CONFIG_WINTERGRASP_RESTART_AFTER_CRASH
Definition IWorld.h:373
@ CONFIG_TELEPORT_TIMEOUT_FAR
Definition IWorld.h:347
@ CONFIG_SOCKET_TIMEOUTTIME_ACTIVE
Definition IWorld.h:384
@ CONFIG_START_PLAYER_LEVEL
Definition IWorld.h:237
@ CONFIG_GUILD_BANK_TAB_COST_2
Definition IWorld.h:409
@ CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL
Definition IWorld.h:246
@ CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE
Definition IWorld.h:247
@ CONFIG_BG_REWARD_WINNER_HONOR_FIRST
Definition IWorld.h:392
@ CONFIG_ARENA_START_PERSONAL_RATING
Definition IWorld.h:334
@ CONFIG_COMPRESSION
Definition IWorld.h:209
@ CONFIG_STRICT_CHARTER_NAMES
Definition IWorld.h:220
@ CONFIG_INTERVAL_SAVE
Definition IWorld.h:213
@ CONFIG_BG_REWARD_LOSER_HONOR_FIRST
Definition IWorld.h:396
@ CONFIG_CORPSE_DECAY_WORLDBOSS
Definition IWorld.h:303
@ CONFIG_TICKET_LEVEL_REQ
Definition IWorld.h:296
@ CONFIG_CHATFLOOD_ADDON_MESSAGE_COUNT
Definition IWorld.h:278
@ CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PRINT_MODE
Definition IWorld.h:404
@ CONFIG_GUILD_BANK_TAB_COST_5
Definition IWorld.h:412
@ CONFIG_LFG_OPTIONSMASK
Definition IWorld.h:366
@ CONFIG_GM_LOGIN_STATE
Definition IWorld.h:253
@ CONFIG_ARENA_PREV_OPPONENTS_DISCARD_TIMER
Definition IWorld.h:329
@ CONFIG_AUCTION_LEVEL_REQ
Definition IWorld.h:297
@ CONFIG_REALM_ZONE
Definition IWorld.h:218
@ CONFIG_CHAT_STRICT_LINK_CHECKING_KICK
Definition IWorld.h:289
@ CONFIG_GM_LEVEL_IN_GM_LIST
Definition IWorld.h:258
@ CONFIG_ARENA_RATING_DISCARD_TIMER
Definition IWorld.h:328
@ CONFIG_WARDEN_NUM_OTHER_CHECKS
Definition IWorld.h:382
@ CONFIG_HEROIC_CHARACTERS_PER_REALM
Definition IWorld.h:232
@ CONFIG_WINTERGRASP_ENABLE
Definition IWorld.h:326
@ CONFIG_SUNSREACH_COUNTER_MAX
Definition IWorld.h:426
@ CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER
Definition IWorld.h:403
@ CONFIG_GM_VISIBLE_STATE
Definition IWorld.h:254
@ CONFIG_MAX_WHO_LIST_RETURN
Definition IWorld.h:402
@ CONFIG_GROUP_VISIBILITY
Definition IWorld.h:261
@ CONFIG_CREATURE_FAMILY_FLEE_DELAY
Definition IWorld.h:284
@ CONFIG_PACKET_SPOOF_BANMODE
Definition IWorld.h:374
@ CONFIG_LEGACY_ARENA_POINTS_CALC
Definition IWorld.h:333
@ CONFIG_CHARDELETE_KEEP_DAYS
Definition IWorld.h:356
@ CONFIG_MAX_RESULTS_LOOKUP_COMMANDS
Definition IWorld.h:362
@ CONFIG_START_HONOR_POINTS
Definition IWorld.h:243
@ CONFIG_BATTLEGROUND_WARSONG_FLAGS
Definition IWorld.h:321
@ CONFIG_CREATURE_STOP_FOR_PLAYER
Definition IWorld.h:231
@ CONFIG_INTERVAL_DISCONNECT_TOLERANCE
Definition IWorld.h:212
@ CONFIG_CHAT_WHISPER_LEVEL_REQ
Definition IWorld.h:291
@ CONFIG_SKILL_GAIN_GATHERING
Definition IWorld.h:272
@ CONFIG_CHARTER_COST_ARENA_2v2
Definition IWorld.h:399
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMER
Definition IWorld.h:309
@ CONFIG_AFK_PREVENT_LOGOUT
Definition IWorld.h:386
@ CONFIG_CHATFLOOD_MESSAGE_DELAY
Definition IWorld.h:277
@ CONFIG_DISABLE_BREATHING
Definition IWorld.h:306
@ CONFIG_STRICT_PLAYER_NAMES
Definition IWorld.h:219
@ CONFIG_LOGDB_CLEARINTERVAL
Definition IWorld.h:344
@ CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT
Definition IWorld.h:242
@ CONFIG_BATTLEGROUND_REPORT_AFK
Definition IWorld.h:313
@ CONFIG_AUCTIONHOUSE_WORKERTHREADS
Definition IWorld.h:424
@ CONFIG_BATTLEGROUND_OVERRIDE_LOWLEVELS_MINPLAYERS
Definition IWorld.h:307
@ CONFIG_INSTANCE_UNLOAD_DELAY
Definition IWorld.h:250
@ CONFIG_GM_LEVEL_IN_WHO_LIST
Definition IWorld.h:259
@ CONFIG_TELEPORT_TIMEOUT_NEAR
Definition IWorld.h:346
@ CONFIG_GUILD_BANK_TAB_COST_1
Definition IWorld.h:408
@ CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER
Definition IWorld.h:310
@ CONFIG_GUILD_BANK_TAB_COST_0
Definition IWorld.h:407
@ CONFIG_HONOR_AFTER_DUEL
Definition IWorld.h:337
@ CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS
Definition IWorld.h:365
@ CONFIG_EXPANSION
Definition IWorld.h:275
@ CONFIG_CORPSE_DECAY_RARE
Definition IWorld.h:300
@ CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY
Definition IWorld.h:288
@ CONFIG_UPTIME_UPDATE
Definition IWorld.h:263
@ CONFIG_WARDEN_CLIENT_RESPONSE_DELAY
Definition IWorld.h:376
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD
Definition IWorld.h:283
@ CONFIG_WINTERGRASP_PLR_MAX
Definition IWorld.h:368
@ CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER
Definition IWorld.h:233
@ CONFIG_PORT_WORLD
Definition IWorld.h:214
@ CONFIG_MIN_DUALSPEC_LEVEL
Definition IWorld.h:236
@ CONFIG_LFG_MAX_KICK_COUNT
Definition IWorld.h:419
@ CONFIG_SKILL_GAIN_CRAFTING
Definition IWorld.h:270
@ CONFIG_RANDOM_BG_RESET_HOUR
Definition IWorld.h:353
@ CONFIG_DB_PING_INTERVAL
Definition IWorld.h:363
@ CONFIG_WORLD_BOSS_LEVEL_DIFF
Definition IWorld.h:285
@ CONFIG_CORPSE_DECAY_RAREELITE
Definition IWorld.h:302
@ CONFIG_CHATFLOOD_MESSAGE_COUNT
Definition IWorld.h:276
@ CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN
Definition IWorld.h:294
@ CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL
Definition IWorld.h:336
@ CONFIG_WARDEN_CLIENT_FAIL_ACTION
Definition IWorld.h:378
@ CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT
Definition IWorld.h:427
@ CONFIG_ITEMDELETE_QUALITY
Definition IWorld.h:389
@ CONFIG_CHARTER_COST_ARENA_3v3
Definition IWorld.h:400
@ CONFIG_MIN_PLAYER_NAME
Definition IWorld.h:223
@ CONFIG_ICC_BUFF_HORDE
Definition IWorld.h:387
@ CONFIG_CHATFLOOD_ADDON_MESSAGE_DELAY
Definition IWorld.h:279
@ CONFIG_SKILL_CHANCE_GREY
Definition IWorld.h:267
@ CONFIG_TOGGLE_XP_COST
Definition IWorld.h:414
@ CONFIG_INTERVAL_MAPUPDATE
Definition IWorld.h:210
@ CONFIG_NUMTHREADS
Definition IWorld.h:343
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY
Definition IWorld.h:282
@ CONFIG_MAX_PRIMARY_TRADE_SKILL
Definition IWorld.h:251
@ CONFIG_ITEMDELETE_ITEM_LEVEL
Definition IWorld.h:390
@ CONFIG_SKIP_CINEMATICS
Definition IWorld.h:234
@ CONFIG_SKILL_CHANCE_GREEN
Definition IWorld.h:266
@ CONFIG_CHAT_SAY_LEVEL_REQ
Definition IWorld.h:292
@ CONFIG_WINTERGRASP_PLR_MIN
Definition IWorld.h:369
@ CONFIG_BG_REWARD_WINNER_HONOR_LAST
Definition IWorld.h:394
@ CONFIG_CHARACTERS_PER_REALM
Definition IWorld.h:230
@ CONFIG_BATTLEGROUND_ARATHI_CAPTUREPOINTS
Definition IWorld.h:322
@ CONFIG_GUILD_BANK_INITIAL_TABS
Definition IWorld.h:406
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR
Definition IWorld.h:70
@ CONFIG_SHOW_KICK_IN_WORLD
Definition IWorld.h:128
@ CONFIG_QUEST_IGNORE_AUTO_COMPLETE
Definition IWorld.h:143
@ CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY
Definition IWorld.h:91
@ CONFIG_BG_XP_FOR_KILL
Definition IWorld.h:115
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT
Definition IWorld.h:71
@ CONFIG_AUTOBROADCAST
Definition IWorld.h:131
@ CONFIG_CHECK_GOBJECT_LOS
Definition IWorld.h:152
@ CONFIG_WEATHER
Definition IWorld.h:92
@ CONFIG_ALL_TAXI_PATHS
Definition IWorld.h:81
@ CONFIG_GM_LOWER_SECURITY
Definition IWorld.h:88
@ CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS
Definition IWorld.h:116
@ CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE
Definition IWorld.h:163
@ CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS
Definition IWorld.h:141
@ CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
Definition IWorld.h:97
@ CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG
Definition IWorld.h:107
@ CONFIG_START_CUSTOM_SPELLS
Definition IWorld.h:122
@ CONFIG_SKILL_MILLING
Definition IWorld.h:90
@ CONFIG_PDUMP_NO_OVERWRITE
Definition IWorld.h:138
@ CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP
Definition IWorld.h:101
@ CONFIG_ALLOW_TWO_SIDE_WHO_LIST
Definition IWorld.h:78
@ CONFIG_LFG_CAST_DESERTER
Definition IWorld.h:134
@ CONFIG_MUNCHING_BLIZZLIKE
Definition IWorld.h:181
@ CONFIG_STRICT_NAMES_PROFANITY
Definition IWorld.h:179
@ CONFIG_ALLOW_LOGGING_IP_ADDRESSES_IN_DATABASE
Definition IWorld.h:166
@ CONFIG_SHOW_MUTE_IN_WORLD
Definition IWorld.h:129
@ CONFIG_STRICT_NAMES_RESERVED
Definition IWorld.h:178
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION
Definition IWorld.h:76
@ CONFIG_ALLOW_GM_GROUP
Definition IWorld.h:86
@ CONFIG_DECLINED_NAMES_USED
Definition IWorld.h:106
@ CONFIG_MINIGOB_MANABONK
Definition IWorld.h:148
@ CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS
Definition IWorld.h:155
@ CONFIG_LFG_LOCATION_ALL
Definition IWorld.h:154
@ CONFIG_LEAVE_GROUP_ON_LOGOUT
Definition IWorld.h:171
@ CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA
Definition IWorld.h:151
@ CONFIG_ALLOW_PLAYER_COMMANDS
Definition IWorld.h:66
@ CONFIG_ALLOW_GM_FRIEND
Definition IWorld.h:87
@ CONFIG_INSTANCE_GMSUMMON_PLAYER
Definition IWorld.h:84
@ CONFIG_QUEST_IGNORE_RAID
Definition IWorld.h:94
@ CONFIG_SHOW_BAN_IN_WORLD
Definition IWorld.h:130
@ CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD
Definition IWorld.h:174
@ CONFIG_CLEAN_CHARACTER_DB
Definition IWorld.h:67
@ CONFIG_CHAT_MUTE_FIRST_LOGIN
Definition IWorld.h:100
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY
Definition IWorld.h:111
@ CONFIG_CHAT_FAKE_MESSAGE_PREVENTING
Definition IWorld.h:99
@ CONFIG_ALLOW_TWO_SIDE_TRADE
Definition IWorld.h:80
@ CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE
Definition IWorld.h:102
@ CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND
Definition IWorld.h:79
@ CONFIG_SKILL_PROSPECTING
Definition IWorld.h:89
@ CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS
Definition IWorld.h:170
@ CONFIG_IP_BASED_ACTION_LOGGING
Definition IWorld.h:149
@ CONFIG_ADDON_CHANNEL
Definition IWorld.h:65
@ CONFIG_START_ALL_REP
Definition IWorld.h:124
@ CONFIG_PVP_TOKEN_ENABLE
Definition IWorld.h:126
@ CONFIG_DETECT_POS_COLLISION
Definition IWorld.h:95
@ CONFIG_DEATH_BONES_BG_OR_ARENA
Definition IWorld.h:104
@ CONFIG_VMAP_BLIZZLIKE_PVP_LOS
Definition IWorld.h:173
@ CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE
Definition IWorld.h:113
@ CONFIG_INSTANCE_IGNORE_RAID
Definition IWorld.h:83
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL
Definition IWorld.h:77
@ CONFIG_BATTLEGROUND_CAST_DESERTER
Definition IWorld.h:109
@ CONFIG_CLOSE_IDLE_CONNECTIONS
Definition IWorld.h:153
@ CONFIG_OBJECT_QUEST_MARKERS
Definition IWorld.h:177
@ CONFIG_SET_BOP_ITEM_TRADEABLE
Definition IWorld.h:165
@ CONFIG_STATS_SAVE_ONLY_ON_LOGOUT
Definition IWorld.h:68
@ CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING
Definition IWorld.h:147
@ CONFIG_DEBUG_ARENA
Definition IWorld.h:161
@ CONFIG_SPELL_QUEUE_ENABLED
Definition IWorld.h:183
@ CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE
Definition IWorld.h:117
@ CONFIG_RESTRICTED_LFG_CHANNEL
Definition IWorld.h:96
@ CONFIG_NO_RESET_TALENT_COST
Definition IWorld.h:127
@ CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA
Definition IWorld.h:150
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL
Definition IWorld.h:72
@ CONFIG_PRESERVE_CUSTOM_CHANNELS
Definition IWorld.h:136
@ CONFIG_ENABLE_MMAPS
Definition IWorld.h:139
@ CONFIG_ALLOW_JOIN_BG_AND_LFG
Definition IWorld.h:169
@ CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH
Definition IWorld.h:180
@ CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN
Definition IWorld.h:119
@ CONFIG_QUEST_POI_ENABLED
Definition IWorld.h:172
@ CONFIG_ITEMDELETE_METHOD
Definition IWorld.h:157
@ CONFIG_DURABILITY_LOSS_IN_PVP
Definition IWorld.h:64
@ CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY
Definition IWorld.h:118
@ CONFIG_ENABLE_LOGIN_AFTER_DC
Definition IWorld.h:140
@ CONFIG_BATTLEGROUND_TRACK_DESERTERS
Definition IWorld.h:114
@ CONFIG_QUEST_IGNORE_AUTO_ACCEPT
Definition IWorld.h:142
@ CONFIG_DIE_COMMAND_MODE
Definition IWorld.h:105
@ CONFIG_DEBUG_BATTLEGROUND
Definition IWorld.h:160
@ CONFIG_ALLOW_TWO_SIDE_ACCOUNTS
Definition IWorld.h:69
@ CONFIG_PLAYER_SETTINGS_ENABLED
Definition IWorld.h:168
@ CONFIG_VMAP_INDOOR_CHECK
Definition IWorld.h:120
@ CONFIG_INSTANCE_SHARED_ID
Definition IWorld.h:85
@ CONFIG_ENABLE_DAZE
Definition IWorld.h:182
@ CONFIG_WARDEN_ENABLED
Definition IWorld.h:145
@ CONFIG_ITEMDELETE_VENDOR
Definition IWorld.h:158
@ CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE
Definition IWorld.h:159
@ CONFIG_PDUMP_NO_PATHS
Definition IWorld.h:137
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_EMOTE
Definition IWorld.h:156
@ CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL
Definition IWorld.h:93
@ CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG
Definition IWorld.h:108
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP
Definition IWorld.h:73
@ CONFIG_OBJECT_SPARKLES
Definition IWorld.h:175
@ CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL
Definition IWorld.h:162
@ CONFIG_DELETE_CHARACTER_TICKET_TRACE
Definition IWorld.h:133
@ CONFIG_REALM_LOGIN_ENABLED
Definition IWorld.h:167
@ CONFIG_ENABLE_CONTINENT_TRANSPORT
Definition IWorld.h:146
@ CONFIG_DEATH_BONES_WORLD
Definition IWorld.h:103
@ CONFIG_QUEST_ENABLE_QUEST_TRACKER
Definition IWorld.h:144
@ CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID
Definition IWorld.h:164
@ CONFIG_ALWAYS_MAXSKILL
Definition IWorld.h:125
@ CONFIG_TALENTS_INSPECTING
Definition IWorld.h:98
@ CONFIG_LOW_LEVEL_REGEN_BOOST
Definition IWorld.h:176
@ CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES
Definition IWorld.h:135
@ CONFIG_ALLOW_TICKETS
Definition IWorld.h:132
@ CONFIG_START_ALL_EXPLORED
Definition IWorld.h:123
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD
Definition IWorld.h:74
@ CONFIG_PET_LOS
Definition IWorld.h:121
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMED
Definition IWorld.h:112
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE
Definition IWorld.h:110
@ CONFIG_INSTANCE_IGNORE_LEVEL
Definition IWorld.h:82
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_ARENA
Definition IWorld.h:75
@ RATE_REWARD_BONUS_MONEY
Definition IWorld.h:472
@ RATE_SELLVALUE_ITEM_ARTIFACT
Definition IWorld.h:460
@ RATE_BUYVALUE_ITEM_ARTIFACT
Definition IWorld.h:468
@ RATE_CREATURE_NORMAL_SPELLDAMAGE
Definition IWorld.h:500
@ RATE_CREATURE_NORMAL_HP
Definition IWorld.h:490
@ RATE_DAMAGE_FALL
Definition IWorld.h:510
@ RATE_DROP_ITEM_REFERENCED_AMOUNT
Definition IWorld.h:452
@ RATE_CREATURE_NORMAL_DAMAGE
Definition IWorld.h:495
@ RATE_POWER_RAGE_INCOME
Definition IWorld.h:437
@ RATE_CREATURE_ELITE_RARE_DAMAGE
Definition IWorld.h:499
@ RATE_CREATURE_AGGRO
Definition IWorld.h:505
@ RATE_BUYVALUE_ITEM_POOR
Definition IWorld.h:462
@ RATE_SELLVALUE_ITEM_EPIC
Definition IWorld.h:458
@ RATE_POWER_RAGE_LOSS
Definition IWorld.h:438
@ RATE_REPUTATION_LOWLEVEL_QUEST
Definition IWorld.h:488
@ RATE_ARENA_POINTS
Definition IWorld.h:515
@ RATE_DURABILITY_LOSS_BLOCK
Definition IWorld.h:524
@ RATE_DROP_ITEM_RARE
Definition IWorld.h:447
@ RATE_XP_PET_NEXT_LEVEL
Definition IWorld.h:484
@ RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE
Definition IWorld.h:501
@ RATE_REPUTATION_LOWLEVEL_KILL
Definition IWorld.h:487
@ RATE_XP_KILL
Definition IWorld.h:473
@ RATE_XP_QUEST_DF
Definition IWorld.h:481
@ RATE_POWER_RUNICPOWER_INCOME
Definition IWorld.h:439
@ RATE_INSTANCE_RESET_TIME
Definition IWorld.h:519
@ RATE_REST_OFFLINE_IN_WILDERNESS
Definition IWorld.h:508
@ RATE_POWER_RUNICPOWER_LOSS
Definition IWorld.h:440
@ RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE
Definition IWorld.h:498
@ RATE_XP_BG_KILL_SOTA
Definition IWorld.h:478
@ RATE_POWER_ENERGY
Definition IWorld.h:442
@ RATE_TALENT
Definition IWorld.h:516
@ RATE_SELLVALUE_ITEM_NORMAL
Definition IWorld.h:455
@ RATE_REST_MAX_BONUS
Definition IWorld.h:509
@ RATE_XP_BG_KILL_WSG
Definition IWorld.h:475
@ RATE_CREATURE_ELITE_RAREELITE_DAMAGE
Definition IWorld.h:497
@ RATE_POWER_MANA
Definition IWorld.h:436
@ RATE_CREATURE_ELITE_WORLDBOSS_HP
Definition IWorld.h:493
@ RATE_DROP_ITEM_LEGENDARY
Definition IWorld.h:449
@ RATE_MOVESPEED_PLAYER
Definition IWorld.h:525
@ RATE_DURABILITY_LOSS_PARRY
Definition IWorld.h:522
@ RATE_XP_BG_KILL_AB
Definition IWorld.h:476
@ RATE_BUYVALUE_ITEM_UNCOMMON
Definition IWorld.h:464
@ RATE_MISS_CHANCE_MULTIPLIER_TARGET_PLAYER
Definition IWorld.h:528
@ RATE_DROP_ITEM_POOR
Definition IWorld.h:444
@ RATE_BUYVALUE_ITEM_LEGENDARY
Definition IWorld.h:467
@ RATE_REST_OFFLINE_IN_TAVERN_OR_CITY
Definition IWorld.h:507
@ RATE_SELLVALUE_ITEM_HEIRLOOM
Definition IWorld.h:461
@ RATE_AUCTION_DEPOSIT
Definition IWorld.h:512
@ RATE_DROP_ITEM_UNCOMMON
Definition IWorld.h:446
@ RATE_DROP_ITEM_REFERENCED
Definition IWorld.h:451
@ RATE_BUYVALUE_ITEM_NORMAL
Definition IWorld.h:463
@ RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE
Definition IWorld.h:502
@ RATE_XP_BG_KILL_EOTS
Definition IWorld.h:477
@ RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS
Definition IWorld.h:489
@ RATE_REPAIRCOST
Definition IWorld.h:485
@ RATE_DROP_MONEY
Definition IWorld.h:470
@ RATE_DURABILITY_LOSS_DAMAGE
Definition IWorld.h:521
@ RATE_AUCTION_CUT
Definition IWorld.h:513
@ RATE_BUYVALUE_ITEM_HEIRLOOM
Definition IWorld.h:469
@ RATE_HEALTH
Definition IWorld.h:435
@ RATE_MISS_CHANCE_MULTIPLIER_TARGET_CREATURE
Definition IWorld.h:527
@ RATE_XP_PET
Definition IWorld.h:483
@ RATE_SELLVALUE_ITEM_UNCOMMON
Definition IWorld.h:456
@ RATE_DURABILITY_LOSS_ON_DEATH
Definition IWorld.h:520
@ RATE_SELLVALUE_ITEM_POOR
Definition IWorld.h:454
@ RATE_BUYVALUE_ITEM_EPIC
Definition IWorld.h:466
@ RATE_CREATURE_ELITE_ELITE_DAMAGE
Definition IWorld.h:496
@ RATE_XP_QUEST
Definition IWorld.h:480
@ RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE
Definition IWorld.h:503
@ RATE_DROP_ITEM_EPIC
Definition IWorld.h:448
@ RATE_SELLVALUE_ITEM_RARE
Definition IWorld.h:457
@ RATE_SKILL_DISCOVERY
Definition IWorld.h:443
@ RATE_DROP_ITEM_ARTIFACT
Definition IWorld.h:450
@ RATE_CREATURE_ELITE_RARE_SPELLDAMAGE
Definition IWorld.h:504
@ RATE_CREATURE_ELITE_ELITE_HP
Definition IWorld.h:491
@ RATE_MOVESPEED_NPC
Definition IWorld.h:526
@ RATE_XP_EXPLORE
Definition IWorld.h:482
@ RATE_CREATURE_ELITE_RARE_HP
Definition IWorld.h:494
@ RATE_REPUTATION_GAIN
Definition IWorld.h:486
@ RATE_REST_INGAME
Definition IWorld.h:506
@ RATE_BUYVALUE_ITEM_RARE
Definition IWorld.h:465
@ RATE_POWER_FOCUS
Definition IWorld.h:441
@ RATE_SELLVALUE_ITEM_LEGENDARY
Definition IWorld.h:459
@ RATE_HONOR
Definition IWorld.h:514
@ RATE_REWARD_QUEST_MONEY
Definition IWorld.h:471
@ RATE_CORPSE_DECAY_LOOTED
Definition IWorld.h:518
@ RATE_DURABILITY_LOSS_ABSORB
Definition IWorld.h:523
@ RATE_AUCTION_TIME
Definition IWorld.h:511
@ RATE_XP_BG_KILL_IC
Definition IWorld.h:479
@ RATE_DROP_ITEM_GROUP_AMOUNT
Definition IWorld.h:453
@ RATE_TALENT_PET
Definition IWorld.h:517
@ RATE_CREATURE_ELITE_RAREELITE_HP
Definition IWorld.h:492
@ RATE_DROP_ITEM_NORMAL
Definition IWorld.h:445
@ RATE_XP_BG_KILL_AV
Definition IWorld.h:474
@ CONFIG_RESPAWN_DYNAMICRATE_CREATURE
Definition IWorld.h:203
@ CONFIG_SIGHT_MONSTER
Definition IWorld.h:191
@ CONFIG_ARENA_WIN_RATING_MODIFIER_1
Definition IWorld.h:198
@ CONFIG_GROUP_XP_DISTANCE
Definition IWorld.h:189
@ CONFIG_LISTEN_RANGE_YELL
Definition IWorld.h:194
@ CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS
Definition IWorld.h:195
@ CONFIG_ARENA_WIN_RATING_MODIFIER_2
Definition IWorld.h:199
@ CONFIG_ARENA_LOSE_RATING_MODIFIER
Definition IWorld.h:200
@ CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS
Definition IWorld.h:196
@ CONFIG_LISTEN_RANGE_SAY
Definition IWorld.h:192
@ CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE
Definition IWorld.h:190
@ CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER
Definition IWorld.h:201
@ CONFIG_RESPAWN_DYNAMICRATE_GAMEOBJECT
Definition IWorld.h:202
@ CONFIG_CHANCE_OF_GM_SURVEY
Definition IWorld.h:197
@ CONFIG_LISTEN_RANGE_TEXTEMOTE
Definition IWorld.h:193
#define sLog
Definition Log.h:126
#define sMapMgr
Definition MapMgr.h:220
#define sMetric
Definition Metric.h:130
#define MAX_VISIBILITY_DISTANCE
Definition ObjectDefines.h:31
#define DEFAULT_VISIBILITY_DISTANCE
Definition ObjectDefines.h:40
#define DEFAULT_VISIBILITY_BGARENAS
Definition ObjectDefines.h:43
#define DEFAULT_VISIBILITY_INSTANCE
Definition ObjectDefines.h:41
#define MAX_PLAYER_NAME
Definition ObjectMgr.h:682
#define MAX_CHARTER_NAME
Definition ObjectMgr.h:685
#define MAX_PET_NAME
Definition ObjectMgr.h:684
#define MAX_MONEY_AMOUNT
Definition Player.h:935
#define sScriptMgr
Definition ScriptMgr.h:727
#define GUILD_EVENTLOG_MAX_RECORDS
Definition SharedDefines.h:3236
#define GUILD_BANKLOG_MAX_RECORDS
Definition SharedDefines.h:3235
#define MAX_MOVE_TYPE
Definition UnitDefines.h:360
float baseMoveSpeed[MAX_MOVE_TYPE]
Definition Unit.cpp:73
float playerBaseMoveSpeed[MAX_MOVE_TYPE]
Definition Unit.cpp:86
WorldUpdateTime sWorldUpdateTime
Definition UpdateTime.cpp:27
static void InitializeDisabledMaps()
Definition MMapFactory.cpp:37
void setEnableHeightCalc(bool pVal)
Definition IVMapMgr.h:116
void setEnableLineOfSightCalc(bool pVal)
Definition IVMapMgr.h:111
static VMapMgr2 * createOrGetVMapMgr()
Definition VMapFactory.cpp:27
void LoadFromConfig()
Definition UpdateTime.cpp:152
float getRate(Rates rate) const override
Get a server rate (see Rates)
Definition World.h:203
void SetNewCharString(std::string const &str) override
Set the string for new characters (first login)
Definition World.h:164
@ REALM_ZONE_RUSSIAN
Definition World.h:102
@ REALM_ZONE_DEVELOPMENT
Definition World.h:91
@ WUPDATE_CLEANDB
Definition World.h:65
@ WUPDATE_AUTOBROADCAST
Definition World.h:66
@ WUPDATE_UPTIME
Definition World.h:62

References _bool_configs, _dataPath, _float_configs, _int_configs, _maxVisibleDistanceInBGArenas, _maxVisibleDistanceInInstances, _maxVisibleDistanceOnContinents, _rate_values, _timers, baseMoveSpeed, CONFIG_ADDON_CHANNEL, CONFIG_AFK_PREVENT_LOGOUT, CONFIG_ALL_TAXI_PATHS, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_GM_GROUP, CONFIG_ALLOW_JOIN_BG_AND_LFG, CONFIG_ALLOW_LOGGING_IP_ADDRESSES_IN_DATABASE, CONFIG_ALLOW_PLAYER_COMMANDS, CONFIG_ALLOW_TICKETS, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_ALLOW_TWO_SIDE_INTERACTION_ARENA, CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_EMOTE, CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP, CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_ALLOW_TWO_SIDE_TRADE, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH, CONFIG_ALWAYS_MAX_SKILL_FOR_LEVEL, CONFIG_ALWAYS_MAXSKILL, CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS, CONFIG_ARENA_GAMES_REQUIRED, CONFIG_ARENA_LOSE_RATING_MODIFIER, CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER, CONFIG_ARENA_MAX_RATING_DIFFERENCE, CONFIG_ARENA_PREV_OPPONENTS_DISCARD_TIMER, CONFIG_ARENA_QUEUE_ANNOUNCER_DETAIL, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY, CONFIG_ARENA_RATING_DISCARD_TIMER, CONFIG_ARENA_START_MATCHMAKER_RATING, CONFIG_ARENA_START_PERSONAL_RATING, CONFIG_ARENA_START_RATING, CONFIG_ARENA_WIN_RATING_MODIFIER_1, CONFIG_ARENA_WIN_RATING_MODIFIER_2, CONFIG_AUCTION_LEVEL_REQ, CONFIG_AUCTIONHOUSE_WORKERTHREADS, CONFIG_AUTOBROADCAST, CONFIG_AUTOBROADCAST_CENTER, CONFIG_AUTOBROADCAST_INTERVAL, CONFIG_AUTOBROADCAST_MIN_LEVEL_DISABLE, CONFIG_BATTLEGROUND_ALTERAC_REINFORCEMENTS, CONFIG_BATTLEGROUND_ALTERAC_REP_ONBOSSDEATH, CONFIG_BATTLEGROUND_ARATHI_CAPTUREPOINTS, CONFIG_BATTLEGROUND_BERSERKING_BUFF_RESPAWN, CONFIG_BATTLEGROUND_CAST_DESERTER, CONFIG_BATTLEGROUND_DISABLE_QUEST_SHARE_IN_BG, CONFIG_BATTLEGROUND_DISABLE_READY_CHECK_IN_BG, CONFIG_BATTLEGROUND_EYEOFTHESTORM_CAPTUREPOINTS, CONFIG_BATTLEGROUND_INVITATION_TYPE, CONFIG_BATTLEGROUND_OVERRIDE_LOWLEVELS_MINPLAYERS, CONFIG_BATTLEGROUND_PLAYER_RESPAWN, CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_LEVEL, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_LIMIT_MIN_PLAYERS, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_SPAM_DELAY, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMED, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_TIMER, CONFIG_BATTLEGROUND_REPORT_AFK, CONFIG_BATTLEGROUND_REPORT_AFK_TIMER, CONFIG_BATTLEGROUND_RESTORATION_BUFF_RESPAWN, CONFIG_BATTLEGROUND_SPEED_BUFF_RESPAWN, CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE, CONFIG_BATTLEGROUND_TRACK_DESERTERS, CONFIG_BATTLEGROUND_WARSONG_FLAGS, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, CONFIG_BG_REWARD_WINNER_ARENA_FIRST, CONFIG_BG_REWARD_WINNER_ARENA_LAST, CONFIG_BG_REWARD_WINNER_HONOR_FIRST, CONFIG_BG_REWARD_WINNER_HONOR_LAST, CONFIG_BG_XP_FOR_KILL, CONFIG_BIRTHDAY_TIME, CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA, CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA, CONFIG_CALENDAR_DELETE_OLD_EVENTS_HOUR, CONFIG_CHANCE_OF_GM_SURVEY, CONFIG_CHANGE_FACTION_MAX_MONEY, CONFIG_CHARACTER_CREATING_DISABLED, CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK, CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK, CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER, CONFIG_CHARACTERS_PER_ACCOUNT, CONFIG_CHARACTERS_PER_REALM, CONFIG_CHARDELETE_KEEP_DAYS, CONFIG_CHARDELETE_METHOD, CONFIG_CHARDELETE_MIN_LEVEL, CONFIG_CHARTER_COST_ARENA_2v2, CONFIG_CHARTER_COST_ARENA_3v3, CONFIG_CHARTER_COST_ARENA_5v5, CONFIG_CHARTER_COST_GUILD, CONFIG_CHAT_CHANNEL_LEVEL_REQ, CONFIG_CHAT_FAKE_MESSAGE_PREVENTING, CONFIG_CHAT_MUTE_FIRST_LOGIN, CONFIG_CHAT_SAY_LEVEL_REQ, CONFIG_CHAT_STRICT_LINK_CHECKING_KICK, CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY, CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN, CONFIG_CHAT_WHISPER_LEVEL_REQ, CONFIG_CHATFLOOD_ADDON_MESSAGE_COUNT, CONFIG_CHATFLOOD_ADDON_MESSAGE_DELAY, CONFIG_CHATFLOOD_MESSAGE_COUNT, CONFIG_CHATFLOOD_MESSAGE_DELAY, CONFIG_CHATFLOOD_MUTE_TIME, CONFIG_CHECK_GOBJECT_LOS, CONFIG_CLEAN_CHARACTER_DB, CONFIG_CLIENTCACHE_VERSION, CONFIG_CLOSE_IDLE_CONNECTIONS, CONFIG_COMPRESSION, CONFIG_CORPSE_DECAY_ELITE, CONFIG_CORPSE_DECAY_NORMAL, CONFIG_CORPSE_DECAY_RARE, CONFIG_CORPSE_DECAY_RAREELITE, CONFIG_CORPSE_DECAY_WORLDBOSS, CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY, CONFIG_CREATURE_FAMILY_ASSISTANCE_PERIOD, CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_FLEE_DELAY, CONFIG_CREATURE_STOP_FOR_PLAYER, CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD, CONFIG_DB_PING_INTERVAL, CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES, CONFIG_DEATH_BONES_BG_OR_ARENA, CONFIG_DEATH_BONES_WORLD, CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE, CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP, CONFIG_DEATH_SICKNESS_LEVEL, CONFIG_DEBUG_ARENA, CONFIG_DEBUG_BATTLEGROUND, CONFIG_DECLINED_NAMES_USED, CONFIG_DELETE_CHARACTER_TICKET_TRACE, CONFIG_DETECT_POS_COLLISION, CONFIG_DIE_COMMAND_MODE, CONFIG_DISABLE_BREATHING, CONFIG_DONT_CACHE_RANDOM_MOVEMENT_PATHS, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_OPTIONAL_STRING_ID, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PRINT_MODE, CONFIG_DURABILITY_LOSS_IN_PVP, CONFIG_ENABLE_CONTINENT_TRANSPORT, CONFIG_ENABLE_CONTINENT_TRANSPORT_PRELOADING, CONFIG_ENABLE_DAZE, CONFIG_ENABLE_LOGIN_AFTER_DC, CONFIG_ENABLE_MMAPS, CONFIG_ENABLE_SINFO_LOGIN, CONFIG_EVENT_ANNOUNCE, CONFIG_EXPANSION, CONFIG_FFA_PVP_TIMER, CONFIG_GAME_TYPE, CONFIG_GM_CHAT, CONFIG_GM_LEVEL_CHANNEL_MODERATION, CONFIG_GM_LEVEL_IN_GM_LIST, CONFIG_GM_LEVEL_IN_WHO_LIST, CONFIG_GM_LOGIN_STATE, CONFIG_GM_LOWER_SECURITY, CONFIG_GM_VISIBLE_STATE, CONFIG_GM_WHISPERING_TO, CONFIG_GROUP_VISIBILITY, CONFIG_GROUP_XP_DISTANCE, CONFIG_GUILD_BANK_EVENT_LOG_COUNT, CONFIG_GUILD_BANK_INITIAL_TABS, CONFIG_GUILD_BANK_TAB_COST_0, CONFIG_GUILD_BANK_TAB_COST_1, CONFIG_GUILD_BANK_TAB_COST_2, CONFIG_GUILD_BANK_TAB_COST_3, CONFIG_GUILD_BANK_TAB_COST_4, CONFIG_GUILD_BANK_TAB_COST_5, CONFIG_GUILD_EVENT_LOG_COUNT, CONFIG_GUILD_RESET_HOUR, CONFIG_HEROIC_CHARACTERS_PER_REALM, CONFIG_HONOR_AFTER_DUEL, CONFIG_ICC_BUFF_ALLIANCE, CONFIG_ICC_BUFF_HORDE, CONFIG_INSTANCE_GMSUMMON_PLAYER, CONFIG_INSTANCE_IGNORE_LEVEL, CONFIG_INSTANCE_IGNORE_RAID, CONFIG_INSTANCE_RESET_TIME_HOUR, CONFIG_INSTANCE_RESET_TIME_RELATIVE_TIMESTAMP, CONFIG_INSTANCE_SHARED_ID, CONFIG_INSTANCE_UNLOAD_DELAY, CONFIG_INSTANT_LOGOUT, CONFIG_INSTANT_TAXI, CONFIG_INTERVAL_CHANGEWEATHER, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, CONFIG_INTERVAL_MAPUPDATE, CONFIG_INTERVAL_SAVE, CONFIG_IP_BASED_ACTION_LOGGING, CONFIG_ITEMDELETE_ITEM_LEVEL, CONFIG_ITEMDELETE_KEEP_DAYS, CONFIG_ITEMDELETE_METHOD, CONFIG_ITEMDELETE_QUALITY, CONFIG_ITEMDELETE_VENDOR, CONFIG_LEAVE_GROUP_ON_LOGOUT, CONFIG_LEGACY_ARENA_POINTS_CALC, CONFIG_LFG_CAST_DESERTER, CONFIG_LFG_KICK_PREVENTION_TIMER, CONFIG_LFG_LOCATION_ALL, CONFIG_LFG_MAX_KICK_COUNT, CONFIG_LFG_OPTIONSMASK, CONFIG_LISTEN_RANGE_SAY, CONFIG_LISTEN_RANGE_TEXTEMOTE, CONFIG_LISTEN_RANGE_YELL, CONFIG_LOGDB_CLEARINTERVAL, CONFIG_LOGDB_CLEARTIME, CONFIG_LOOT_NEED_BEFORE_GREED_ILVL_RESTRICTION, CONFIG_LOW_LEVEL_REGEN_BOOST, CONFIG_MAIL_DELIVERY_DELAY, CONFIG_MAIL_LEVEL_REQ, CONFIG_MAX_ALLOWED_MMR_DROP, CONFIG_MAX_ARENA_POINTS, CONFIG_MAX_HONOR_POINTS, CONFIG_MAX_HONOR_POINTS_MONEY_PER_POINT, CONFIG_MAX_INSTANCES_PER_HOUR, CONFIG_MAX_OVERSPEED_PINGS, CONFIG_MAX_PLAYER_LEVEL, CONFIG_MAX_PRIMARY_TRADE_SKILL, CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL, CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE, CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE, CONFIG_MAX_RESULTS_LOOKUP_COMMANDS, CONFIG_MAX_WHO_LIST_RETURN, CONFIG_MIN_CHARTER_NAME, CONFIG_MIN_DUALSPEC_LEVEL, CONFIG_MIN_LEVEL_STAT_SAVE, CONFIG_MIN_PET_NAME, CONFIG_MIN_PETITION_SIGNS, CONFIG_MIN_PLAYER_NAME, CONFIG_MINIGOB_MANABONK, CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS, CONFIG_MUNCHING_BLIZZLIKE, CONFIG_NO_RESET_TALENT_COST, CONFIG_NPC_EVADE_IF_NOT_REACHABLE, CONFIG_NPC_REGEN_TIME_IF_NOT_REACHABLE_IN_RAID, CONFIG_NUMTHREADS, CONFIG_OBJECT_QUEST_MARKERS, CONFIG_OBJECT_SPARKLES, CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN, CONFIG_PACKET_SPOOF_BANDURATION, CONFIG_PACKET_SPOOF_BANMODE, CONFIG_PARTY_LEVEL_REQ, CONFIG_PDUMP_NO_OVERWRITE, CONFIG_PDUMP_NO_PATHS, CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS, CONFIG_PET_LOS, CONFIG_PLAYER_SETTINGS_ENABLED, CONFIG_PORT_WORLD, CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS, CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION, CONFIG_PRESERVE_CUSTOM_CHANNELS, CONFIG_PVP_TOKEN_COUNT, CONFIG_PVP_TOKEN_ENABLE, CONFIG_PVP_TOKEN_ID, CONFIG_PVP_TOKEN_MAP_TYPE, CONFIG_QUEST_ENABLE_QUEST_TRACKER, CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF, CONFIG_QUEST_IGNORE_AUTO_ACCEPT, CONFIG_QUEST_IGNORE_AUTO_COMPLETE, CONFIG_QUEST_IGNORE_RAID, CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF, CONFIG_QUEST_POI_ENABLED, CONFIG_RANDOM_BG_RESET_HOUR, CONFIG_REALM_LOGIN_ENABLED, CONFIG_REALM_ZONE, CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID, CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE, CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT, CONFIG_RESPAWN_DYNAMICRATE_CREATURE, CONFIG_RESPAWN_DYNAMICRATE_GAMEOBJECT, CONFIG_RESTRICTED_LFG_CHANNEL, CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY, CONFIG_SESSION_ADD_DELAY, CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE, CONFIG_SET_BOP_ITEM_TRADEABLE, CONFIG_SHOW_BAN_IN_WORLD, CONFIG_SHOW_KICK_IN_WORLD, CONFIG_SHOW_MUTE_IN_WORLD, CONFIG_SIGHT_MONSTER, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL, CONFIG_SKILL_CHANCE_GREEN, CONFIG_SKILL_CHANCE_GREY, CONFIG_SKILL_CHANCE_MINING_STEPS, CONFIG_SKILL_CHANCE_ORANGE, CONFIG_SKILL_CHANCE_SKINNING_STEPS, CONFIG_SKILL_CHANCE_YELLOW, CONFIG_SKILL_GAIN_CRAFTING, CONFIG_SKILL_GAIN_DEFENSE, CONFIG_SKILL_GAIN_GATHERING, CONFIG_SKILL_GAIN_WEAPON, CONFIG_SKILL_MILLING, CONFIG_SKILL_PROSPECTING, CONFIG_SKIP_CINEMATICS, CONFIG_SOCKET_TIMEOUTTIME, CONFIG_SOCKET_TIMEOUTTIME_ACTIVE, CONFIG_SPELL_QUEUE_ENABLED, CONFIG_SPELL_QUEUE_WINDOW, CONFIG_START_ALL_EXPLORED, CONFIG_START_ALL_REP, CONFIG_START_ARENA_POINTS, CONFIG_START_CUSTOM_SPELLS, CONFIG_START_GM_LEVEL, CONFIG_START_HEROIC_PLAYER_LEVEL, CONFIG_START_HEROIC_PLAYER_MONEY, CONFIG_START_HONOR_POINTS, CONFIG_START_PLAYER_LEVEL, CONFIG_START_PLAYER_MONEY, CONFIG_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_STRICT_CHANNEL_NAMES, CONFIG_STRICT_CHARTER_NAMES, CONFIG_STRICT_NAMES_PROFANITY, CONFIG_STRICT_NAMES_RESERVED, CONFIG_STRICT_PET_NAMES, CONFIG_STRICT_PLAYER_NAMES, CONFIG_SUNSREACH_COUNTER_MAX, CONFIG_TALENTS_INSPECTING, CONFIG_TELEPORT_TIMEOUT_FAR, CONFIG_TELEPORT_TIMEOUT_NEAR, CONFIG_TICKET_LEVEL_REQ, CONFIG_TOGGLE_XP_COST, CONFIG_TRADE_LEVEL_REQ, CONFIG_UPTIME_UPDATE, CONFIG_VMAP_BLIZZLIKE_LOS_OPEN_WORLD, CONFIG_VMAP_BLIZZLIKE_PVP_LOS, CONFIG_VMAP_INDOOR_CHECK, CONFIG_WARDEN_CLIENT_BAN_DURATION, CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF, CONFIG_WARDEN_CLIENT_FAIL_ACTION, CONFIG_WARDEN_CLIENT_RESPONSE_DELAY, CONFIG_WARDEN_ENABLED, CONFIG_WARDEN_NUM_LUA_CHECKS, CONFIG_WARDEN_NUM_MEM_CHECKS, CONFIG_WARDEN_NUM_OTHER_CHECKS, CONFIG_WATER_BREATH_TIMER, CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER, CONFIG_WEATHER, CONFIG_WINTERGRASP_BATTLETIME, CONFIG_WINTERGRASP_ENABLE, CONFIG_WINTERGRASP_NOBATTLETIME, CONFIG_WINTERGRASP_PLR_MAX, CONFIG_WINTERGRASP_PLR_MIN, CONFIG_WINTERGRASP_PLR_MIN_LVL, CONFIG_WINTERGRASP_RESTART_AFTER_CRASH, CONFIG_WORLD_BOSS_LEVEL_DIFF, VMAP::VMapFactory::createOrGetVMapMgr(), DEFAULT_MAX_LEVEL, DEFAULT_VISIBILITY_BGARENAS, DEFAULT_VISIBILITY_DISTANCE, DEFAULT_VISIBILITY_INSTANCE, getRate(), GUILD_BANKLOG_MAX_RECORDS, GUILD_EVENTLOG_MAX_RECORDS, HOUR, Realm::Id, IN_MILLISECONDS, MMAP::MMapFactory::InitializeDisabledMaps(), WorldUpdateTime::LoadFromConfig(), LOG_ERROR, LOG_INFO, MAX_CHARTER_NAME, MAX_LEVEL, MAX_MONEY_AMOUNT, MAX_MOVE_TYPE, MAX_PET_NAME, MAX_PLAYER_NAME, MAX_VISIBILITY_DISTANCE, MIN_MAP_UPDATE_DELAY, MINUTE, playerBaseMoveSpeed, RATE_ARENA_POINTS, RATE_AUCTION_CUT, RATE_AUCTION_DEPOSIT, RATE_AUCTION_TIME, RATE_BUYVALUE_ITEM_ARTIFACT, RATE_BUYVALUE_ITEM_EPIC, RATE_BUYVALUE_ITEM_HEIRLOOM, RATE_BUYVALUE_ITEM_LEGENDARY, RATE_BUYVALUE_ITEM_NORMAL, RATE_BUYVALUE_ITEM_POOR, RATE_BUYVALUE_ITEM_RARE, RATE_BUYVALUE_ITEM_UNCOMMON, RATE_CORPSE_DECAY_LOOTED, RATE_CREATURE_AGGRO, RATE_CREATURE_ELITE_ELITE_DAMAGE, RATE_CREATURE_ELITE_ELITE_HP, RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE, RATE_CREATURE_ELITE_RARE_DAMAGE, RATE_CREATURE_ELITE_RARE_HP, RATE_CREATURE_ELITE_RARE_SPELLDAMAGE, RATE_CREATURE_ELITE_RAREELITE_DAMAGE, RATE_CREATURE_ELITE_RAREELITE_HP, RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE, RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE, RATE_CREATURE_ELITE_WORLDBOSS_HP, RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE, RATE_CREATURE_NORMAL_DAMAGE, RATE_CREATURE_NORMAL_HP, RATE_CREATURE_NORMAL_SPELLDAMAGE, RATE_DAMAGE_FALL, RATE_DROP_ITEM_ARTIFACT, RATE_DROP_ITEM_EPIC, RATE_DROP_ITEM_GROUP_AMOUNT, RATE_DROP_ITEM_LEGENDARY, RATE_DROP_ITEM_NORMAL, RATE_DROP_ITEM_POOR, RATE_DROP_ITEM_RARE, RATE_DROP_ITEM_REFERENCED, RATE_DROP_ITEM_REFERENCED_AMOUNT, RATE_DROP_ITEM_UNCOMMON, RATE_DROP_MONEY, RATE_DURABILITY_LOSS_ABSORB, RATE_DURABILITY_LOSS_BLOCK, RATE_DURABILITY_LOSS_DAMAGE, RATE_DURABILITY_LOSS_ON_DEATH, RATE_DURABILITY_LOSS_PARRY, RATE_HEALTH, RATE_HONOR, RATE_INSTANCE_RESET_TIME, RATE_MISS_CHANCE_MULTIPLIER_TARGET_CREATURE, RATE_MISS_CHANCE_MULTIPLIER_TARGET_PLAYER, RATE_MOVESPEED_NPC, RATE_MOVESPEED_PLAYER, RATE_POWER_ENERGY, RATE_POWER_FOCUS, RATE_POWER_MANA, RATE_POWER_RAGE_INCOME, RATE_POWER_RAGE_LOSS, RATE_POWER_RUNICPOWER_INCOME, RATE_POWER_RUNICPOWER_LOSS, RATE_REPAIRCOST, RATE_REPUTATION_GAIN, RATE_REPUTATION_LOWLEVEL_KILL, RATE_REPUTATION_LOWLEVEL_QUEST, RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS, RATE_REST_INGAME, RATE_REST_MAX_BONUS, RATE_REST_OFFLINE_IN_TAVERN_OR_CITY, RATE_REST_OFFLINE_IN_WILDERNESS, RATE_REWARD_BONUS_MONEY, RATE_REWARD_QUEST_MONEY, RATE_SELLVALUE_ITEM_ARTIFACT, RATE_SELLVALUE_ITEM_EPIC, RATE_SELLVALUE_ITEM_HEIRLOOM, RATE_SELLVALUE_ITEM_LEGENDARY, RATE_SELLVALUE_ITEM_NORMAL, RATE_SELLVALUE_ITEM_POOR, RATE_SELLVALUE_ITEM_RARE, RATE_SELLVALUE_ITEM_UNCOMMON, RATE_SKILL_DISCOVERY, RATE_TALENT, RATE_TALENT_PET, RATE_XP_BG_KILL_AB, RATE_XP_BG_KILL_AV, RATE_XP_BG_KILL_EOTS, RATE_XP_BG_KILL_IC, RATE_XP_BG_KILL_SOTA, RATE_XP_BG_KILL_WSG, RATE_XP_EXPLORE, RATE_XP_KILL, RATE_XP_PET, RATE_XP_PET_NEXT_LEVEL, RATE_XP_QUEST, RATE_XP_QUEST_DF, realm, RealmHandle::Realm, REALM_ZONE_DEVELOPMENT, REALM_ZONE_RUSSIAN, IntervalTimer::Reset(), sConfigMgr, SEC_ADMINISTRATOR, SEC_CONSOLE, SEC_MODERATOR, VMAP::IVMapMgr::setEnableHeightCalc(), VMAP::IVMapMgr::setEnableLineOfSightCalc(), IntervalTimer::SetInterval(), SetNewCharString(), sLog, sMapMgr, sMetric, sScriptMgr, sWorld, sWorldSessionMgr, sWorldUpdateTime, WUPDATE_AUTOBROADCAST, WUPDATE_CLEANDB, and WUPDATE_UPTIME.

Referenced by SetInitialWorldSettings().

◆ LoadDBAllowedSecurityLevel()

void World::LoadDBAllowedSecurityLevel ( )
overridevirtual

Implements IWorld.

2602{
2604 stmt->SetData(0, int32(realm.Id.Realm));
2605 PreparedQueryResult result = LoginDatabase.Query(stmt);
2606
2607 if (result)
2608 SetPlayerSecurityLimit(AccountTypes(result->Fetch()->Get<uint8>()));
2609}
AccountTypes
Definition Common.h:56
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition DatabaseEnvFwd.h:45
@ LOGIN_SEL_REALMLIST_SECURITY_LEVEL
Definition LoginDatabase.h:97
void SetPlayerSecurityLimit(AccountTypes sec) override
Definition World.cpp:2611

References Realm::Id, LOGIN_SEL_REALMLIST_SECURITY_LEVEL, LoginDatabase, realm, RealmHandle::Realm, PreparedStatementBase::SetData(), and SetPlayerSecurityLimit().

Referenced by SetInitialWorldSettings().

◆ LoadDBVersion()

void World::LoadDBVersion ( )
overridevirtual

Implements IWorld.

2701{
2702 QueryResult result = WorldDatabase.Query("SELECT db_version, cache_id FROM version LIMIT 1");
2703 if (result)
2704 {
2705 Field* fields = result->Fetch();
2706
2707 _dbVersion = fields[0].Get<std::string>();
2708
2709 // will be overwrite by config values if different and non-0
2711 }
2712
2713 if (_dbVersion.empty())
2714 _dbVersion = "Unknown world database.";
2715}
std::shared_ptr< ResultSet > QueryResult
Definition DatabaseEnvFwd.h:27
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
Definition DatabaseEnv.cpp:20
std::enable_if_t< std::is_arithmetic_v< T >, T > Get() const
Definition Field.h:112

References _dbVersion, _int_configs, CONFIG_CLIENTCACHE_VERSION, Field::Get(), and WorldDatabase.

◆ LoadWorldStates()

void World::LoadWorldStates ( )
overridevirtual

Implements IWorld.

2729{
2730 uint32 oldMSTime = getMSTime();
2731
2732 QueryResult result = CharacterDatabase.Query("SELECT entry, value FROM worldstates");
2733
2734 if (!result)
2735 {
2736 LOG_WARN("server.loading", ">> Loaded 0 world states. DB table `worldstates` is empty!");
2737 LOG_INFO("server.loading", " ");
2738 return;
2739 }
2740
2741 do
2742 {
2743 Field* fields = result->Fetch();
2744 _worldstates[fields[0].Get<uint32>()] = fields[1].Get<uint32>();
2745 } while (result->NextRow());
2746
2747 LOG_INFO("server.loading", ">> Loaded {} World States in {} ms", _worldstates.size(), GetMSTimeDiffToNow(oldMSTime));
2748 LOG_INFO("server.loading", " ");
2749}
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition DatabaseEnv.cpp:21
#define LOG_WARN(filterType__,...)
Definition Log.h:161
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition Timer.h:131
uint32 getMSTime()
Definition Timer.h:103

References _worldstates, CharacterDatabase, Field::Get(), getMSTime(), GetMSTimeDiffToNow(), LOG_INFO, and LOG_WARN.

Referenced by SetInitialWorldSettings().

◆ ProcessCliCommands()

void World::ProcessCliCommands ( )
overridevirtual

Implements IWorld.

2474{
2475 CliCommandHolder::Print zprint = nullptr;
2476 void* callbackArg = nullptr;
2477 CliCommandHolder* command = nullptr;
2478 while (_cliCmdQueue.next(command))
2479 {
2480 LOG_DEBUG("server.worldserver", "CLI command under processing...");
2481 zprint = command->m_print;
2482 callbackArg = command->m_callbackArg;
2483 CliHandler handler(callbackArg, zprint);
2484 handler.ParseCommands(command->m_command);
2485 if (command->m_commandFinished)
2486 command->m_commandFinished(callbackArg, !handler.HasSentErrorMessage());
2487 delete command;
2488 }
2489}
#define LOG_DEBUG(filterType__,...)
Definition Log.h:169
Definition Chat.h:255
CommandFinished m_commandFinished
Definition IWorld.h:41
void * m_callbackArg
Definition IWorld.h:38
Print m_print
Definition IWorld.h:40
void(*)(void *, std::string_view) Print
Definition IWorld.h:35
char * m_command
Definition IWorld.h:39

References _cliCmdQueue, ChatHandler::HasSentErrorMessage(), LOG_DEBUG, CliCommandHolder::m_callbackArg, CliCommandHolder::m_command, CliCommandHolder::m_commandFinished, CliCommandHolder::m_print, LockedQueue< T, StorageType >::next(), and CliHandler::ParseCommands().

Referenced by Update().

◆ ProcessQueryCallbacks()

void World::ProcessQueryCallbacks ( )
private
2780{
2782}
void ProcessReadyCallbacks()
Definition AsyncCallbackProcessor.h:40
QueryCallbackProcessor _queryProcessor
Definition World.h:352

References _queryProcessor, and AsyncCallbackProcessor< T >::ProcessReadyCallbacks().

Referenced by Update().

◆ QueueCliCommand()

void World::QueueCliCommand ( CliCommandHolder commandHolder)
inlineoverridevirtual

Implements IWorld.

261{ _cliCmdQueue.add(commandHolder); }
void add(const T &item)
Adds an item to the back of the queue.
Definition LockedQueue.h:52

References _cliCmdQueue, and LockedQueue< T, StorageType >::add().

◆ RemoveOldCorpses()

void World::RemoveOldCorpses ( )
overridevirtual

Implements IWorld.

2785{
2787}
@ WUPDATE_CORPSES
Definition World.h:63
void SetCurrent(time_t current)
Definition Timer.h:174

References _timers, IntervalTimer::SetCurrent(), and WUPDATE_CORPSES.

◆ ResetDailyQuests()

void World::ResetDailyQuests ( )
protected
2585{
2587 CharacterDatabase.Execute(stmt);
2588
2589 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2590 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2591 if (itr->second->GetPlayer())
2592 itr->second->GetPlayer()->ResetDailyQuestStatus();
2593
2596
2597 // change available dailies
2598 sPoolMgr->ChangeDailyQuests();
2599}
@ CHAR_DEL_QUEST_STATUS_DAILY
Definition CharacterDatabase.h:55
#define sPoolMgr
Definition PoolMgr.h:163
std::unordered_map< uint32, WorldSession * > SessionMap
Definition WorldSessionMgr.h:56

References _nextDailyQuestReset, CHAR_DEL_QUEST_STATUS_DAILY, CharacterDatabase, Acore::Time::GetNextTimeWithDayAndHour(), sPoolMgr, sWorld, sWorldSessionMgr, and WORLD_STATE_CUSTOM_DAILY_QUEST_RESET_TIME.

Referenced by Update().

◆ ResetEventSeasonalQuests()

void World::ResetEventSeasonalQuests ( uint16  event_id)
overridevirtual

Implements IWorld.

2654{
2656 stmt->SetData(0, event_id);
2657 CharacterDatabase.Execute(stmt);
2658
2659 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2660 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2661 if (itr->second->GetPlayer())
2662 itr->second->GetPlayer()->ResetSeasonalQuestStatus(event_id);
2663}
@ CHAR_DEL_QUEST_STATUS_SEASONAL
Definition CharacterDatabase.h:58

References CHAR_DEL_QUEST_STATUS_SEASONAL, CharacterDatabase, PreparedStatementBase::SetData(), and sWorldSessionMgr.

◆ ResetGuildCap()

void World::ResetGuildCap ( )
protected
2691{
2692 LOG_INFO("server.worldserver", "Guild Daily Cap reset.");
2693
2696
2697 sGuildMgr->ResetTimes();
2698}
#define sGuildMgr
Definition GuildMgr.h:51

References _nextGuildReset, Acore::Time::GetNextTimeWithDayAndHour(), LOG_INFO, sGuildMgr, sWorld, and WORLD_STATE_CUSTOM_GUILD_DAILY_RESET_TIME.

Referenced by Update().

◆ ResetMonthlyQuests()

void World::ResetMonthlyQuests ( )
protected
2638{
2639 LOG_INFO("server.worldserver", "Monthly quests reset for all characters.");
2640
2642 CharacterDatabase.Execute(stmt);
2643
2644 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2645 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2646 if (itr->second->GetPlayer())
2647 itr->second->GetPlayer()->ResetMonthlyQuestStatus();
2648
2651}
@ CHAR_DEL_QUEST_STATUS_MONTHLY
Definition CharacterDatabase.h:57
AC_COMMON_API time_t GetNextTimeWithMonthAndHour(int8 month, int8 hour)
Definition Timer.cpp:333

References _nextMonthlyQuestReset, CHAR_DEL_QUEST_STATUS_MONTHLY, CharacterDatabase, Acore::Time::GetNextTimeWithMonthAndHour(), LOG_INFO, sWorld, sWorldSessionMgr, and WORLD_STATE_CUSTOM_MONTHLY_QUEST_RESET_TIME.

Referenced by Update().

◆ ResetRandomBG()

void World::ResetRandomBG ( )
protected
2666{
2667 LOG_DEBUG("server.worldserver", "Random BG status reset for all characters.");
2668
2670 CharacterDatabase.Execute(stmt);
2671
2672 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2673 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2674 if (itr->second->GetPlayer())
2675 itr->second->GetPlayer()->SetRandomWinner(false);
2676
2679}
@ CHAR_DEL_BATTLEGROUND_RANDOM
Definition CharacterDatabase.h:63

References _nextRandomBGReset, CHAR_DEL_BATTLEGROUND_RANDOM, CharacterDatabase, Acore::Time::GetNextTimeWithDayAndHour(), LOG_DEBUG, sWorld, sWorldSessionMgr, and WORLD_STATE_CUSTOM_BG_DAILY_RESET_TIME.

Referenced by Update().

◆ ResetWeeklyQuests()

void World::ResetWeeklyQuests ( )
protected
2621{
2623 CharacterDatabase.Execute(stmt);
2624
2625 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2626 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2627 if (itr->second->GetPlayer())
2628 itr->second->GetPlayer()->ResetWeeklyQuestStatus();
2629
2632
2633 // change available weeklies
2634 sPoolMgr->ChangeWeeklyQuests();
2635}
@ CHAR_DEL_QUEST_STATUS_WEEKLY
Definition CharacterDatabase.h:56

References _nextWeeklyQuestReset, CHAR_DEL_QUEST_STATUS_WEEKLY, CharacterDatabase, Acore::Time::GetNextTimeWithDayAndHour(), sPoolMgr, sWorld, sWorldSessionMgr, and WORLD_STATE_CUSTOM_WEEKLY_QUEST_RESET_TIME.

Referenced by Update().

◆ SetAllowMovement()

void World::SetAllowMovement ( bool  allow)
inlineoverridevirtual

Allow/Disallow object movements.

Implements IWorld.

161{ _allowMovement = allow; }

References _allowMovement.

◆ setBoolConfig()

void World::setBoolConfig ( WorldBoolConfigs  index,
bool  value 
)
inlineoverridevirtual

Set a server configuration element (see #WorldConfigs)

Implements IWorld.

207 {
208 if (index < BOOL_CONFIG_VALUE_COUNT)
209 _bool_configs[index] = value;
210 }

References _bool_configs, and BOOL_CONFIG_VALUE_COUNT.

◆ SetCleaningFlags()

void World::SetCleaningFlags ( uint32  flags)
inlineoverridevirtual

Implements IWorld.

276{ _cleaningFlags = flags; }

References _cleaningFlags.

◆ SetClosed()

void World::SetClosed ( bool  val)
overridevirtual

Close world.

Implements IWorld.

160{
161 _isClosed = val;
162
163 // Invert the value, for simplicity for scripters.
164 sScriptMgr->OnOpenStateChange(!val);
165}

References _isClosed, and sScriptMgr.

◆ setFloatConfig()

void World::setFloatConfig ( WorldFloatConfigs  index,
float  value 
)
inlineoverridevirtual

Set a server configuration element (see #WorldConfigs)

Implements IWorld.

220 {
221 if (index < FLOAT_CONFIG_VALUE_COUNT)
222 _float_configs[index] = value;
223 }

References _float_configs, and FLOAT_CONFIG_VALUE_COUNT.

◆ SetInitialWorldSettings()

void World::SetInitialWorldSettings ( )
overridevirtual

Initialize the World.

  • Server startup begin
  • Initialize the random number generator
  • Initialize detour memory management
  • Initialize VMapMgr function pointers (to untangle game/collision circular deps)
  • Initialize config settings
  • Initialize Allowed Security Level
  • Init highest guids before any table loading to prevent using not initialized guids in some code.
  • Check the existence of the map files for all starting areas.
  • Initialize pool manager
  • Initialize game event manager
  • Loading strings. Getting no records means core load has to be canceled because no error message can be output.
  • Update the realm entry in the database with the realm type from the config file
  • Custom Hook for loading DB items
  • Load the DBC files
  • Initilize static helper structures
  • Load dynamic data tables from the database
  • Handle outdated emails (delete/return)
  • Load AutoBroadCast
  • Load Motd
  • Load and initialize scripts
  • Initialize game time and timers
  • Initialize Battlegrounds
  • Initialize outdoor pvp

Implements IWorld.

1276{
1278 uint32 startupBegin = getMSTime();
1279
1281 srand((unsigned int)GameTime::GetGameTime().count());
1282
1284 dtAllocSetCustom(dtCustomAlloc, dtCustomFree);
1285
1290
1293
1296
1298 sObjectMgr->SetHighestGuids();
1299
1300 if (!sConfigMgr->isDryRun())
1301 {
1303 if (!MapMgr::ExistMapAndVMap(0, -6240.32f, 331.033f)
1304 || !MapMgr::ExistMapAndVMap(0, -8949.95f, -132.493f)
1305 || !MapMgr::ExistMapAndVMap(1, -618.518f, -4251.67f)
1306 || !MapMgr::ExistMapAndVMap(0, 1676.35f, 1677.45f)
1307 || !MapMgr::ExistMapAndVMap(1, 10311.3f, 832.463f)
1308 || !MapMgr::ExistMapAndVMap(1, -2917.58f, -257.98f)
1310 !MapMgr::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
1311 !MapMgr::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
1312 {
1313 LOG_ERROR("server.loading", "Failed to find map files for starting areas");
1314 exit(1);
1315 }
1316 }
1317
1319 sPoolMgr->Initialize();
1320
1322 sGameEventMgr->Initialize();
1323
1325 LOG_INFO("server.loading", " ");
1326 LOG_INFO("server.loading", "Loading Acore Strings...");
1327 if (!sObjectMgr->LoadAcoreStrings())
1328 exit(1); // Error message displayed in function already
1329
1330 LOG_INFO("server.loading", "Loading Module Strings...");
1331 sObjectMgr->LoadModuleStrings();
1332 LOG_INFO("server.loading", "Loading Module Strings Locale...");
1333 sObjectMgr->LoadModuleStringsLocale();
1334
1336 //No SQL injection as values are treated as integers
1337
1338 // not send custom type REALM_FFA_PVP to realm list
1339 uint32 server_type;
1340 if (IsFFAPvPRealm())
1341 server_type = REALM_TYPE_PVP;
1342 else
1343 server_type = getIntConfig(CONFIG_GAME_TYPE);
1344
1346
1347 LoginDatabase.Execute("UPDATE realmlist SET icon = {}, timezone = {} WHERE id = '{}'", server_type, realm_zone, realm.Id.Realm); // One-time query
1348
1350 sScriptMgr->OnLoadCustomDatabaseTable();
1351
1353 LOG_INFO("server.loading", "Initialize Data Stores...");
1355 DetectDBCLang();
1356
1357 // Load cinematic cameras
1359
1360 // Load IP Location Database
1361 sIPLocation->Load();
1362
1363 std::vector<uint32> mapIds;
1364 for (auto const& map : sMapStore)
1365 {
1366 mapIds.emplace_back(map->MapID);
1367 }
1368
1369 vmmgr2->InitializeThreadUnsafe(mapIds);
1370
1372 mmmgr->InitializeThreadUnsafe(mapIds);
1373
1374 LOG_INFO("server.loading", "Loading Game Graveyard...");
1375 sGraveyard->LoadGraveyardFromDB();
1376
1377 LOG_INFO("server.loading", "Initializing PlayerDump Tables...");
1379
1382
1383 LOG_INFO("server.loading", "Loading SpellInfo Store...");
1384 sSpellMgr->LoadSpellInfoStore();
1385
1386 LOG_INFO("server.loading", "Loading Spell Cooldown Overrides...");
1387 sSpellMgr->LoadSpellCooldownOverrides();
1388
1389 LOG_INFO("server.loading", "Loading SpellInfo Data Corrections...");
1390 sSpellMgr->LoadSpellInfoCorrections();
1391
1392 LOG_INFO("server.loading", "Loading Spell Rank Data...");
1393 sSpellMgr->LoadSpellRanks();
1394
1395 LOG_INFO("server.loading", "Loading Spell Specific And Aura State...");
1396 sSpellMgr->LoadSpellSpecificAndAuraState();
1397
1398 LOG_INFO("server.loading", "Loading SkillLineAbilityMultiMap Data...");
1399 sSpellMgr->LoadSkillLineAbilityMap();
1400
1401 LOG_INFO("server.loading", "Loading SpellInfo Custom Attributes...");
1402 sSpellMgr->LoadSpellInfoCustomAttributes();
1403
1404 LOG_INFO("server.loading", "Loading GameObject Models...");
1406
1407 LOG_INFO("server.loading", "Loading Script Names...");
1408 sObjectMgr->LoadScriptNames();
1409
1410 LOG_INFO("server.loading", "Loading Instance Template...");
1411 sObjectMgr->LoadInstanceTemplate();
1412
1413 LOG_INFO("server.loading", "Loading Character Cache...");
1414 sCharacterCache->LoadCharacterCacheStorage();
1415
1416 // Must be called before `creature_respawn`/`gameobject_respawn` tables
1417 LOG_INFO("server.loading", "Loading Instances...");
1418 sInstanceSaveMgr->LoadInstances();
1419
1420 LOG_INFO("server.loading", "Loading Broadcast Texts...");
1421 sObjectMgr->LoadBroadcastTexts();
1422 sObjectMgr->LoadBroadcastTextLocales();
1423
1424 LOG_INFO("server.loading", "Loading Localization Strings...");
1425 uint32 oldMSTime = getMSTime();
1426 sObjectMgr->LoadCreatureLocales();
1427 sObjectMgr->LoadGameObjectLocales();
1428 sObjectMgr->LoadItemLocales();
1429 sObjectMgr->LoadItemSetNameLocales();
1430 sObjectMgr->LoadQuestLocales();
1431 sObjectMgr->LoadQuestOfferRewardLocale();
1432 sObjectMgr->LoadQuestRequestItemsLocale();
1433 sObjectMgr->LoadNpcTextLocales();
1434 sObjectMgr->LoadPageTextLocales();
1435 sObjectMgr->LoadGossipMenuItemsLocales();
1436 sObjectMgr->LoadPointOfInterestLocales();
1437 sObjectMgr->LoadPetNamesLocales();
1438
1439 sObjectMgr->SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
1440 LOG_INFO("server.loading", ">> Localization Strings loaded in {} ms", GetMSTimeDiffToNow(oldMSTime));
1441 LOG_INFO("server.loading", " ");
1442
1443 LOG_INFO("server.loading", "Loading Page Texts...");
1444 sObjectMgr->LoadPageTexts();
1445
1446 LOG_INFO("server.loading", "Loading Game Object Templates..."); // must be after LoadPageTexts
1447 sObjectMgr->LoadGameObjectTemplate();
1448
1449 LOG_INFO("server.loading", "Loading Game Object Template Addons...");
1450 sObjectMgr->LoadGameObjectTemplateAddons();
1451
1452 LOG_INFO("server.loading", "Loading Transport Templates...");
1453 sTransportMgr->LoadTransportTemplates();
1454
1455 LOG_INFO("server.loading", "Loading Spell Required Data...");
1456 sSpellMgr->LoadSpellRequired();
1457
1458 LOG_INFO("server.loading", "Loading Spell Group Types...");
1459 sSpellMgr->LoadSpellGroups();
1460
1461 LOG_INFO("server.loading", "Loading Spell Learn Skills...");
1462 sSpellMgr->LoadSpellLearnSkills(); // must be after LoadSpellRanks
1463
1464 LOG_INFO("server.loading", "Loading Spell Proc Event Conditions...");
1465 sSpellMgr->LoadSpellProcEvents();
1466
1467 LOG_INFO("server.loading", "Loading Spell Proc Conditions and Data...");
1468 sSpellMgr->LoadSpellProcs();
1469
1470 LOG_INFO("server.loading", "Loading Spell Bonus Data...");
1471 sSpellMgr->LoadSpellBonuses();
1472
1473 LOG_INFO("server.loading", "Loading Aggro Spells Definitions...");
1474 sSpellMgr->LoadSpellThreats();
1475
1476 LOG_INFO("server.loading", "Loading Mixology Bonuses...");
1477 sSpellMgr->LoadSpellMixology();
1478
1479 LOG_INFO("server.loading", "Loading Spell Group Stack Rules...");
1480 sSpellMgr->LoadSpellGroupStackRules();
1481
1482 LOG_INFO("server.loading", "Loading NPC Texts...");
1483 sObjectMgr->LoadGossipText();
1484
1485 LOG_INFO("server.loading", "Loading Enchant Spells Proc Datas...");
1486 sSpellMgr->LoadSpellEnchantProcData();
1487
1488 LOG_INFO("server.loading", "Loading Item Random Enchantments Table...");
1490
1491 LOG_INFO("server.loading", "Loading Disables");
1492 sDisableMgr->LoadDisables(); // must be before loading quests and items
1493
1494 LOG_INFO("server.loading", "Loading Items..."); // must be after LoadRandomEnchantmentsTable and LoadPageTexts
1495 sObjectMgr->LoadItemTemplates();
1496
1497 LOG_INFO("server.loading", "Loading Item Set Names..."); // must be after LoadItemPrototypes
1498 sObjectMgr->LoadItemSetNames();
1499
1500 LOG_INFO("server.loading", "Loading Creature Model Based Info Data...");
1501 sObjectMgr->LoadCreatureModelInfo();
1502
1503 LOG_INFO("server.loading", "Loading Creature Custom IDs Config...");
1504 sObjectMgr->LoadCreatureCustomIDs();
1505
1506 LOG_INFO("server.loading", "Loading Creature Templates...");
1507 sObjectMgr->LoadCreatureTemplates();
1508
1509 LOG_INFO("server.loading", "Loading Equipment Templates..."); // must be after LoadCreatureTemplates
1510 sObjectMgr->LoadEquipmentTemplates();
1511
1512 LOG_INFO("server.loading", "Loading Creature Template Addons...");
1513 sObjectMgr->LoadCreatureTemplateAddons();
1514
1515 LOG_INFO("server.loading", "Loading Reputation Reward Rates...");
1516 sObjectMgr->LoadReputationRewardRate();
1517
1518 LOG_INFO("server.loading", "Loading Creature Reputation OnKill Data...");
1519 sObjectMgr->LoadReputationOnKill();
1520
1521 LOG_INFO("server.loading", "Loading Reputation Spillover Data..." );
1522 sObjectMgr->LoadReputationSpilloverTemplate();
1523
1524 LOG_INFO("server.loading", "Loading Points Of Interest Data...");
1525 sObjectMgr->LoadPointsOfInterest();
1526
1527 LOG_INFO("server.loading", "Loading Creature Base Stats...");
1528 sObjectMgr->LoadCreatureClassLevelStats();
1529
1530 LOG_INFO("server.loading", "Loading Creature Data...");
1531 sObjectMgr->LoadCreatures();
1532
1533 LOG_INFO("server.loading", "Loading Creature sparring...");
1534 sObjectMgr->LoadCreatureSparring();
1535
1536 LOG_INFO("server.loading", "Loading Temporary Summon Data...");
1537 sObjectMgr->LoadTempSummons(); // must be after LoadCreatureTemplates() and LoadGameObjectTemplates()
1538
1539 LOG_INFO("server.loading", "Loading Pet Levelup Spells...");
1540 sSpellMgr->LoadPetLevelupSpellMap();
1541
1542 LOG_INFO("server.loading", "Loading Pet default Spells additional to Levelup Spells...");
1543 sSpellMgr->LoadPetDefaultSpells();
1544
1545 LOG_INFO("server.loading", "Loading Creature Addon Data...");
1546 sObjectMgr->LoadCreatureAddons(); // must be after LoadCreatureTemplates() and LoadCreatures()
1547
1548 LOG_INFO("server.loading", "Loading Creature Movement Overrides...");
1549 sObjectMgr->LoadCreatureMovementOverrides(); // must be after LoadCreatures()
1550
1551 LOG_INFO("server.loading", "Loading Gameobject Data...");
1552 sObjectMgr->LoadGameobjects();
1553
1554 LOG_INFO("server.loading", "Loading GameObject Addon Data...");
1555 sObjectMgr->LoadGameObjectAddons(); // must be after LoadGameObjectTemplate() and LoadGameobjects()
1556
1557 LOG_INFO("server.loading", "Loading GameObject Quest Items...");
1558 sObjectMgr->LoadGameObjectQuestItems();
1559
1560 LOG_INFO("server.loading", "Loading Creature Quest Items...");
1561 sObjectMgr->LoadCreatureQuestItems();
1562
1563 LOG_INFO("server.loading", "Loading Creature Linked Respawn...");
1564 sObjectMgr->LoadLinkedRespawn(); // must be after LoadCreatures(), LoadGameObjects()
1565
1566 LOG_INFO("server.loading", "Loading Weather Data...");
1568
1569 LOG_INFO("server.loading", "Loading Quests...");
1570 sObjectMgr->LoadQuests(); // must be loaded after DBCs, creature_template, item_template, gameobject tables
1571
1572 LOG_INFO("server.loading", "Checking Quest Disables");
1573 sDisableMgr->CheckQuestDisables(); // must be after loading quests
1574
1575 LOG_INFO("server.loading", "Loading Quest POI");
1576 sObjectMgr->LoadQuestPOI();
1577
1578 LOG_INFO("server.loading", "Loading Quests Starters and Enders...");
1579 sObjectMgr->LoadQuestStartersAndEnders(); // must be after quest load
1580
1581 LOG_INFO("server.loading", "Loading Quest Greetings...");
1582 sObjectMgr->LoadQuestGreetings(); // must be loaded after creature_template, gameobject_template tables
1583 LOG_INFO("server.loading", "Loading Quest Greeting Locales...");
1584 sObjectMgr->LoadQuestGreetingsLocales(); // must be loaded after creature_template, gameobject_template tables, quest_greeting
1585
1586 LOG_INFO("server.loading", "Loading Quest Money Rewards...");
1587 sObjectMgr->LoadQuestMoneyRewards();
1588
1589 LOG_INFO("server.loading", "Loading Objects Pooling Data...");
1590 sPoolMgr->LoadFromDB();
1591
1592 LOG_INFO("server.loading", "Loading Game Event Data..."); // must be after loading pools fully
1593 sGameEventMgr->LoadHolidayDates(); // Must be after loading DBC
1594 sGameEventMgr->LoadFromDB(); // Must be after loading holiday dates
1595
1596 LOG_INFO("server.loading", "Loading UNIT_NPC_FLAG_SPELLCLICK Data..."); // must be after LoadQuests
1597 sObjectMgr->LoadNPCSpellClickSpells();
1598
1599 LOG_INFO("server.loading", "Loading Vehicle Template Accessories...");
1600 sObjectMgr->LoadVehicleTemplateAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
1601
1602 LOG_INFO("server.loading", "Loading Vehicle Accessories...");
1603 sObjectMgr->LoadVehicleAccessories(); // must be after LoadCreatureTemplates() and LoadNPCSpellClickSpells()
1604
1605 LOG_INFO("server.loading", "Loading Vehicle Seat Addon Data...");
1606 sObjectMgr->LoadVehicleSeatAddon(); // must be after loading DBC
1607
1608 LOG_INFO("server.loading", "Loading SpellArea Data..."); // must be after quest load
1609 sSpellMgr->LoadSpellAreas();
1610
1611 LOG_INFO("server.loading", "Loading Area Trigger Definitions");
1612 sObjectMgr->LoadAreaTriggers();
1613
1614 LOG_INFO("server.loading", "Loading Area Trigger Teleport Definitions...");
1615 sObjectMgr->LoadAreaTriggerTeleports();
1616
1617 LOG_INFO("server.loading", "Loading Access Requirements...");
1618 sObjectMgr->LoadAccessRequirements(); // must be after item template load
1619
1620 LOG_INFO("server.loading", "Loading Quest Area Triggers...");
1621 sObjectMgr->LoadQuestAreaTriggers(); // must be after LoadQuests
1622
1623 LOG_INFO("server.loading", "Loading Tavern Area Triggers...");
1624 sObjectMgr->LoadTavernAreaTriggers();
1625
1626 LOG_INFO("server.loading", "Loading AreaTrigger Script Names...");
1627 sObjectMgr->LoadAreaTriggerScripts();
1628
1629 LOG_INFO("server.loading", "Loading LFG Entrance Positions..."); // Must be after areatriggers
1630 sLFGMgr->LoadLFGDungeons();
1631
1632 LOG_INFO("server.loading", "Loading Dungeon Boss Data...");
1633 sObjectMgr->LoadInstanceEncounters();
1634
1635 LOG_INFO("server.loading", "Loading LFG Rewards...");
1636 sLFGMgr->LoadRewards();
1637
1638 LOG_INFO("server.loading", "Loading Graveyard-Zone Links...");
1639 sGraveyard->LoadGraveyardZones();
1640
1641 LOG_INFO("server.loading", "Loading Spell Pet Auras...");
1642 sSpellMgr->LoadSpellPetAuras();
1643
1644 LOG_INFO("server.loading", "Loading Spell Target Coordinates...");
1645 sSpellMgr->LoadSpellTargetPositions();
1646
1647 LOG_INFO("server.loading", "Loading Enchant Custom Attributes...");
1648 sSpellMgr->LoadEnchantCustomAttr();
1649
1650 LOG_INFO("server.loading", "Loading linked Spells...");
1651 sSpellMgr->LoadSpellLinked();
1652
1653 LOG_INFO("server.loading", "Loading Player Create Data...");
1654 sObjectMgr->LoadPlayerInfo();
1655
1656 LOG_INFO("server.loading", "Loading Exploration BaseXP Data...");
1657 sObjectMgr->LoadExplorationBaseXP();
1658
1659 LOG_INFO("server.loading", "Loading Pet Name Parts...");
1660 sObjectMgr->LoadPetNames();
1661
1663
1664 LOG_INFO("server.loading", "Loading The Max Pet Number...");
1665 sObjectMgr->LoadPetNumber();
1666
1667 LOG_INFO("server.loading", "Loading Pet Level Stats...");
1668 sObjectMgr->LoadPetLevelInfo();
1669
1670 LOG_INFO("server.loading", "Loading Player Level Dependent Mail Rewards...");
1671 sObjectMgr->LoadMailLevelRewards();
1672
1673 LOG_INFO("server.loading", "Load Mail Server definitions...");
1674 sServerMailMgr->LoadMailServerTemplates();
1675
1676 // Loot tables
1678
1679 LOG_INFO("server.loading", "Loading Skill Discovery Table...");
1681
1682 LOG_INFO("server.loading", "Loading Skill Extra Item Table...");
1684
1685 LOG_INFO("server.loading", "Loading Skill Perfection Data Table...");
1687
1688 LOG_INFO("server.loading", "Loading Skill Fishing Base Level Requirements...");
1689 sObjectMgr->LoadFishingBaseSkillLevel();
1690
1691 LOG_INFO("server.loading", "Loading Achievements...");
1692 sAchievementMgr->LoadAchievementReferenceList();
1693 LOG_INFO("server.loading", "Loading Achievement Criteria Lists...");
1694 sAchievementMgr->LoadAchievementCriteriaList();
1695 LOG_INFO("server.loading", "Loading Achievement Criteria Data...");
1696 sAchievementMgr->LoadAchievementCriteriaData();
1697 LOG_INFO("server.loading", "Loading Achievement Rewards...");
1698 sAchievementMgr->LoadRewards();
1699 LOG_INFO("server.loading", "Loading Achievement Reward Locales...");
1700 sAchievementMgr->LoadRewardLocales();
1701 LOG_INFO("server.loading", "Loading Completed Achievements...");
1702 sAchievementMgr->LoadCompletedAchievements();
1703
1705 LOG_INFO("server.loading", "Loading Item Auctions...");
1706 sAuctionMgr->LoadAuctionItems();
1707 LOG_INFO("server.loading", "Loading Auctions...");
1708 sAuctionMgr->LoadAuctions();
1709
1710 sGuildMgr->LoadGuilds();
1711
1712 LOG_INFO("server.loading", "Loading ArenaTeams...");
1713 sArenaTeamMgr->LoadArenaTeams();
1714
1715 LOG_INFO("server.loading", "Loading Groups...");
1716 sGroupMgr->LoadGroups();
1717
1718 LOG_INFO("server.loading", "Loading Reserved Names...");
1719 sObjectMgr->LoadReservedPlayerNamesDB();
1720 sObjectMgr->LoadReservedPlayerNamesDBC(); // Needs to be after LoadReservedPlayerNamesDB()
1721
1722 LOG_INFO("server.loading", "Loading Profanity Names...");
1723 sObjectMgr->LoadProfanityNamesFromDB();
1724 sObjectMgr->LoadProfanityNamesFromDBC(); // Needs to be after LoadProfanityNamesFromDB()
1725
1726 LOG_INFO("server.loading", "Loading GameObjects for Quests...");
1727 sObjectMgr->LoadGameObjectForQuests();
1728
1729 LOG_INFO("server.loading", "Loading BattleMasters...");
1730 sBattlegroundMgr->LoadBattleMastersEntry();
1731
1732 LOG_INFO("server.loading", "Loading GameTeleports...");
1733 sObjectMgr->LoadGameTele();
1734
1735 LOG_INFO("server.loading", "Loading Gossip Menu...");
1736 sObjectMgr->LoadGossipMenu();
1737
1738 LOG_INFO("server.loading", "Loading Gossip Menu Options...");
1739 sObjectMgr->LoadGossipMenuItems();
1740
1741 LOG_INFO("server.loading", "Loading Vendors...");
1742 sObjectMgr->LoadVendors(); // must be after load CreatureTemplate and ItemTemplate
1743
1744 LOG_INFO("server.loading", "Loading Trainers...");
1745 sObjectMgr->LoadTrainerSpell(); // must be after load CreatureTemplate
1746
1747 LOG_INFO("server.loading", "Loading Waypoints...");
1748 sWaypointMgr->Load();
1749
1750 LOG_INFO("server.loading", "Loading SmartAI Waypoints...");
1751 sSmartWaypointMgr->LoadFromDB();
1752
1753 LOG_INFO("server.loading", "Loading Creature Formations...");
1754 sFormationMgr->LoadCreatureFormations();
1755
1756 LOG_INFO("server.loading", "Loading World States..."); // must be loaded before battleground, outdoor PvP and conditions
1758
1759 LOG_INFO("server.loading", "Loading Conditions...");
1760 sConditionMgr->LoadConditions();
1761
1762 LOG_INFO("server.loading", "Loading Faction Change Achievement Pairs...");
1763 sObjectMgr->LoadFactionChangeAchievements();
1764
1765 LOG_INFO("server.loading", "Loading Faction Change Spell Pairs...");
1766 sObjectMgr->LoadFactionChangeSpells();
1767
1768 LOG_INFO("server.loading", "Loading Faction Change Item Pairs...");
1769 sObjectMgr->LoadFactionChangeItems();
1770
1771 LOG_INFO("server.loading", "Loading Faction Change Reputation Pairs...");
1772 sObjectMgr->LoadFactionChangeReputations();
1773
1774 LOG_INFO("server.loading", "Loading Faction Change Title Pairs...");
1775 sObjectMgr->LoadFactionChangeTitles();
1776
1777 LOG_INFO("server.loading", "Loading Faction Change Quest Pairs...");
1778 sObjectMgr->LoadFactionChangeQuests();
1779
1780 LOG_INFO("server.loading", "Loading GM Tickets...");
1781 sTicketMgr->LoadTickets();
1782
1783 LOG_INFO("server.loading", "Loading GM Surveys...");
1784 sTicketMgr->LoadSurveys();
1785
1786 LOG_INFO("server.loading", "Loading Client Addons...");
1788
1789 // pussywizard:
1790 LOG_INFO("server.loading", "Deleting Invalid Mail Items...");
1791 LOG_INFO("server.loading", " ");
1792 CharacterDatabase.Execute("DELETE mi FROM mail_items mi LEFT JOIN item_instance ii ON mi.item_guid = ii.guid WHERE ii.guid IS NULL");
1793 CharacterDatabase.Execute("DELETE mi FROM mail_items mi LEFT JOIN mail m ON mi.mail_id = m.id WHERE m.id IS NULL");
1794 CharacterDatabase.Execute("UPDATE mail m LEFT JOIN mail_items mi ON m.id = mi.mail_id SET m.has_items=0 WHERE m.has_items<>0 AND mi.mail_id IS NULL");
1795
1797 LOG_INFO("server.loading", "Returning Old Mails...");
1798 LOG_INFO("server.loading", " ");
1799 sObjectMgr->ReturnOrDeleteOldMails(false);
1800
1802 LOG_INFO("server.loading", "Loading Autobroadcasts...");
1803 sAutobroadcastMgr->LoadAutobroadcasts();
1804 sAutobroadcastMgr->LoadAutobroadcastsLocalized();
1805
1807 LOG_INFO("server.loading", "Loading Motd...");
1808 sMotdMgr->LoadMotd();
1809
1811 sObjectMgr->LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
1812 sObjectMgr->LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
1813 sObjectMgr->LoadWaypointScripts();
1814
1815 LOG_INFO("server.loading", "Loading Spell Script Names...");
1816 sObjectMgr->LoadSpellScriptNames();
1817
1818 LOG_INFO("server.loading", "Loading Creature Texts...");
1819 sCreatureTextMgr->LoadCreatureTexts();
1820
1821 LOG_INFO("server.loading", "Loading Creature Text Locales...");
1822 sCreatureTextMgr->LoadCreatureTextLocales();
1823
1824 LOG_INFO("server.loading", "Loading Scripts...");
1825 sScriptMgr->LoadDatabase();
1826
1827 LOG_INFO("server.loading", "Validating Spell Scripts...");
1828 sObjectMgr->ValidateSpellScripts();
1829
1830 LOG_INFO("server.loading", "Loading SmartAI Scripts...");
1831 sSmartScriptMgr->LoadSmartAIFromDB();
1832
1833 LOG_INFO("server.loading", "Loading Calendar Data...");
1834 sCalendarMgr->LoadFromDB();
1835
1836 LOG_INFO("server.loading", "Initializing SpellInfo Precomputed Data..."); // must be called after loading items, professions, spells and pretty much anything
1837 LOG_INFO("server.loading", " ");
1838 sObjectMgr->InitializeSpellInfoPrecomputedData();
1839
1840 LOG_INFO("server.loading", "Initialize Commands...");
1842
1844 LOG_INFO("server.loading", "Initialize Game Time and Timers");
1845 LOG_INFO("server.loading", " ");
1846
1848 stmt->SetData(0, realm.Id.Realm);
1849 stmt->SetData(1, uint32(GameTime::GetStartTime().count()));
1851 LoginDatabase.Execute(stmt);
1852
1855 //Update "uptime" table based on configuration entry in minutes.
1856
1858 //erase corpses every 20 minutes
1860 // clean logs table every 14 days by default
1862
1864
1865 // our speed up
1867
1868 _timers[WUPDATE_WHO_LIST].SetInterval(5 * IN_MILLISECONDS); // update who list cache every 5 seconds
1869
1871
1873 LOG_INFO("server.loading", "Starting Map System");
1874 LOG_INFO("server.loading", " ");
1875 sMapMgr->Initialize();
1876
1877 LOG_INFO("server.loading", "Starting Game Event system...");
1878 LOG_INFO("server.loading", " ");
1879 uint32 nextGameEvent = sGameEventMgr->StartSystem();
1880 _timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
1881
1882 // Delete all characters which have been deleted X days before
1884
1885 // Delete all items which have been deleted X days before
1887
1888 // Delete all custom channels which haven't been used for PreserveCustomChannelDuration days.
1890
1891 LOG_INFO("server.loading", "Initializing Opcodes...");
1893
1894 LOG_INFO("server.loading", "Loading Arena Season Rewards...");
1895 sArenaSeasonMgr->LoadRewards();
1896 LOG_INFO("server.loading", "Loading Active Arena Season...");
1897 sArenaSeasonMgr->LoadActiveSeason();
1898
1899 LOG_INFO("server.loading", "Loading WorldState...");
1900 sWorldState->Load();
1901
1902 sTicketMgr->Initialize();
1903
1905 LOG_INFO("server.loading", "Starting Battleground System");
1906 sBattlegroundMgr->LoadBattlegroundTemplates();
1907 sBattlegroundMgr->InitAutomaticArenaPointDistribution();
1908
1910 LOG_INFO("server.loading", "Starting Outdoor PvP System");
1911 sOutdoorPvPMgr->InitOutdoorPvP();
1912
1914 LOG_INFO("server.loading", "Starting Battlefield System");
1915 sBattlefieldMgr->InitBattlefield();
1916
1917 LOG_INFO("server.loading", "Loading Transports...");
1918 sTransportMgr->SpawnContinentTransports();
1919
1921 LOG_INFO("server.loading", "Loading Warden Checks..." );
1922 sWardenCheckMgr->LoadWardenChecks();
1923
1924 LOG_INFO("server.loading", "Loading Warden Action Overrides..." );
1925 sWardenCheckMgr->LoadWardenOverrides();
1926
1927 LOG_INFO("server.loading", "Deleting Expired Bans...");
1928 LoginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate"); // One-time query
1929
1930 LOG_INFO("server.loading", "Calculate Next Daily Quest Reset Time...");
1932
1933 LOG_INFO("server.loading", "Calculate Next Weekly Quest Reset Time..." );
1935
1936 LOG_INFO("server.loading", "Calculate Next Monthly Quest Reset Time...");
1938
1939 LOG_INFO("server.loading", "Calculate Random Battleground Reset Time..." );
1941
1942 LOG_INFO("server.loading", "Calculate Deletion Of Old Calendar Events Time...");
1944
1945 LOG_INFO("server.loading", "Calculate Guild Cap Reset Time...");
1946 LOG_INFO("server.loading", " ");
1948
1949 LOG_INFO("server.loading", "Load Petitions...");
1950 sPetitionMgr->LoadPetitions();
1951
1952 LOG_INFO("server.loading", "Load Petition Signs...");
1953 sPetitionMgr->LoadSignatures();
1954
1955 LOG_INFO("server.loading", "Load Stored Loot Items...");
1956 sLootItemStorage->LoadStorageFromDB();
1957
1958 LOG_INFO("server.loading", "Load Channel Rights...");
1960
1961 LOG_INFO("server.loading", "Load Channels...");
1963
1964 LOG_INFO("server.loading", "Loading AntiDos opcode policies");
1965 sWorldGlobals->LoadAntiDosOpcodePolicies();
1966
1967 sScriptMgr->OnBeforeWorldInitialized();
1968
1970 {
1971 LOG_INFO("server.loading", "Loading All Grids For All Non-Instanced Maps...");
1972
1973 for (uint32 i = 0; i < sMapStore.GetNumRows(); ++i)
1974 {
1975 MapEntry const* mapEntry = sMapStore.LookupEntry(i);
1976
1977 if (mapEntry && !mapEntry->Instanceable())
1978 {
1979 Map* map = sMapMgr->CreateBaseMap(mapEntry->MapID);
1980
1981 if (map)
1982 {
1983 LOG_INFO("server.loading", ">> Loading All Grids For Map {}", map->GetId());
1984 map->LoadAllGrids();
1985 }
1986 }
1987 }
1988 }
1989
1990 uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
1991
1992 LOG_INFO("server.loading", " ");
1993 LOG_INFO("server.loading", "WORLD: World Initialized In {} Minutes {} Seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000)); // outError for red color in console
1994 LOG_INFO("server.loading", " ");
1995
1996 METRIC_EVENT("events", "World initialized", "World Initialized In " + std::to_string(startupDuration / 60000) + " Minutes " + std::to_string((startupDuration % 60000) / 1000) + " Seconds");
1997
1998 if (sConfigMgr->isDryRun())
1999 {
2000 sMapMgr->UnloadAll();
2001 LOG_INFO("server.loading", "AzerothCore Dry Run Completed, Terminating.");
2002 exit(0);
2003 }
2004}
#define sAchievementMgr
Definition AchievementMgr.h:451
#define sArenaSeasonMgr
Definition ArenaSeasonMgr.h:124
#define sArenaTeamMgr
Definition ArenaTeamMgr.h:69
#define sAuctionMgr
Definition AuctionHouseMgr.h:224
#define sAutobroadcastMgr
Definition AutobroadcastMgr.h:54
#define sBattlefieldMgr
Definition BattlefieldMgr.h:77
#define sBattlegroundMgr
Definition BattlegroundMgr.h:187
#define sCharacterCache
Definition CharacterCache.h:83
#define sConditionMgr
Definition ConditionMgr.h:290
#define sFormationMgr
Definition CreatureGroups.h:127
#define sCreatureTextMgr
Definition CreatureTextMgr.h:119
uint32 GetLiquidFlags(uint32 liquidType)
Definition DBCStores.cpp:834
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
void LoadDBCStores(const std::string &dataPath)
Definition DBCStores.cpp:261
#define sDisableMgr
Definition DisableMgr.h:88
#define sGraveyard
Definition GameGraveyard.h:74
void LoadGameObjectModelList(std::string const &dataPath)
Definition GameObjectModel.cpp:45
#define sGroupMgr
Definition GroupMgr.h:51
#define sIPLocation
Definition IPLocation.h:49
#define sInstanceSaveMgr
Definition InstanceSaveMgr.h:202
void LoadRandomEnchantmentsTable()
Definition ItemEnchantmentMgr.cpp:47
#define sLFGMgr
Definition LFGMgr.h:641
@ LOGIN_INS_UPTIME
Definition LoginDatabase.h:125
#define sLootItemStorage
Definition LootItemStorage.h:73
void LoadLootTables()
Definition LootMgr.h:443
void LoadM2Cameras(std::string const &dataPath)
Definition M2Stores.cpp:173
void dtCustomFree(void *ptr)
Definition MMapMgr.h:34
void * dtCustomAlloc(std::size_t size, dtAllocHint)
Definition MMapMgr.h:29
#define METRIC_EVENT(category, title, description)
Definition Metric.h:185
#define sMotdMgr
Definition MotdMgr.h:52
#define sObjectMgr
Definition ObjectMgr.h:1636
#define sOutdoorPvPMgr
Definition OutdoorPvPMgr.h:102
#define sPetitionMgr
Definition PetitionMgr.h:87
#define sServerMailMgr
Definition ServerMailMgr.h:229
void LoadSkillDiscoveryTable()
Definition SkillDiscovery.cpp:46
void LoadSkillPerfectItemTable()
Definition SkillExtraItems.cpp:52
void LoadSkillExtraItemTable()
Definition SkillExtraItems.cpp:138
#define sSmartWaypointMgr
Definition SmartScriptMgr.h:2237
#define sSmartScriptMgr
Definition SmartScriptMgr.h:2236
#define sSpellMgr
Definition SpellMgr.h:825
#define sTicketMgr
Definition TicketMgr.h:260
#define sTransportMgr
Definition TransportMgr.h:163
#define sWardenCheckMgr
Definition WardenCheckMgr.h:89
#define sWaypointMgr
Definition WaypointMgr.h:78
#define sWorldGlobals
Definition WorldGlobals.h:42
#define sWorldState
Definition WorldState.h:215
static void LoadChannelRights()
Definition ChannelMgr.cpp:166
static void LoadChannels()
Definition ChannelMgr.cpp:50
static void CleanOldChannelsInDB()
Definition Channel.cpp:140
static bool IsVMAPDisabledFor(uint32 entry, uint8 flags)
Definition DisableMgr.cpp:432
static MMapMgr * createOrGetMMapMgr()
Definition MMapFactory.cpp:27
Definition MMapMgr.h:74
void InitializeThreadUnsafe(const std::vector< uint32 > &mapIds)
Definition MMapMgr.cpp:41
static bool ExistMapAndVMap(uint32 mapid, float x, float y)
Definition MapMgr.cpp:305
Definition Map.h:156
void LoadAllGrids()
Definition Map.cpp:306
uint32 GetId() const
Definition Map.h:229
static void InitializeTables()
Definition PlayerDump.cpp:253
static void DeleteOldCharacters()
Definition Player.cpp:4345
static void DeleteOldRecoveryItems()
Definition Player.cpp:4380
Definition VMapMgr2.h:76
IsVMAPDisabledForFn IsVMAPDisabledForPtr
Definition VMapMgr2.h:137
void InitializeThreadUnsafe(const std::vector< uint32 > &mapIds)
Definition VMapMgr2.cpp:54
GetLiquidFlagsFn GetLiquidFlagsPtr
Definition VMapMgr2.h:134
bool IsFFAPvPRealm() const override
Definition World.cpp:2794
void LoadConfigSettings(bool reload=false) override
Initialize config values.
Definition World.cpp:168
void LoadWorldStates() override
Definition World.cpp:2728
void InitCalendarOldEventsDeletionTime()
Definition World.cpp:2562
void InitDailyQuestResetTime()
Definition World.cpp:2529
void LoadDBAllowedSecurityLevel() override
Definition World.cpp:2601
void DetectDBCLang()
Definition World.cpp:2006
void InitGuildResetTime()
Definition World.cpp:2573
void InitRandomBGResetTime()
Definition World.cpp:2551
void InitWeeklyQuestResetTime()
Definition World.cpp:2518
void InitMonthlyQuestResetTime()
Definition World.cpp:2540
OpcodeTable opcodeTable
Definition Opcodes.cpp:51
void Initialize()
Correspondence between opcodes and their names.
Definition Opcodes.cpp:123
void LoadWeatherData()
Definition WeatherMgr.cpp:82
@ WUPDATE_PINGDB
Definition World.h:68
@ WUPDATE_WHO_LIST
Definition World.h:70
@ WUPDATE_WEATHERS
Definition World.h:61
void Initialize()
Definition CreatureAIRegistry.cpp:34
AC_GAME_API void LoadCommandMap()
Definition ChatCommand.cpp:530
void LoadFromDB()
Definition AddonMgr.cpp:39
void CleanDatabase()
Definition CharacterDatabaseCleaner.cpp:27
Seconds GetStartTime()
Definition GameTime.cpp:33
AC_COMMON_API char const * GetFullVersion()
Definition GitRevision.cpp:82
Definition DBCStructure.h:1324
uint32 MapID
Definition DBCStructure.h:1325
bool Instanceable() const
Definition DBCStructure.h:1352

References _dataPath, _int_configs, _mail_expire_check_timer, _timers, CharacterDatabase, CharacterDatabaseCleaner::CleanDatabase(), Channel::CleanOldChannelsInDB(), CONFIG_AUTOBROADCAST_INTERVAL, CONFIG_DB_PING_INTERVAL, CONFIG_EXPANSION, CONFIG_GAME_TYPE, CONFIG_LOGDB_CLEARINTERVAL, CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS, CONFIG_REALM_ZONE, CONFIG_UPTIME_UPDATE, MMAP::MMapFactory::createOrGetMMapMgr(), VMAP::VMapFactory::createOrGetVMapMgr(), Player::DeleteOldCharacters(), Player::DeleteOldRecoveryItems(), DetectDBCLang(), dtCustomAlloc(), dtCustomFree(), MapMgr::ExistMapAndVMap(), GetDefaultDbcLocale(), GitRevision::GetFullVersion(), GameTime::GetGameTime(), Map::GetId(), getIntConfig(), GetLiquidFlags(), VMAP::VMapMgr2::GetLiquidFlagsPtr, getMSTime(), GetMSTimeDiffToNow(), GameTime::GetStartTime(), Realm::Id, IN_MILLISECONDS, InitCalendarOldEventsDeletionTime(), InitDailyQuestResetTime(), InitGuildResetTime(), AIRegistry::Initialize(), OpcodeTable::Initialize(), PlayerDump::InitializeTables(), MMAP::MMapMgr::InitializeThreadUnsafe(), VMAP::VMapMgr2::InitializeThreadUnsafe(), InitMonthlyQuestResetTime(), InitRandomBGResetTime(), InitWeeklyQuestResetTime(), MapEntry::Instanceable(), IsFFAPvPRealm(), DisableMgr::IsVMAPDisabledFor(), VMAP::VMapMgr2::IsVMAPDisabledForPtr, Map::LoadAllGrids(), ChannelMgr::LoadChannelRights(), ChannelMgr::LoadChannels(), Acore::ChatCommands::LoadCommandMap(), LoadConfigSettings(), LoadDBAllowedSecurityLevel(), LoadDBCStores(), AddonMgr::LoadFromDB(), LoadGameObjectModelList(), LoadLootTables(), LoadM2Cameras(), LoadRandomEnchantmentsTable(), LoadSkillDiscoveryTable(), LoadSkillExtraItemTable(), LoadSkillPerfectItemTable(), WeatherMgr::LoadWeatherData(), LoadWorldStates(), LOG_ERROR, LOG_INFO, LOGIN_INS_UPTIME, LoginDatabase, MapEntry::MapID, METRIC_EVENT, MINUTE, opcodeTable, realm, RealmHandle::Realm, REALM_TYPE_PVP, sAchievementMgr, sArenaSeasonMgr, sArenaTeamMgr, sAuctionMgr, sAutobroadcastMgr, sBattlefieldMgr, sBattlegroundMgr, sCalendarMgr, sCharacterCache, sConditionMgr, sConfigMgr, sCreatureTextMgr, sDisableMgr, PreparedStatementBase::SetData(), IntervalTimer::SetInterval(), sFormationMgr, sGameEventMgr, sGraveyard, sGroupMgr, sGuildMgr, sInstanceSaveMgr, sIPLocation, sLFGMgr, sLootItemStorage, sMapMgr, sMapStore, sMotdMgr, sObjectMgr, sOutdoorPvPMgr, sPetitionMgr, sPoolMgr, sScriptMgr, sServerMailMgr, sSmartScriptMgr, sSmartWaypointMgr, sSpellMgr, sTicketMgr, sTransportMgr, sWardenCheckMgr, sWaypointMgr, sWorld, sWorldGlobals, sWorldState, WUPDATE_5_SECS, WUPDATE_AUTOBROADCAST, WUPDATE_CLEANDB, WUPDATE_CORPSES, WUPDATE_EVENTS, WUPDATE_PINGDB, WUPDATE_UPTIME, WUPDATE_WEATHERS, and WUPDATE_WHO_LIST.

◆ setIntConfig()

void World::setIntConfig ( WorldIntConfigs  index,
uint32  value 
)
inlineoverridevirtual

Set a server configuration element (see #WorldConfigs)

Implements IWorld.

233 {
234 if (index < INT_CONFIG_VALUE_COUNT)
235 _int_configs[index] = value;
236 }

References _int_configs, and INT_CONFIG_VALUE_COUNT.

◆ SetNewCharString()

void World::SetNewCharString ( std::string const &  str)
inlineoverridevirtual

Set the string for new characters (first login)

Implements IWorld.

164{ _newCharString = str; }

References _newCharString.

Referenced by LoadConfigSettings().

◆ SetPlayerSecurityLimit()

void World::SetPlayerSecurityLimit ( AccountTypes  sec)
overridevirtual

Implements IWorld.

2612{
2613 AccountTypes sec = _sec < SEC_CONSOLE ? _sec : SEC_PLAYER;
2614 bool update = sec > _allowedSecurityLevel;
2616 if (update)
2618}

References _allowedSecurityLevel, SEC_CONSOLE, SEC_PLAYER, and sWorldSessionMgr.

Referenced by LoadDBAllowedSecurityLevel().

◆ setRate()

void World::setRate ( Rates  rate,
float  value 
)
inlineoverridevirtual

Set a server rate (see Rates)

Implements IWorld.

201{ _rate_values[rate] = value; }

References _rate_values.

◆ SetRealmName()

void World::SetRealmName ( std::string  name)
inlineoverridevirtual

Implements IWorld.

280{ _realmName = name; } // pussywizard

References _realmName.

◆ setWorldState()

void World::setWorldState ( uint32  index,
uint64  value 
)
overridevirtual

Implements IWorld.

2753{
2754 auto const& it = _worldstates.find(index);
2755 if (it != _worldstates.end())
2756 {
2758 stmt->SetData(0, uint32(timeValue));
2759 stmt->SetData(1, index);
2760 CharacterDatabase.Execute(stmt);
2761 }
2762 else
2763 {
2765 stmt->SetData(0, index);
2766 stmt->SetData(1, uint32(timeValue));
2767 CharacterDatabase.Execute(stmt);
2768 }
2769
2770 _worldstates[index] = timeValue;
2771}
@ CHAR_INS_WORLDSTATE
Definition CharacterDatabase.h:307
@ CHAR_UPD_WORLDSTATE
Definition CharacterDatabase.h:306

References _worldstates, CHAR_INS_WORLDSTATE, CHAR_UPD_WORLDSTATE, CharacterDatabase, and PreparedStatementBase::SetData().

◆ ShutdownCancel()

void World::ShutdownCancel ( )
overridevirtual

Cancel a planned server shutdown.

Implements IWorld.

2455{
2456 // nothing cancel or too later
2457 if (!_shutdownTimer || _stopEvent)
2458 return;
2459
2461
2462 _shutdownMask = 0;
2463 _shutdownTimer = 0;
2464 _exitCode = SHUTDOWN_EXIT_CODE; // to default value
2465 sWorldSessionMgr->SendServerMessage(msgid);
2466
2467 LOG_DEBUG("server.worldserver", "Server {} cancelled.", (_shutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));
2468
2469 sScriptMgr->OnShutdownCancel();
2470}
ServerMessageType
Definition IWorld.h:53
@ SERVER_MSG_SHUTDOWN_CANCELLED
Definition IWorld.h:57
@ SERVER_MSG_RESTART_CANCELLED
Definition IWorld.h:58
@ SHUTDOWN_EXIT_CODE
Definition World.h:53
@ SHUTDOWN_MASK_RESTART
Definition World.h:47

References _exitCode, _shutdownMask, _shutdownTimer, _stopEvent, LOG_DEBUG, SERVER_MSG_RESTART_CANCELLED, SERVER_MSG_SHUTDOWN_CANCELLED, SHUTDOWN_EXIT_CODE, SHUTDOWN_MASK_RESTART, sScriptMgr, and sWorldSessionMgr.

◆ ShutdownMsg()

void World::ShutdownMsg ( bool  show = false,
Player player = nullptr,
std::string const &  reason = std::string() 
)
overridevirtual

Displays a shutdown message at specific intervals or immediately if required.

Show the time remaining for a server shutdown/restart with a reason appended if one is provided. Messages are displayed at regular intervals such as every 12 hours, 1 hour, 5 minutes, 1 minute, 30 seconds, 10 seconds, and every second in the last 10 seconds.

Parameters
showForces the message to be displayed immediately.
playerThe player who should recieve the message (can be nullptr for global messages).
reasonThe reason for the shutdown, appended to the message if provided.
  • Display a message every 12 hours, hour, 5 minutes, minute, 30 seconds, 10 seconds and finally seconds

Implements IWorld.

2424{
2425 // Do not show a message for idle shutdown
2427 return;
2428
2429 bool twelveHours = (_shutdownTimer > 12 * HOUR && (_shutdownTimer % (12 * HOUR)) == 0); // > 12 h ; every 12 h
2430 bool oneHour = (_shutdownTimer < 12 * HOUR && (_shutdownTimer % HOUR) == 0); // < 12 h ; every 1 h
2431 bool fiveMin = (_shutdownTimer < 30 * MINUTE && (_shutdownTimer % (5 * MINUTE)) == 0); // < 30 min ; every 5 min
2432 bool oneMin = (_shutdownTimer < 15 * MINUTE && (_shutdownTimer % MINUTE) == 0); // < 15 min ; every 1 min
2433 bool thirtySec = (_shutdownTimer < 5 * MINUTE && (_shutdownTimer % 30) == 0); // < 5 min; every 30 sec
2434 bool tenSec = (_shutdownTimer < 1 * MINUTE && (_shutdownTimer % 10) == 0); // < 1 min; every 10 sec
2435 bool oneSec = (_shutdownTimer < 10 * SECOND && (_shutdownTimer % 1) == 0); // < 10 sec; every 1 sec
2436
2438 if (show || twelveHours || oneHour || fiveMin || oneMin || thirtySec || tenSec || oneSec)
2439 {
2440 std::string str = secsToTimeString(_shutdownTimer).append(".");
2441 if (!reason.empty())
2442 str += " - " + reason;
2443 // Display the reason every 12 hours, hour, 5 minutes, minute. At 60 seconds and at 10 seconds
2444 else if (!_shutdownReason.empty() && (twelveHours || oneHour || fiveMin || oneMin || _shutdownTimer == 60 || _shutdownTimer == 10))
2445 str += " - " + _shutdownReason;
2446
2448 sWorldSessionMgr->SendServerMessage(msgid, str, player);
2449 LOG_WARN("server.worldserver", "Server {} in {}", (_shutdownMask & SHUTDOWN_MASK_RESTART ? "restarting" : "shutdown"), str);
2450 }
2451}
constexpr auto SECOND
Definition Common.h:46
@ SERVER_MSG_SHUTDOWN_TIME
Definition IWorld.h:54
@ SERVER_MSG_RESTART_TIME
Definition IWorld.h:55
std::string secsToTimeString(uint64 timeInSecs, bool shortText)
Definition Util.cpp:73
std::string _shutdownReason
Definition World.h:306

References _shutdownMask, _shutdownReason, _shutdownTimer, HOUR, LOG_WARN, MINUTE, SECOND, secsToTimeString(), SERVER_MSG_RESTART_TIME, SERVER_MSG_SHUTDOWN_TIME, SHUTDOWN_MASK_IDLE, SHUTDOWN_MASK_RESTART, and sWorldSessionMgr.

Referenced by _UpdateGameTime(), and ShutdownServ().

◆ ShutdownServ()

void World::ShutdownServ ( uint32  time,
uint32  options,
uint8  exitcode,
std::string const &  reason = std::string() 
)
overridevirtual

Shutdown the server.

  • If the shutdown time is 0, set m_stopEvent (except if shutdown is 'idle' with remaining sessions)
  • Else set the shutdown timer and warn users

Implements IWorld.

2382{
2383 // ignore if server shutdown at next tick
2384 if (IsStopped())
2385 return;
2386
2387 _shutdownMask = options;
2388 _exitCode = exitcode;
2389 _shutdownReason = reason;
2390
2391 LOG_DEBUG("server.worldserver", "Server shutdown called with ShutdownMask {}, ExitCode {}, Time {}, Reason {}", ShutdownMask(options), ShutdownExitCode(exitcode), secsToTimeString(time), reason);
2392
2394 if (time == 0)
2395 {
2396 if (!(options & SHUTDOWN_MASK_IDLE) || sWorldSessionMgr->GetActiveAndQueuedSessionCount() == 0)
2397 _stopEvent = true; // exist code already set
2398 else
2399 _shutdownTimer = 1; //So that the session count is re-evaluated at next world tick
2400 }
2402 else
2403 {
2404 _shutdownTimer = time;
2405 ShutdownMsg(true, nullptr, reason);
2406 }
2407
2408 sScriptMgr->OnShutdownInitiate(ShutdownExitCode(exitcode), ShutdownMask(options));
2409}
ShutdownExitCode
Definition World.h:52
ShutdownMask
Definition World.h:46

References _exitCode, _shutdownMask, _shutdownReason, _shutdownTimer, _stopEvent, IsStopped(), LOG_DEBUG, secsToTimeString(), SHUTDOWN_MASK_IDLE, ShutdownMsg(), sScriptMgr, and sWorldSessionMgr.

◆ StopNow()

◆ Update()

void World::Update ( uint32  diff)
overridevirtual

Update the World !

  • Update the game time and check for shutdown time
  • Update the different timers
  • Update Who List Cache

Handle daily quests reset time

Handle weekly quests reset time

Handle monthly quests reset time

Handle weather updates when the timer has passed

Clean logs table

  • Update objects when the timer has passed (maps, transport, creatures, ...)

Update uptime table

  • Erase corpses once every 20 minutes
  • Process Game events when necessary
  • Ping to keep MySQL connections alive

Implements IWorld.

2051{
2052 METRIC_TIMER("world_update_time_total");
2053
2056 Seconds currentGameTime = GameTime::GetGameTime();
2057
2059
2060 // Record update if recording set in log and diff is greater then minimum set in log
2062
2063 DynamicVisibilityMgr::Update(sWorldSessionMgr->GetActiveSessionCount());
2064
2066 for (int i = 0; i < WUPDATE_COUNT; ++i)
2067 {
2068 if (_timers[i].GetCurrent() >= 0)
2069 _timers[i].Update(diff);
2070 else
2071 _timers[i].SetCurrent(0);
2072 }
2073
2074 // pussywizard: our speed up and functionality
2075 if (_timers[WUPDATE_5_SECS].Passed())
2076 {
2078
2079 // moved here from HandleCharEnumOpcode
2081 CharacterDatabase.Execute(stmt);
2082 }
2083
2085 if (_timers[WUPDATE_WHO_LIST].Passed())
2086 {
2087 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update who list"));
2089 sWhoListCacheMgr->Update();
2090 }
2091
2092 {
2093 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Check quest reset times"));
2094
2096 if (currentGameTime > _nextDailyQuestReset)
2097 {
2099 }
2100
2102 if (currentGameTime > _nextWeeklyQuestReset)
2103 {
2105 }
2106
2108 if (currentGameTime > _nextMonthlyQuestReset)
2109 {
2111 }
2112 }
2113
2114 if (currentGameTime > _nextRandomBGReset)
2115 {
2116 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Reset random BG"));
2117 ResetRandomBG();
2118 }
2119
2120 if (currentGameTime > _nextCalendarOldEventsDeletionTime)
2121 {
2122 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Delete old calendar events"));
2124 }
2125
2126 if (currentGameTime > _nextGuildReset)
2127 {
2128 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Reset guild cap"));
2129 ResetGuildCap();
2130 }
2131
2132 {
2133 // pussywizard: handle expired auctions, auctions expired when realm was offline are also handled here (not during loading when many required things aren't loaded yet)
2134 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update expired auctions"));
2135 sAuctionMgr->Update(diff);
2136 }
2137
2138 if (currentGameTime > _mail_expire_check_timer)
2139 {
2140 sObjectMgr->ReturnOrDeleteOldMails(true);
2141 _mail_expire_check_timer = currentGameTime + 6h;
2142 }
2143
2144 {
2145 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update sessions"));
2146 sWorldSessionMgr->UpdateSessions(diff);
2147 }
2148
2150 if (_timers[WUPDATE_WEATHERS].Passed())
2151 {
2154 }
2155
2157 if (sWorld->getIntConfig(CONFIG_LOGDB_CLEARTIME) > 0) // if not enabled, ignore the timer
2158 {
2159 if (_timers[WUPDATE_CLEANDB].Passed())
2160 {
2161 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Clean logs table"));
2162
2164
2166 stmt->SetData(0, sWorld->getIntConfig(CONFIG_LOGDB_CLEARTIME));
2167 stmt->SetData(1, uint32(currentGameTime.count()));
2168 LoginDatabase.Execute(stmt);
2169 }
2170 }
2171
2172 {
2173 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update LFG 0"));
2174 sLFGMgr->Update(diff, 0); // pussywizard: remove obsolete stuff before finding compatibility during map update
2175 }
2176
2177 {
2179 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update maps"));
2180 sMapMgr->Update(diff);
2181 }
2182
2183 if (sWorld->getBoolConfig(CONFIG_AUTOBROADCAST))
2184 {
2185 if (_timers[WUPDATE_AUTOBROADCAST].Passed())
2186 {
2187 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Send autobroadcast"));
2189 sAutobroadcastMgr->SendAutobroadcasts();
2190 }
2191 }
2192
2193 {
2194 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update battlegrounds"));
2195 sBattlegroundMgr->Update(diff);
2196 }
2197
2198 {
2199 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update outdoor pvp"));
2200 sOutdoorPvPMgr->Update(diff);
2201 }
2202
2203 {
2204 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update worldstate"));
2205 sWorldState->Update(diff);
2206 }
2207
2208 {
2209 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update battlefields"));
2210 sBattlefieldMgr->Update(diff);
2211 }
2212
2213 {
2214 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update LFG 2"));
2215 sLFGMgr->Update(diff, 2); // pussywizard: handle created proposals
2216 }
2217
2218 {
2219 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Process query callbacks"));
2220 // execute callbacks from sql queries that were queued recently
2222 }
2223
2225 if (_timers[WUPDATE_UPTIME].Passed())
2226 {
2227 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update uptime"));
2228
2230
2232 stmt->SetData(0, uint32(GameTime::GetUptime().count()));
2233 stmt->SetData(1, uint16(sWorldSessionMgr->GetMaxPlayerCount()));
2234 stmt->SetData(2, realm.Id.Realm);
2235 stmt->SetData(3, uint32(GameTime::GetStartTime().count()));
2236 LoginDatabase.Execute(stmt);
2237 }
2238
2240 if (_timers[WUPDATE_CORPSES].Passed())
2241 {
2242 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Remove old corpses"));
2244
2245 sMapMgr->DoForAllMaps([](Map* map)
2246 {
2247 map->RemoveOldCorpses();
2248 });
2249 }
2250
2252 if (_timers[WUPDATE_EVENTS].Passed())
2253 {
2254 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update game events"));
2255 _timers[WUPDATE_EVENTS].Reset(); // to give time for Update() to be processed
2256 uint32 nextGameEvent = sGameEventMgr->Update();
2257 _timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);
2259 }
2260
2262 if (_timers[WUPDATE_PINGDB].Passed())
2263 {
2264 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Ping MySQL"));
2266 LOG_DEBUG("sql.driver", "Ping MySQL to keep connection alive");
2267 CharacterDatabase.KeepAlive();
2268 LoginDatabase.KeepAlive();
2269 WorldDatabase.KeepAlive();
2270 }
2271
2272 {
2273 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update instance reset times"));
2274 // update the instance reset times
2275 sInstanceSaveMgr->Update();
2276 }
2277
2278 {
2279 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Process cli commands"));
2280 // And last, but not least handle the issued cli commands
2282 }
2283
2284 {
2285 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update world scripts"));
2286 sScriptMgr->OnWorldUpdate(diff);
2287 }
2288
2289 {
2290 METRIC_TIMER("world_update_time", METRIC_TAG("type", "Update metrics"));
2291 // Stats logger update
2292 sMetric->Update();
2293 METRIC_VALUE("update_time_diff", diff);
2294 }
2295}
@ CHAR_DEL_EXPIRED_BANS
Definition CharacterDatabase.h:34
@ LOGIN_UPD_UPTIME_PLAYERS
Definition LoginDatabase.h:77
@ LOGIN_DEL_OLD_LOGS
Definition LoginDatabase.h:78
#define METRIC_VALUE(category, value,...)
Definition Metric.h:193
#define METRIC_TAG(name, value)
Definition Metric.h:159
#define METRIC_TIMER(category,...)
Definition Metric.h:202
#define sWhoListCacheMgr
Definition WhoListCacheMgr.h:96
static void Update(uint32 sessionCount)
Definition DynamicVisibility.cpp:22
void RemoveOldCorpses()
Definition Map.cpp:2865
void UpdateWithDiff(uint32 diff)
Definition UpdateTime.cpp:102
void RecordUpdateTime(Milliseconds gameTimeMs, uint32 diff, uint32 sessionCount)
Definition UpdateTime.cpp:163
void ProcessCliCommands() override
Definition World.cpp:2473
void _UpdateGameTime()
Update the game time.
Definition World.cpp:2351
void ResetMonthlyQuests()
Definition World.cpp:2637
void ResetGuildCap()
Definition World.cpp:2690
void ResetWeeklyQuests()
Definition World.cpp:2620
void ResetRandomBG()
Definition World.cpp:2665
void ResetDailyQuests()
Definition World.cpp:2584
void CalendarDeleteOldEvents()
Definition World.cpp:2681
void ProcessQueryCallbacks()
Definition World.cpp:2779
void Update(uint32 diff)
Definition WeatherMgr.cpp:150
@ WUPDATE_COUNT
Definition World.h:71
Milliseconds GetGameTimeMS()
Definition GameTime.cpp:43
Seconds GetUptime()
Uptime.
Definition GameTime.cpp:58
void Update(time_t diff)
Definition Timer.h:152

References _mail_expire_check_timer, _nextCalendarOldEventsDeletionTime, _nextDailyQuestReset, _nextGuildReset, _nextMonthlyQuestReset, _nextRandomBGReset, _nextWeeklyQuestReset, _timers, _UpdateGameTime(), CalendarDeleteOldEvents(), CHAR_DEL_EXPIRED_BANS, CharacterDatabase, CONFIG_AUTOBROADCAST, CONFIG_LOGDB_CLEARTIME, GameTime::GetGameTime(), GameTime::GetGameTimeMS(), GameTime::GetStartTime(), GameTime::GetUptime(), Realm::Id, LOG_DEBUG, LOGIN_DEL_OLD_LOGS, LOGIN_UPD_UPTIME_PLAYERS, LoginDatabase, METRIC_TAG, METRIC_TIMER, METRIC_VALUE, ProcessCliCommands(), ProcessQueryCallbacks(), realm, RealmHandle::Realm, WorldUpdateTime::RecordUpdateTime(), Map::RemoveOldCorpses(), IntervalTimer::Reset(), ResetDailyQuests(), ResetGuildCap(), ResetMonthlyQuests(), ResetRandomBG(), ResetWeeklyQuests(), sAuctionMgr, sAutobroadcastMgr, sBattlefieldMgr, sBattlegroundMgr, IntervalTimer::SetCurrent(), PreparedStatementBase::SetData(), IntervalTimer::SetInterval(), sGameEventMgr, sInstanceSaveMgr, sLFGMgr, sMapMgr, sMetric, sObjectMgr, sOutdoorPvPMgr, sScriptMgr, sWhoListCacheMgr, sWorld, sWorldSessionMgr, sWorldState, sWorldUpdateTime, IntervalTimer::Update(), WeatherMgr::Update(), DynamicVisibilityMgr::Update(), UpdateTime::UpdateWithDiff(), WorldDatabase, WUPDATE_5_SECS, WUPDATE_AUTOBROADCAST, WUPDATE_CLEANDB, WUPDATE_CORPSES, WUPDATE_COUNT, WUPDATE_EVENTS, WUPDATE_PINGDB, WUPDATE_UPTIME, WUPDATE_WEATHERS, and WUPDATE_WHO_LIST.

◆ UpdateAreaDependentAuras()

void World::UpdateAreaDependentAuras ( )
overridevirtual

Implements IWorld.

2718{
2719 WorldSessionMgr::SessionMap const& sessionMap = sWorldSessionMgr->GetAllSessions();
2720 for (WorldSessionMgr::SessionMap::const_iterator itr = sessionMap.begin(); itr != sessionMap.end(); ++itr)
2721 if (itr->second && itr->second->GetPlayer() && itr->second->GetPlayer()->IsInWorld())
2722 {
2723 itr->second->GetPlayer()->UpdateAreaDependentAuras(itr->second->GetPlayer()->GetAreaId());
2724 itr->second->GetPlayer()->UpdateZoneDependentAuras(itr->second->GetPlayer()->GetZoneId());
2725 }
2726}

References sWorldSessionMgr.

◆ UpdateRealmCharCount()

void World::UpdateRealmCharCount ( uint32  accid)
overridevirtual

Implements IWorld.

2492{
2494 stmt->SetData(0, accountId);
2495 _queryProcessor.AddCallback(CharacterDatabase.AsyncQuery(stmt).WithPreparedCallback(std::bind(&World::_UpdateRealmCharCount, this, std::placeholders::_1,accountId)));
2496}
@ CHAR_SEL_CHARACTER_COUNT
Definition CharacterDatabase.h:136
T & AddCallback(T &&query)
Definition AsyncCallbackProcessor.h:34
void _UpdateRealmCharCount(PreparedQueryResult resultCharCount, uint32 accountId)
Definition World.cpp:2498

References _queryProcessor, _UpdateRealmCharCount(), AsyncCallbackProcessor< T >::AddCallback(), CHAR_SEL_CHARACTER_COUNT, CharacterDatabase, and PreparedStatementBase::SetData().

Member Data Documentation

◆ _allowedSecurityLevel

AccountTypes World::_allowedSecurityLevel
private

◆ _allowMovement

bool World::_allowMovement
private

◆ _availableDbcLocaleMask

uint32 World::_availableDbcLocaleMask
private

◆ _bool_configs

bool World::_bool_configs[BOOL_CONFIG_VALUE_COUNT]
private

◆ _cleaningFlags

uint32 World::_cleaningFlags
private

◆ _cliCmdQueue

LockedQueue<CliCommandHolder*> World::_cliCmdQueue
private

◆ _dataPath

std::string World::_dataPath
private

◆ _dbVersion

std::string World::_dbVersion
private

Referenced by GetDBVersion(), and LoadDBVersion().

◆ _defaultDbcLocale

LocaleConstant World::_defaultDbcLocale
private

◆ _exitCode

uint8 World::_exitCode = SHUTDOWN_EXIT_CODE
staticprivate

◆ _float_configs

float World::_float_configs[FLOAT_CONFIG_VALUE_COUNT]
private

◆ _int_configs

◆ _isClosed

bool World::_isClosed
private

Referenced by IsClosed(), SetClosed(), and World().

◆ _mail_expire_check_timer

Seconds World::_mail_expire_check_timer
private

◆ _maxVisibleDistanceInBGArenas

float World::_maxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS
staticprivate

◆ _maxVisibleDistanceInInstances

float World::_maxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE
staticprivate

◆ _maxVisibleDistanceOnContinents

float World::_maxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE
staticprivate

◆ _newCharString

std::string World::_newCharString
private

◆ _nextCalendarOldEventsDeletionTime

Seconds World::_nextCalendarOldEventsDeletionTime
private

◆ _nextDailyQuestReset

Seconds World::_nextDailyQuestReset
private

◆ _nextGuildReset

Seconds World::_nextGuildReset
private

◆ _nextMonthlyQuestReset

Seconds World::_nextMonthlyQuestReset
private

◆ _nextRandomBGReset

Seconds World::_nextRandomBGReset
private

◆ _nextWeeklyQuestReset

Seconds World::_nextWeeklyQuestReset
private

◆ _queryProcessor

QueryCallbackProcessor World::_queryProcessor
private

◆ _rate_values

float World::_rate_values[MAX_RATES]
private

◆ _realmName

std::string World::_realmName
private

Referenced by GetRealmName(), and SetRealmName().

◆ _shutdownMask

uint32 World::_shutdownMask
private

◆ _shutdownReason

std::string World::_shutdownReason
private

Referenced by ShutdownMsg(), and ShutdownServ().

◆ _shutdownTimer

◆ _stopEvent

std::atomic_long World::_stopEvent = false
staticprivate

◆ _timers

◆ _worldstates

WorldStatesMap World::_worldstates
private

◆ m_worldLoopCounter

uint32 World::m_worldLoopCounter = 0
static

The documentation for this class was generated from the following files: