Core/Creatures: Changed creatures to become tagged by player doing any action that causes creature aggro (apart from distance) (#22759)

* This was introduced in patch 3.0.8

(cherry picked from commit f2df802c500e3878ba431d1be0a57ce293983121)
This commit is contained in:
PolarCookie
2021-11-15 22:16:04 +01:00
committed by Shauren
parent 87486cecff
commit 1232f1d06e
+5
View File
@@ -7709,6 +7709,11 @@ void Unit::AttackedTarget(Unit* target, bool canInitialAggro)
if (Unit* targetOwner = target->GetCharmerOrOwner())
targetOwner->EngageWithTarget(this);
//Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
if (Creature* creature = target->ToCreature())
if (!creature->hasLootRecipient() && GetTypeId() == TYPEID_PLAYER)
creature->SetLootRecipient(this);
Player* myPlayerOwner = GetCharmerOrOwnerPlayerOrPlayerItself();
Player* targetPlayerOwner = target->GetCharmerOrOwnerPlayerOrPlayerItself();
if (myPlayerOwner && targetPlayerOwner && !(myPlayerOwner->duel && myPlayerOwner->duel->Opponent == targetPlayerOwner))