Jump to content

[FIX/PATCH][7664] Overkill


Guest Lightguard

Recommended Posts

  • 1 month later...

This might be better.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c60809e..3b43a57 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4196,6 +4196,12 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
                m_target->RemoveAurasDueToSpell(31665);
                break;
            }
+            // Overkill
+            if (spell->Id == 58428 && !apply)
+            {
+                m_target->RemoveAurasDueToSpell(58427);
+                break;
+            }
            break;
        }
        case SPELLFAMILY_HUNTER:
@@ -5245,6 +5251,8 @@ void Aura::HandleShapeshiftBoosts(bool apply)
    uint32 spellId = 0;
    uint32 spellId2 = 0;
    uint32 HotWSpellId = 0;
+    uint32 OverkillspellId;
+    uint32 OverkillspellId2;

    switch(GetModifier()->m_miscvalue)
    {
@@ -5307,6 +5315,9 @@ void Aura::HandleShapeshiftBoosts(bool apply)
        case FORM_GHOUL:
        case FORM_SHADOW:
        case FORM_STEALTH:
+            OverkillspellId = 58427;
+            OverkillspellId2 = 58428;
+            break;
        case FORM_CREATURECAT:
        case FORM_CREATUREBEAR:
            spellId = 0;
@@ -5356,6 +5367,10 @@ void Aura::HandleShapeshiftBoosts(bool apply)
                    }
                }
            }
+            //Overkill
+            if (OverkillspellId)
+                if(m_target->HasAura(58426,0))
+                    m_target->CastSpell(m_target, OverkillspellId, true);
        }
    }
    else
@@ -5363,6 +5378,11 @@ void Aura::HandleShapeshiftBoosts(bool apply)
        m_target->RemoveAurasDueToSpell(spellId);
        m_target->RemoveAurasDueToSpell(spellId2);

+        //Overkill
+        if (OverkillspellId2)
+            if(m_target->HasAura(58426,0))
+                m_target->CastSpell(m_target, OverkillspellId2, true);
+
        Unit::AuraMap& tAuras = m_target->GetAuras();
        for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end()
        {
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 7fd3d1a..ebf22b7 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1371,6 +1371,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                    return false;
            }

+            //Overkill
+            if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 )
+                return false;
+
            // Garrote -> Garrote-Silence (multi-family check)
            if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 )
                return false;

Patchfile

Link to comment
Share on other sites

this is my suggestion how you should do this:

This might be better.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c60809e..3b43a57 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4196,6 +4196,12 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
                m_target->RemoveAurasDueToSpell(31665);
                break;
            }
+            // Overkill
+            if (spell->Id == 58428 && !apply)
+            {
+                m_target->RemoveAurasDueToSpell(58427);
+                break;
+            }
            break;
        }
        case SPELLFAMILY_HUNTER:
@@ -5245,6 +5251,8 @@ void Aura::HandleShapeshiftBoosts(bool apply)
    uint32 spellId = 0;
    uint32 spellId2 = 0;
    uint32 HotWSpellId = 0;

    switch(GetModifier()->m_miscvalue)
    {
@@ -5307,6 +5315,9 @@ void Aura::HandleShapeshiftBoosts(bool apply)
        case FORM_GHOUL:
        case FORM_SHADOW:
        case FORM_STEALTH:
+             if(m_target->HasAura(58426))
+            {
+                spellId = 58427;
+                spellId2 = 58428;
+            }
+            break;
        case FORM_CREATURECAT:
        case FORM_CREATUREBEAR:
            spellId = 0;

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 7fd3d1a..ebf22b7 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1371,6 +1371,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                    return false;
            }

+            //Overkill
+            if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 )
+                return false;
+
            // Garrote -> Garrote-Silence (multi-family check)
            if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 )
                return false;

Patchfile

why are you using new spell id defines? this is not neccesary for this case because stealth form has not any other spell id applied than 0 which could also be deleted beacause there is no redefinition needed. spellids get initialized with 0. for talents like master shapeshifter you need extra spellid defines because spell ids are already in use at shapeshift. for additional damage calculation you can lookup my master shapeshifter patch(dire bear or bear form)

check http://github.com/NetSky/mangos/commit/0c1acaddb6c627bd9f37743ad625c1b0cab95d51 as an example but take care whitespaces got fixed in a later commit). spell and heal damage boni are still to hacky this way thats why i am working on an generic methods with new unit stat applied adding percantage spell damage done by several spells or whole class spell categories related to caster.

edit:

+ if(((Player*)this)->HasAura(48412))

