aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-09-27 05:16:23 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-09-27 05:23:46 +0200
commitda91ae1f225b711c916b180675886b31b2d2ebf4 (patch)
tree2a0cbd5fed64c19a0166874d31ae960f0920df89 /src/server/game/Spells/Spell.cpp
parenteb4ff759ecb844aceb0017c16b2732423f199b84 (diff)
parenteccc6e97ead56d79cf58904a9276c73feea028ee (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp src/server/scripts/Spells/spell_dk.cpp src/server/scripts/Spells/spell_druid.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/scripts/Spells/spell_warrior.cpp
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 01eeac8066a..108f23bcc6a 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -4589,8 +4589,9 @@ void Spell::HandleThreatSpells()
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{
+ float threatToAdd = threat;
if (ihit->missCondition != SPELL_MISS_NONE)
- continue;
+ threatToAdd = 0.0f;
Unit* target = ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
if (!target)
@@ -4598,14 +4599,14 @@ void Spell::HandleThreatSpells()
// positive spells distribute threat among all units that are in combat with target, like healing
if (m_spellInfo->_IsPositiveSpell())
- target->getHostileRefManager().threatAssist(m_caster, threat, m_spellInfo);
+ target->getHostileRefManager().threatAssist(m_caster, threatToAdd, m_spellInfo);
// for negative spells threat gets distributed among affected targets
else
{
if (!target->CanHaveThreatList())
continue;
- target->AddThreat(m_caster, threat, m_spellInfo->GetSchoolMask(), m_spellInfo);
+ target->AddThreat(m_caster, threatToAdd, m_spellInfo->GetSchoolMask(), m_spellInfo);
}
}
TC_LOG_DEBUG("spells", "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size()));