Jump to content

[patch] Savage Combat


Auntie Mangos

Recommended Posts

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

Proc debuf on target (if poison apply) and remove debuf (if not poison on target)

* For which repository revision was the patch created?

11375

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

http://getmangos.eu/community/topic/13015/bug-rogue-talent-savage-combat/

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

Den

[ins]DELETE FROM `spell_proc_event` WHERE `entry` IN (51682, 58413);

INSERT INTO `spell_proc_event` VALUES

(51682, 0x00, 8, 0x10014000, 0x10014000, 0x10014000, 0x00080000, 0x00080000, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),

(58413, 0x00, 8, 0x10014000, 0x10014000, 0x10014000, 0x00080000, 0x00080000, 0x00080000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0);[/ins]

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6727fae..a8cec81 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -8981,8 +8981,32 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
            break;
        }
        case SPELLFAMILY_ROGUE:
+        {
+            // remove debuf savage combat
+            if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0008000010014000))
+            {
+                // search poison
+                bool found = false;
+                Unit::SpellAuraHolderMap const& auras = m_target->GetSpellAuraHolderMap();
+                for (Unit::SpellAuraHolderMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
+                {
+                    uint32 flags1 = m_target->HasAuraState(AURA_STATE_DEADLY_POISON);
+                    if (itr->second->GetSpellProto()->SpellFamilyName == SPELLFAMILY_ROGUE && (flags1 & (0x80000)))
+                    {
+                        found = true;
+                        break;
+                    }
+                }
+
+                if (!found)
+                {
+                    m_target->RemoveAurasDueToSpell(58684); // Savage Combat rank 1
+                    m_target->RemoveAurasDueToSpell(58683); // Savage Combat rank 2
+                }
+            }
+
            // Sprint (skip non player casted spells by category)
-            if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000040) && GetSpellProto()->Category == 44)
+            else if (GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000040) && GetSpellProto()->Category == 44)
            {
                if(!apply || m_target->HasAura(58039))      // Glyph of Blurred Speed
                    spellId1 = 61922;                       // Sprint (waterwalk)
@@ -8992,6 +9016,7 @@ void SpellAuraHolder::HandleSpellSpecificBoosts(bool apply)
            else
                return;
            break;
+        }
        case SPELLFAMILY_HUNTER:
        {
            switch (GetId())

Link to comment
Share on other sites

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