diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index f0767e299..760145b8d 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -215,9 +215,10 @@ class MANGOS_DLL_SPEC Aura virtual ~Aura(); void SetModifier(AuraType t, int32 a, uint32 pt, int32 miscValue); - Modifier* GetModifier() {return &m_modifier;} - int32 GetMiscValue() {return m_spellProto->EffectMiscValue[m_effIndex];} - int32 GetMiscBValue() {return m_spellProto->EffectMiscValueB[m_effIndex];} + Modifier* GetModifier() { return &m_modifier; } + Modifier const* GetModifier() const { return &m_modifier; } + int32 GetMiscValue() const { return m_spellProto->EffectMiscValue[m_effIndex]; } + int32 GetMiscBValue() const { return m_spellProto->EffectMiscValueB[m_effIndex]; } SpellEntry const* GetSpellProto() const { return m_spellProto; } uint32 GetId() const{ return m_spellProto->Id; } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f3916d9d9..366978200 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -437,25 +437,38 @@ void Spell::EffectSchoolDMG(uint32 effect_idx) // Conflagrate - consumes Immolate or Shadowflame else if (m_spellInfo->TargetAuraState == AURA_STATE_CONFLAGRATE) { - // for caster applied auras only + Aura const* aura = NULL; // found req. aura for damage calculation + Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) { - if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && - (*i)->GetCasterGUID()==m_caster->GetGUID() && - // Immolate - ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004) || - // Shadowflame - (*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)) - { - int32 damagetick = m_caster->SpellDamageBonus(unitTarget, (*i)->GetSpellProto(), (*i)->GetModifier()->m_amount, DOT); - damage += damagetick * 4; + // for caster applied auras only + if ((*i)->GetSpellProto()->SpellFamilyName != SPELLFAMILY_WARLOCK || + (*i)->GetCasterGUID()!=m_caster->GetGUID()) + continue; - // Glyph of Conflagrate - if (!m_caster->HasAura(56235)) - unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID()); + // Immolate + if ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004)) + { + aura = *i; // it selected always if exist break; } + + // Shadowflame + if ((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002) + aura = *i; // remember but wait possible Immolate as primary priority + } + + // found Immolate or Shadowflame + if (aura) + { + int32 damagetick = m_caster->SpellDamageBonus(unitTarget, aura->GetSpellProto(), aura->GetModifier()->m_amount, DOT); + damage += damagetick * 4; + + // Glyph of Conflagrate + if (!m_caster->HasAura(56235)) + unitTarget->RemoveAurasByCasterSpell(aura->GetId(), m_caster->GetGUID()); + break; } } break; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7d2e1d5a8..c8280c349 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8216" + #define REVISION_NR "8217" #endif // __REVISION_NR_H__