aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authorraczman <none@none>2009-03-21 14:34:03 +0100
committerraczman <none@none>2009-03-21 14:34:03 +0100
commitc6860a28f6593698eedaaa2f98b39f1efd6bd74a (patch)
tree2988d686330bfb9078ea007f2e969e396994a8a3 /src/game/SpellEffects.cpp
parentf5116e0e7864d593930d1404d5b4d9316553ee42 (diff)
Mutilate fix - by _krz.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index c974d835618..750130984eb 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4160,26 +4160,15 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
// Mutilate (for each hand)
else if(m_spellInfo->SpellFamilyFlags & 0x600000000LL)
{
- bool found = false;
- // fast check
- if(unitTarget->HasAuraState(AURA_STATE_DEADLY_POISON))
- found = true;
- // full aura scan
- else
+ Unit::AuraMap const& auras = unitTarget->GetAuras();
+ for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
{
- Unit::AuraMap const& auras = unitTarget->GetAuras();
- for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
+ if(itr->second->GetSpellProto()->Dispel == DISPEL_POISON)
{
- if(itr->second->GetSpellProto()->Dispel == DISPEL_POISON)
- {
- found = true;
- break;
- }
+ totalDamagePercentMod *= 1.5f; // 150% if poisoned
+ break;
}
}
-
- if(found)
- totalDamagePercentMod *= 1.5f; // 150% if poisoned
}
break;
}