Jump to content

[patch][8451] Demonic Pact


Auntie Mangos

Recommended Posts

The Spell: http://www.wowhead.com/?search=demonic+pact#talents

Triggered by this pet aura: http://www.wowhead.com/?spell=53646

The proc needs a custom baspoints calculation. It is calculated by the master's spellpower and a coefficient, that is stored in the talent dummy aura.

Patch:

From 0c15907d784c7b5f6f8ff3d7c737914903577b32 Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Thu, 6 Aug 2009 13:35:38 +0200
Subject: [PATCH] implemented 47236 and ranks

---
src/game/Unit.cpp |   26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 8fb3d78..4b296a9 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6857,6 +6857,32 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
                return false;
            break;
        }
+        // Demonic Pact
+        case 48090:
+        {
+            Unit *owner = GetOwner();
+            if( !owner)
+                return false;
+
+            int32 factor = 0;
+            // get factor from owner dummy aura
+            AuraList const& mDummy = owner->GetAurasByType(SPELL_AURA_DUMMY);
+            for(Unit::AuraList::const_iterator i = mDummy.begin(); i != mDummy.end(); ++i)
+                if( (*i)->GetModifier()->m_miscvalue == 12 && (*i)->GetSpellProto()->SpellIconID == 3220 )
+                {
+                    factor = (*i)->GetModifier()->m_amount;
+                    break;
+                }
+            if( !factor)
+                return false;
+
+            // cancel alredy existing demonic pact to prevent stacking
+            owner->RemoveAurasDueToSpell(48090);
+            basepoints0 = owner->SpellBaseDamageBonus(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC))* factor /100;
+
+            CastCustomSpell(target,trigger_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura);
+            return true;
+        }
        // Sword and Board
        case 50227:
        {
-- 
1.5.5.1

github: http://github.com/pasdVn/mangos/commit/0c15907d784c7b5f6f8ff3d7c737914903577b32.patch

Don't forget the sql part (procs only on crit):

DELETE FROM `spell_proc_event` WHERE `entry` IN ('53646');
INSERT INTO `spell_proc_event` (`entry` ,`SchoolMask` ,`SpellFamilyName` ,`SpellFamilyMask0` ,`SpellFamilyMask1` ,`SpellFamilyMask2` ,`procFlags` ,`procEx` ,`ppmRate` ,`CustomChance` ,`Cooldown`) VALUES
('53646', '0', '0', '0', '0', '0', '0', '2', '0', '0', '0');

Edit: I found a bug report^^: http://getmangos.eu/community/viewtopic.php?id=8038&

pasdVn

Link to comment
Share on other sites

  • 39 years later...
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