Show
Ignore:
Timestamp:
11/19/08 13:34:57 (17 years ago)
Author:
yumileroy
Message:

[svn] * Use ObjectMgr/AccountMgr? functions rather than DB queries. Source mangos

Original author: KingPin?
Date: 2008-10-21 19:07:16-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ObjectMgr.cpp

    r88 r94  
    13561356{ 
    13571357    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 
     1368uint32 ObjectMgr::GetPlayerAccountIdByPlayerName(std::string name) const 
     1369{ 
     1370    QueryResult *result = CharacterDatabase.PQuery("SELECT account FROM characters WHERE name = '%s'", name.c_str()); 
    13581371    if(result) 
    13591372    {