aboutsummaryrefslogtreecommitdiff
path: root/src/trinityrealm/RealmList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trinityrealm/RealmList.cpp')
-rw-r--r--src/trinityrealm/RealmList.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/trinityrealm/RealmList.cpp b/src/trinityrealm/RealmList.cpp
index 4de3a796179..93d3a8da372 100644
--- a/src/trinityrealm/RealmList.cpp
+++ b/src/trinityrealm/RealmList.cpp
@@ -44,7 +44,7 @@ void RealmList::Initialize(uint32 updateInterval)
UpdateRealms(true);
}
-void RealmList::UpdateRealm( uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 color, uint8 timezone, AccountTypes allowedSecurityLevel, float popu)
+void RealmList::UpdateRealm( uint32 ID, const std::string& name, const std::string& address, uint32 port, uint8 icon, uint8 color, uint8 timezone, AccountTypes allowedSecurityLevel, float popu, uint32 build)
{
///- Create new if not exist or update existed
Realm& realm = m_realms[name];
@@ -61,6 +61,7 @@ void RealmList::UpdateRealm( uint32 ID, const std::string& name, const std::stri
std::ostringstream ss;
ss << address << ":" << port;
realm.address = ss.str();
+ realm.gamebuild = build;
}
void RealmList::UpdateIfNeed()
@@ -82,7 +83,7 @@ void RealmList::UpdateRealms(bool init)
{
sLog.outDetail("Updating Realm List...");
- QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population FROM realmlist WHERE color <> 3 ORDER BY name" );
+ QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, color, timezone, allowedSecurityLevel, population, gamebuild FROM realmlist WHERE color <> 3 ORDER BY name" );
///- Circle through results and add them to the realm map
if(result)
@@ -93,7 +94,7 @@ void RealmList::UpdateRealms(bool init)
uint8 allowedSecurityLevel = fields[7].GetUInt8();
- UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat() );
+ UpdateRealm(fields[0].GetUInt32(), fields[1].GetCppString(),fields[2].GetCppString(),fields[3].GetUInt32(),fields[4].GetUInt8(), fields[5].GetUInt8(), fields[6].GetUInt8(), (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), fields[8].GetFloat(), fields[9].GetUInt32() );
if(init)
sLog.outString("Added realm \"%s\".", fields[1].GetString());
} while( result->NextRow() );