From b5a3947a805c9ca9eca1150aa7a935c2611d742a Mon Sep 17 00:00:00 2001 From: Warpten Date: Fri, 21 Dec 2012 20:12:11 +0100 Subject: Core/StatsSystem: Fixing up "fucked up logic". Nayd's Seal of Approval. --- src/server/game/Entities/Unit/Unit.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 4d2934f5842..e8ac91eb145 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -15675,11 +15675,7 @@ void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const return; // Don't consider resilience if not in PvP - player or pet - bool isAllowedSource = (GetTypeId() == TYPEID_PLAYER); - if (!isAllowedSource && GetTypeId() == TYPEID_UNIT && GetOwner() && GetOwner()->GetTypeId() == TYPEID_PLAYER) - isAllowedSource = true; - - if (!isAllowedSource) + if (!GetCharmerOrOwnerPlayerOrPlayerItself()) return; Unit const* target = NULL; -- cgit v1.2.3