mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)
This commit is contained in:
@@ -82,8 +82,8 @@ public:
|
||||
}
|
||||
|
||||
// Get target information
|
||||
uint64 targetGuid = sObjectMgr->GetPlayerGUIDByName(target.c_str());
|
||||
uint64 targetAccountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
|
||||
ObjectGuid targetGuid = sObjectMgr->GetPlayerGUIDByName(target.c_str());
|
||||
uint32 targetAccountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid.GetCounter());
|
||||
uint32 targetGmLevel = AccountMgr::GetSecurity(targetAccountId, realmID);
|
||||
|
||||
// Target must exist and have administrative rights
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
sTicketMgr->ResolveAndCloseTicket(ticket->GetId(), player ? player->GetGUID() : -1);
|
||||
sTicketMgr->ResolveAndCloseTicket(ticket->GetId(), player ? player->GetGUID() : ObjectGuid::Empty);
|
||||
sTicketMgr->UpdateLastChange();
|
||||
|
||||
std::string msg = ticket->FormatMessageString(*handler, player ? player->GetName().c_str() : "Console", nullptr, nullptr, nullptr);
|
||||
@@ -244,7 +244,7 @@ public:
|
||||
|
||||
SQLTransaction trans = SQLTransaction(nullptr);
|
||||
ticket->SetCompleted();
|
||||
ticket->SetResolvedBy(gm ? gm->GetGUID() : -1);
|
||||
ticket->SetResolvedBy(gm ? gm->GetGUID() : ObjectGuid::Empty);
|
||||
ticket->SaveToDB(trans);
|
||||
|
||||
std::string msg = ticket->FormatMessageString(*handler, nullptr, nullptr, nullptr, nullptr);
|
||||
@@ -380,8 +380,8 @@ public:
|
||||
security = assignedPlayer->GetSession()->GetSecurity();
|
||||
else
|
||||
{
|
||||
uint64 guid = ticket->GetAssignedToGUID();
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(guid);
|
||||
ObjectGuid guid = ticket->GetAssignedToGUID();
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(guid.GetCounter());
|
||||
security = AccountMgr::GetSecurity(accountId, realmID);
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ public:
|
||||
return false;
|
||||
|
||||
// Detect target's GUID
|
||||
uint64 guid = 0;
|
||||
ObjectGuid guid;
|
||||
if (Player* player = ObjectAccessor::FindPlayerByName(name, false))
|
||||
guid = player->GetGUID();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user