From f44572ce56989baffd7e1f6cbf62f39fa65ec343 Mon Sep 17 00:00:00 2001 From: xinef1 Date: Mon, 26 Dec 2016 11:14:43 +0100 Subject: Core/Units: Fixed exploit where killing tamed pet could yield emblems (#18605) (cherry picked from commit 2aae46ad49851239f69910dc0ccd2efed87bdb10) --- src/server/game/Entities/Unit/Unit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4a03028ae15..1d6ba29800b 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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) -- cgit v1.2.3