Merge branch '4.3.4' of https://github.com/TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -844,6 +844,8 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
}
|
||||
|
||||
// Get the account information from the realmd database
|
||||
// 0 1 2 3 4 5 6 7 8
|
||||
// SELECT id, sessionkey, last_ip, locked, expansion, mutetime, locale, recruiter, os FROM account WHERE username = ?
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_INFO_BY_NAME);
|
||||
|
||||
stmt->setString(0, account);
|
||||
@@ -860,15 +862,11 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
uint8 expansion = fields[6].GetUInt8();
|
||||
uint8 expansion = fields[4].GetUInt8();
|
||||
uint32 world_expansion = sWorld->getIntConfig(CONFIG_EXPANSION);
|
||||
if (expansion > world_expansion)
|
||||
expansion = world_expansion;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: (s, v) check s: %s v: %s",
|
||||
fields[5].GetCString(),
|
||||
fields[4].GetCString());
|
||||
|
||||
///- Re-check ip locking (same check as in realmd).
|
||||
if (fields[3].GetUInt8() == 1) // if ip is locked
|
||||
{
|
||||
@@ -884,13 +882,13 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
|
||||
k.SetHexStr(fields[1].GetCString());
|
||||
|
||||
int64 mutetime = fields[7].GetInt64();
|
||||
int64 mutetime = fields[5].GetInt64();
|
||||
//! Negative mutetime indicates amount of seconds to be muted effective on next login - which is now.
|
||||
if (mutetime < 0)
|
||||
{
|
||||
mutetime = time(NULL) + llabs(mutetime);
|
||||
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME);
|
||||
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_MUTE_TIME_LOGIN);
|
||||
|
||||
stmt->setInt64(0, mutetime);
|
||||
stmt->setUInt32(1, id);
|
||||
@@ -898,12 +896,12 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
LoginDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
locale = LocaleConstant (fields[8].GetUInt8());
|
||||
locale = LocaleConstant (fields[6].GetUInt8());
|
||||
if (locale >= TOTAL_LOCALES)
|
||||
locale = LOCALE_enUS;
|
||||
|
||||
uint32 recruiter = fields[9].GetUInt32();
|
||||
std::string os = fields[10].GetString();
|
||||
uint32 recruiter = fields[7].GetUInt32();
|
||||
std::string os = fields[8].GetString();
|
||||
|
||||
// Must be done before WorldSession is created
|
||||
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX")
|
||||
@@ -1006,6 +1004,7 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
m_Session->LoadGlobalAccountData();
|
||||
m_Session->LoadTutorialsData();
|
||||
m_Session->ReadAddonsInfo(addonsData);
|
||||
m_Session->LoadPermissions();
|
||||
|
||||
// Initialize Warden system only if it is enabled by config
|
||||
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED))
|
||||
|
||||
Reference in New Issue
Block a user