Few small optimizations here and there

This commit is contained in:
Aokromes committed 2017-02-01 16:51:21 +01:00
1 parent 0f9c7106ce
commit 8bb777ef5c
35 files changed
+366 -373

No files matched your search

+3 -3
View File
@@ -95,7 +95,7 @@ public:
return true;
}
ObjectGuid targetGuid = sObjectMgr->GetPlayerGUIDByName(target);
ObjectGuid targetGuid = sWorld->GetCharacterGuidByName(target);
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
// Target must exist and have administrative rights
if (!AccountMgr::HasPermission(accountId, rbac::RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET, realm.Id.Realm))
@@ -455,10 +455,10 @@ public:
if (Player* player = ObjectAccessor::FindPlayerByName(name))
guid = player->GetGUID();
else
guid = sObjectMgr->GetPlayerGUIDByName(name);
guid = sWorld->GetCharacterGuidByName(name);
// Target must exist
if (!guid)
if (guid.IsEmpty())
{
handler->SendSysMessage(LANG_NO_PLAYERS_FOUND);
return true;