Jump to content

[partial fix/dev] Grounding Totem Effect (Auras 96, 111)

Guest reeshack

Recommended Posts

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

- It fixes the Grounding Totem Effect and similar spells using aura 96.

For which repository revision was the patch created?

rev. 8578

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

Not for this issue in the first 5 pages of search list for words "Grounding totem" :)

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

Me, reeshack.

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 48a0643..b83a89b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8024,8 +8024,8 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
        return NULL;

-    // Magic case
-    if(spellInfo && (spellInfo->DmgClass == SPELL_DAMAGE_CLASS_NONE || spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC))
+    // SPELL_AURA_SPELL_MAGNET must NOT take any physical spells except for hamstring, wing clip and death grip
+    if(spellInfo && (spellInfo->SchoolMask != SPELL_SCHOOL_MASK_NORMAL || (spellInfo->Id == 1715 || spellInfo->Id == 2974 || spellInfo->Id == 49576)))
        Unit::AuraList const& magnetAuras = victim->GetAurasByType(SPELL_AURA_SPELL_MAGNET);
        for(Unit::AuraList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
@@ -8033,7 +8033,7 @@ Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
                if(magnet->IsWithinLOSInMap(this) && magnet->isAlive())
                    return magnet;
-    // Melee && ranged case
+    // Normal case
        AuraList const& hitTriggerAuras = victim->GetAurasByType(SPELL_AURA_ADD_CASTER_HIT_TRIGGER);

Spells using spell Aura 96 must not be taking any physical spells, like Charge, Intercept, Premeditation and other.

I am not very sure about Aura 111, I have not found any spells which use it, so maybe there should be a specified definition instead of the branch "else" (i.e. maybe it is not taking only physical spells). Please, post if you know about some of them, or about any general rule for this Aura, so I can update the code :)

Link to comment
Share on other sites

I've looked at comments on wowhead and you are probably right...so it seems to be a bit more complicated than I firstly thought :(. Is there any rule, which physical spells are consumed and which not? Like f.e. only movement slowing etc.

EDIT: Or are those spells supposed to be hardcoded exceptions? That doesn't seem very likely to me...

EDIT 2: Added exceptions for 3 spells - hamstring, wing clip and death grip, until this will be confirmed or a possibility of general solution will be found

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