Skip to content

Commit

Permalink
Core/Worldserver: Move the Realm instance into the game library
Browse files Browse the repository at this point in the history
  • Loading branch information
Naios committed Mar 11, 2016
1 parent 329225b commit 7c257aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/server/game/World/World.cpp
Expand Up @@ -3473,6 +3473,8 @@ void World::RemoveOldCorpses()
m_timers[WUPDATE_CORPSES].SetCurrent(m_timers[WUPDATE_CORPSES].GetInterval());
}

Realm realm;

uint32 GetVirtualRealmAddress()
{
return uint32(realm.Id.Region) << 24 | uint32(realm.Id.Site) << 16 | realm.Id.Realm;
Expand Down
1 change: 1 addition & 0 deletions src/server/game/World/World.h
Expand Up @@ -898,5 +898,6 @@ extern Realm realm;
uint32 GetVirtualRealmAddress();

#define sWorld World::instance()

#endif
/// @}
2 changes: 0 additions & 2 deletions src/server/worldserver/Main.cpp
Expand Up @@ -80,8 +80,6 @@ uint32 _worldLoopCounter(0);
uint32 _lastChangeMsTime(0);
uint32 _maxCoreStuckTimeInMs(0);

Realm realm;

void SignalHandler(const boost::system::error_code& error, int signalNumber);
void FreezeDetectorHandler(const boost::system::error_code& error);
AsyncAcceptor* StartRaSocketAcceptor(boost::asio::io_service& ioService);
Expand Down

0 comments on commit 7c257aa

Please sign in to comment.