1427 srand((
unsigned int)time(
NULL));
1459 TC_LOG_FATAL(
"server.loading",
"Unable to load critical files - server shutting down !!!");
1471 TC_LOG_INFO(
"server.loading",
"Loading Trinity strings...");
1484 TC_LOG_INFO(
"server.loading",
"Initialize data stores...");
1501 std::unordered_map<uint32, std::vector<uint32>> mapData;
1504 mapData.insert(std::unordered_map<
uint32, std::vector<uint32>>::value_type(mapEntry->ID, std::vector<uint32>()));
1505 if (mapEntry->ParentMapID != -1)
1506 mapData[mapEntry->ParentMapID].push_back(mapEntry->ID);
1510 vmmgr2->InitializeThreadUnsafe(mapData);
1515 TC_LOG_INFO(
"server.loading",
"Loading SpellInfo store...");
1518 TC_LOG_INFO(
"server.loading",
"Loading SpellInfo corrections...");
1521 TC_LOG_INFO(
"server.loading",
"Loading SkillLineAbilityMultiMap Data...");
1524 TC_LOG_INFO(
"server.loading",
"Loading SpellInfo custom attributes...");
1525 sSpellMgr->LoadSpellInfoCustomAttributes();
1527 TC_LOG_INFO(
"server.loading",
"Loading GameObject models...");
1530 TC_LOG_INFO(
"server.loading",
"Loading Script Names...");
1533 TC_LOG_INFO(
"server.loading",
"Loading Instance Template...");
1537 TC_LOG_INFO(
"server.loading",
"Loading instances...");
1540 TC_LOG_INFO(
"server.loading",
"Loading Localization strings...");
1553 TC_LOG_INFO(
"server.loading",
"Loading Account Roles and Permissions...");
1556 TC_LOG_INFO(
"server.loading",
"Loading Page Texts...");
1559 TC_LOG_INFO(
"server.loading",
"Loading Game Object Templates...");
1562 TC_LOG_INFO(
"server.loading",
"Loading Transport templates...");
1565 TC_LOG_INFO(
"server.loading",
"Loading Spell Rank Data...");
1568 TC_LOG_INFO(
"server.loading",
"Loading Spell Required Data...");
1571 TC_LOG_INFO(
"server.loading",
"Loading Spell Group types...");
1574 TC_LOG_INFO(
"server.loading",
"Loading Spell Learn Skills...");
1577 TC_LOG_INFO(
"server.loading",
"Loading Spell Learn Spells...");
1580 TC_LOG_INFO(
"server.loading",
"Loading Spell Proc Event conditions...");
1583 TC_LOG_INFO(
"server.loading",
"Loading Spell Proc conditions and data...");
1586 TC_LOG_INFO(
"server.loading",
"Loading Aggro Spells Definitions...");
1589 TC_LOG_INFO(
"server.loading",
"Loading Spell Group Stack Rules...");
1592 TC_LOG_INFO(
"server.loading",
"Loading NPC Texts...");
1595 TC_LOG_INFO(
"server.loading",
"Loading Enchant Spells Proc datas...");
1598 TC_LOG_INFO(
"server.loading",
"Loading Item Random Enchantments Table...");
1601 TC_LOG_INFO(
"server.loading",
"Loading Disables");
1604 TC_LOG_INFO(
"server.loading",
"Loading Items...");
1607 TC_LOG_INFO(
"server.loading",
"Loading Item set names...");
1613 TC_LOG_INFO(
"server.loading",
"Loading Creature Model Based Info Data...");
1616 TC_LOG_INFO(
"server.loading",
"Loading Creature templates...");
1619 TC_LOG_INFO(
"server.loading",
"Loading Equipment templates...");
1622 TC_LOG_INFO(
"server.loading",
"Loading Creature template addons...");
1625 TC_LOG_INFO(
"server.loading",
"Loading Reputation Reward Rates...");
1628 TC_LOG_INFO(
"server.loading",
"Loading Creature Reputation OnKill Data...");
1631 TC_LOG_INFO(
"server.loading",
"Loading Reputation Spillover Data...");
1632 sObjectMgr->LoadReputationSpilloverTemplate();
1634 TC_LOG_INFO(
"server.loading",
"Loading Points Of Interest Data...");
1637 TC_LOG_INFO(
"server.loading",
"Loading Creature Base Stats...");
1640 TC_LOG_INFO(
"server.loading",
"Loading Creature Data...");
1643 TC_LOG_INFO(
"server.loading",
"Loading Temporary Summon Data...");
1646 TC_LOG_INFO(
"server.loading",
"Loading pet levelup spells...");
1649 TC_LOG_INFO(
"server.loading",
"Loading pet default spells additional to levelup spells...");
1652 TC_LOG_INFO(
"server.loading",
"Loading Creature Addon Data...");
1655 TC_LOG_INFO(
"server.loading",
"Loading Gameobject Data...");
1658 TC_LOG_INFO(
"server.loading",
"Loading GameObject Addon Data...");
1661 TC_LOG_INFO(
"server.loading",
"Loading GameObject Quest Items...");
1664 TC_LOG_INFO(
"server.loading",
"Loading Creature Quest Items...");
1667 TC_LOG_INFO(
"server.loading",
"Loading Creature Linked Respawn...");
1670 TC_LOG_INFO(
"server.loading",
"Loading Weather Data...");
1673 TC_LOG_INFO(
"server.loading",
"Loading Quests...");
1676 TC_LOG_INFO(
"server.loading",
"Checking Quest Disables");
1679 TC_LOG_INFO(
"server.loading",
"Loading Quest POI");
1682 TC_LOG_INFO(
"server.loading",
"Loading Quests Starters and Enders...");
1685 TC_LOG_INFO(
"server.loading",
"Loading Quest Greetings...");
1688 TC_LOG_INFO(
"server.loading",
"Loading Objects Pooling Data...");
1691 TC_LOG_INFO(
"server.loading",
"Loading Game Event Data...");
1694 TC_LOG_INFO(
"server.loading",
"Loading UNIT_NPC_FLAG_SPELLCLICK Data...");
1697 TC_LOG_INFO(
"server.loading",
"Loading Vehicle Template Accessories...");
1698 sObjectMgr->LoadVehicleTemplateAccessories();
1700 TC_LOG_INFO(
"server.loading",
"Loading Vehicle Accessories...");
1703 TC_LOG_INFO(
"server.loading",
"Loading SpellArea Data...");
1706 TC_LOG_INFO(
"server.loading",
"Loading AreaTrigger definitions...");
1709 TC_LOG_INFO(
"server.loading",
"Loading Access Requirements...");
1712 TC_LOG_INFO(
"server.loading",
"Loading Quest Area Triggers...");
1715 TC_LOG_INFO(
"server.loading",
"Loading Tavern Area Triggers...");
1718 TC_LOG_INFO(
"server.loading",
"Loading AreaTrigger script names...");
1721 TC_LOG_INFO(
"server.loading",
"Loading LFG entrance positions...");
1724 TC_LOG_INFO(
"server.loading",
"Loading Dungeon boss data...");
1727 TC_LOG_INFO(
"server.loading",
"Loading LFG rewards...");
1730 TC_LOG_INFO(
"server.loading",
"Loading Graveyard-zone links...");
1733 TC_LOG_INFO(
"server.loading",
"Loading spell pet auras...");
1736 TC_LOG_INFO(
"server.loading",
"Loading Spell target coordinates...");
1739 TC_LOG_INFO(
"server.loading",
"Loading enchant custom attributes...");
1742 TC_LOG_INFO(
"server.loading",
"Loading linked spells...");
1745 TC_LOG_INFO(
"server.loading",
"Loading Player Create Data...");
1748 TC_LOG_INFO(
"server.loading",
"Loading Exploration BaseXP Data...");
1751 TC_LOG_INFO(
"server.loading",
"Loading Pet Name Parts...");
1756 TC_LOG_INFO(
"server.loading",
"Loading the max pet number...");
1759 TC_LOG_INFO(
"server.loading",
"Loading pet level stats...");
1762 TC_LOG_INFO(
"server.loading",
"Loading Player level dependent mail rewards...");
1768 TC_LOG_INFO(
"server.loading",
"Loading Skill Discovery Table...");
1771 TC_LOG_INFO(
"server.loading",
"Loading Skill Extra Item Table...");
1774 TC_LOG_INFO(
"server.loading",
"Loading Skill Perfection Data Table...");
1777 TC_LOG_INFO(
"server.loading",
"Loading Skill Fishing base level requirements...");
1780 TC_LOG_INFO(
"server.loading",
"Loading skill tier info...");
1783 TC_LOG_INFO(
"server.loading",
"Loading Achievements...");
1785 TC_LOG_INFO(
"server.loading",
"Loading Achievement Criteria Modifier trees...");
1787 TC_LOG_INFO(
"server.loading",
"Loading Achievement Criteria Lists...");
1789 TC_LOG_INFO(
"server.loading",
"Loading Achievement Criteria Data...");
1791 TC_LOG_INFO(
"server.loading",
"Loading Achievement Rewards...");
1793 TC_LOG_INFO(
"server.loading",
"Loading Achievement Reward Locales...");
1795 TC_LOG_INFO(
"server.loading",
"Loading Completed Achievements...");
1799 TC_LOG_INFO(
"server.loading",
"Loading Item Auctions...");
1802 TC_LOG_INFO(
"server.loading",
"Loading Auctions...");
1805 TC_LOG_INFO(
"server.loading",
"Loading Guild rewards...");
1808 TC_LOG_INFO(
"server.loading",
"Loading Guilds...");
1813 TC_LOG_INFO(
"server.loading",
"Loading ArenaTeams...");
1816 TC_LOG_INFO(
"server.loading",
"Loading Groups...");
1819 TC_LOG_INFO(
"server.loading",
"Loading ReservedNames...");
1822 TC_LOG_INFO(
"server.loading",
"Loading GameObjects for quests...");
1825 TC_LOG_INFO(
"server.loading",
"Loading BattleMasters...");
1828 TC_LOG_INFO(
"server.loading",
"Loading GameTeleports...");
1831 TC_LOG_INFO(
"server.loading",
"Loading Gossip menu...");
1834 TC_LOG_INFO(
"server.loading",
"Loading Gossip menu options...");
1837 TC_LOG_INFO(
"server.loading",
"Loading Vendors...");
1840 TC_LOG_INFO(
"server.loading",
"Loading Trainers...");
1843 TC_LOG_INFO(
"server.loading",
"Loading Waypoints...");
1846 TC_LOG_INFO(
"server.loading",
"Loading SmartAI Waypoints...");
1849 TC_LOG_INFO(
"server.loading",
"Loading Creature Formations...");
1852 TC_LOG_INFO(
"server.loading",
"Loading World States...");
1855 TC_LOG_INFO(
"server.loading",
"Loading Terrain Phase definitions...");
1858 TC_LOG_INFO(
"server.loading",
"Loading Terrain Swap Default definitions...");
1861 TC_LOG_INFO(
"server.loading",
"Loading Terrain World Map definitions...");
1864 TC_LOG_INFO(
"server.loading",
"Loading Phase Area definitions...");
1867 TC_LOG_INFO(
"server.loading",
"Loading Conditions...");
1870 TC_LOG_INFO(
"server.loading",
"Loading faction change achievement pairs...");
1873 TC_LOG_INFO(
"server.loading",
"Loading faction change spell pairs...");
1876 TC_LOG_INFO(
"server.loading",
"Loading faction change quest pairs...");
1879 TC_LOG_INFO(
"server.loading",
"Loading faction change item pairs...");
1882 TC_LOG_INFO(
"server.loading",
"Loading faction change reputation pairs...");
1885 TC_LOG_INFO(
"server.loading",
"Loading faction change title pairs...");
1888 TC_LOG_INFO(
"server.loading",
"Loading GM bugs...");
1891 TC_LOG_INFO(
"server.loading",
"Loading GM complaints...");
1894 TC_LOG_INFO(
"server.loading",
"Loading GM suggestions...");
1900 TC_LOG_INFO(
"server.loading",
"Loading client addons...");
1903 TC_LOG_INFO(
"server.loading",
"Loading garrison info...");
1907 TC_LOG_INFO(
"server.loading",
"Returning old mails...");
1910 TC_LOG_INFO(
"server.loading",
"Loading Autobroadcasts...");
1918 TC_LOG_INFO(
"server.loading",
"Loading spell script names...");
1921 TC_LOG_INFO(
"server.loading",
"Loading Creature Texts...");
1924 TC_LOG_INFO(
"server.loading",
"Loading Creature Text Locales...");
1927 TC_LOG_INFO(
"server.loading",
"Initializing Scripts...");
1931 TC_LOG_INFO(
"server.loading",
"Validating spell scripts...");
1934 TC_LOG_INFO(
"server.loading",
"Loading SmartAI scripts...");
1937 TC_LOG_INFO(
"server.loading",
"Loading Calendar data...");
1941 TC_LOG_INFO(
"server.loading",
"Initialize game time and timers");
1945 LoginDatabase.
PExecute(
"INSERT INTO uptime (realmid, starttime, uptime, revision) VALUES(%u, %u, 0, '%s')",
1982 TC_LOG_INFO(
"server.loading",
"Starting Map System");
1985 TC_LOG_INFO(
"server.loading",
"Starting Game Event system...");
1990 Player::DeleteOldCharacters();
1992 TC_LOG_INFO(
"server.loading",
"Initialize AuctionHouseBot...");
1998 TC_LOG_INFO(
"server.loading",
"Initializing Opcodes...");
2001 TC_LOG_INFO(
"server.loading",
"Starting Arena Season...");
2007 TC_LOG_INFO(
"server.loading",
"Starting Battleground System");
2011 TC_LOG_INFO(
"server.loading",
"Starting Outdoor PvP System");
2015 TC_LOG_INFO(
"server.loading",
"Starting Battlefield System");
2018 TC_LOG_INFO(
"server.loading",
"Loading Transports...");
2022 TC_LOG_INFO(
"server.loading",
"Loading Warden Checks...");
2025 TC_LOG_INFO(
"server.loading",
"Loading Warden Action Overrides...");
2028 TC_LOG_INFO(
"server.loading",
"Deleting expired bans...");
2029 LoginDatabase.
Execute(
"DELETE FROM ip_banned WHERE unbandate <= UNIX_TIMESTAMP() AND unbandate<>bandate");
2031 TC_LOG_INFO(
"server.loading",
"Calculate next daily quest reset time...");
2034 TC_LOG_INFO(
"server.loading",
"Calculate next weekly quest reset time...");
2037 TC_LOG_INFO(
"server.loading",
"Calculate next monthly quest reset time...");
2040 TC_LOG_INFO(
"server.loading",
"Calculate random battleground reset time...");
2043 TC_LOG_INFO(
"server.loading",
"Calculate guild limitation(s) reset time...");
2046 TC_LOG_INFO(
"server.loading",
"Calculate next currency reset time...");
2051 TC_LOG_INFO(
"server.loading",
"Loading race and class expansion requirements...");
2052 sObjectMgr->LoadRaceAndClassExpansionRequirements();
2054 TC_LOG_INFO(
"server.loading",
"Loading character templates...");
2057 TC_LOG_INFO(
"server.loading",
"Loading realm names...");
2060 TC_LOG_INFO(
"server.loading",
"Loading battle pets info...");
2065 TC_LOG_INFO(
"server.worldserver",
"World initialized in %u minutes %u seconds", (startupDuration / 60000), ((startupDuration % 60000) / 1000));
2068 sLog->SetRealmId(realmId);
void dtAllocSetCustom(dtAllocFunc *allocFunc, dtFreeFunc *freeFunc)
Definition: DetourAlloc.cpp:35
#define sDB2Manager
Definition: DB2Stores.h:224
uint32 GetLiquidFlags(uint32 liquidType)
Definition: DBCStores.cpp:794
uint32 Realm
Definition: Realm.h:53
void Execute(const char *sql)
Definition: DatabaseWorkerPool.h:87
OpcodeTable opcodeTable
Definition: Opcodes.cpp:49
Definition: VMapManager2.h:78
void LoadGameTables(const std::string &dataPath, uint32 defaultLocale)
Definition: DBCStores.cpp:500
#define sCalendarMgr
Definition: CalendarMgr.h:334
void LoadConfigSettings(bool reload=false)
Initialize config values.
Definition: World.cpp:427
#define sOutdoorPvPMgr
Definition: OutdoorPvPMgr.h:105
void InitRandomBGResetTime()
Definition: World.cpp:3018
Realm realm
Definition: World.cpp:3485
#define sGuildMgr
Definition: GuildMgr.h:61
void LoadFromDB()
Definition: AddonMgr.cpp:40
void InitializeThreadUnsafe(std::unordered_map< uint32, std::vector< uint32 >> const &mapData)
Definition: MMapManager.cpp:39
void LoadDBAllowedSecurityLevel()
Definition: World.cpp:3135
uint32 getMSTime()
Definition: Timer.h:24
#define sConfigMgr
Definition: Config.h:61
Definition: DBCStructure.h:830
#define sTransportMgr
Definition: TransportMgr.h:162
time_t m_gameTime
Definition: World.h:804
arena_t NULL
Definition: jemalloc_internal.h:624
TC_COMMON_API char const * GetFullVersion()
Definition: GitRevision.cpp:51
void CheckQuestDisables()
Definition: DisableMgr.cpp:248
#define sLog
Definition: Log.h:154
static bool ExistMapAndVMap(uint32 mapid, float x, float y)
Definition: MapManager.cpp:237
uint64_t uint64
Definition: g3dmath.h:170
void LoadGameObjectModelList(std::string const &dataPath)
Definition: GameObjectModel.cpp:43
void LoadDisables()
Definition: DisableMgr.cpp:58
void LoadAutobroadcasts()
Definition: World.cpp:2093
#define sObjectMgr
Definition: ObjectMgr.h:1567
void Close()
Definition: DatabaseWorkerPool.cpp:72
LocaleConstant GetDefaultDbcLocale() const
Definition: World.h:616
time_t mail_timer
Definition: World.h:806
LoginDatabaseWorkerPool LoginDatabase
Accessor to the realm/login database.
Definition: DatabaseEnv.cpp:22
void InitDailyQuestResetTime()
Definition: World.cpp:2976
void PExecute(Format &&sql, Args &&...args)
Definition: DatabaseWorkerPool.h:99
IntervalTimer m_timers[WUPDATE_COUNT]
Definition: World.h:805
void SetInterval(time_t interval)
Definition: Timer.h:79
void LoadSkillDiscoveryTable()
Definition: SkillDiscovery.cpp:47
#define sWaypointMgr
Definition: WaypointManager.h:75
time_t m_startTime
Definition: World.h:803
#define sPoolMgr
Definition: PoolMgr.h:166
TC_GAME_API void CleanDatabase()
Definition: CharacterDatabaseCleaner.cpp:28
void * dtCustomAlloc(int size, dtAllocHint)
Definition: Memory.h:9
Battlenet::RealmHandle Id
Definition: Realm.h:86
#define sLFGMgr
Definition: LFGMgr.h:481
uint32 m_int_configs[INT_CONFIG_VALUE_COUNT]
Definition: World.h:823
bool IsVMAPDisabledFor(uint32 entry, uint8 flags)
Definition: DisableMgr.cpp:375
void dtCustomFree(void *ptr)
Definition: Memory.h:14
#define UI64FMTD
Definition: Define.h:137
#define sSpellMgr
Definition: SpellMgr.h:756
void LoadWeatherData()
Definition: WeatherMgr.cpp:83
std::string m_dataPath
Definition: World.h:834
#define sCreatureTextMgr
Definition: CreatureTextMgr.h:113
bool IsFFAPvPRealm() const
Definition: World.h:718
uint32_t uint32
Definition: Define.h:150
#define sGroupMgr
Definition: GroupMgr.h:59
#define sGarrisonMgr
Definition: GarrisonMgr.h:77
#define sAuctionBot
Definition: AuctionHouseBot.h:305
#define sSmartWaypointMgr
Definition: SmartScriptMgr.h:1670
HotfixDatabaseWorkerPool HotfixDatabase
Accessor to the hotfix database.
Definition: DatabaseEnv.cpp:23
#define sConditionMgr
Definition: ConditionMgr.h:307
void Initialize()
Correspondence between opcodes and their names.
Definition: Opcodes.cpp:111
#define sAccountMgr
Definition: AccountMgr.h:98
#define sInstanceSaveMgr
Definition: InstanceSaveMgr.h:243
time_t mail_timer_expires
Definition: World.h:807
#define sBattlefieldMgr
Definition: BattlefieldMgr.h:67
#define sSupportMgr
Definition: SupportMgr.h:296
void InitMonthlyQuestResetTime()
Definition: World.cpp:3011
TC_COMMON_API struct tm * localtime_r(const time_t *time, struct tm *result)
void InitWeeklyQuestResetTime()
Definition: World.cpp:2969
Definition: MMapManager.h:93
#define sGameEventMgr
Definition: GameEventMgr.h:184
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
void LoadCharacterInfoStore()
Definition: World.cpp:3395
#define TC_LOG_FATAL(filterType__,...)
Definition: Log.h:210
DBCStorage< MapEntry > sMapStore(Mapfmt)
LocaleConstant m_defaultDbcLocale
Definition: World.h:830
#define sTaxiPathGraph
Definition: TaxiPathGraph.h:65
#define sWardenCheckMgr
Definition: WardenCheckMgr.h:80
#define sMapMgr
Definition: MapManager.h:194
#define sFormationMgr
Definition: CreatureGroups.h:84
#define sAuctionMgr
Definition: AuctionHouseMgr.h:199
#define sBattlegroundMgr
Definition: BattlegroundMgr.h:181
static IVMapManager * createOrGetVMapManager()
Definition: VMapFactory.cpp:28
static MMapManager * createOrGetMMapManager()
Definition: MMapFactory.cpp:28
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define sArenaTeamMgr
Definition: ArenaTeamMgr.h:53
void LoadDBCStores(const std::string &dataPath, uint32 defaultLocale)
Definition: DBCStores.cpp:288
#define sScriptMgr
Definition: ScriptMgr.h:837
void Initialize()
Definition: CreatureAIRegistry.cpp:34
uint32_t uint32
Definition: g3dmath.h:168
void LoadWorldStates()
Definition: World.cpp:3289
#define sGuildFinderMgr
Definition: GuildFinderMgr.h:271
TC_GAME_API void LoadRandomEnchantmentsTable()
Definition: ItemEnchantmentMgr.cpp:47
static void CleanOldChannelsInDB()
Definition: Channel.cpp:136
void LoadLootTables()
Definition: LootMgr.cpp:1881
uint32 getIntConfig(WorldIntConfigs index) const
Get a server configuration element (see #WorldConfigs)
Definition: World.h:707
#define sAchievementMgr
Definition: AchievementMgr.h:501
void InitGuildResetTime()
Definition: World.cpp:3046
#define sSmartScriptMgr
Definition: SmartScriptMgr.h:1669
void InitCurrencyResetTime()
Definition: World.cpp:3074
static void Initialize()
Definition: BattlePetMgr.cpp:79