Core/Units: Fixed exploit where killing tamed pet could yield emblems (#18605)

(cherry picked from commit 2aae46ad49)
This commit is contained in:
xinef1
2016-12-26 11:14:43 +01:00
committed by DoctorKraft
parent 0515184ba9
commit f44572ce56
+4
View File
@@ -10851,6 +10851,10 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (isRewardAllowed && creature && creature->GetLootRecipient())
player = creature->GetLootRecipient();
// Exploit fix
if (creature && creature->IsPet() && creature->GetOwnerGUID().IsPlayer())
isRewardAllowed = false;
// Reward player, his pets, and group/raid members
// call kill spell proc event (before real die and combat stop to triggering auras removed at death/combat stop)
if (isRewardAllowed && player && player != victim)