Jump to content

[9363][fix]Fire Nova


Guest laise

Recommended Posts

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

updates Fire Nova according to 3.3 changes

For which repository revision was the patch created?

9139(should work on latest)

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

haven't seen any

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 d61815e..4994f08 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1968,6 +1931,37 @@ void Spell::EffectDummy(uint32 i)
                }
                return;
            }
+            // Fire Nova
+            if (m_spellInfo->SpellIconID == 33)
+            {
+                if (!m_caster)
+                    return;
+
+                uint32 triggered_spell_id;
+                switch(m_spellInfo->Id)
+                {
+                    case 1535:  triggered_spell_id = 8349; break;
+                    case 8498:  triggered_spell_id = 8502; break;
+                    case 8499:  triggered_spell_id = 8503; break;
+                    case 11314: triggered_spell_id = 11306; break;
+                    case 11315: triggered_spell_id = 11307; break;
+                    case 25546: triggered_spell_id = 25535; break;
+                    case 25547: triggered_spell_id = 25537; break;
+                    case 61649: triggered_spell_id = 61650; break;
+                    case 61657: triggered_spell_id = 61654; break;
+                    default:
+                        break;
+                }
+                // fire slot
+                if (triggered_spell_id && m_caster->m_TotemSlot[0])
+                {
+                    Creature* totem = m_caster->GetMap()->GetCreature(m_caster->m_TotemSlot[0]);
+                    if (totem && totem->isTotem())
+                        totem->CastSpell(totem, triggered_spell_id, true, NULL, NULL, m_caster->GetGUID());
+                }
+                return;
+            }
            break;
        case SPELLFAMILY_DEATHKNIGHT:
            // Death Coil

Link to comment
Share on other sites

try using SpellFamilyFlags & 0x08000000 instead of SpellIconId, and use "default: return" in the switch, otherwise you could cast a random spell (uninitialized variable triggered_spell_id). The return inside the "if" is reduntant.

edit: change this to add threat to player instead of totem

totem->CastSpell(totem, triggered_spell_id, true, NULL, NULL, m_caster->GetGUID());

Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • 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