OregonCore  revision 3611e8a-git
Your Favourite TBC server
World.h
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __WORLD_H
19 #define __WORLD_H
20 
21 #include "Common.h"
22 #include "Timer.h"
23 #include "Policies/Singleton.h"
24 #include "SharedDefines.h"
25 #include "ace/Atomic_Op.h"
26 #include "QueryResult.h"
27 
28 #include <map>
29 #include <set>
30 #include <list>
31 
32 class Object;
33 class WorldPacket;
34 class WorldSession;
35 class Player;
36 class Weather;
37 struct ScriptInfo;
38 class SqlResultQueue;
39 class QueryResult;
40 class WorldSocket;
41 
42 // ServerMessages.dbc
44 {
50 };
51 
53 {
56 };
57 
59 {
63 };
64 
65 // Timers for different object refresh rates
67 {
79 };
80 
81 // Configuration elements
83 {
267 };
268 
269 // Server rates
270 enum Rates
271 {
331 };
332 
333 // Type of server
335 {
341  REALM_TYPE_FFA_PVP = 16 // custom, free for all pvp mode like arena PvP in all zones except rest activated places and sanctuaries
342  // replaced by REALM_PVP in realm list
343 };
344 
346 {
347  REALM_ZONE_UNKNOWN = 0, // any language
348  REALM_ZONE_DEVELOPMENT = 1, // any language
349  REALM_ZONE_UNITED_STATES = 2, // extended-Latin
350  REALM_ZONE_OCEANIC = 3, // extended-Latin
351  REALM_ZONE_LATIN_AMERICA = 4, // extended-Latin
352  REALM_ZONE_TOURNAMENT_5 = 5, // basic-Latin at create, any at login
353  REALM_ZONE_KOREA = 6, // East-Asian
354  REALM_ZONE_TOURNAMENT_7 = 7, // basic-Latin at create, any at login
355  REALM_ZONE_ENGLISH = 8, // extended-Latin
356  REALM_ZONE_GERMAN = 9, // extended-Latin
357  REALM_ZONE_FRENCH = 10, // extended-Latin
358  REALM_ZONE_SPANISH = 11, // extended-Latin
359  REALM_ZONE_RUSSIAN = 12, // Cyrillic
360  REALM_ZONE_TOURNAMENT_13 = 13, // basic-Latin at create, any at login
361  REALM_ZONE_TAIWAN = 14, // East-Asian
362  REALM_ZONE_TOURNAMENT_15 = 15, // basic-Latin at create, any at login
363  REALM_ZONE_CHINA = 16, // East-Asian
364  REALM_ZONE_CN1 = 17, // basic-Latin at create, any at login
365  REALM_ZONE_CN2 = 18, // basic-Latin at create, any at login
366  REALM_ZONE_CN3 = 19, // basic-Latin at create, any at login
367  REALM_ZONE_CN4 = 20, // basic-Latin at create, any at login
368  REALM_ZONE_CN5 = 21, // basic-Latin at create, any at login
369  REALM_ZONE_CN6 = 22, // basic-Latin at create, any at login
370  REALM_ZONE_CN7 = 23, // basic-Latin at create, any at login
371  REALM_ZONE_CN8 = 24, // basic-Latin at create, any at login
372  REALM_ZONE_TOURNAMENT_25 = 25, // basic-Latin at create, any at login
373  REALM_ZONE_TEST_SERVER = 26, // any language
374  REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
375  REALM_ZONE_QA_SERVER = 28, // any language
376  REALM_ZONE_CN9 = 29 // basic-Latin at create, any at login
377 };
378 
379 // DB scripting commands
381 {
382  SCRIPT_COMMAND_TALK = 0, // source/target = Creature, target = any, datalong = talk type (0=say, 1=whisper, 2=yell, 3=emote text, 4=boss emote text), datalong2 & 1 = player talk (instead of creature), dataint = string_id
383  SCRIPT_COMMAND_EMOTE = 1, // source/target = Creature, datalong = emote id, datalong2 = 0: set emote state; > 0: play emote state
384  SCRIPT_COMMAND_FIELD_SET = 2, // source/target = Creature, datalong = field id, datalog2 = value
385  SCRIPT_COMMAND_MOVE_TO = 3, // source/target = Creature, datalong2 = time to reach, x/y/z = destination
386  SCRIPT_COMMAND_FLAG_SET = 4, // source/target = Creature, datalong = field id, datalog2 = bitmask
387  SCRIPT_COMMAND_FLAG_REMOVE = 5, // source/target = Creature, datalong = field id, datalog2 = bitmask
388  SCRIPT_COMMAND_TELEPORT_TO = 6, // source/target = Creature/Player (see datalong2), datalong = map_id, datalong2 = 0: Player; 1: Creature, x/y/z = destination, o = orientation
389  SCRIPT_COMMAND_QUEST_EXPLORED = 7, // target/source = Player, target/source = GO/Creature, datalong = quest id, datalong2 = distance or 0
390  SCRIPT_COMMAND_KILL_CREDIT = 8, // target/source = Player, datalong = creature entry, datalong2 = 0: personal credit, 1: group credit
391  SCRIPT_COMMAND_RESPAWN_GAMEOBJECT = 9, // source = WorldObject (summoner), datalong = GO guid, datalong2 = despawn delay
392  SCRIPT_COMMAND_TEMP_SUMMON_CREATURE = 10, // source = WorldObject (summoner), datalong = creature entry, datalong2 = despawn delay, x/y/z = summon position, o = orientation
393  SCRIPT_COMMAND_OPEN_DOOR = 11, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
394  SCRIPT_COMMAND_CLOSE_DOOR = 12, // source = Unit, datalong = GO guid, datalong2 = reset delay (min 15)
395  SCRIPT_COMMAND_ACTIVATE_OBJECT = 13, // source = Unit, target = GO
396  SCRIPT_COMMAND_REMOVE_AURA = 14, // source (datalong2 != 0) or target (datalong2 == 0) = Unit, datalong = spell id
397  SCRIPT_COMMAND_CAST_SPELL = 15, // source and/or target = Unit, datalong2 = cast direction (0: s->t 1: s->s 2: t->t 3: t->s 4: s->creature with dataint entry), dataint & 1 = triggered flag
398  SCRIPT_COMMAND_PLAY_SOUND = 16, // source = WorldObject, target = none/Player, datalong = sound id, datalong2 (bitmask: 0/1=anyone/player, 0/2=without/with distance dependency, so 1|2 = 3 is target with distance dependency)
399  SCRIPT_COMMAND_CREATE_ITEM = 17, // target/source = Player, datalong = item entry, datalong2 = amount
400  SCRIPT_COMMAND_DESPAWN_SELF = 18, // target/source = Creature, datalong = despawn delay
401  SCRIPT_COMMAND_DO_NOTHING = 19, // do nothing
402  SCRIPT_COMMAND_LOAD_PATH = 20, // source = Unit, datalong = path id, datalong2 = is repeatable
403  SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT = 21, // source = WorldObject (if present used as a search center), datalong = script id, datalong2 = unit lowguid, dataint = script table to use (see ScriptsType)
404  SCRIPT_COMMAND_KILL = 22, // source/target = Creature, dataint = remove corpse attribute
405 
406  //Oregon only
407  SCRIPT_COMMAND_ORIENTATION = 30, // source = Unit, target (datalong > 0) = Unit, datalong = > 0 turn source to face target, o = orientation
408  SCRIPT_COMMAND_EQUIP = 31, // soucre = Creature, datalong = equipment id
409  SCRIPT_COMMAND_MODEL = 32, // source = Creature, datalong = model id
410  SCRIPT_COMMAND_CLOSE_GOSSIP = 33, // source = Player
411 };
412 
413 // Storage class for commands issued for delayed execution
415 {
416  typedef void Print(void*, const char*);
417  typedef void CommandFinished(void*, bool success);
418 
420  char* m_command;
422 
424 
425  CliCommandHolder(void* callbackArg, const char* command, Print* zprint, CommandFinished* commandFinished)
426  : m_callbackArg(callbackArg), m_print(zprint), m_commandFinished(commandFinished)
427  {
428  size_t len = strlen(command) + 1;
429  m_command = new char[len];
430  memcpy(m_command, command, len);
431  }
432 
434  {
435  delete[] m_command;
436  }
437 };
438 
441 {
444 };
445 
448 {
452 };
453 
454 typedef UNORDERED_MAP<uint32, WorldSession*> SessionMap;
455 
456 // The World
457 class World
458 {
459  public:
460  static volatile uint32 m_worldLoopCounter;
461 
462  World();
463  ~World();
464 
465  WorldSession* FindSession(uint32 id) const;
466  void AddSession(WorldSession* s);
467  void SendAutoBroadcast();
468  bool RemoveSession(uint32 id);
469  // Get the number of current active sessions
470  void UpdateMaxSessionCounters();
471  const SessionMap& GetAllSessions() const { return m_sessions; }
473  {
474  return m_sessions.size();
475  }
477  {
478  return m_sessions.size() - m_QueuedPlayer.size();
479  }
481  {
482  return m_QueuedPlayer.size();
483  }
484  // Get the maximum number of parallel sessions on the server since last reboot
486  {
487  return m_maxQueuedSessionCount;
488  }
490  {
491  return m_maxActiveSessionCount;
492  }
493  Player* FindPlayerInZone(uint32 zone);
494 
495  Weather* FindWeather(uint32 id) const;
496  Weather* AddWeather(uint32 zone_id);
497  void RemoveWeather(uint32 zone_id);
498 
499  // Get the active session server limit (or security level limitations)
501  {
502  return m_playerLimit >= 0 ? m_playerLimit : 0;
503  }
505  {
506  return m_allowedSecurityLevel < 0 ? SEC_PLAYER : m_allowedSecurityLevel;
507  }
509  {
510  m_allowedSecurityLevel = (sec < SEC_PLAYER ? SEC_PLAYER : sec);
511  }
512 
513  // Set the active session server limit (or security level limitation)
514  void SetPlayerLimit(int32 limit, bool needUpdate = false);
515 
516  //player Queue
517  typedef std::list<WorldSession*> Queue;
518  void AddQueuedPlayer(WorldSession*);
519  bool RemoveQueuedPlayer(WorldSession* session);
520  int32 GetQueuePos(WorldSession*);
521  bool HasRecentlyDisconnected(WorldSession*);
523  {
524  return m_QueuedPlayer.size();
525  }
526 
527  // todo Actions on m_allowMovement still to be implemented
528  // Is movement allowed?
529  bool getAllowMovement() const
530  {
531  return m_allowMovement;
532  }
533  // Allow/Disallow object movements
534  void SetAllowMovement(bool allow)
535  {
536  m_allowMovement = allow;
537  }
538 
539  // Set a new Message of the Day
540  void SetMotd(std::string motd)
541  {
542  m_motd = motd;
543  }
544  // Get the current Message of the Day
545  const char* GetMotd() const
546  {
547  return m_motd.c_str();
548  }
549 
550  // Set the string for new characters (first login)
551  void SetNewCharString(std::string str)
552  {
553  m_newCharString = str;
554  }
555  // Get the string for new characters (first login)
556  const std::string& GetNewCharString() const
557  {
558  return m_newCharString;
559  }
560 
562  {
563  return m_defaultDbcLocale;
564  }
565 
566  // Get the path where data (dbc, maps) are stored on disk
567  std::string GetDataPath() const
568  {
569  return m_dataPath;
570  }
571 
572  // When server started?
573  time_t const& GetStartTime() const
574  {
575  return m_startTime;
576  }
577  // What time is it?
578  time_t const& GetGameTime() const
579  {
580  return m_gameTime;
581  }
582  // Uptime (in secs)
584  {
585  return uint32(m_gameTime - m_startTime);
586  }
587  // Update time
589  {
590  return m_updateTime;
591  }
593  {
594  if (t >= 0) m_configs[CONFIG_INTERVAL_LOG_UPDATE] = (uint32)t;
595  }
596 
597  // Get the maximum skill level a player can reach
599  {
600  uint32 lvl = getConfig(CONFIG_MAX_PLAYER_LEVEL);
601  return lvl > 60 ? 300 + ((lvl - 60) * 75) / 10 : lvl * 5;
602  }
603 
604  void SetInitialWorldSettings();
605  void LoadConfigSettings(bool reload = false);
606 
607  void SendWorldText(int32 string_id, ...);
608  void SendGlobalText(const char* text, WorldSession* self);
609  void SendGMText(int32 string_id, ...);
610  void SendGlobalMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
611  void SendGlobalGMMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
612  bool SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
613  void SendZoneText(uint32 zone, const char* text, WorldSession* self = 0, uint32 team = 0);
614  void SendServerMessage(ServerMessageType type, const char* text = "", Player* player = NULL);
615 
616  // Are we in the middle of a shutdown?
617  bool IsShuttingDown() const
618  {
619  return m_ShutdownTimer > 0;
620  }
622  {
623  return m_ShutdownTimer;
624  }
625  void ShutdownServ(uint32 time, uint32 options, uint8 exitcode);
626  void ShutdownCancel();
627  void ShutdownMsg(bool show = false, Player* player = NULL);
629  {
630  return m_ExitCode;
631  }
632  static void StopNow(uint8 exitcode)
633  {
634  if (m_stopEvent) return;
635  m_stopEvent = true;
636  m_ExitCode = exitcode;
637  }
638  static bool IsStopped()
639  {
640  return m_stopEvent;
641  }
642 
643  void Update(uint32 diff);
644 
645  void UpdateSessions(time_t diff);
646  // Set a server rate (see #Rates)
647  void setRate(Rates rate, float value)
648  {
649  rate_values[rate] = value;
650  }
651  // Get a server rate (see #Rates)
652  float getRate(Rates rate) const
653  {
654  return rate_values[rate];
655  }
656 
657  // Set a server configuration element (see #WorldConfigs)
659  {
660  if (index < CONFIG_VALUE_COUNT)
661  m_configs[index] = value;
662  }
663 
664  // Get a server configuration element (see #WorldConfigs)
665  uint32 getConfig(uint32 index) const
666  {
667  if (index < CONFIG_VALUE_COUNT)
668  return m_configs[index];
669  else
670  return 0;
671  }
672 
673  // Are we on a "Player versus Player" server?
674  bool IsPvPRealm()
675  {
676  return (getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_PVP || getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_RPPVP || getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_FFA_PVP);
677  }
679  {
680  return getConfig(CONFIG_GAME_TYPE) == REALM_TYPE_FFA_PVP;
681  }
682 
683  bool KickPlayer(const std::string& playerName);
684  void KickAll();
685  void KickAllLess(AccountTypes sec);
686  BanReturn BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author);
687  bool RemoveBanAccount(BanMode mode, std::string nameOrIP);
688 
690  {
691  return (uint32)++m_scheduledScripts;
692  }
694  {
695  return (uint32)--m_scheduledScripts;
696  }
698  {
699  return (uint32)(m_scheduledScripts -= count);
700  }
701  bool IsScriptScheduled() const
702  {
703  return m_scheduledScripts > 0;
704  }
705 
706  // for max speed access
708  {
709  return m_MaxVisibleDistanceOnContinents;
710  }
712  {
713  return m_MaxVisibleDistanceInInstances;
714  }
716  {
717  return m_MaxVisibleDistanceInBGArenas;
718  }
719 
721  {
722  return m_visibility_notify_periodOnContinents;
723  }
725  {
726  return m_visibility_notify_periodInInstances;
727  }
729  {
730  return m_visibility_notify_periodInBGArenas;
731  }
732 
733  void ProcessCliCommands();
734  void QueueCliCommand(CliCommandHolder* commandHolder)
735  {
736  cliCmdQueue.add(commandHolder);
737  }
738 
739  void UpdateResultQueue();
740  void InitResultQueue();
741 
742  void ForceGameEventUpdate();
743 
744  void UpdateRealmCharCount(uint32 accid);
745 
746  void UpdateAllowedSecurity();
747 
749  {
750  if (m_availableDbcLocaleMask & (1 << locale)) return locale;
751  else return m_defaultDbcLocale;
752  }
753 
754  //used World DB version
755  void LoadDBVersion();
756  char const* GetDBVersion()
757  {
758  return m_DBVersion.c_str();
759  }
760 
761  //used Script version
762  void SetScriptsVersion(char const* version)
763  {
764  m_ScriptsVersion = version ? version : "unknown scripting library";
765  }
766  char const* GetScriptsVersion()
767  {
768  return m_ScriptsVersion.c_str();
769  }
770 
771  void RecordTimeDiff(const char* text, ...);
772  void LoadAutobroadcasts();
773  void LoadIp2nation();
774  void LoadOpcodeProtection();
775  void LoadSQLUpdates();
776 
777  ProtectedOpcodeProperties const& GetProtectedOpcodeProperties(uint32 opcode);
778  protected:
779  void _UpdateGameTime();
780  // callback for UpdateRealmCharacters
781  void _UpdateRealmCharCount(QueryResult_AutoPtr resultCharCount, uint32 accountId);
782 
783  void InitDailyQuestResetTime();
784  void ResetDailyQuests();
785  private:
786  static volatile bool m_stopEvent;
790 
791  //atomic op counter for active scripts amount
792  ACE_Atomic_Op<ACE_Thread_Mutex, long> m_scheduledScripts;
793 
794  time_t m_startTime;
795  time_t m_gameTime;
800  uint32 m_updateTime, m_updateTimeSum;
803 
804  typedef UNORDERED_MAP<uint32, Weather*> WeatherMap;
805  WeatherMap m_weathers;
806 
808  typedef UNORDERED_MAP<uint32, time_t> DisconnectMap;
809  DisconnectMap m_disconnects;
812 
813  std::string m_newCharString;
814 
815  float rate_values[MAX_RATES];
819  LocaleConstant m_defaultDbcLocale; // from config for one from loaded DBC locales
821  void DetectDBCLang();
823  std::string m_motd;
824  std::string m_dataPath;
825 
826  // for max speed access
830 
834 
835  // CLI command holder to be thread safe
838 
839  // next daily quests reset time
841 
842  //Player Queue
844 
845  //sessions that are added async
846  void AddSession_(WorldSession* s);
848 
849  //used versions
850  std::string m_DBVersion;
851  std::string m_ScriptsVersion;
852 
853  std::list<std::string> m_Autobroadcasts;
854  std::string m_SQLUpdatesPath;
855  UNORDERED_MAP<uint32, ProtectedOpcodeProperties> _protectedOpcodesProperties;
856 };
857 
858 extern uint32 realmID;
859 
860 #define sWorld Oregon::Singleton<World>::Instance()
861 #endif
862 
Definition: Object.h:124
Kick the player.
Definition: World.h:443
uint32 mail_timer_expires
Definition: World.h:799
UNORDERED_MAP< uint32, time_t > DisconnectMap
Definition: World.h:808
void SetAllowMovement(bool allow)
Definition: World.h:534
UNORDERED_MAP< uint32, WorldSession * > SessionMap
Definition: World.h:454
void SetNewCharString(std::string str)
Definition: World.h:551
std::string GetDataPath() const
Definition: World.h:567
OpcodePenalty
What should happen if the threshold per interval is passed.
Definition: World.h:440
CommandFinished * m_commandFinished
Definition: World.h:423
uint32 GetShutDownTimeLeft()
Definition: World.h:621
Rates
Definition: World.h:270
const std::string & GetNewCharString() const
Definition: World.h:556
char * m_command
Definition: World.h:420
UNORDERED_MAP< uint32, Weather * > WeatherMap
Definition: World.h:804
time_t m_NextDailyQuestReset
Definition: World.h:840
std::list< WorldSession * > Queue
Definition: World.h:517
std::string m_SQLUpdatesPath
Definition: World.h:854
uint32 m_updateTimeCount
Definition: World.h:801
uint32 GetActiveAndQueuedSessionCount() const
Definition: World.h:472
WorldTimers
Definition: World.h:66
static float GetMaxVisibleDistanceOnContinents()
Definition: World.h:707
ACE_Based::LockedQueue< CliCommandHolder *, ACE_Thread_Mutex > cliCmdQueue
Definition: World.h:836
void QueueCliCommand(CliCommandHolder *commandHolder)
Definition: World.h:734
IntervalTimer extmail_timer
Definition: World.h:797
static float m_MaxVisibleDistanceInInstances
Definition: World.h:828
AccountTypes
Definition: Common.h:188
Definition: World.h:457
uint32 GetUpdateTime() const
Definition: World.h:588
SqlResultQueue * m_resultQueue
Definition: World.h:837
bool getAllowMovement() const
Definition: World.h:529
SessionMap m_sessions
Definition: World.h:807
std::string m_motd
Definition: World.h:823
uint32 GetMaxActiveSessionCount() const
Definition: World.h:489
uint32 DecreaseScheduledScriptCount()
Definition: World.h:693
std::list< std::string > m_Autobroadcasts
Definition: World.h:853
bool IsPvPRealm()
Definition: World.h:674
AccountTypes GetPlayerSecurityLimit() const
Definition: World.h:504
static uint8 m_ExitCode
Definition: World.h:787
void SetScriptsVersion(char const *version)
Definition: World.h:762
AccountTypes m_allowedSecurityLevel
Definition: World.h:818
time_t m_gameTime
Definition: World.h:795
static bool IsStopped()
Definition: World.h:638
ACE_INT32 int32
Definition: Define.h:67
uint32 m_maxActiveSessionCount
Definition: World.h:810
uint32 m_availableDbcLocaleMask
Definition: World.h:820
WeatherMap m_weathers
Definition: World.h:805
BanMode
uint32 mail_timer
Definition: World.h:798
ShutdownExitCode
Definition: World.h:58
static float GetMaxVisibleDistanceInInstances()
Definition: World.h:711
static float GetMaxVisibleDistanceInBGArenas()
Definition: World.h:715
std::string m_DBVersion
Definition: World.h:850
BanReturn
uint32 threshold
Sets the maximum count one protected packet per Interval can be processed per session.
Definition: World.h:449
CliCommandHolder(void *callbackArg, const char *command, Print *zprint, CommandFinished *commandFinished)
Definition: World.h:425
Queue m_QueuedPlayer
Definition: World.h:843
void Print(void *, const char *)
Definition: World.h:416
time_t const & GetStartTime() const
Definition: World.h:573
ScriptCommands
Definition: World.h:380
float getRate(Rates rate) const
Definition: World.h:652
Print * m_print
Definition: World.h:421
uint32 DecreaseScheduledScriptCount(size_t count)
Definition: World.h:697
ACE_UINT8 uint8
Definition: Define.h:73
~CliCommandHolder()
Definition: World.h:433
time_t m_startTime
Definition: World.h:794
uint32 GetQueueSize() const
Definition: World.h:522
static uint8 GetExitCode()
Definition: World.h:628
static int32 GetVisibilityNotifyPeriodInInstances()
Definition: World.h:724
const char * GetMotd() const
Definition: World.h:545
void setConfig(uint32 index, uint32 value)
Definition: World.h:658
void * m_callbackArg
Definition: World.h:419
OpcodePenalty penalty
What should happen if the threshold per interval is passed.
Definition: World.h:451
static int32 m_visibility_notify_periodInBGArenas
Definition: World.h:833
static int32 GetVisibilityNotifyPeriodOnContinents()
Definition: World.h:720
etc mysql my cnf *Then change max_allowed_packet to a bigger value
uint16 GetConfigMaxSkillValue() const
Definition: World.h:598
std::string m_dataPath
Definition: World.h:824
static int32 m_visibility_notify_periodOnContinents
Definition: World.h:831
uint32 m_ShutdownMask
Definition: World.h:789
std::string m_newCharString
Definition: World.h:813
void SetRecordDiffInterval(int32 t)
Definition: World.h:592
LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const
Definition: World.h:748
RealmZone
Definition: World.h:345
DisconnectMap m_disconnects
Definition: World.h:809
char const * GetScriptsVersion()
Definition: World.h:766
static int32 m_visibility_notify_periodInInstances
Definition: World.h:832
uint32 m_maxQueuedSessionCount
Definition: World.h:811
WorldConfigs
Definition: World.h:82
uint32 GetPlayerAmountLimit() const
Definition: World.h:500
time_t const & GetGameTime() const
Definition: World.h:578
static float m_MaxVisibleDistanceInBGArenas
Definition: World.h:829
bool IsFFAPvPRealm()
Definition: World.h:678
uint32 m_updateTimeSum
Definition: World.h:800
char const * GetDBVersion()
Definition: World.h:756
Protected Opcode.
Definition: World.h:447
ACE_Based::LockedQueue< WorldSession *, ACE_Thread_Mutex > addSessQueue
Definition: World.h:847
void SetPlayerSecurityLimit(AccountTypes sec)
Definition: World.h:508
void SetMotd(std::string motd)
Definition: World.h:540
uint32 IncreaseScheduledScriptsCount()
Definition: World.h:689
static volatile bool m_stopEvent
Definition: World.h:786
void CommandFinished(void *, bool success)
Definition: World.h:417
static int32 GetVisibilityNotifyPeriodInBGArenas()
Definition: World.h:728
ACE_Refcounted_Auto_Ptr< QueryResult, ACE_Null_Mutex > QueryResult_AutoPtr
Definition: QueryResult.h:113
uint32 interval
Interval for threshold, in milliseconds.&#39;.
Definition: World.h:450
uint32 m_currentTime
Definition: World.h:802
LocaleConstant m_defaultDbcLocale
Definition: World.h:819
bool IsScriptScheduled() const
Definition: World.h:701
bool m_allowMovement
Definition: World.h:822
uint32 realmID
Id of the realm.
Definition: Main.cpp:57
uint32 m_ShutdownTimer
Definition: World.h:788
uint32 GetQueuedSessionCount() const
Definition: World.h:480
ServerMessageType
Definition: World.h:43
ShutdownMask
Definition: World.h:52
ACE_Atomic_Op< ACE_Thread_Mutex, long > m_scheduledScripts
Definition: World.h:792
uint32 GetDefaultDbcLocale() const
Definition: World.h:561
void setRate(Rates rate, float value)
Definition: World.h:647
static volatile uint32 m_worldLoopCounter
Definition: World.h:460
uint32 getConfig(uint32 index) const
Definition: World.h:665
Skip the packet without processing.
Definition: World.h:442
LocaleConstant
Definition: Common.h:211
ACE_UINT16 uint16
Definition: Define.h:72
ACE_UINT32 uint32
Definition: Define.h:71
static float m_MaxVisibleDistanceOnContinents
Definition: World.h:827
uint32 GetUptime() const
Definition: World.h:583
bool IsShuttingDown() const
Definition: World.h:617
Definition: Player.h:922
int32 m_playerLimit
Definition: World.h:817
UNORDERED_MAP< uint32, ProtectedOpcodeProperties > _protectedOpcodesProperties
Definition: World.h:855
const SessionMap & GetAllSessions() const
Definition: World.h:471
std::string m_ScriptsVersion
Definition: World.h:851
uint32 GetActiveSessionCount() const
Definition: World.h:476
uint32 GetMaxQueuedSessionCount() const
Definition: World.h:485
static void StopNow(uint8 exitcode)
Definition: World.h:632
RealmType
Definition: World.h:334