Core/DBLayer: Few more type corrections

Closes #5871
This commit is contained in:
Nay
2012-03-24 23:05:24 +00:00
parent 61691d7698
commit 192d7d735d
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -174,7 +174,7 @@ uint32 GetSecurity(uint32 accountId)
stmt->setUInt32(0, accountId); stmt->setUInt32(0, accountId);
PreparedQueryResult result = LoginDatabase.Query(stmt); 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) uint32 GetSecurity(uint32 accountId, int32 realmId)
@@ -184,7 +184,7 @@ uint32 GetSecurity(uint32 accountId, int32 realmId)
stmt->setInt32(1, realmId); stmt->setInt32(1, realmId);
PreparedQueryResult result = LoginDatabase.Query(stmt); 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) bool GetName(uint32 accountId, std::string& name)
+1 -1
View File
@@ -909,7 +909,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
else else
{ {
fields = result->Fetch(); fields = result->Fetch();
security = fields[0].GetInt32(); security = fields[0].GetUInt8();
} }
// Re-check account ban (same check as in realmd) // Re-check account ban (same check as in realmd)
+2 -2
View File
@@ -227,8 +227,8 @@ public:
Field* fieldsLogin = resultLogin->Fetch(); Field* fieldsLogin = resultLogin->Fetch();
handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE, handler->PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(), fieldsLogin[0].GetCString(), name.c_str(), fieldsLogin[1].GetCString(),
fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt32(), fieldsDB[2].GetUInt16(), fieldsDB[3].GetUInt16(), fieldsLogin[3].GetUInt8(),
fieldsLogin[2].GetUInt32()); fieldsLogin[2].GetUInt8());
} }
else else
handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str()); handler->PSendSysMessage(LANG_ACCOUNT_LIST_ERROR, name.c_str());
@@ -32,7 +32,7 @@
RASocket::RASocket() RASocket::RASocket()
{ {
iMinLevel = ConfigMgr::GetIntDefault("RA.MinLevel", 3); _minLevel = ConfigMgr::GetIntDefault("RA.MinLevel", 3);
} }
RASocket::~RASocket() RASocket::~RASocket()
@@ -192,7 +192,7 @@ int RASocket::check_access_level(const std::string& user)
Field* fields = result->Fetch(); 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()); sLog->outRemote("User %s has no privilege to login", user.c_str());
return -1; return -1;
@@ -56,7 +56,7 @@ class RASocket: public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
private: private:
/// Minimum security level required to connect /// Minimum security level required to connect
uint8 iMinLevel; uint8 _minLevel;
}; };
#endif #endif
/// @} /// @}