Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)

This commit is contained in:
Spp-
2011-07-27 12:14:27 +02:00
parent fa50c0a464
commit b2a84d9f1e
47 changed files with 166 additions and 168 deletions
+2 -2
View File
@@ -14753,7 +14753,7 @@ void Unit::ClearComboPointHolders()
{
uint32 lowguid = *m_ComboPointHolders.begin();
Player* plr = sObjectMgr->GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
Player* plr = ObjectAccessor::FindPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER));
if (plr && plr->GetComboTarget() == GetGUID()) // recheck for safe
plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
else
@@ -15365,7 +15365,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
group->UpdateLooterGuid(creature, true);
if (group->GetLooterGuid())
{
looter = sObjectMgr->GetPlayer(group->GetLooterGuid());
looter = ObjectAccessor::FindPlayer(group->GetLooterGuid());
if (looter)
{
creature->SetLootRecipient(looter); // update creature loot recipient to the allowed looter.