Jump to content

Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

fixes 10% damage increase for Chaos Bolt and Incinerate if there is own Immolate on target

For which repository revision was the patch created?

9362

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

http://getmangos.eu/community/showthread.php?10723-[bug]Fire-and-brismtone

Who has been writing this patch? Please include either forum user names or email addresses.

me

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 5d0fbd5..ee667d6 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -428,7 +428,22 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
                                ((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x00000000000004)))
                            {
                                damage += damage/4;
-                                break;
+
+                                if((*i)->GetCaster() && (*i)->GetCaster() == m_caster)
+                                {
+                                    Unit::AuraList const& dummyList = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
+                                    for(Unit::AuraList::const_iterator iter = dummyList.begin(); iter != dummyList.end(); ++iter)
+                                    {
+                                        // Fire and Brimstone      
+                                        if((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
+                                            (*iter)->GetSpellProto()->SpellIconID == 3173)
+                                        {
+                                            damage += int32(damage * (*iter)->GetModifier()->m_amount / 100);
+                                            break;
+                                        }  
+                                    }
+                                }
+                                break;
                            }
                        }
                    }
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 28cbbc2..af4be04 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9035,6 +9035,35 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
                if (pVictim->GetHealth() * 100 / pVictim->GetMaxHealth() <= 25)
                  DoneTotalMod *= 4;
            }
+            // Chaos Bolt
+            else if (spellProto->SpellFamilyFlags & UI64LIT(0x0002000000000000))
+            {
+                // Check aura state for speed but aura state set not only for Immolate spell
+                if (pVictim->HasAuraState(AURA_STATE_CONFLAGRATE))
+                {
+                    Unit::AuraList const& dummyList = GetAurasByType(SPELL_AURA_DUMMY);
+                    for(Unit::AuraList::const_iterator iter = dummyList.begin(); iter != dummyList.end(); ++iter)
+                    {
+                        // Fire and Brimstone      
+                        if((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
+                            ((*iter)->GetSpellProto()->SpellIconID == 3173))
+                        {
+                            Unit::AuraList const& RejorRegr = pVictim->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
+                            for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
+                            {
+                                // Immolate
+                                if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
+                                    (*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x00000000000004) && (*i)->GetCaster() && (*i)->GetCaster() == this)
+                                {  
+                                    DoneTotalMod *= ((*iter)->GetModifier()->m_amount+100.0f) / 100.0f;
+                                    break;
+                                }
+                            }
+                            break;
+                        }
+                    }
+                }
+            }
            break;
        }
        case SPELLFAMILY_DEATHKNIGHT:

maybe there are additional ways to optimize looping =\\

  • 40 years later...
Posted

Hmm, why two times? I think both spell's whole damage should do x% more damage, so the part in SpellDamageBonus would be enough, or am I wrong?

PS: I would code one loop after the other, not interlace both in each other^^

Posted

Search Immolate auras with use

Aura * aura = GetAura(...) more simply.

I agree with pasdVn that both effects must be handled in SpellDamageBonus, because handle effects in sources before apply SpellDamageBonus, in effects must be calculate base damage

As example, many glyph with auras OverrideClassScripts :)

Posted

updated

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 28cbbc2..af4be04 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9035,6 +9035,35 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
                if (pVictim->GetHealth() * 100 / pVictim->GetMaxHealth() <= 25)
                  DoneTotalMod *= 4;
            }
+            // Chaos Bolt & Incinerate
+            else if (spellProto->SpellFamilyFlags & UI64LIT(0x0002004000000000) && (m_spellInfo->SpellIconID==2128 || m_spellInfo->SpellIconID==3178))
+            {
+                // Check aura state for speed but aura state set not only for Immolate spell
+                if (pVictim->HasAuraState(AURA_STATE_CONFLAGRATE))
+                {
+                    Unit::AuraList const& dummyList = GetAurasByType(SPELL_AURA_DUMMY);
+                    for(Unit::AuraList::const_iterator iter = dummyList.begin(); iter != dummyList.end(); ++iter)
+                    {
+                        // Fire and Brimstone      
+                        if((*iter)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
+                            ((*iter)->GetSpellProto()->SpellIconID == 3173))
+                        {
+                            if (Aura *aur = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, UI64LIT(0x00000000000004), NULL, GetGUID()))
+                                DoneTotalMod *= ((*iter)->GetModifier()->m_amount+100.0f) / 100.0f;
+                            break;
+                        }
+                    }
+                }
+            }
            break;
        }
        case SPELLFAMILY_DEATHKNIGHT

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use