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

This commit is contained in:
xinef1 authored and Aokromes committed 2016-12-28 16:08:22 +01:00
1 parent 58c0171e77
commit 297fdc6e1a
1 file changed
+4
+4
View File
@@ -13981,6 +13981,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)