Jump to content

[Fix] Empowered Fire


Guest MrLama

Recommended Posts

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

implemented mana restore part for Empowered Fire

For which repository revision was the patch created?

8994

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

---

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

Me

DB part ( it is PROC_FLAG_TAKEN_ANY_DAMAGE + PROC_FLAG_ON_TRAP_ACTIVATION otherwise it doesn't work for me ) :

DELETE FROM spell_proc_event WHERE entry = 12654;
INSERT INTO spell_proc_event (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
('12654', '0', '3', '134217728', '0', '0', '3145728', '0', '0', '100', '0');

Core part:

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 35a478b..11f3afc 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3016,6 +3024,7 @@ void Spell::EffectEnergize(uint32 i)
            break;
        case 31930:                                         // Judgements of the Wise
        case 63375:                                         // Improved Stormstrike
+		case 67545:											// Empowered Fire
            damage = damage * unitTarget->GetCreateMana() / 100;
            break;
        default:
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 5bcac41..bf9ab45 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -5386,6 +5386,36 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                    CastSpell(this, 28682, true, castItem, triggeredByAura);
                    return (procEx & PROC_EX_CRITICAL_HIT); // charge update only at crit hits, no hidden cooldowns
                }
+				// Empowered Fire ( mana regen )
+				case 12654:
+				{
+					Unit* caster = triggeredByAura->GetCaster();
+					// it should not be triggered from other ignites
+					if ( caster && pVictim && caster->GetGUID() == pVictim->GetGUID() )
+					{
+						Unit::AuraList const& auras = caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
+						for ( Unit::AuraList::const_iterator i = auras.begin(); i != auras.end(); i++ )
+						{
+							switch((*i)->GetId())
+							{
+								case 31656:
+								case 31657:
+								case 31658:
+									{
+										if( roll_chance_i( int32((*i)->GetSpellProto()->procChance)) )
+										{
+											caster->CastSpell( caster, 67545, true );
+											return true;
+										}
+										else
+											return false;
+
+									}
+							}
+						} 
+					}
+					return false;
+				}
                // Glyph of Ice Block
                case 56372:
                {

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