Core/Misc: Moved CharacterInfo out of world to separate class
This commit is contained in:
1 parent
5373e2bd3b
commit
5e1a7bcfbb
43 files changed
+520
-391
No files matched your search
@@ -23,6 +23,7 @@ Category: commandscripts
|
||||
EndScriptData */
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "CharacterCache.h"
|
||||
#include "Chat.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -95,8 +96,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectGuid targetGuid = sWorld->GetCharacterGuidByName(target);
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
|
||||
ObjectGuid targetGuid = sCharacterCache->GetCharacterGuidByName(target);
|
||||
uint32 accountId = sCharacterCache->GetCharacterAccountIdByGuid(targetGuid);
|
||||
// Target must exist and have administrative rights
|
||||
if (!AccountMgr::HasPermission(accountId, rbac::RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET, realm.Id.Realm))
|
||||
{
|
||||
@@ -394,7 +395,7 @@ public:
|
||||
else
|
||||
{
|
||||
ObjectGuid guid = ticket->GetAssignedToGUID();
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(guid);
|
||||
uint32 accountId = sCharacterCache->GetCharacterAccountIdByGuid(guid);
|
||||
security = AccountMgr::GetSecurity(accountId, realm.Id.Realm);
|
||||
}
|
||||
|
||||
@@ -455,7 +456,7 @@ public:
|
||||
if (Player* player = ObjectAccessor::FindPlayerByName(name))
|
||||
guid = player->GetGUID();
|
||||
else
|
||||
guid = sWorld->GetCharacterGuidByName(name);
|
||||
guid = sCharacterCache->GetCharacterGuidByName(name);
|
||||
|
||||
// Target must exist
|
||||
if (guid.IsEmpty())
|
||||
|
||||
Reference in new issue
Block a user