Jump to content

[Fix][9045] Revitalize


Guest MrLama

Recommended Posts

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

Chance to restore power on HoT tick while having Revitalize talent

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

DELETE FROM spell_proc_event WHERE entry IN (48545,48544,48539);
INSERT INTO spell_proc_event (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES 
('48539', '0', '7', '16', '67108864', '0', '2359296', '0', '0', '5', '0'),
('48544', '0', '7', '16', '67108864', '0', '2359296', '0', '0', '10', '0'),
('48545', '0', '7', '16', '67108864', '0', '2359296', '0', '0', '15', '0');

Core part

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 186d538..e6d456f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6786,6 +6845,7 @@ void Aura::PeriodicTick()

            int32 gain = m_target->ModifyHealth(pdamage);

+			pCaster->ProcDamageAndSpell( m_target, PROC_FLAG_ON_DO_PERIODIC, PROC_FLAG_ON_TAKE_PERIODIC, PROC_EX_NONE, gain, BASE_ATTACK, m_spellProto );
            // add HoTs to amount healed in bgs
            if( pCaster->GetTypeId() == TYPEID_PLAYER )
                if( BattleGround *bg = ((Player*)pCaster)->GetBattleGround() )
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 35a478b..383b92f 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3015,7 +3023,9 @@ void Spell::EffectEnergize(uint32 i)
            level_multiplier = 4;
            break;
        case 31930:                                         // Judgements of the Wise
+		case 48542:											// Revitalize
        case 63375:                                         // Improved Stormstrike
            damage = damage * unitTarget->GetCreateMana() / 100;
            break;
        default:
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 5bcac41..bdc3a3a 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7638,6 +7680,25 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, Aura
        case 6953:                                          // Warbringer
            RemoveAurasAtMechanicImmunity(IMMUNE_TO_ROOT_AND_SNARE_MASK,0,true);
            return true;
+		case 7010:											// Revitalize (rank 1)
+		case 7011:											// Revitalize (rank 2)
+		case 7012:											// Revitalize (rank 3)
+		{
+			switch( pVictim->getPowerType() )
+			{
+				case POWER_MANA:
+					triggered_spell_id = 48542; break;
+				case POWER_RAGE:
+					triggered_spell_id = 48541; break;
+				case POWER_ENERGY:
+					triggered_spell_id = 48540; break;
+				case POWER_RUNIC_POWER:
+					triggered_spell_id = 48543; break;
+				default:
+					return false;
+			}
+			break;
+		}
        case 8152:                                          // Serendipity
        {
            // if heal your target over maximum health

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