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
This commit is contained in:
PolarCookie
2018-11-04 21:59:03 +01:00
committed by Shauren
parent 93cb86b683
commit f2df802c50

View File

@@ -8183,6 +8183,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))