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

Port From (https://github.com/TrinityCore/TrinityCore/commit/1232f1d06e21ba0bfb0e956b8e957780cd5985c2)
This commit is contained in:
hondacrx
2021-11-15 23:15:26 -05:00
parent c5ed2f5a97
commit 593a4b9df8
+6
View File
@@ -697,6 +697,12 @@ namespace Game.Entities
if (targetOwner != null)
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.
Creature creature = target.ToCreature();
if (creature != null)
if (!creature.HasLootRecipient() && IsPlayer())
creature.SetLootRecipient(this);
Player myPlayerOwner = GetCharmerOrOwnerPlayerOrPlayerItself();
Player targetPlayerOwner = target.GetCharmerOrOwnerPlayerOrPlayerItself();
if (myPlayerOwner && targetPlayerOwner && !(myPlayerOwner.duel != null && myPlayerOwner.duel.Opponent == targetPlayerOwner))