Changeset 94 for trunk/src/game/ObjectMgr.cpp
- Timestamp:
- 11/19/08 13:34:57 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ObjectMgr.cpp
r88 r94 1356 1356 { 1357 1357 QueryResult *result = CharacterDatabase.PQuery("SELECT account FROM characters WHERE guid = '%u'", GUID_LOPART(guid)); 1358 if(result) 1359 { 1360 uint32 acc = (*result)[0].GetUInt32(); 1361 delete result; 1362 return acc; 1363 } 1364 1365 return 0; 1366 } 1367 1368 uint32 ObjectMgr::GetPlayerAccountIdByPlayerName(std::string name) const 1369 { 1370 QueryResult *result = CharacterDatabase.PQuery("SELECT account FROM characters WHERE name = '%s'", name.c_str()); 1358 1371 if(result) 1359 1372 {