aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarpten <vertozor@gmail.com>2012-12-21 20:12:11 +0100
committerWarpten <vertozor@gmail.com>2012-12-21 20:12:11 +0100
commitb5a3947a805c9ca9eca1150aa7a935c2611d742a (patch)
tree8791db490eed9b290bb6a9e3ba1d6e6246a39e70
parentcf99043c1ef446fc6394a295d8bb6dbb1a0566f3 (diff)
Core/StatsSystem: Fixing up "fucked up logic".
Nayd's Seal of Approval.
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
1 files changed, 1 insertions, 5 deletions
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;