Jump to content

[patch] [8342] Invigoration, "dummy" proc


pasdVn

Recommended Posts

A Beastmaster Hunter Talent: http://www.wowhead.com/?search=Invigoration#talents

Procs from this pet aura: http://www.wowhead.com/?spell=53397

The strange thing is, that it already has a proc chance from 100%, and triggers a spell with a script effect (!?). Don't ask me why 'they' did it this way. Maybe there are not enough free bits from the spellFamilyFlags to handle it as similr talents (by a spellmodifier that changes the proc chance, such as http://www.wowhead.com/?spell=19621 for example). Or this aura is also used to remove "Cobra Strikes" (http://www.wowhead.com/?search=cobra+strikes#talents) proc charges (or stacks in fact) form the owner on pet crit... Who knows? But does not matter now.

Anyway here is a patch that makes it work, even with this quite strange construct:

From 3a04ec2b34af8a1a3931e571e16919f48926a0f9 Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Wed, 5 Aug 2009 11:02:55 +0200
Subject: [PATCH] added pet talent "Invigoration" (53252 and ranks)

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

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index dfb0c22..2f4795c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5232,6 +5232,19 @@ void Spell::EffectScriptEffect(uint32 effIndex)
                        m_caster->CastCustomSpell(unitTarget, spellId, &basePoint, 0, 0, false);
                    return;
                }
+                // Invigoration
+                case 53412:
+                {
+                    Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
+                    for(Unit::AuraList::const_iterator i = auras.begin();i != auras.end(); ++i)
+                        if( (*i)->GetModifier()->m_miscvalue == 8 && (*i)->GetSpellProto()->SpellIconID == 3487)
+                            if(roll_chance_i((*i)->GetModifier()->m_amount))
+                            {
+                                unitTarget->CastSpell(unitTarget, 53398, true, NULL, (*i), m_caster->GetGUID());
+                                return;
+                            }
+                    return;
+                }
                default:
                    break;
            }
-- 
1.5.5.1

gihub: http://github.com/pasdVn/mangos/commit/3a04ec2b34af8a1a3931e571e16919f48926a0f9.patch

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

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

pasdVn

Link to comment
Share on other sites

I think it can be rewrited, just by sql possible in less hack way ;)

Look at this:

Pet always have passive 53397 [self target] --(at crit by _spec_ ability)-> 53412 [master target]

Playe have 53252/53253 --(spell cast 53412 hit triggered)-> 53398 [self target]

[added]why in sql 53412 instead 53397...

I will attempt implement in suggested way...

[added]scriptted spell not have any flags, so maybe your way can be better...

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