Changeset 79 for trunk/src/game/AccountMgr.cpp
- Timestamp:
- 11/19/08 13:32:21 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/AccountMgr.cpp
r44 r79 19 19 */ 20 20 21 #include "Account Mgr.h"21 #include "AccountAccessor.h" 22 22 #include "Database/DatabaseEnv.h" 23 23 #include "ObjectMgr.h" … … 82 82 83 83 // kick if player currently 84 if(Player* p = objmgr.GetPlayer(guid))84 if(Player* p = ObjectAccessor::FindPlayer(guid)) 85 85 { 86 86 WorldSession* s = p->GetSession(); … … 169 169 } 170 170 171 uint32 AccountMgr::GetSecurity(uint32 acc_id) 172 { 173 QueryResult *result = loginDatabase.PQuery("SELECT gmlevel FROM account WHERE id = '%u'", acc_id); 174 if(result) 175 { 176 uint32 sec = (*result)[0].GetUInt32(); 177 delete result; 178 return sec; 179 } 180 181 return 0; 182 } 183 184 bool AccountMgr::GetName(uint32 acc_id, std::string &name) 185 { 186 QueryResult *result = loginDatabase.PQuery("SELECT username FROM account WHERE id = '%u'", acc_id); 187 if(result) 188 { 189 name = (*result)[0].GetCppString(); 190 delete result; 191 return true; 192 } 193 194 return false; 195 } 196 171 197 bool AccountMgr::CheckPassword(uint32 accid, std::string passwd) 172 198 {