mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-20 06:49:29 -04:00
Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user