Core/Spells: rework part 4: iterate over effects first
Implement far spell queue processing # Conflicts: # src/server/game/Spells/Spell.cpp
This commit is contained in:
1 parent
3fbbea61bd
commit
4bb8c93df8
12 files changed
+765
-834
No files matched your search
@@ -363,8 +363,8 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR0_CU_SHARE_DAMAGE))
|
||||
{
|
||||
uint32 count = 0;
|
||||
for (std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if (ihit->effectMask & (1<<effIndex))
|
||||
for (auto ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if (ihit->EffectMask & (1 << effIndex))
|
||||
++count;
|
||||
|
||||
damage /= count; // divide to all targets
|
||||
@@ -1072,10 +1072,10 @@ void Spell::EffectHeal(SpellEffIndex effIndex)
|
||||
if (m_spellInfo->Id == 45064)
|
||||
{
|
||||
// Amount of heal - depends from stacked Holy Energy
|
||||
int damageAmount = 0;
|
||||
int32 damageAmount = 0;
|
||||
if (AuraEffect const* aurEff = m_caster->GetAuraEffect(45062, 0))
|
||||
{
|
||||
damageAmount+= aurEff->GetAmount();
|
||||
damageAmount += aurEff->GetAmount();
|
||||
m_caster->RemoveAurasDueToSpell(45062);
|
||||
}
|
||||
|
||||
@@ -1128,7 +1128,7 @@ void Spell::EffectHeal(SpellEffIndex effIndex)
|
||||
if (unitTarget->HasAura(48920) && (unitTarget->GetHealth() + addhealth >= unitTarget->GetMaxHealth()))
|
||||
unitTarget->RemoveAura(48920);
|
||||
|
||||
m_damage -= addhealth;
|
||||
m_healing += addhealth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user