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
This commit is contained in:
commit
da91ae1f22
93 files changed
+2131
-827
No files matched your search
@@ -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()));
|
||||
|
||||
Reference in new issue
Block a user