@@ -174,7 +174,7 @@ uint32 GetSecurity(uint32 accountId)
|
||||
stmt->setUInt32(0, accountId);
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
|
||||
return (result) ? (*result)[0].GetUInt32() : uint32(SEC_PLAYER);
|
||||
return (result) ? (*result)[0].GetUInt8() : uint32(SEC_PLAYER);
|
||||
}
|
||||
|
||||
uint32 GetSecurity(uint32 accountId, int32 realmId)
|
||||
@@ -184,7 +184,7 @@ uint32 GetSecurity(uint32 accountId, int32 realmId)
|
||||
stmt->setInt32(1, realmId);
|
||||
PreparedQueryResult result = LoginDatabase.Query(stmt);
|
||||
|
||||
return (result) ? (*result)[0].GetUInt32() : uint32(SEC_PLAYER);
|
||||
return (result) ? (*result)[0].GetUInt8() : uint32(SEC_PLAYER);
|
||||
}
|
||||
|
||||
bool GetName(uint32 accountId, std::string& name)
|
||||
|
||||
@@ -909,7 +909,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
||||
else
|
||||
{
|
||||
fields = result->Fetch();
|
||||
security = fields[0].GetInt32();
|
||||
security = fields[0].GetUInt8();
|
||||
}
|
||||
|
||||
// Re-check account ban (same check as in realmd)
|
||||
|
||||
@@ -227,8 +227,8 @@ public:
|
||||
Field* fieldsLogin = resultLogin->Fetch();
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
|
||||
fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(),
|
||||
fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(),
|
||||
fieldsLogin[2].GetUInt32());
|
||||
fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt8(),
|
||||
fieldsLogin[2].GetUInt8());
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
RASocket::RASocket()
|
||||
{
|
||||
iMinLevel = ConfigMgr::GetIntDefault("RA.MinLevel", 3);
|
||||
_minLevel = ConfigMgr::GetIntDefault("RA.MinLevel", 3);
|
||||
}
|
||||
|
||||
RASocket::~RASocket()
|
||||
@@ -192,7 +192,7 @@ int RASocket::check_access_level(const std::string& user)
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
if (fields[1].GetUInt32() < iMinLevel)
|
||||
if (fields[1].GetUInt8() < _minLevel)
|
||||
{
|
||||
sLog->outRemote("User %s has no privilege to login", user.c_str());
|
||||
return -1;
|
||||
|
||||
@@ -56,7 +56,7 @@ class RASocket: public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
|
||||
|
||||
private:
|
||||
/// Minimum security level required to connect
|
||||
uint8 iMinLevel;
|
||||
uint8 _minLevel;
|
||||
};
|
||||
#endif
|
||||
/// @}
|
||||
|
||||
Reference in New Issue
Block a user