mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[11470] Final cleanup uint64 guid cases
Also drop logout player update fields cleanup that in any cases not saved.
This commit is contained in:
parent
a2b6a6fde5
commit
719e298795
26 changed files with 144 additions and 153 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue