Jump to content

[fix 0.12] Improved Scorch & Improved Blizzard talents


Guest Casso

Recommended Posts

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

This patch fixes two talents of mage class, Improved Blizzard and Improved Scorch

For which repository revision was the patch created?

most mangos-0.12 revs (probably master branch too, not tested)

Who has been writing this patch?

Casso

Improved Blizzard:

-------------------------- src/game/SpellEffects.cpp --------------------------
index 6f6f3d2..750ec71 100644
@@ -352,10 +352,21 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                // Arcane Blast
                if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x20000000))
                {
                    m_caster->CastSpell(m_caster, 36032, true);
                }
+
+                // Improved Blizzard talent
+                if (m_spellInfo->SpellFamilyFlags == UI64LIT(0x00080080) && m_spellInfo->SpellVisual == 9487 && m_caster->GetTypeId() == TYPEID_PLAYER)
+                {
+                    if(m_caster->HasSpell(12488))       // Rank 3
+                        m_caster->CastSpell(unitTarget,12486,true);
+                    else if(m_caster->HasSpell(12487))  // Rank 2
+                        m_caster->CastSpell(unitTarget,12485,true);
+                    else if(m_caster->HasSpell(11185))  // Rank 1
+                        m_caster->CastSpell(unitTarget,12484,true);
+                }
                break;
            }
            case SPELLFAMILY_WARRIOR:
            {
                // Bloodthirst

Improved scorch:

-------------------------- src/game/SpellEffects.cpp --------------------------
index 750ec71..a730d77 100644
@@ -363,10 +363,25 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                    else if(m_caster->HasSpell(12487))
                        m_caster->CastSpell(unitTarget,12485,true);
                    else if(m_caster->HasSpell(11185))
                        m_caster->CastSpell(unitTarget,12484,true);
                }
+
+                // Improved Scorch talent
+                 if (m_spellInfo->SpellFamilyFlags == UI64LIT(0x00000010) &&  m_spellInfo->SpellIconID == 816 && m_caster->GetTypeId()  == TYPEID_PLAYER)
+                {
+                    if(m_caster->HasSpell(12873))      // Rank 3 - 100%
+                        m_caster->CastSpell(unitTarget,22959,true);
+                    else if(m_caster->HasSpell(12872)) // Rank 2 - 66%
+                    {
+                        if(urand(1,3) > 1)
+                            m_caster->CastSpell(unitTarget,22959,true);
+                    }                    
+                    else if(m_caster->HasSpell(11095)) // Rank 1 - 33%
+                        if(urand(1,3) > 2)
+                            m_caster->CastSpell(unitTarget,22959,true);
+                }
                break;
            }
            case SPELLFAMILY_WARRIOR:
            {
                // Bloodthirst

Link to comment
Share on other sites

I found original Improved Blizzard code in Unit::HandleOverrideClassScriptAuraProc

       case 836:                                           // Improved Blizzard (Rank 1)
       {
           if (!procSpell || procSpell->SpellVisual!=9487)
               return false;
           triggered_spell_id = 12484;
           break;
       }
       case 988:                                           // Improved Blizzard (Rank 2)
       {
           if (!procSpell || procSpell->SpellVisual!=9487)
               return false;
           triggered_spell_id = 12485;
           break;
       }
       case 989:                                           // Improved Blizzard (Rank 3)
       {
           if (!procSpell || procSpell->SpellVisual!=9487)
               return false;
           triggered_spell_id = 12486;
           break;
       }

This code has two problems:

1. SpellVisual is not 9487 (it is visual effect of area spell blizzard, not one tick)

real SpellVisual of 1 tick is 9490

2. After change SpellVisual code talent procs, but debuff was casted to caster, not to victim, because area spell has no real target (pVictim = Caster)

Link to comment
Share on other sites

×
×
  • 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