From 7eab6a791ae1c039de67a80ff8bd125bf69f7ba4 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 21 Oct 2014 21:09:15 +0200 Subject: Core/Entities: Final batch of removing implicit conversions of ObjectGuid to uint64 (cherry picked from commit 68f45e87345ff85341f835f0372f2a62b89f24d9) --- src/server/scripts/Commands/cs_character.cpp | 4 ++-- src/server/scripts/Commands/cs_npc.cpp | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp index 5d33e5d6e98..7c557055fd2 100644 --- a/src/server/scripts/Commands/cs_character.cpp +++ b/src/server/scripts/Commands/cs_character.cpp @@ -790,7 +790,7 @@ public: // Update level and reset XP, everything else will be updated at login CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_LEVEL); stmt->setUInt8(0, static_cast(newlevel)); - stmt->setUInt32(1, player->GetGUID()); + stmt->setUInt32(1, player->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); } @@ -837,7 +837,7 @@ public: // Update level and reset XP, everything else will be updated at login CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_LEVEL); stmt->setUInt8(0, static_cast(newlevel)); - stmt->setUInt32(1, player->GetGUID()); + stmt->setUInt32(1, player->GetGUID().GetCounter()); CharacterDatabase.Execute(stmt); } diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 99a5a524a2c..9b86dc7d576 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -1122,8 +1122,7 @@ public: { if (!pair.second) continue; - ObjectGuid guid = ObjectGuid::Create(pair.first); - Player const* player = ObjectAccessor::FindConnectedPlayer(guid); + Player const* player = ObjectAccessor::FindConnectedPlayer(pair.first); handler->PSendSysMessage(LANG_COMMAND_NPC_SHOWLOOT_SUBLABEL, player ? player->GetName() : Trinity::StringFormat("Offline player ({})", pair.first.ToString()), pair.second->size()); for (auto it = pair.second->cbegin(); it != pair.second->cend(); ++it) -- cgit v1.2.3