[11470] Final cleanup uint64 guid cases

Also drop logout player update fields cleanup that in any cases not saved.
This commit is contained in:
VladimirMangos 2011-05-11 21:32:50 +04:00
parent a2b6a6fde5
commit 719e298795
26 changed files with 144 additions and 153 deletions

View file

@ -1583,17 +1583,17 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
}
// name must be checked to correctness (if received) before call this function
uint64 ObjectMgr::GetPlayerGUIDByName(std::string name) const
ObjectGuid ObjectMgr::GetPlayerGuidByName(std::string name) const
{
uint64 guid = 0;
ObjectGuid guid;
CharacterDatabase.escape_string(name);
// Player name safe to sending to DB (checked at login) and this function using
QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM characters WHERE name = '%s'", name.c_str());
if(result)
if (result)
{
guid = ObjectGuid(HIGHGUID_PLAYER, (*result)[0].GetUInt32()).GetRawValue();
guid = ObjectGuid(HIGHGUID_PLAYER, (*result)[0].GetUInt32());
delete result;
}