*Do not let Incinerate has extra damage for Shadowflame Author: rechapa79

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-24 09:59:33 +08:00
parent f9d0ccf857
commit b6c0f72b13
4 changed files with 40 additions and 13 deletions
+1 -1
View File
@@ -908,7 +908,7 @@ enum AuraState
//AURA_STATE_UNKNOWN11 = 11, // t|
AURA_STATE_FAERIE_FIRE = 12, // c t|
AURA_STATE_HEALTHLESS_35_PERCENT = 13, // C T |
AURA_STATE_IMMOLATE = 14, // T |
AURA_STATE_CONFLAGRATE = 14, // T |
AURA_STATE_SWIFTMEND = 15, // T |
AURA_STATE_DEADLY_POISON = 16, // T |
AURA_STATE_ENRAGE = 17, // C |
+7 -4
View File
@@ -1203,10 +1203,13 @@ void Aura::_AddAura()
if (IsSealSpell(m_spellProto))
SetAuraState(AURA_STATE_JUDGEMENT);
// Conflagrate aura state on Immolate or Shadowflame
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && (m_spellProto->SpellFamilyFlags[0] & 4
|| m_spellProto->SpellFamilyFlags[2] & 2))
SetAuraState(AURA_STATE_IMMOLATE);
// Conflagrate aura state on Immolate and Shadowflame
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK &&
// Immolate
((m_spellProto->SpellFamilyFlags[0] & 4) ||
// Shadowflame
(m_spellProto->SpellFamilyFlags[2] & 2)))
SetAuraState(AURA_STATE_CONFLAGRATE);
// Faerie Fire (druid versions)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x400)
+24 -7
View File
@@ -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());