Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
World Class Reference

The World. More...

#include <World.h>

Collaboration diagram for World:

Public Types

typedef std::list< WorldSession * > Queue

Public Member Functions

void AddCharacterNameData (uint32 guid, std::string const &name, uint8 gender, uint8 race, uint8 playerClass, uint8 level, uint32 realm)
void AddQueuedPlayer (WorldSession *)
void AddSession (WorldSession *s)
BanReturn BanAccount (BanMode mode, std::string const &nameOrIP, std::string const &duration, std::string const &reason, std::string const &author)
 Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban.
BanReturn BanAccount (BanMode mode, std::string const &nameOrIP, uint32 duration_secs, std::string const &reason, std::string const &author)
 Ban an account or ban an IP address, duration is in seconds if positive, otherwise permban.
BanReturn BanCharacter (std::string const &name, std::string const &duration, std::string const &reason, std::string const &author)
 Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban.
void DecreasePlayerCount ()
void DeleteCharacterNameData (uint32 guid)
PlayerFindPlayerInZone (uint32 zone)
 Find a player in a specified zone.
WorldSessionFindSession (uint32 id) const
 Find a session by its id.
void ForceGameEventUpdate ()
uint32 GetActiveAndQueuedSessionCount () const
uint32 GetActiveSessionCount () const
bool getAllowMovement () const
const SessionMapGetAllSessions () const
LocaleConstant GetAvailableDbcLocale (LocaleConstant locale) const
bool GetBoolConfig (WorldBoolConfigs index) const
 Get a server configuration element (see #WorldConfigs).
CharacterNameData const * GetCharacterNameData (uint32 guid) const
uint32 GetCleaningFlags () const
uint16 GetConfigMaxSkillValue () const
 Get the maximum skill level a player can reach.
std::string const & GetDataPath () const
 Get the path where data (dbc, maps) are stored on disk.
char const * GetDBVersion () const
LocaleConstant GetDefaultDbcLocale () const
bool GetEventKill () const
float GetFloatConfig (WorldFloatConfigs index) const
 Get a server configuration element (see #WorldConfigs).
time_t const & GetGameTime () const
 What time is it?
uint32 getIntConfig (WorldIntConfigs index) const
 Get a server configuration element (see #WorldConfigs).
uint32 GetMaxActiveSessionCount () const
uint32 GetMaxPlayerCount () const
uint32 GetMaxQueuedSessionCount () const
 Get the maximum number of parallel sessions on the server since last reboot.
const char * GetMotd () const
 Get the current Message of the Day.
std::string const & GetNewCharString () const
 Get the string for new characters (first login).
time_t GetNextDailyQuestsResetTime () const
 Next daily quests and random bg reset time.
time_t GetNextRandomBGResetTime () const
time_t GetNextWeeklyQuestsResetTime () const
uint32 GetPlayerAmountLimit () const
uint32 GetPlayerCount () const
 Get number of players.
AccountTypes GetPlayerSecurityLimit () const
 Security level limitations.
uint32 GetQueuedSessionCount () const
int32 GetQueuePos (WorldSession *)
float getRate (Rates rate) const
 Get a server rate (see Rates).
uint32 GetShutDownTimeLeft () const
time_t const & GetStartTime () const
 When server started?
uint32 GetUpdateTime () const
 Update time.
uint32 GetUptime () const
 Uptime (in secs).
uint64 getWorldState (uint32 index) const
bool HasCharacterNameData (uint32 guid)
bool HasRecentlyDisconnected (WorldSession *)
void IncreasePlayerCount ()
 Increase/Decrease number of players.
bool IsClosed () const
 Deny clients?
bool IsFFAPvPRealm () const
bool IsPvPRealm () const
 Are we on a "Player versus Player" server?
bool IsShuttingDown () const
 Are we in the middle of a shutdown?
void KickAll ()
 Kick (and save) all players.
void KickAllLess (AccountTypes sec)
 Kick (and save) all players with security level less sec.
void LoadAutobroadcasts ()
void LoadConfigSettings (bool reload=false)
 Initialize config values.
void LoadDBAllowedSecurityLevel ()
void LoadDBVersion ()
void LoadWorldStates ()
void ProcessCliCommands ()
void ProcessStartEvent ()
void ProcessStopEvent ()
void QueueCliCommand (CliCommandHolder *commandHolder)
void RecordTimeDiff (const char *text,...)
void ReloadRBAC ()
bool RemoveBanAccount (BanMode mode, std::string const &nameOrIP)
 Remove a ban from an account or IP address.
bool RemoveBanCharacter (std::string const &name)
 Remove a ban from a character.
bool RemoveQueuedPlayer (WorldSession *session)
bool RemoveSession (uint32 id)
 Remove a given session.
void ResetEventSeasonalQuests (uint16 event_id)
void SendAutoBroadcast ()
void SendGlobalGMMessage (WorldPacket *packet, WorldSession *self=0, uint32 team=0)
 Send a packet to all GMs (except self if mentioned).
void SendGlobalMessage (WorldPacket *packet, WorldSession *self=0, uint32 team=0)
 Send a packet to all players (except self if mentioned).
void SendGlobalText (const char *text, WorldSession *self)
 DEPRECATED, only for debug purpose. Send a System Message to all players (except self if mentioned).
void SendGMText (int32 string_id,...)
 Send a System Message to all GMs (except self if mentioned).
void SendServerMessage (ServerMessageType type, const char *text="", Player *player=NULL)
 Send a server message to the user(s).
void SendWorldText (int32 string_id,...)
 Send a System Message to all players (except self if mentioned).
void SendZoneMessage (uint32 zone, WorldPacket *packet, WorldSession *self=0, uint32 team=0)
 Send a packet to all players (or players selected team) in the zone (except self if mentioned).
void SendZoneText (uint32 zone, const char *text, WorldSession *self=0, uint32 team=0)
 Send a System Message to all players in the zone (except self if mentioned).
void SetAllowMovement (bool allow)
 Allow/Disallow object movements.
void SetBoolConfig (WorldBoolConfigs index, bool value)
 Set a server configuration element (see #WorldConfigs).
void SetCleaningFlags (uint32 flags)
void SetClosed (bool val)
 Close world.
void SetFloatConfig (WorldFloatConfigs index, float value)
 Set a server configuration element (see #WorldConfigs).
void SetInitialWorldSettings ()
 Initialize the World.
void setIntConfig (WorldIntConfigs index, uint32 value)
 Set a server configuration element (see #WorldConfigs).
void SetMotd (std::string const &motd)
 Set a new Message of the Day.
void SetNewCharString (std::string const &str)
 Set the string for new characters (first login).
void SetPlayerAmountLimit (uint32 limit)
 Active session server limit.
void SetPlayerSecurityLimit (AccountTypes sec)
void setRate (Rates rate, float value)
 Set a server rate (see Rates).
void SetRecordDiffInterval (int32 t)
void setWorldState (uint32 index, uint64 value)
void ShutdownCancel ()
 Cancel a planned server shutdown.
void ShutdownMsg (bool show=false, Player *player=NULL)
 Display a shutdown message to the user(s).
void ShutdownServ (uint32 time, uint32 options, uint8 exitcode)
 Shutdown the server.
void Update (uint32 diff)
 Update the World !
void UpdateAreaDependentAuras ()
void UpdateCharacterNameData (uint32 guid, std::string const &name, uint8 gender=GENDER_NONE, uint8 race=RACE_NONE, uint32 realm=-1)
void UpdateCharacterNameDataLevel (uint32 guid, uint8 level)
void UpdateMaxSessionCounters ()
 Get the number of current active sessions.
void UpdateRealmCharCount (uint32 accid)
void UpdateSessions (uint32 diff)
 World ()
 World constructor.
 ~World ()
 World destructor.

Static Public Member Functions

static uint8 GetExitCode ()
static float GetMaxVisibleDistanceInBGArenas ()
static float GetMaxVisibleDistanceInInstances ()
static float GetMaxVisibleDistanceOnContinents ()
static int32 GetVisibilityNotifyPeriodInBGArenas ()
static int32 GetVisibilityNotifyPeriodInInstances ()
static int32 GetVisibilityNotifyPeriodOnContinents ()
static bool IsStopped ()
static void StopNow (uint8 exitcode)

Public Attributes

bool isEventKillStart

Static Public Attributes

static std::atomic< uint32m_worldLoopCounter = 0

Protected Member Functions

void _UpdateGameTime ()
 Update the game time.
void _UpdateRealmCharCount (PreparedQueryResult resultCharCount)
void InitCurrencyResetTime ()
void InitDailyQuestResetTime ()
void InitGuildResetTime ()
void InitMonthlyQuestResetTime ()
void InitRandomBGResetTime ()
void InitWeeklyQuestResetTime ()
void ResetCurrencyWeekCap ()
void ResetDailyQuests ()
void ResetGuildCap ()
void ResetMonthlyQuests ()
void ResetRandomBG ()
void ResetWeeklyQuests ()

Private Types

typedef std::map< uint8, std::string > AutobroadcastsMap
typedef std::map< uint8, uint8AutobroadcastsWeightMap
typedef UNORDERED_MAP< uint32, time_t > DisconnectMap
typedef std::map< uint32, uint64WorldStatesMap

Private Member Functions

void AddSession_ (WorldSession *s)
void LoadCharacterNameData ()
 Loads several pieces of information on server startup with the low GUID There is no further database query necessary. These are a number of methods that work into the calling function.
void ProcessQueryCallbacks ()

Private Attributes

std::map< uint32, CharacterNameData_characterNameDataMap
Skyfire::LockedQueue< WorldSession *, Skyfire::MutexaddSessQueue
Skyfire::LockedQueue< CliCommandHolder *, Skyfire::MutexcliCmdQueue
AccountTypes m_allowedSecurityLevel
bool m_allowMovement
AutobroadcastsMap m_Autobroadcasts
AutobroadcastsWeightMap m_AutobroadcastsWeights
uint32 m_availableDbcLocaleMask
bool m_bool_configs [uint8(WorldBoolConfigs::BOOL_CONFIG_VALUE_COUNT)]
uint32 m_CleaningFlags
uint32 m_currentTime
std::string m_dataPath
std::string m_DBVersion
LocaleConstant m_defaultDbcLocale
DisconnectMap m_disconnects
float m_float_configs [uint8(WorldFloatConfigs::FLOAT_CONFIG_VALUE_COUNT)]
time_t m_gameTime
uint32 m_int_configs [uint8(WorldIntConfigs::INT_CONFIG_VALUE_COUNT)]
bool m_isClosed
uint32 m_maxActiveSessionCount
uint32 m_MaxPlayerCount
uint32 m_maxQueuedSessionCount
std::string m_motd
std::string m_newCharString
time_t m_NextCurrencyReset
time_t m_NextDailyQuestReset
time_t m_NextGuildReset
time_t m_NextMonthlyQuestReset
time_t m_NextRandomBGReset
time_t m_NextWeeklyQuestReset
uint32 m_PlayerCount
uint32 m_playerLimit
Queue m_QueuedPlayer
std::vector< PreparedQueryResultFuturem_realmCharCallbacks
SessionMap m_sessions
uint32 m_ShutdownMask
uint32 m_ShutdownTimer
time_t m_startTime
IntervalTimer m_timers [WUPDATE_COUNT]
uint32 m_updateTime
uint32 m_updateTimeCount
uint32 m_updateTimeSum
WorldStatesMap m_worldstates
time_t mail_timer
time_t mail_timer_expires
float rate_values [uint8(Rates::MAX_RATES)]

Static Private Attributes

static uint8 m_ExitCode = SHUTDOWN_EXIT_CODE
static float m_MaxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS
static float m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE
static float m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE
static std::atomic< bool > m_stopEvent = false
static int32 m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD
static int32 m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD
static int32 m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD

Detailed Description

The World.

Definition at line 556 of file World.h.

Member Typedef Documentation

◆ AutobroadcastsMap

typedef std::map<uint8, std::string> World::AutobroadcastsMap
private

Definition at line 892 of file World.h.

◆ AutobroadcastsWeightMap

typedef std::map<uint8, uint8> World::AutobroadcastsWeightMap
private

Definition at line 895 of file World.h.

◆ DisconnectMap

typedef UNORDERED_MAP<uint32, time_t> World::DisconnectMap
private

Definition at line 839 of file World.h.

◆ Queue

typedef std::list<WorldSession*> World::Queue

Definition at line 606 of file World.h.

◆ WorldStatesMap

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

Definition at line 852 of file World.h.

Constructor & Destructor Documentation

◆ World()

◆ ~World()

World::~World ( )

World destructor.

  • Empty the kicked session set
Todo
free addSessQueue

Definition at line 125 of file World.cpp.

References MMAP::MMapFactory::clear(), VMAP::VMapFactory::clear(), cliCmdQueue, and m_sessions.

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

Definition at line 2694 of file World.cpp.

References GetActiveAndQueuedSessionCount(), IsStopped(), m_gameTime, m_ShutdownMask, m_ShutdownTimer, m_stopEvent, SHUTDOWN_MASK_IDLE, and ShutdownMsg().

Referenced by Update().

◆ _UpdateRealmCharCount()

◆ AddCharacterNameData()

void World::AddCharacterNameData ( uint32 guid,
std::string const & name,
uint8 gender,
uint8 race,
uint8 playerClass,
uint8 level,
uint32 realm )

◆ AddQueuedPlayer()

void World::AddQueuedPlayer ( WorldSession * sess)

◆ AddSession()

void World::AddSession ( WorldSession * s)

Definition at line 221 of file World.cpp.

References addSessQueue.

◆ AddSession_()

◆ BanAccount() [1/2]

BanReturn World::BanAccount ( BanMode mode,
std::string const & nameOrIP,
std::string const & duration,
std::string const & reason,
std::string const & author )

Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban.

Definition at line 2510 of file World.cpp.

References BanAccount(), and TimeStringToSecs().

Referenced by BanAccount().

◆ BanAccount() [2/2]

BanReturn World::BanAccount ( BanMode mode,
std::string const & nameOrIP,
uint32 duration_secs,
std::string const & reason,
std::string const & author )

Ban an account or ban an IP address, duration is in seconds if positive, otherwise permban.

  • Update the database with ban information
  • Disconnect all affected players (for IP it can be several)

Definition at line 2517 of file World.cpp.

References BAN_ACCOUNT, BAN_CHARACTER, BAN_IP, BAN_NOTFOUND, BAN_SUCCESS, BAN_SYNTAX_ERROR, CHAR_SEL_ACCOUNT_BY_NAME, CharacterDatabase, FindSession(), Field::GetUInt32(), LOGIN_INS_ACCOUNT_BANNED, LOGIN_INS_IP_BANNED, LOGIN_SEL_ACCOUNT_BY_IP, LOGIN_SEL_ACCOUNT_ID_BY_NAME, LOGIN_UPD_ACCOUNT_NOT_BANNED, LoginDatabase, PreparedStatement::setString(), and PreparedStatement::setUInt32().

◆ BanCharacter()

BanReturn World::BanCharacter ( std::string const & name,
std::string const & duration,
std::string const & reason,
std::string const & author )

Ban an account or ban an IP address, duration will be parsed using TimeStringToSecs if it is positive, otherwise permban.

Pick a player to ban if not online

Definition at line 2623 of file World.cpp.

References BAN_NOTFOUND, BAN_SUCCESS, CHAR_INS_CHARACTER_BAN, CHAR_SEL_GUID_BY_NAME, CHAR_UPD_CHARACTER_BAN, CharacterDatabase, Object::GetGUIDLow(), Player::GetSession(), WorldSession::KickPlayer(), PreparedStatement::setString(), PreparedStatement::setUInt32(), sObjectAccessor, and TimeStringToSecs().

◆ DecreasePlayerCount()

void World::DecreasePlayerCount ( )
inline

Definition at line 586 of file World.h.

References m_PlayerCount.

◆ DeleteCharacterNameData()

void World::DeleteCharacterNameData ( uint32 guid)
inline

Definition at line 793 of file World.h.

References _characterNameDataMap.

◆ FindPlayerInZone()

Player * World::FindPlayerInZone ( uint32 zone)

Find a player in a specified zone.

  • circle through active sessions and return the first player found in the zone

Definition at line 146 of file World.cpp.

References Unit::GetPlayer(), WorldObject::GetZoneId(), Object::IsInWorld(), and m_sessions.

◆ FindSession()

WorldSession * World::FindSession ( uint32 id) const

Find a session by its id.

Definition at line 194 of file World.cpp.

References m_sessions.

Referenced by BanAccount().

◆ ForceGameEventUpdate()

void World::ForceGameEventUpdate ( )

Definition at line 2310 of file World.cpp.

References m_timers, sGameEventMgr, and WUPDATE_EVENTS.

◆ GetActiveAndQueuedSessionCount()

uint32 World::GetActiveAndQueuedSessionCount ( ) const
inline

Definition at line 571 of file World.h.

References m_sessions.

Referenced by _UpdateGameTime(), AddSession_(), and ShutdownServ().

◆ GetActiveSessionCount()

uint32 World::GetActiveSessionCount ( ) const
inline

Definition at line 572 of file World.h.

References m_QueuedPlayer, and m_sessions.

Referenced by AddSession_(), RemoveQueuedPlayer(), and Update().

◆ getAllowMovement()

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

Definition at line 614 of file World.h.

References m_allowMovement.

◆ GetAllSessions()

const SessionMap & World::GetAllSessions ( ) const
inline

Definition at line 570 of file World.h.

References m_sessions.

◆ GetAvailableDbcLocale()

LocaleConstant World::GetAvailableDbcLocale ( LocaleConstant locale) const
inline

Definition at line 771 of file World.h.

References m_availableDbcLocaleMask, and m_defaultDbcLocale.

◆ GetBoolConfig()

bool World::GetBoolConfig ( WorldBoolConfigs index) const
inline

Get a server configuration element (see #WorldConfigs).

Definition at line 695 of file World.h.

References BOOL_CONFIG_VALUE_COUNT, and m_bool_configs.

Referenced by LoadConfigSettings(), and SetInitialWorldSettings().

◆ GetCharacterNameData()

CharacterNameData const * World::GetCharacterNameData ( uint32 guid) const

Definition at line 3427 of file World.cpp.

References _characterNameDataMap.

◆ GetCleaningFlags()

uint32 World::GetCleaningFlags ( ) const
inline

Definition at line 796 of file World.h.

References m_CleaningFlags.

◆ GetConfigMaxSkillValue()

uint16 World::GetConfigMaxSkillValue ( ) const
inline

Get the maximum skill level a player can reach.

Definition at line 649 of file World.h.

References CONFIG_MAX_PLAYER_LEVEL, and getIntConfig().

◆ GetDataPath()

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

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

Definition at line 631 of file World.h.

References m_dataPath.

◆ GetDBVersion()

char const * World::GetDBVersion ( ) const
inline

Definition at line 775 of file World.h.

References m_DBVersion.

◆ GetDefaultDbcLocale()

LocaleConstant World::GetDefaultDbcLocale ( ) const
inline

Definition at line 628 of file World.h.

References m_defaultDbcLocale.

Referenced by SetInitialWorldSettings().

◆ GetEventKill()

bool World::GetEventKill ( ) const
inline

Definition at line 785 of file World.h.

References isEventKillStart.

◆ GetExitCode()

uint8 World::GetExitCode ( )
inlinestatic

Definition at line 673 of file World.h.

References m_ExitCode.

Referenced by Master::Run().

◆ GetFloatConfig()

float World::GetFloatConfig ( WorldFloatConfigs index) const
inline

Get a server configuration element (see #WorldConfigs).

Definition at line 713 of file World.h.

References FLOAT_CONFIG_VALUE_COUNT, and m_float_configs.

◆ GetGameTime()

time_t const & World::GetGameTime ( ) const
inline

What time is it?

Definition at line 636 of file World.h.

References m_gameTime.

◆ getIntConfig()

◆ GetMaxActiveSessionCount()

uint32 World::GetMaxActiveSessionCount ( ) const
inline

Definition at line 576 of file World.h.

References m_maxActiveSessionCount.

◆ GetMaxPlayerCount()

uint32 World::GetMaxPlayerCount ( ) const
inline

Definition at line 579 of file World.h.

References m_MaxPlayerCount.

Referenced by Update().

◆ GetMaxQueuedSessionCount()

uint32 World::GetMaxQueuedSessionCount ( ) const
inline

Get the maximum number of parallel sessions on the server since last reboot.

Definition at line 575 of file World.h.

References m_maxQueuedSessionCount.

◆ GetMaxVisibleDistanceInBGArenas()

float World::GetMaxVisibleDistanceInBGArenas ( )
inlinestatic

Definition at line 758 of file World.h.

References m_MaxVisibleDistanceInBGArenas.

Referenced by BattlegroundMap::InitVisibilityDistance().

◆ GetMaxVisibleDistanceInInstances()

float World::GetMaxVisibleDistanceInInstances ( )
inlinestatic

Definition at line 757 of file World.h.

References m_MaxVisibleDistanceInInstances.

Referenced by InstanceMap::InitVisibilityDistance().

◆ GetMaxVisibleDistanceOnContinents()

float World::GetMaxVisibleDistanceOnContinents ( )
inlinestatic

Definition at line 756 of file World.h.

References m_MaxVisibleDistanceOnContinents.

Referenced by Map::InitVisibilityDistance().

◆ GetMotd()

const char * World::GetMotd ( ) const

Get the current Message of the Day.

Definition at line 188 of file World.cpp.

References m_motd.

◆ GetNewCharString()

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

Get the string for new characters (first login).

Definition at line 626 of file World.h.

References m_newCharString.

◆ GetNextDailyQuestsResetTime()

time_t World::GetNextDailyQuestsResetTime ( ) const
inline

Next daily quests and random bg reset time.

Definition at line 644 of file World.h.

References m_NextDailyQuestReset.

◆ GetNextRandomBGResetTime()

time_t World::GetNextRandomBGResetTime ( ) const
inline

Definition at line 646 of file World.h.

References m_NextRandomBGReset.

◆ GetNextWeeklyQuestsResetTime()

time_t World::GetNextWeeklyQuestsResetTime ( ) const
inline

Definition at line 645 of file World.h.

References m_NextWeeklyQuestReset.

◆ GetPlayerAmountLimit()

uint32 World::GetPlayerAmountLimit ( ) const
inline

Definition at line 603 of file World.h.

References m_playerLimit.

Referenced by AddSession_().

◆ GetPlayerCount()

uint32 World::GetPlayerCount ( ) const
inline

Get number of players.

Definition at line 578 of file World.h.

References m_PlayerCount.

◆ GetPlayerSecurityLimit()

AccountTypes World::GetPlayerSecurityLimit ( ) const
inline

Security level limitations.

Definition at line 597 of file World.h.

References m_allowedSecurityLevel.

◆ GetQueuedSessionCount()

uint32 World::GetQueuedSessionCount ( ) const
inline

Definition at line 573 of file World.h.

References m_QueuedPlayer.

Referenced by AddSession_().

◆ GetQueuePos()

int32 World::GetQueuePos ( WorldSession * sess)

Definition at line 321 of file World.cpp.

References m_QueuedPlayer.

Referenced by AddQueuedPlayer().

◆ getRate()

float World::getRate ( Rates rate) const
inline

Get a server rate (see Rates).

Definition at line 683 of file World.h.

References rate_values.

Referenced by LoadConfigSettings().

◆ GetShutDownTimeLeft()

uint32 World::GetShutDownTimeLeft ( ) const
inline

Definition at line 669 of file World.h.

References m_ShutdownTimer.

◆ GetStartTime()

time_t const & World::GetStartTime ( ) const
inline

When server started?

Definition at line 634 of file World.h.

References m_startTime.

◆ GetUpdateTime()

uint32 World::GetUpdateTime ( ) const
inline

Update time.

Definition at line 640 of file World.h.

References m_updateTime.

◆ GetUptime()

uint32 World::GetUptime ( ) const
inline

Uptime (in secs).

Definition at line 638 of file World.h.

References m_gameTime, and m_startTime.

◆ GetVisibilityNotifyPeriodInBGArenas()

int32 World::GetVisibilityNotifyPeriodInBGArenas ( )
inlinestatic

Definition at line 762 of file World.h.

References m_visibility_notify_periodInBGArenas.

Referenced by BattlegroundMap::InitVisibilityDistance().

◆ GetVisibilityNotifyPeriodInInstances()

int32 World::GetVisibilityNotifyPeriodInInstances ( )
inlinestatic

Definition at line 761 of file World.h.

References m_visibility_notify_periodInInstances.

Referenced by InstanceMap::InitVisibilityDistance().

◆ GetVisibilityNotifyPeriodOnContinents()

int32 World::GetVisibilityNotifyPeriodOnContinents ( )
inlinestatic

Definition at line 760 of file World.h.

References m_visibility_notify_periodOnContinents.

Referenced by Map::InitVisibilityDistance().

◆ getWorldState()

uint64 World::getWorldState ( uint32 index) const

Definition at line 3323 of file World.cpp.

References m_worldstates.

Referenced by InitGuildResetTime(), and ResetGuildCap().

◆ HasCharacterNameData()

bool World::HasCharacterNameData ( uint32 guid)
inline

Definition at line 794 of file World.h.

References _characterNameDataMap.

◆ HasRecentlyDisconnected()

bool World::HasRecentlyDisconnected ( WorldSession * session)

◆ IncreasePlayerCount()

void World::IncreasePlayerCount ( )
inline

Increase/Decrease number of players.

Definition at line 581 of file World.h.

References m_MaxPlayerCount, and m_PlayerCount.

◆ InitCurrencyResetTime()

void World::InitCurrencyResetTime ( )
protected

◆ InitDailyQuestResetTime()

void World::InitDailyQuestResetTime ( )
protected

Definition at line 2954 of file World.cpp.

References CharacterDatabase, DAY, Skyfire::LocalTime(), and m_NextDailyQuestReset.

Referenced by SetInitialWorldSettings().

◆ InitGuildResetTime()

void World::InitGuildResetTime ( )
protected

◆ InitMonthlyQuestResetTime()

void World::InitMonthlyQuestResetTime ( )
protected

Definition at line 2989 of file World.cpp.

References m_NextMonthlyQuestReset, sWorld, and WS_MONTHLY_QUEST_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ InitRandomBGResetTime()

void World::InitRandomBGResetTime ( )
protected

◆ InitWeeklyQuestResetTime()

void World::InitWeeklyQuestResetTime ( )
protected

Definition at line 2947 of file World.cpp.

References m_NextWeeklyQuestReset, sWorld, and WS_WEEKLY_QUEST_RESET_TIME.

Referenced by SetInitialWorldSettings().

◆ IsClosed()

bool World::IsClosed ( ) const

Deny clients?

Definition at line 168 of file World.cpp.

References m_isClosed.

◆ IsFFAPvPRealm()

bool World::IsFFAPvPRealm ( ) const
inline

Definition at line 745 of file World.h.

References CONFIG_GAME_TYPE, getIntConfig(), and REALM_TYPE_FFA_PVP.

Referenced by SetInitialWorldSettings().

◆ IsPvPRealm()

bool World::IsPvPRealm ( ) const
inline

Are we on a "Player versus Player" server?

Definition at line 744 of file World.h.

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

◆ IsShuttingDown()

bool World::IsShuttingDown ( ) const
inline

Are we in the middle of a shutdown?

Definition at line 668 of file World.h.

References m_ShutdownTimer.

◆ IsStopped()

bool World::IsStopped ( )
inlinestatic

◆ KickAll()

void World::KickAll ( )

Kick (and save) all players.

Definition at line 2491 of file World.cpp.

References m_QueuedPlayer, and m_sessions.

◆ KickAllLess()

void World::KickAllLess ( AccountTypes sec)

Kick (and save) all players with security level less sec.

Definition at line 2501 of file World.cpp.

References m_sessions.

Referenced by SetPlayerSecurityLimit().

◆ LoadAutobroadcasts()

◆ LoadCharacterNameData()

void World::LoadCharacterNameData ( )
private

Loads several pieces of information on server startup with the low GUID There is no further database query necessary. These are a number of methods that work into the calling function.

Parameters
guidRequires a lowGUID to call
Returns
Name, Gender, Race, Class and Level of player character Example Usage:
CharacterNameData const* nameData = sWorld->GetCharacterNameData(lowGUID);
if (!nameData)
return;
std::string playerName = nameData->m_name;
uint8 playerGender = nameData->m_gender;
uint8 playerRace = nameData->m_race;
uint8 playerClass = nameData->m_class;
uint8 playerLevel = nameData->m_level;
std::uint8_t uint8
Definition Define.h:79
#define sWorld
Definition World.h:910
std::string m_name
Definition World.h:548

Definition at line 3367 of file World.cpp.

References AddCharacterNameData(), CharacterDatabase, and SF_LOG_INFO.

Referenced by SetInitialWorldSettings().

◆ LoadConfigSettings()

void World::LoadConfigSettings ( bool reload = false)

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 and GuarderSight (with meaning) in worldserver.conf or put them as define
  • Load the CharDelete related config options
  • Read the "Data" directory from the config file

Definition at line 402 of file World.cpp.

References BAN_ACCOUNT, BAN_CHARACTER, BAN_IP, baseMoveSpeed, BATTLE_PET_MAX_LEVEL, BATTLE_PET_MAX_LOADOUT_SLOTS, CONFIG_ACC_PASSCHANGESEC, CONFIG_ADDON_CHANNEL, CONFIG_ALL_TAXI_PATHS, CONFIG_ALLOW_GM_GROUP, CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL, CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP, CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD, CONFIG_ALLOW_TWO_SIDE_TRADE, CONFIG_ALWAYS_MAXSKILL, CONFIG_ARENA_LOG_EXTENDED_INFO, CONFIG_ARENA_MAX_RATING_DIFFERENCE, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY, CONFIG_ARENA_RATED_UPDATE_TIMER, CONFIG_ARENA_RATING_DISCARD_TIMER, CONFIG_ARENA_SEASON_ID, CONFIG_ARENA_SEASON_IN_PROGRESS, CONFIG_ARENA_START_MATCHMAKER_RATING, CONFIG_ARENA_START_PERSONAL_RATING, CONFIG_ARENA_START_RATING, CONFIG_AUCTION_LEVEL_REQ, CONFIG_AUTOBROADCAST, CONFIG_AUTOBROADCAST_CENTER, CONFIG_AUTOBROADCAST_INTERVAL, CONFIG_BATTLE_PET_INITIAL_LEVEL, CONFIG_BATTLE_PET_LOADOUT_UNLOCK_COUNT, CONFIG_BATTLE_PET_WILD_SPAWN_MIN_COUNT, CONFIG_BATTLEGROUND_CAST_DESERTER, CONFIG_BATTLEGROUND_INVITATION_TYPE, CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST, CONFIG_BG_REWARD_WINNER_CONQUEST_LAST, CONFIG_BG_REWARD_WINNER_HONOR_FIRST, CONFIG_BG_REWARD_WINNER_HONOR_LAST, CONFIG_BG_XP_FOR_KILL, CONFIG_BLACK_MARKET_AUCTION_DELAY, CONFIG_BLACK_MARKET_AUCTION_DELAY_MOD, CONFIG_BLACK_MARKET_MAX_AUCTIONS, CONFIG_BLACK_MARKET_OPEN, CONFIG_BOOST_NEW_ACCOUNT, CONFIG_BOOST_START_LEVEL, CONFIG_BOOST_START_MONEY, CONFIG_CAST_UNSTUCK, CONFIG_CHANCE_OF_GM_SURVEY, 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_HEROIC_MIN_LEVEL, CONFIG_CHARDELETE_KEEP_DAYS, CONFIG_CHARDELETE_METHOD, CONFIG_CHARDELETE_MIN_LEVEL, CONFIG_CHAT_CHANNEL_LEVEL_REQ, CONFIG_CHAT_FAKE_MESSAGE_PREVENTING, CONFIG_CHAT_GM_WHISPER_FILTER_BYPASS, CONFIG_CHAT_SAY_LEVEL_REQ, CONFIG_CHAT_STRICT_LINK_CHECKING_KICK, CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY, CONFIG_CHAT_WHISPER_LEVEL_REQ, CONFIG_CHATFLOOD_MESSAGE_COUNT, CONFIG_CHATFLOOD_MESSAGE_DELAY, CONFIG_CHATFLOOD_MUTE_TIME, CONFIG_CHATLOG_ADDON, CONFIG_CHATLOG_BGROUND, CONFIG_CHATLOG_CHANNEL, CONFIG_CHATLOG_GUILD, CONFIG_CHATLOG_PARTY, CONFIG_CHATLOG_PUBLIC, CONFIG_CHATLOG_RAID, CONFIG_CHATLOG_SYSCHAN, CONFIG_CHATLOG_WHISPER, CONFIG_CLEAN_CHARACTER_DB, CONFIG_CLIENTCACHE_VERSION, 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_RADIUS, CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_FLEE_DELAY, CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD, CONFIG_CURRENCY_MAX_HONOR_POINTS, CONFIG_CURRENCY_MAX_JUSTICE_POINTS, CONFIG_CURRENCY_RESET_DAY, CONFIG_CURRENCY_RESET_HOUR, CONFIG_CURRENCY_RESET_INTERVAL, CONFIG_CURRENCY_START_CONQUEST_POINTS, CONFIG_CURRENCY_START_HONOR_POINTS, CONFIG_CURRENCY_START_JUSTICE_POINTS, 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_DECLINED_NAMES_USED, CONFIG_DETECT_POS_COLLISION, CONFIG_DIE_COMMAND_MODE, CONFIG_DISABLE_BREATHING, CONFIG_DURABILITY_LOSS_IN_PVP, CONFIG_ENABLE_MMAPS, CONFIG_ENABLE_SINFO_LOGIN, CONFIG_EVENT_ANNOUNCE, CONFIG_EXPANSION, CONFIG_GAME_TYPE, CONFIG_GM_CHAT, 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_GRID_UNLOAD, CONFIG_GROUP_VISIBILITY, CONFIG_GROUP_XP_DISTANCE, CONFIG_GUILD_BANK_EVENT_LOG_COUNT, CONFIG_GUILD_DAILY_XP_CAP, CONFIG_GUILD_EVENT_LOG_COUNT, CONFIG_GUILD_LEVELING_ENABLED, CONFIG_GUILD_MAX_LEVEL, CONFIG_GUILD_NEWS_LOG_COUNT, CONFIG_GUILD_RESET_HOUR, CONFIG_GUILD_SAVE_INTERVAL, CONFIG_GUILD_UNDELETABLE_LEVEL, CONFIG_GUILD_WEEKLY_REP_CAP, CONFIG_HEROIC_CHARACTERS_PER_REALM, CONFIG_HONOR_AFTER_DUEL, CONFIG_INSTANCE_IGNORE_LEVEL, CONFIG_INSTANCE_IGNORE_RAID, CONFIG_INSTANCE_RESET_TIME_HOUR, CONFIG_INSTANCE_UNLOAD_DELAY, CONFIG_INSTANCES_RESET_ANNOUNCE, CONFIG_INSTANT_TAXI, CONFIG_INTERVAL_CHANGEWEATHER, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, CONFIG_INTERVAL_GRIDCLEAN, CONFIG_INTERVAL_LOG_UPDATE, CONFIG_INTERVAL_MAPUPDATE, CONFIG_INTERVAL_SAVE, CONFIG_LFG_OPTIONSMASK, CONFIG_LISTEN_RANGE_SAY, CONFIG_LISTEN_RANGE_TEXTEMOTE, CONFIG_LISTEN_RANGE_YELL, CONFIG_LOGDB_CLEARINTERVAL, CONFIG_LOGDB_CLEARTIME, CONFIG_LOOT_AOE_RADIUS, CONFIG_MAIL_DELIVERY_DELAY, CONFIG_MAIL_LEVEL_REQ, 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, CONFIG_MIN_CHARTER_NAME, CONFIG_MIN_DUALSPEC_LEVEL, CONFIG_MIN_LEVEL_STAT_SAVE, CONFIG_MIN_LOG_UPDATE, CONFIG_MIN_PET_NAME, CONFIG_MIN_PETITION_SIGNS, CONFIG_MIN_PLAYER_NAME, CONFIG_NO_RESET_TALENT_COST, CONFIG_NUMTHREADS, CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN, CONFIG_PACKET_SPOOF_BANDURATION, CONFIG_PACKET_SPOOF_BANMODE, CONFIG_PACKET_SPOOF_POLICY, CONFIG_PDUMP_NO_OVERWRITE, CONFIG_PDUMP_NO_PATHS, CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS, CONFIG_PORT_WORLD, 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_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_RANDOM_BG_RESET_HOUR, CONFIG_RBAC_FREE_PERMISSION_MODE, CONFIG_REALM_ZONE, CONFIG_RESTRICTED_LFG_CHANNEL, CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY, CONFIG_SESSION_ADD_DELAY, CONFIG_SHOW_KICK_IN_WORLD, CONFIG_SIGHT_GUARDER, CONFIG_SIGHT_MONSTER, 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_GATHERING, CONFIG_SKILL_MILLING, CONFIG_SKILL_PROSPECTING, CONFIG_SKIP_CINEMATICS, CONFIG_SOCKET_TIMEOUTTIME, CONFIG_START_ALL_EXPLORED, CONFIG_START_ALL_REP, CONFIG_START_ALL_SPELLS, CONFIG_START_GM_LEVEL, CONFIG_START_HEROIC_PLAYER_LEVEL, CONFIG_START_PETBAR_LEVEL, CONFIG_START_PLAYER_LEVEL, CONFIG_START_PLAYER_MONEY, CONFIG_STATS_LIMITS_BLOCK, CONFIG_STATS_LIMITS_CRIT, CONFIG_STATS_LIMITS_DODGE, CONFIG_STATS_LIMITS_ENABLE, CONFIG_STATS_LIMITS_PARRY, CONFIG_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_STRICT_CHARTER_NAMES, CONFIG_STRICT_PET_NAMES, CONFIG_STRICT_PLAYER_NAMES, CONFIG_TALENTS_INSPECTING, CONFIG_THREAT_RADIUS, CONFIG_TICKET_LEVEL_REQ, CONFIG_TICKETS_FEEDBACK_SYSTEM_ENABLED, CONFIG_TICKETS_GM_ENABLED, CONFIG_TRADE_LEVEL_REQ, CONFIG_UI_QUESTLEVELS_IN_DIALOGS, CONFIG_UPTIME_UPDATE, 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_MEM_CHECKS, CONFIG_WARDEN_NUM_OTHER_CHECKS, 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, CONTACT_DISTANCE, VMAP::VMapFactory::createOrGetVMapManager(), DEFAULT_MAX_LEVEL, DEFAULT_VISIBILITY_BGARENAS, DEFAULT_VISIBILITY_DISTANCE, DEFAULT_VISIBILITY_INSTANCE, DEFAULT_VISIBILITY_NOTIFY_PERIOD, GetBoolConfig(), getIntConfig(), getRate(), GUILD_BANKLOG_MAX_RECORDS, GUILD_EVENTLOG_MAX_RECORDS, GUILD_NEWSLOG_MAX_RECORDS, HOUR, IN_MILLISECONDS, LOCALE_enUS, localeNames, m_dataPath, m_defaultDbcLocale, m_MaxVisibleDistanceInBGArenas, m_MaxVisibleDistanceInInstances, m_MaxVisibleDistanceOnContinents, m_timers, m_visibility_notify_periodInBGArenas, m_visibility_notify_periodInInstances, m_visibility_notify_periodOnContinents, MAX_CHARTER_NAME, MAX_LEVEL, MAX_MONEY_AMOUNT, MAX_MOVE_TYPE, MAX_PET_NAME, MAX_PLAYER_NAME, MAX_VISIBILITY_DISTANCE, MIN_GRID_DELAY, MIN_MAP_UPDATE_DELAY, MINUTE, NOMINAL_MELEE_RANGE, playerBaseMoveSpeed, WorldSession::DosProtection::POLICY_KICK, RATE_AUCTION_CUT, RATE_AUCTION_DEPOSIT, RATE_AUCTION_TIME, 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_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_MOVESPEED, RATE_POWER_CHI, RATE_POWER_DEMONICFURY_LOSS, 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_LFG_BONUS, RATE_REPUTATION_LOWLEVEL_KILL, RATE_REPUTATION_LOWLEVEL_QUEST, RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS, RATE_REST_INGAME, RATE_REST_OFFLINE_IN_TAVERN_OR_CITY, RATE_REST_OFFLINE_IN_WILDERNESS, RATE_SKILL_DISCOVERY, RATE_TARGET_POS_RECALCULATION_RANGE, RATE_XP_EXPLORE, RATE_XP_GUILD_MODIFIER, RATE_XP_KILL, RATE_XP_QUEST, REALM_ZONE_DEVELOPMENT, REALM_ZONE_RUSSIAN, sConfigMgr, SEC_ADMINISTRATOR, SEC_CONSOLE, SetBoolConfig(), VMAP::IVMapManager::setEnableHeightCalc(), VMAP::IVMapManager::setEnableLineOfSightCalc(), SetFloatConfig(), setIntConfig(), SetMotd(), SetNewCharString(), SetPlayerAmountLimit(), setRate(), SF_LOG_ERROR, SF_LOG_INFO, SF_LOG_WARN, sLog, sMapMgr, sScriptMgr, sTicketMgr, sWorld, TOTAL_LOCALES, UI64FMTD, WUPDATE_AUTOBROADCAST, WUPDATE_CLEANDB, and WUPDATE_UPTIME.

Referenced by SetInitialWorldSettings().

◆ LoadDBAllowedSecurityLevel()

void World::LoadDBAllowedSecurityLevel ( )

◆ LoadDBVersion()

void World::LoadDBVersion ( )

◆ LoadWorldStates()

void World::LoadWorldStates ( )

◆ ProcessCliCommands()

◆ ProcessQueryCallbacks()

void World::ProcessQueryCallbacks ( )
private

Definition at line 3329 of file World.cpp.

References _UpdateRealmCharCount(), and m_realmCharCallbacks.

Referenced by Update().

◆ ProcessStartEvent()

void World::ProcessStartEvent ( )

Definition at line 3252 of file World.cpp.

References isEventKillStart.

◆ ProcessStopEvent()

void World::ProcessStopEvent ( )

Definition at line 3257 of file World.cpp.

References isEventKillStart.

◆ QueueCliCommand()

void World::QueueCliCommand ( CliCommandHolder * commandHolder)
inline

Definition at line 765 of file World.h.

References cliCmdQueue.

◆ RecordTimeDiff()

void World::RecordTimeDiff ( const char * text,
... )

◆ ReloadRBAC()

void World::ReloadRBAC ( )

Definition at line 3436 of file World.cpp.

References m_sessions, and SF_LOG_INFO.

◆ RemoveBanAccount()

bool World::RemoveBanAccount ( BanMode mode,
std::string const & nameOrIP )

◆ RemoveBanCharacter()

bool World::RemoveBanCharacter ( std::string const & name)

Remove a ban from a character.

Pick a player to ban if not online

Definition at line 2664 of file World.cpp.

References CHAR_SEL_GUID_BY_NAME, CHAR_UPD_CHARACTER_BAN, CharacterDatabase, Object::GetGUIDLow(), PreparedStatement::setString(), PreparedStatement::setUInt32(), and sObjectAccessor.

◆ RemoveQueuedPlayer()

◆ RemoveSession()

bool World::RemoveSession ( uint32 id)

Remove a given session.

  • Find the session, kick the user, but we can't delete session at this moment to prevent iterator invalidation

Definition at line 205 of file World.cpp.

References m_sessions.

Referenced by AddSession_().

◆ ResetCurrencyWeekCap()

void World::ResetCurrencyWeekCap ( )
protected

◆ ResetDailyQuests()

void World::ResetDailyQuests ( )
protected

Definition at line 3081 of file World.cpp.

References CHAR_DEL_QUEST_STATUS_DAILY, CharacterDatabase, m_sessions, SF_LOG_INFO, and sPoolMgr.

Referenced by Update().

◆ ResetEventSeasonalQuests()

void World::ResetEventSeasonalQuests ( uint16 event_id)

◆ ResetGuildCap()

void World::ResetGuildCap ( )
protected

◆ ResetMonthlyQuests()

void World::ResetMonthlyQuests ( )
protected

◆ ResetRandomBG()

void World::ResetRandomBG ( )
protected

◆ ResetWeeklyQuests()

void World::ResetWeeklyQuests ( )
protected

◆ SendAutoBroadcast()

◆ SendGlobalGMMessage()

void World::SendGlobalGMMessage ( WorldPacket * packet,
WorldSession * self = 0,
uint32 team = 0 )

◆ SendGlobalMessage()

void World::SendGlobalMessage ( WorldPacket * packet,
WorldSession * self = 0,
uint32 team = 0 )

Send a packet to all players (except self if mentioned).

Definition at line 2319 of file World.cpp.

References m_sessions.

Referenced by SendGlobalText(), and SendServerMessage().

◆ SendGlobalText()

void World::SendGlobalText ( const char * text,
WorldSession * self )

DEPRECATED, only for debug purpose. Send a System Message to all players (except self if mentioned).

Definition at line 2447 of file World.cpp.

References ChatHandler::BuildChatPacket(), CHAT_MSG_SYSTEM, LANG_UNIVERSAL, ChatHandler::LineFromMessage(), and SendGlobalMessage().

◆ SendGMText()

void World::SendGMText ( int32 string_id,
... )

Send a System Message to all GMs (except self if mentioned).

Definition at line 2421 of file World.cpp.

References WorldSession::GetPlayer(), WorldSession::HasPermission(), Object::IsInWorld(), m_sessions, and rbac::RBAC_PERM_RECEIVE_GLOBAL_GM_TEXTMESSAGE.

◆ SendServerMessage()

void World::SendServerMessage ( ServerMessageType type,
const char * text = "",
Player * player = NULL )

Send a server message to the user(s).

Definition at line 2794 of file World.cpp.

References Player::GetSession(), SendGlobalMessage(), WorldSession::SendPacket(), SERVER_MSG_STRING, and SMSG_SERVER_MESSAGE.

Referenced by ShutdownCancel(), and ShutdownMsg().

◆ SendWorldText()

void World::SendWorldText ( int32 string_id,
... )

Send a System Message to all players (except self if mentioned).

Definition at line 2402 of file World.cpp.

References m_sessions.

◆ SendZoneMessage()

void World::SendZoneMessage ( uint32 zone,
WorldPacket * packet,
WorldSession * self = 0,
uint32 team = 0 )

Send a packet to all players (or players selected team) in the zone (except self if mentioned).

Definition at line 2465 of file World.cpp.

References m_sessions.

Referenced by SendZoneText().

◆ SendZoneText()

void World::SendZoneText ( uint32 zone,
const char * text,
WorldSession * self = 0,
uint32 team = 0 )

Send a System Message to all players in the zone (except self if mentioned).

Definition at line 2483 of file World.cpp.

References ChatHandler::BuildChatPacket(), CHAT_MSG_SYSTEM, LANG_UNIVERSAL, and SendZoneMessage().

◆ SetAllowMovement()

void World::SetAllowMovement ( bool allow)
inline

Allow/Disallow object movements.

Definition at line 616 of file World.h.

References m_allowMovement.

◆ SetBoolConfig()

void World::SetBoolConfig ( WorldBoolConfigs index,
bool value )
inline

Set a server configuration element (see #WorldConfigs).

Definition at line 686 of file World.h.

References BOOL_CONFIG_VALUE_COUNT, and m_bool_configs.

Referenced by LoadConfigSettings().

◆ SetCleaningFlags()

void World::SetCleaningFlags ( uint32 flags)
inline

Definition at line 797 of file World.h.

References m_CleaningFlags.

◆ SetClosed()

void World::SetClosed ( bool val)

Close world.

Definition at line 173 of file World.cpp.

References m_isClosed, and sScriptMgr.

◆ SetFloatConfig()

void World::SetFloatConfig ( WorldFloatConfigs index,
float value )
inline

Set a server configuration element (see #WorldConfigs).

Definition at line 704 of file World.h.

References FLOAT_CONFIG_VALUE_COUNT, and m_float_configs.

Referenced by LoadConfigSettings().

◆ SetInitialWorldSettings()

void World::SetInitialWorldSettings ( )

Initialize the World.

  • Server startup begin
  • Initialize the random number generator
  • Initialize detour memory management
  • 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 races' startup 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
  • Remove the bones (they should not exist in DB though) and old corpses after a restart
  • Load the DBC files
  • Load dynamic data tables from the database
  • Handle outdated emails (delete/return)
  • Load and initialize scripts
  • Initialize game time and timers
Todo
Get rid of magic numbers
  • Initilize static helper structures
  • Initialize Battlegrounds
  • Initialize outdoor pvp

Definition at line 1370 of file World.cpp.

References CHAR_DEL_OLD_CORPSES, CharacterDatabase, DisableMgr::CheckQuestDisables(), CharacterDatabaseCleaner::CleanDatabase(), Channel::CleanOldChannelsInDB(), clientOpcodeTable, CONFIG_AUTOBROADCAST_INTERVAL, CONFIG_DB_PING_INTERVAL, CONFIG_EXPANSION, CONFIG_GAME_TYPE, CONFIG_GUILD_SAVE_INTERVAL, CONFIG_LOGDB_CLEARINTERVAL, CONFIG_REALM_ZONE, CONFIG_UPTIME_UPDATE, DAY, Player::DeleteOldCharacters(), dtCustomAlloc(), dtCustomFree(), MapManager::ExistMapAndVMap(), GetBoolConfig(), GetDefaultDbcLocale(), getIntConfig(), getMSTime(), GetMSTimeDiffToNow(), HOUR, IN_MILLISECONDS, InitCurrencyResetTime(), InitDailyQuestResetTime(), InitGuildResetTime(), AIRegistry::Initialize(), InitMonthlyQuestResetTime(), InitRandomBGResetTime(), InitWeeklyQuestResetTime(), IsFFAPvPRealm(), LoadAutobroadcasts(), LoadCharacterNameData(), LoadConfigSettings(), LoadDB2Stores(), LoadDBAllowedSecurityLevel(), LoadDBCStores(), DisableMgr::LoadDisables(), AddonMgr::LoadFromDB(), LoadGameObjectModelList(), LegacyTransport::LoadLegacyTransportEntries(), LoadLootTables(), LoadRandomEnchantmentsTable(), LoadSkillDiscoveryTable(), LoadSkillExtraItemTable(), WeatherMgr::LoadWeatherData(), LoadWorldStates(), Skyfire::LocalTime(), LoginDatabase, m_dataPath, m_gameTime, m_startTime, m_timers, mail_timer, mail_timer_expires, MINUTE, REALM_TYPE_PVP, realmNameStore, sAccountMgr, sAchievementMgr, sAuctionMgr, sBattlefieldMgr, sBattlegroundMgr, sBattlePetSpawnMgr, sBlackMarketMgr, sCalendarMgr, sCinematicSequenceMgr, sConditionMgr, sConfigMgr, sCreatureTextMgr, serverOpcodeTable, PreparedStatement::setUInt32(), SF_LOG_ERROR, SF_LOG_INFO, sFormationMgr, sGameEventMgr, sGroupMgr, sGuildFinderMgr, sGuildMgr, sInstanceSaveMgr, sLFGMgr, sLog, sMapMgr, sObjectMgr, sOutdoorPvPMgr, sPoolMgr, sScriptMgr, sSmartScriptMgr, sSmartWaypointMgr, sSpellMgr, StartEluna(), sTicketMgr, sTransportMgr, sWardenCheckMgr, sWaypointMgr, UI64FMTD, WUPDATE_AUCTIONS, WUPDATE_AUTOBROADCAST, WUPDATE_BLACK_MARKET, WUPDATE_CLEANDB, WUPDATE_CORPSES, WUPDATE_DELETECHARS, WUPDATE_EVENTS, WUPDATE_GUILDSAVE, WUPDATE_PINGDB, WUPDATE_UPTIME, and WUPDATE_WEATHERS.

◆ setIntConfig()

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

Set a server configuration element (see #WorldConfigs).

Definition at line 722 of file World.h.

References INT_CONFIG_VALUE_COUNT, and m_int_configs.

Referenced by LoadConfigSettings(), LoadDBVersion(), and SetRecordDiffInterval().

◆ SetMotd()

void World::SetMotd ( std::string const & motd)

Set a new Message of the Day.

Definition at line 181 of file World.cpp.

References m_motd, and sScriptMgr.

Referenced by LoadConfigSettings().

◆ SetNewCharString()

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

Set the string for new characters (first login).

Definition at line 624 of file World.h.

References m_newCharString.

Referenced by LoadConfigSettings().

◆ SetPlayerAmountLimit()

void World::SetPlayerAmountLimit ( uint32 limit)
inline

Active session server limit.

Definition at line 602 of file World.h.

References m_playerLimit.

Referenced by LoadConfigSettings().

◆ SetPlayerSecurityLimit()

void World::SetPlayerSecurityLimit ( AccountTypes sec)

Definition at line 3121 of file World.cpp.

References KickAllLess(), m_allowedSecurityLevel, SEC_CONSOLE, and SEC_PLAYER.

Referenced by LoadDBAllowedSecurityLevel().

◆ setRate()

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

Set a server rate (see Rates).

Definition at line 681 of file World.h.

References rate_values.

Referenced by LoadConfigSettings().

◆ SetRecordDiffInterval()

void World::SetRecordDiffInterval ( int32 t)
inline

Definition at line 641 of file World.h.

References CONFIG_INTERVAL_LOG_UPDATE, and setIntConfig().

◆ setWorldState()

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

◆ ShutdownCancel()

◆ ShutdownMsg()

void World::ShutdownMsg ( bool show = false,
Player * player = NULL )

Display a shutdown message to the user(s).

  • Display a message every 12 hours, hours, 5 minutes, minute, 5 seconds and finally seconds

Definition at line 2751 of file World.cpp.

References HOUR, m_ShutdownMask, m_ShutdownTimer, MINUTE, secsToTimeString(), SendServerMessage(), SERVER_MSG_RESTART_TIME, SERVER_MSG_SHUTDOWN_TIME, SF_LOG_DEBUG, SHUTDOWN_MASK_IDLE, and SHUTDOWN_MASK_RESTART.

Referenced by _UpdateGameTime(), and ShutdownServ().

◆ ShutdownServ()

void World::ShutdownServ ( uint32 time,
uint32 options,
uint8 exitcode )

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

Definition at line 2723 of file World.cpp.

References GetActiveAndQueuedSessionCount(), IsStopped(), m_ExitCode, m_ShutdownMask, m_ShutdownTimer, m_stopEvent, SHUTDOWN_MASK_IDLE, ShutdownMsg(), and sScriptMgr.

◆ StopNow()

◆ Update()

void World::Update ( uint32 diff)

Update the World !

  • Update the different timers
  • Update the game time and check for shutdown time

Handle daily quests reset time

Handle weekly quests reset time

Handle monthly quests reset time

  • Handle auctions when the timer has passed

    • Update mails (return old mails with item, or delete them)
    • Handle expired Blackmarket auctions
    • Handle auctions when the timer has passed

      • Update mails (return old mails with item, or delete them)
      • Handle expired auctions

    • Handle session updates when the timer has passed

    • Handle weather updates when the timer has passed

    • Update uptime table

    • Clean logs table

    • Handle all other objects

      • Update objects when the timer has passed (maps, transport, creatures, ...)
      • Delete all characters which have been deleted X days before
      • Erase corpses once every 20 minutes
      • Process Game events when necessary
      • Ping to keep MySQL connections alive

Definition at line 2090 of file World.cpp.

References _UpdateGameTime(), CharacterDatabase, CONFIG_AUTOBROADCAST, CONFIG_INTERVAL_LOG_UPDATE, CONFIG_LOGDB_CLEARTIME, CONFIG_MIN_LOG_UPDATE, DAY, Player::DeleteOldCharacters(), GetActiveSessionCount(), getIntConfig(), GetMaxPlayerCount(), Skyfire::Diagnostics::GetRuntimeMetrics(), LOGIN_DEL_OLD_LOGS, LOGIN_UPD_UPTIME_PLAYERS, LoginDatabase, m_gameTime, m_NextCurrencyReset, m_NextDailyQuestReset, m_NextGuildReset, m_NextMonthlyQuestReset, m_NextRandomBGReset, m_NextWeeklyQuestReset, m_startTime, m_timers, m_updateTime, m_updateTimeCount, m_updateTimeSum, mail_timer, mail_timer_expires, ProcessCliCommands(), ProcessQueryCallbacks(), realmNameStore, RecordTimeDiff(), Skyfire::Diagnostics::RuntimeMetrics::RecordWorldUpdate(), ResetCurrencyWeekCap(), ResetDailyQuests(), ResetGuildCap(), ResetMonthlyQuests(), ResetRandomBG(), ResetWeeklyQuests(), sAuctionMgr, sBattlefieldMgr, sBattlegroundMgr, sBattlePetSpawnMgr, sBlackMarketMgr, SendAutoBroadcast(), PreparedStatement::setUInt16(), PreparedStatement::setUInt32(), SF_LOG_DEBUG, sGameEventMgr, sGuildMgr, sInstanceSaveMgr, sLFGMgr, sMapMgr, sObjectAccessor, sObjectMgr, sOutdoorPvPMgr, sScriptMgr, sWorld, WeatherMgr::Update(), UpdateSessions(), WorldDatabase, WUPDATE_AUCTIONS, WUPDATE_AUTOBROADCAST, WUPDATE_BLACK_MARKET, WUPDATE_CLEANDB, WUPDATE_CORPSES, WUPDATE_COUNT, WUPDATE_DELETECHARS, WUPDATE_EVENTS, WUPDATE_GUILDSAVE, WUPDATE_PINGDB, WUPDATE_UPTIME, and WUPDATE_WEATHERS.

◆ UpdateAreaDependentAuras()

void World::UpdateAreaDependentAuras ( )

Definition at line 3262 of file World.cpp.

References m_sessions.

◆ UpdateCharacterNameData()

void World::UpdateCharacterNameData ( uint32 guid,
std::string const & name,
uint8 gender = GENDER_NONE,
uint8 race = RACE_NONE,
uint32 realm = -1 )

Definition at line 3402 of file World.cpp.

References _characterNameDataMap, GENDER_NONE, and RACE_NONE.

◆ UpdateCharacterNameDataLevel()

void World::UpdateCharacterNameDataLevel ( uint32 guid,
uint8 level )

Definition at line 3418 of file World.cpp.

References _characterNameDataMap.

◆ UpdateMaxSessionCounters()

void World::UpdateMaxSessionCounters ( )

Get the number of current active sessions.

Definition at line 3230 of file World.cpp.

References m_maxActiveSessionCount, m_maxQueuedSessionCount, m_QueuedPlayer, and m_sessions.

Referenced by AddSession_().

◆ UpdateRealmCharCount()

void World::UpdateRealmCharCount ( uint32 accid)

◆ UpdateSessions()

void World::UpdateSessions ( uint32 diff)
  • Add new sessions
  • Then send an update signal to remaining ones
  • and remove not active sessions from the list

Definition at line 2807 of file World.cpp.

References AddSession_(), addSessQueue, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, getIntConfig(), m_disconnects, m_sessions, RemoveQueuedPlayer(), and WorldSession::Update().

Referenced by Update().

Member Data Documentation

◆ _characterNameDataMap

◆ addSessQueue

Skyfire::LockedQueue<WorldSession*, Skyfire::Mutex> World::addSessQueue
private

Definition at line 887 of file World.h.

Referenced by AddSession(), and UpdateSessions().

◆ cliCmdQueue

Skyfire::LockedQueue<CliCommandHolder*, Skyfire::Mutex> World::cliCmdQueue
private

Definition at line 872 of file World.h.

Referenced by ProcessCliCommands(), QueueCliCommand(), and ~World().

◆ isEventKillStart

bool World::isEventKillStart

Definition at line 787 of file World.h.

Referenced by GetEventKill(), ProcessStartEvent(), and ProcessStopEvent().

◆ m_allowedSecurityLevel

AccountTypes World::m_allowedSecurityLevel
private

Definition at line 855 of file World.h.

Referenced by GetPlayerSecurityLimit(), SetPlayerSecurityLimit(), and World().

◆ m_allowMovement

bool World::m_allowMovement
private

Definition at line 858 of file World.h.

Referenced by getAllowMovement(), SetAllowMovement(), and World().

◆ m_Autobroadcasts

AutobroadcastsMap World::m_Autobroadcasts
private

Definition at line 893 of file World.h.

Referenced by LoadAutobroadcasts(), and SendAutoBroadcast().

◆ m_AutobroadcastsWeights

AutobroadcastsWeightMap World::m_AutobroadcastsWeights
private

Definition at line 896 of file World.h.

Referenced by LoadAutobroadcasts(), and SendAutoBroadcast().

◆ m_availableDbcLocaleMask

uint32 World::m_availableDbcLocaleMask
private

Definition at line 857 of file World.h.

Referenced by GetAvailableDbcLocale(), and World().

◆ m_bool_configs

bool World::m_bool_configs[uint8(WorldBoolConfigs::BOOL_CONFIG_VALUE_COUNT)]
private

Definition at line 850 of file World.h.

Referenced by GetBoolConfig(), and SetBoolConfig().

◆ m_CleaningFlags

uint32 World::m_CleaningFlags
private

Definition at line 825 of file World.h.

Referenced by GetCleaningFlags(), SetCleaningFlags(), and World().

◆ m_currentTime

uint32 World::m_currentTime
private

Definition at line 836 of file World.h.

Referenced by RecordTimeDiff().

◆ m_dataPath

std::string World::m_dataPath
private

Definition at line 860 of file World.h.

Referenced by GetDataPath(), LoadConfigSettings(), and SetInitialWorldSettings().

◆ m_DBVersion

std::string World::m_DBVersion
private

Definition at line 890 of file World.h.

Referenced by GetDBVersion(), and LoadDBVersion().

◆ m_defaultDbcLocale

LocaleConstant World::m_defaultDbcLocale
private

Definition at line 856 of file World.h.

Referenced by GetAvailableDbcLocale(), GetDefaultDbcLocale(), LoadConfigSettings(), and World().

◆ m_disconnects

DisconnectMap World::m_disconnects
private

Definition at line 840 of file World.h.

Referenced by HasRecentlyDisconnected(), and UpdateSessions().

◆ m_ExitCode

uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE
staticprivate

Definition at line 821 of file World.h.

Referenced by GetExitCode(), ShutdownCancel(), ShutdownServ(), and StopNow().

◆ m_float_configs

float World::m_float_configs[uint8(WorldFloatConfigs::FLOAT_CONFIG_VALUE_COUNT)]
private

Definition at line 851 of file World.h.

Referenced by GetFloatConfig(), and SetFloatConfig().

◆ m_gameTime

time_t World::m_gameTime
private

Definition at line 830 of file World.h.

Referenced by _UpdateGameTime(), GetGameTime(), GetUptime(), SetInitialWorldSettings(), Update(), and World().

◆ m_int_configs

uint32 World::m_int_configs[uint8(WorldIntConfigs::INT_CONFIG_VALUE_COUNT)]
private

Definition at line 849 of file World.h.

Referenced by getIntConfig(), and setIntConfig().

◆ m_isClosed

bool World::m_isClosed
private

Definition at line 827 of file World.h.

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

◆ m_maxActiveSessionCount

uint32 World::m_maxActiveSessionCount
private

Definition at line 841 of file World.h.

Referenced by GetMaxActiveSessionCount(), UpdateMaxSessionCounters(), and World().

◆ m_MaxPlayerCount

uint32 World::m_MaxPlayerCount
private

Definition at line 844 of file World.h.

Referenced by GetMaxPlayerCount(), IncreasePlayerCount(), and World().

◆ m_maxQueuedSessionCount

uint32 World::m_maxQueuedSessionCount
private

Definition at line 842 of file World.h.

Referenced by GetMaxQueuedSessionCount(), UpdateMaxSessionCounters(), and World().

◆ m_MaxVisibleDistanceInBGArenas

float World::m_MaxVisibleDistanceInBGArenas = DEFAULT_VISIBILITY_BGARENAS
staticprivate

Definition at line 865 of file World.h.

Referenced by GetMaxVisibleDistanceInBGArenas(), and LoadConfigSettings().

◆ m_MaxVisibleDistanceInInstances

float World::m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE
staticprivate

Definition at line 864 of file World.h.

Referenced by GetMaxVisibleDistanceInInstances(), and LoadConfigSettings().

◆ m_MaxVisibleDistanceOnContinents

float World::m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE
staticprivate

Definition at line 863 of file World.h.

Referenced by GetMaxVisibleDistanceOnContinents(), and LoadConfigSettings().

◆ m_motd

std::string World::m_motd
private

Definition at line 859 of file World.h.

Referenced by GetMotd(), and SetMotd().

◆ m_newCharString

std::string World::m_newCharString
private

Definition at line 846 of file World.h.

Referenced by GetNewCharString(), and SetNewCharString().

◆ m_NextCurrencyReset

time_t World::m_NextCurrencyReset
private

Definition at line 880 of file World.h.

Referenced by InitCurrencyResetTime(), ResetCurrencyWeekCap(), Update(), and World().

◆ m_NextDailyQuestReset

time_t World::m_NextDailyQuestReset
private

Definition at line 875 of file World.h.

Referenced by GetNextDailyQuestsResetTime(), InitDailyQuestResetTime(), Update(), and World().

◆ m_NextGuildReset

time_t World::m_NextGuildReset
private

Definition at line 879 of file World.h.

Referenced by InitGuildResetTime(), ResetGuildCap(), and Update().

◆ m_NextMonthlyQuestReset

time_t World::m_NextMonthlyQuestReset
private

Definition at line 877 of file World.h.

Referenced by InitMonthlyQuestResetTime(), ResetMonthlyQuests(), and Update().

◆ m_NextRandomBGReset

time_t World::m_NextRandomBGReset
private

Definition at line 878 of file World.h.

Referenced by GetNextRandomBGResetTime(), InitRandomBGResetTime(), ResetRandomBG(), and Update().

◆ m_NextWeeklyQuestReset

time_t World::m_NextWeeklyQuestReset
private

◆ m_PlayerCount

uint32 World::m_PlayerCount
private

Definition at line 843 of file World.h.

Referenced by DecreasePlayerCount(), GetPlayerCount(), IncreasePlayerCount(), and World().

◆ m_playerLimit

uint32 World::m_playerLimit
private

Definition at line 854 of file World.h.

Referenced by GetPlayerAmountLimit(), RemoveQueuedPlayer(), SetPlayerAmountLimit(), and World().

◆ m_QueuedPlayer

◆ m_realmCharCallbacks

std::vector<PreparedQueryResultFuture> World::m_realmCharCallbacks
private

Definition at line 902 of file World.h.

Referenced by ProcessQueryCallbacks(), and UpdateRealmCharCount().

◆ m_sessions

◆ m_ShutdownMask

uint32 World::m_ShutdownMask
private

Definition at line 823 of file World.h.

Referenced by _UpdateGameTime(), ShutdownCancel(), ShutdownMsg(), ShutdownServ(), and World().

◆ m_ShutdownTimer

uint32 World::m_ShutdownTimer
private

◆ m_startTime

time_t World::m_startTime
private

Definition at line 829 of file World.h.

Referenced by GetStartTime(), GetUptime(), SetInitialWorldSettings(), Update(), and World().

◆ m_stopEvent

std::atomic< bool > World::m_stopEvent = false
staticprivate

Definition at line 820 of file World.h.

Referenced by _UpdateGameTime(), IsStopped(), ShutdownCancel(), ShutdownServ(), and StopNow().

◆ m_timers

IntervalTimer World::m_timers[WUPDATE_COUNT]
private

Definition at line 831 of file World.h.

Referenced by ForceGameEventUpdate(), LoadConfigSettings(), SetInitialWorldSettings(), and Update().

◆ m_updateTime

uint32 World::m_updateTime
private

Definition at line 834 of file World.h.

Referenced by GetUpdateTime(), and Update().

◆ m_updateTimeCount

uint32 World::m_updateTimeCount
private

Definition at line 835 of file World.h.

Referenced by RecordTimeDiff(), Update(), and World().

◆ m_updateTimeSum

uint32 World::m_updateTimeSum
private

Definition at line 834 of file World.h.

Referenced by Update(), and World().

◆ m_visibility_notify_periodInBGArenas

int32 World::m_visibility_notify_periodInBGArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD
staticprivate

Definition at line 869 of file World.h.

Referenced by GetVisibilityNotifyPeriodInBGArenas(), and LoadConfigSettings().

◆ m_visibility_notify_periodInInstances

int32 World::m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD
staticprivate

Definition at line 868 of file World.h.

Referenced by GetVisibilityNotifyPeriodInInstances(), and LoadConfigSettings().

◆ m_visibility_notify_periodOnContinents

int32 World::m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD
staticprivate

Definition at line 867 of file World.h.

Referenced by GetVisibilityNotifyPeriodOnContinents(), and LoadConfigSettings().

◆ m_worldLoopCounter

std::atomic< uint32 > World::m_worldLoopCounter = 0
static

Definition at line 559 of file World.h.

Referenced by FreezeDetectorRunnable::Run(), and WorldRunnable::Run().

◆ m_worldstates

WorldStatesMap World::m_worldstates
private

Definition at line 853 of file World.h.

Referenced by getWorldState(), LoadWorldStates(), and setWorldState().

◆ mail_timer

time_t World::mail_timer
private

Definition at line 832 of file World.h.

Referenced by SetInitialWorldSettings(), and Update().

◆ mail_timer_expires

time_t World::mail_timer_expires
private

Definition at line 833 of file World.h.

Referenced by SetInitialWorldSettings(), and Update().

◆ rate_values

float World::rate_values[uint8(Rates::MAX_RATES)]
private

Definition at line 848 of file World.h.

Referenced by getRate(), and setRate().


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