+ {

+ if(((Player*)this)->HasAura(48422) && spellProto->Effect[effect_index] == SPELL_EFFECT_HEAL)

+ value = value * 1.04;

+ if(((Player*)this)->HasAura(48421) && spellProto->Effect[effect_index] == SPELL_EFFECT_SCHOOL_DAMAGE)

+ value = value * 1.04;

+ }

+ }

has to be replaced by

+ if(((Player*)this)->HasAura(48412))

+ {

+ if(((Player*)this)->HasAura(48422) && spellProto->Effect[effect_index] != SPELL_EFFECT_SCHOOL_DAMAGE)

+ value = value * 1.04;

+ if(((Player*)this)->HasAura(48421) && spellProto->Effect[effect_index] != SPELL_EFFECT_HEAL)

+ value = value * 1.04;

+ }

+ }

Link to comment
Share on other sites

         case FORM_STEALTH:
+             if(m_target->HasAura(58426))
+            {
+                  uint32 OverkillspellId;
+                 uint32 OverkillspellId2;
+            }
+            break;
        case FORM_CREATURECAT:

This is the only part that could mean 1 less check. That i would agree.

btw. Overkill has only 1 dummy no ranks, i don't really see what you mean...

Link to comment
Share on other sites

yeah i just was talking bout this : there should be general additional cast methods so we do not have to add custom ones :)

if there are several spells/talents like this they could all use the same cast access and you do not have to add different ones

Link to comment
Share on other sites

i tried to point out that if there are several spells/talents beeing applied at shapeshift there should be general local spellid/value vars and different placed cast method accesses using this variables/values. thats all. :D

Edit : Did you realize Druids can access some talents even if they do not have the right shapeshifting form.... i realized this is possible with sprint...this is fixed with some checks... but i wonder if there could be more... did you realize anything concerning this issue?

Link to comment
Share on other sites

Based on the suggestion of Vladimir, this should fit to everyone's needs...

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index c60809e..3249b65 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -3541,10 +3541,10 @@ void Aura::HandleModStealth(bool apply, bool Real)
        }
    }

-    // Master of Subtlety
    Unit::AuraList const& mDummyAuras = pTarget->GetAurasByType(SPELL_AURA_DUMMY);
    for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
    {
+        // Master of Subtlety
        if ((*i)->GetSpellProto()->SpellIconID == 2114)
        {
            if (apply)
@@ -3554,6 +3554,18 @@ void Aura::HandleModStealth(bool apply, bool Real)
            }
            else
                pTarget->CastSpell(pTarget,31666,true);
+            continue;
+        }
+        // Overkill
+        if ((*i)->GetId() == 58426  && GetSpellProto()->SpellFamilyFlags & 0x0000000000400000LL)
+        {
+            if (apply)
+            {
+                pTarget->CastSpell(m_target, 58427, true);
+                pTarget->RemoveAurasDueToSpell(58428);
+            }
+            else
+                pTarget->CastSpell(m_target, 58428, true);
            break;
        }
    }
@@ -4196,6 +4208,12 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
                m_target->RemoveAurasDueToSpell(31665);
                break;
            }
+            // Overkill
+            if (spell->Id == 58428 && !apply)
+            {
+                m_target->RemoveAurasDueToSpell(58427);
+                break;
+            }
            break;
        }
        case SPELLFAMILY_HUNTER:
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 7fd3d1a..ebf22b7 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1371,6 +1371,10 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                    return false;
            }

+            //Overkill
+            if( spellInfo_1->SpellIconID == 2285 && spellInfo_2->SpellIconID == 2285 )
+                return false;
+
            // Garrote -> Garrote-Silence (multi-family check)
            if( spellInfo_1->SpellIconID == 498 && spellInfo_2->SpellIconID == 498 && spellInfo_2->SpellVisual[0] == 0 )
                return false; 

Patchfile

Link to comment
Share on other sites

  • 1 year later...

After swith to 3.3.3 not work correct, cuz spell 58428 now not exist in DBC. BTW i found many major spells which now not existing in DBC, but realy need, like 62388 (for Demonic Circle), 56817( for Rune Strike), 61988(Divine Shield Exclude Aura), or many triggered spells (mostly whitch should change durations of some auras) like 58428 with durations 20000 for overkill. What we should do now? Hardcode (very hackly) durations, send fake auras, etc... or maybe time to implement SQL-storage for overwriting spell-DBC for not existing spells or existing, but with wrong values? This is the major question for now! Nobody know what to happen in the future with DBC :\\

Link to comment
Share on other sites

Am with laise on this one. There might be another table or some sort of code that gets triggered for some spells. This code is not in client side DBC it might be like an extension of the server that has common triggering spells of some sort which handle specific client spells. This might answer many spells that have gone for months without been fixed.

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