aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <none@none>2010-12-23 19:58:00 +0100
committerShauren <none@none>2010-12-23 19:58:00 +0100
commitb098c15674e4124cd5364ed70dc2731305a2a3e0 (patch)
tree5dbb0259cde49af58b2e8ee4957d8d6520995857
parent3b903693aa0393d4242b896eb3221cbefe919ab8 (diff)
Core/Auras: Removed pointless checks in SPELL_AURA_MOD_THREAT (10)
--HG-- branch : trunk
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 55a0bc37790..9acb142f2d9 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -3963,17 +3963,9 @@ void AuraEffect::HandleModThreat(AuraApplication const * aurApp, uint8 mode, boo
return;
Unit * target = aurApp->GetTarget();
- if (apply && !target->isAlive())
- return;
-
- Unit * caster = GetCaster();
- if (!caster)
- return;
-
- if (target->GetTypeId() == TYPEID_PLAYER)
- for (int8 x=0; x < MAX_SPELL_SCHOOL; x++)
- if (GetMiscValue() & int32(1<<x))
- ApplyPercentModFloatVar(target->m_threatModifier[x], (float)GetAmount(), apply);
+ for (int32 i = 0; i < MAX_SPELL_SCHOOL; ++i)
+ if (GetMiscValue() & (1 << i))
+ ApplyPercentModFloatVar(target->m_threatModifier[i], float(GetAmount()), apply);
}
void AuraEffect::HandleAuraModTotalThreat(AuraApplication const * aurApp, uint8 mode, bool apply) const