diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 31aecbb65a0..2289020ee38 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4559,8 +4559,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) @@ -4568,14 +4569,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())); |
