diff options
author | megamage <none@none> | 2009-07-24 09:59:33 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-24 09:59:33 +0800 |
commit | b6c0f72b1350b76da6add2781ff54e343eaf2c48 (patch) | |
tree | 5c1cdca52f872f42e54513ffbdd40041a017abe3 /src/game/SpellEffects.cpp | |
parent | f9d0ccf8574e9b40fdeac17473b224cacbb1d457 (diff) |
*Do not let Incinerate has extra damage for Shadowflame Author: rechapa79
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 67e1c88c7ef..f60d04a7ff2 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -444,19 +444,36 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) // Incinerate Rank 1 & 2 if((m_spellInfo->SpellFamilyFlags[1] & 0x000040) && m_spellInfo->SpellIconID==2128) { - // Incinerate does more dmg (dmg*0.25) if the target is Immolated. - if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE, m_spellInfo, m_caster)) - damage += int32(damage*0.25f); + // Incinerate does more dmg (dmg*0.25) if the target have Immolate debuff. + // Check aura state for speed but aura state set not only for Immolate spell + if(unitTarget->HasAuraState(AURA_STATE_CONFLAGRATE, m_spellInfo, m_caster)) + { + Unit::AuraEffectList const& RejorRegr = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); + for(Unit::AuraEffectList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) + { + // Immolate + if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && + ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 0x4)) + { + damage += damage/4; + break; + } + } + } } - // Conflagrate - consumes immolate or shadowflame - else if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE) + // Conflagrate - consumes Immolate or Shadowflame + else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE) { // for caster applied auras only Unit::AuraEffectList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for(Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) { - if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 4 || (*i)->GetSpellProto()->SpellFamilyFlags[2] & 2) && - (*i)->GetCasterGUID()==m_caster->GetGUID() ) + if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && + (*i)->GetCasterGUID()==m_caster->GetGUID() && + // Immolate + ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 4 || + // Shadowflame + (*i)->GetSpellProto()->SpellFamilyFlags[2] & 2)) { uint32 pdamage = (*i)->GetAmount() > 0 ? (*i)->GetAmount() : 0; pdamage = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), pdamage, DOT, (*i)->GetParentAura()->GetStackAmount()); |