mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user