mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(Core/RealmList): port TrinityCore realm api (#5626)
* feat(Core/RealmList): port TrinityCore realm api * 1 * whitespace cleanup * Update data/sql/updates/pending_db_auth/rev_1620114805872279900.sql Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * 1 * 2 * Update data/sql/updates/pending_db_auth/rev_1620114805872279900.sql Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * ` * 1 * small corrects * finish maybe * realm.Id.Realm * ws * 1 Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,7 @@ EndScriptData */
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "Realm.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "TicketMgr.h"
|
||||
|
||||
@@ -84,7 +85,7 @@ public:
|
||||
// Get target information
|
||||
ObjectGuid targetGuid = sObjectMgr->GetPlayerGUIDByName(target.c_str());
|
||||
uint32 targetAccountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid.GetCounter());
|
||||
uint32 targetGmLevel = AccountMgr::GetSecurity(targetAccountId, realmID);
|
||||
uint32 targetGmLevel = AccountMgr::GetSecurity(targetAccountId, realm.Id.Realm);
|
||||
|
||||
// Target must exist and have administrative rights
|
||||
if (!targetGuid || AccountMgr::IsPlayerAccount(targetGmLevel))
|
||||
@@ -382,7 +383,7 @@ public:
|
||||
{
|
||||
ObjectGuid guid = ticket->GetAssignedToGUID();
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(guid.GetCounter());
|
||||
security = AccountMgr::GetSecurity(accountId, realmID);
|
||||
security = AccountMgr::GetSecurity(accountId, realm.Id.Realm);
|
||||
}
|
||||
|
||||
// Check security
|
||||
|
||||
Reference in New Issue
Block a user