![]() |
TrinityCore
|
#include <World.h>
Public Types | |
| typedef std::list< WorldSession * > | Queue |
Public Member Functions | |
| WorldSession * | FindSession (uint32 id) const |
| Find a session by its id. | |
| void | AddSession (WorldSession *s) |
| void | SendAutoBroadcast () |
| bool | RemoveSession (uint32 id) |
| Remove a given session. | |
| void | UpdateMaxSessionCounters () |
| Get the number of current active sessions. | |
| SessionMap const & | GetAllSessions () const |
| uint32 | GetActiveAndQueuedSessionCount () const |
| uint32 | GetActiveSessionCount () const |
| uint32 | GetQueuedSessionCount () const |
| uint32 | GetMaxQueuedSessionCount () const |
| Get the maximum number of parallel sessions on the server since last reboot. | |
| uint32 | GetMaxActiveSessionCount () const |
| uint32 | GetPlayerCount () const |
| Get number of players. | |
| uint32 | GetMaxPlayerCount () const |
| void | IncreasePlayerCount () |
| Increase/Decrease number of players. | |
| void | DecreasePlayerCount () |
| Player * | FindPlayerInZone (uint32 zone) |
| Find a player in a specified zone. | |
| bool | IsClosed () const |
| Deny clients? | |
| void | SetClosed (bool val) |
| Close world. | |
| AccountTypes | GetPlayerSecurityLimit () const |
| Security level limitations. | |
| void | SetPlayerSecurityLimit (AccountTypes sec) |
| void | LoadDBAllowedSecurityLevel () |
| void | SetPlayerAmountLimit (uint32 limit) |
| Active session server limit. | |
| uint32 | GetPlayerAmountLimit () const |
| void | AddQueuedPlayer (WorldSession *) |
| bool | RemoveQueuedPlayer (WorldSession *session) |
| int32 | GetQueuePos (WorldSession *) |
| bool | HasRecentlyDisconnected (WorldSession *) |
| bool | getAllowMovement () const |
| void | SetAllowMovement (bool allow) |
| Allow/Disallow object movements. | |
| void | SetMotd (std::string motd) |
| Set a new Message of the Day. | |
| std::vector< std::string > const & | GetMotd () const |
| Get the current Message of the Day. | |
| void | SetNewCharString (std::string const &str) |
| Set the string for new characters (first login) | |
| std::string const & | GetNewCharString () const |
| Get the string for new characters (first login) | |
| LocaleConstant | GetDefaultDbcLocale () const |
| std::string const & | GetDataPath () const |
| Get the path where data (dbc, maps) are stored on disk. | |
| time_t | GetNextDailyQuestsResetTime () const |
| Next daily quests and random bg reset time. | |
| time_t | GetNextWeeklyQuestsResetTime () const |
| time_t | GetNextRandomBGResetTime () const |
| uint16 | GetConfigMaxSkillValue () const |
| Get the maximum skill level a player can reach. | |
| void | SetInitialWorldSettings () |
| Initialize the World. | |
| void | LoadConfigSettings (bool reload=false) |
| Initialize config values. | |
| void | SendWorldText (uint32 string_id,...) |
| Send a System Message to all players (except self if mentioned) | |
| void | SendGlobalText (char const *text, WorldSession *self) |
| DEPRECATED, only for debug purpose. Send a System Message to all players (except self if mentioned) | |
| void | SendGMText (uint32 string_id,...) |
| Send a System Message to all GMs (except self if mentioned) | |
| void | SendServerMessage (ServerMessageType messageID, std::string stringParam="", Player *player=nullptr) |
| Send a server message to the user(s) | |
| void | SendGlobalMessage (WorldPacket const *packet, WorldSession *self=nullptr, uint32 team=0) |
| Send a packet to all players (except self if mentioned) | |
| void | SendGlobalGMMessage (WorldPacket const *packet, WorldSession *self=nullptr, uint32 team=0) |
| Send a packet to all GMs (except self if mentioned) | |
| bool | IsShuttingDown () const |
| Are we in the middle of a shutdown? | |
| uint32 | GetShutDownTimeLeft () const |
| void | ShutdownServ (uint32 time, uint32 options, uint8 exitcode, const std::string &reason=std::string()) |
| Shutdown the server. | |
| uint32 | ShutdownCancel () |
| Cancel a planned server shutdown. | |
| void | ShutdownMsg (bool show=false, Player *player=nullptr, const std::string &reason=std::string()) |
| Display a shutdown message to the user(s) | |
| void | Update (uint32 diff) |
| Update the World ! | |
| void | UpdateSessions (uint32 diff) |
| void | setRate (Rates rate, float value) |
| Set a server rate (see Rates) | |
| float | getRate (Rates rate) const |
| Get a server rate (see Rates) | |
| void | setBoolConfig (WorldBoolConfigs index, bool value) |
| Set a server configuration element (see #WorldConfigs) | |
| bool | getBoolConfig (WorldBoolConfigs index) const |
| Get a server configuration element (see #WorldConfigs) | |
| void | setFloatConfig (WorldFloatConfigs index, float value) |
| Set a server configuration element (see #WorldConfigs) | |
| float | getFloatConfig (WorldFloatConfigs index) const |
| Get a server configuration element (see #WorldConfigs) | |
| void | setIntConfig (WorldIntConfigs index, uint32 value) |
| Set a server configuration element (see #WorldConfigs) | |
| uint32 | getIntConfig (WorldIntConfigs index) const |
| Get a server configuration element (see #WorldConfigs) | |
| void | setWorldState (uint32 index, uint64 value) |
| uint64 | getWorldState (uint32 index) const |
| void | LoadWorldStates () |
| bool | IsPvPRealm () const |
| Are we on a "Player versus Player" server? | |
| bool | IsFFAPvPRealm () const |
| void | KickAll () |
| Kick (and save) all players. | |
| void | KickAllLess (AccountTypes sec) |
Kick (and save) all players with security level less sec | |
| 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. | |
| bool | RemoveBanAccount (BanMode mode, std::string const &nameOrIP) |
| Remove a ban from an account or IP address. | |
| 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. | |
| bool | RemoveBanCharacter (std::string const &name) |
| Remove a ban from a character. | |
| void | ProcessCliCommands () |
| void | QueueCliCommand (CliCommandHolder *commandHolder) |
| void | ForceGameEventUpdate () |
| void | UpdateRealmCharCount (uint32 accid) |
| LocaleConstant | GetAvailableDbcLocale (LocaleConstant locale) const |
| void | LoadDBVersion () |
| char const * | GetDBVersion () const |
| void | LoadAutobroadcasts () |
| void | UpdateAreaDependentAuras () |
| uint32 | GetCleaningFlags () const |
| void | SetCleaningFlags (uint32 flags) |
| void | ResetEventSeasonalQuests (uint16 event_id, time_t eventStartTime) |
| void | ReloadRBAC () |
| void | RemoveOldCorpses () |
| void | TriggerGuidWarning () |
| void | TriggerGuidAlert () |
| bool | IsGuidWarning () |
| bool | IsGuidAlert () |
Static Public Member Functions | |
| static World * | instance () |
| static uint8 | GetExitCode () |
| static void | StopNow (uint8 exitcode) |
| static bool | IsStopped () |
| static float | GetMaxVisibleDistanceOnContinents () |
| static float | GetMaxVisibleDistanceInInstances () |
| static float | GetMaxVisibleDistanceInBG () |
| static float | GetMaxVisibleDistanceInArenas () |
| static int32 | GetVisibilityNotifyPeriodOnContinents () |
| static int32 | GetVisibilityNotifyPeriodInInstances () |
| static int32 | GetVisibilityNotifyPeriodInBG () |
| static int32 | GetVisibilityNotifyPeriodInArenas () |
Static Public Attributes | |
| static std::atomic< uint32 > | m_worldLoopCounter |
Protected Member Functions | |
| void | _UpdateGameTime () |
| Update the game time. | |
| void | _UpdateRealmCharCount (PreparedQueryResult resultCharCount) |
| void | InitQuestResetTimes () |
| void | CheckQuestResetTimes () |
| void | ResetDailyQuests () |
| void | ResetWeeklyQuests () |
| void | ResetMonthlyQuests () |
| void | InitRandomBGResetTime () |
| void | InitCalendarOldEventsDeletionTime () |
| void | InitGuildResetTime () |
| void | ResetRandomBG () |
| void | CalendarDeleteOldEvents () |
| void | ResetGuildCap () |
Private Types | |
| typedef std::unordered_map< uint32, time_t > | DisconnectMap |
| typedef std::map< uint32, uint64 > | WorldStatesMap |
| typedef std::map< uint8, std::string > | AutobroadcastsMap |
| typedef std::map< uint8, uint8 > | AutobroadcastsWeightMap |
Private Member Functions | |
| World () | |
| World constructor. | |
| ~World () | |
| World destructor. | |
| void | DetectDBCLang () |
| void | AddSession_ (WorldSession *s) |
| void | ProcessQueryCallbacks () |
| void | SendGuidWarning () |
| void | DoGuidWarningRestart () |
| void | DoGuidAlertRestart () |
Static Private Attributes | |
| static std::atomic< bool > | m_stopEvent |
| static uint8 | m_ExitCode = SHUTDOWN_EXIT_CODE |
| static float | m_MaxVisibleDistanceOnContinents = DEFAULT_VISIBILITY_DISTANCE |
| static float | m_MaxVisibleDistanceInInstances = DEFAULT_VISIBILITY_INSTANCE |
| static float | m_MaxVisibleDistanceInBG = DEFAULT_VISIBILITY_BGARENAS |
| static float | m_MaxVisibleDistanceInArenas = DEFAULT_VISIBILITY_BGARENAS |
| static int32 | m_visibility_notify_periodOnContinents = DEFAULT_VISIBILITY_NOTIFY_PERIOD |
| static int32 | m_visibility_notify_periodInInstances = DEFAULT_VISIBILITY_NOTIFY_PERIOD |
| static int32 | m_visibility_notify_periodInBG = DEFAULT_VISIBILITY_NOTIFY_PERIOD |
| static int32 | m_visibility_notify_periodInArenas = DEFAULT_VISIBILITY_NOTIFY_PERIOD |
Friends | |
| class | debug_commandscript |
|
private |
|
private |
|
private |
| typedef std::list<WorldSession*> World::Queue |
|
private |
|
private |
|
private |
|
protected |
Update the game time.
Definition at line 2990 of file World.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| void World::AddQueuedPlayer | ( | WorldSession * | sess | ) |
| void World::AddSession | ( | WorldSession * | s | ) |
|
private |
| BanReturn World::BanCharacter | ( | std::string const & | name, |
| std::string const & | duration, | ||
| std::string const & | reason, | ||
| std::string const & | author | ||
| ) |
|
protected |
|
protected |
|
private |
|
private |
|
private |
| WorldSession * World::FindSession | ( | uint32 | id | ) | const |
| void World::ForceGameEventUpdate | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| std::vector< std::string > const & World::GetMotd | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| int32 World::GetQueuePos | ( | WorldSession * | sess | ) |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| bool World::HasRecentlyDisconnected | ( | WorldSession * | session | ) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
| bool World::IsFFAPvPRealm | ( | ) | const |
| bool World::IsPvPRealm | ( | ) | const |
|
inline |
|
inlinestatic |
| void World::KickAllLess | ( | AccountTypes | sec | ) |
| void World::LoadAutobroadcasts | ( | ) |
| void World::LoadConfigSettings | ( | bool | reload = false | ) |
Initialize config values.
Definition at line 493 of file World.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void World::LoadDBAllowedSecurityLevel | ( | ) |
| void World::LoadDBVersion | ( | ) |
| void World::LoadWorldStates | ( | ) |
| void World::ProcessCliCommands | ( | ) |
|
private |
|
inline |
| bool World::RemoveBanAccount | ( | BanMode | mode, |
| std::string const & | nameOrIP | ||
| ) |
| bool World::RemoveBanCharacter | ( | std::string const & | name | ) |
| void World::RemoveOldCorpses | ( | ) |
| bool World::RemoveQueuedPlayer | ( | WorldSession * | session | ) |
| bool World::RemoveSession | ( | uint32 | id | ) |
|
protected |
| void World::ResetEventSeasonalQuests | ( | uint16 | event_id, |
| time_t | eventStartTime | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
| void World::SendAutoBroadcast | ( | ) |
| void World::SendGlobalGMMessage | ( | WorldPacket const * | packet, |
| WorldSession * | self = nullptr, |
||
| uint32 | team = 0 |
||
| ) |
| void World::SendGlobalMessage | ( | WorldPacket const * | packet, |
| WorldSession * | self = nullptr, |
||
| uint32 | team = 0 |
||
| ) |
| void World::SendGlobalText | ( | char const * | text, |
| WorldSession * | self | ||
| ) |
| void World::SendGMText | ( | uint32 | string_id, |
| ... | |||
| ) |
|
private |
| void World::SendServerMessage | ( | ServerMessageType | messageID, |
| std::string | stringParam = "", |
||
| Player * | player = nullptr |
||
| ) |
| void World::SendWorldText | ( | uint32 | string_id, |
| ... | |||
| ) |
|
inline |
|
inline |
|
inline |
| void World::SetInitialWorldSettings | ( | ) |
Initialize the World.
Definition at line 1598 of file World.cpp.
Here is the call graph for this function:
|
inline |
| void World::SetMotd | ( | std::string | motd | ) |
|
inline |
|
inline |
| void World::SetPlayerSecurityLimit | ( | AccountTypes | sec | ) |
|
inline |
| uint32 World::ShutdownCancel | ( | ) |
| void World::ShutdownMsg | ( | bool | show = false, |
| Player * | player = nullptr, |
||
| const std::string & | reason = std::string() |
||
| ) |
|
inlinestatic |
| void World::TriggerGuidAlert | ( | ) |
| void World::TriggerGuidWarning | ( | ) |
| void World::Update | ( | uint32 | diff | ) |
Update the World !
Handle auctions when the timer has passed
Handle AHBot operations
Handle file changes
Handle session updates when the timer has passed
Update uptime table
Clean logs table
Handle all other objects
Definition at line 2356 of file World.cpp.
Here is the call graph for this function:| void World::UpdateMaxSessionCounters | ( | ) |
| void World::UpdateRealmCharCount | ( | uint32 | accid | ) |
| void World::UpdateSessions | ( | uint32 | diff | ) |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
private |