Jump to content

[fix]Vanish - stop creature attacks


Auntie Mangos

Recommended Posts

  • * What bug does the patch fix? What features does the patch add?
    Creatures shouldn't aggro immediately after player used Vanish
    * For which repository revision was the patch created?
    8159
    * 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/showthread.php?p=79164
    * Who has been writing this patch? Please include either forum user names or email addresses.
    me

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d0843e6..c4557ee 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1897,6 +1897,12 @@ void Spell::EffectTriggerSpell(uint32 i)
            if(((Player*)m_caster)->HasSpellCooldown(spellId))
                ((Player*)m_caster)->RemoveSpellCooldown(spellId);

+            // prevent interrupt message
+            m_caster->m_currentSpells[CURRENT_GENERIC_SPELL]->finish();
+            //inerrupt anything that might aggro creatures again
+            m_caster->InterruptNonMeleeSpells(true);
+
+            //cast the stealth spell
            m_caster->CastSpell(m_caster, spellId, true);
            return;
        }

Seems to work fine, but it's kind of a guess-based correction, so i would welcome any comments.

This correction DOESN'T fix interrruption of spells which started before Vanish or Pets that keep attacking through stealth.

Link to comment
Share on other sites

  • 39 years later...

What about Poisons? they will get removed at vanish if i interpret your change correctly... i think it would be better to empty all threat lists where the related player is listed...so if creature should aggro again and player is not visible he should be ignored by ai ...

Link to comment
Share on other sites

What about Poisons? they will get removed at vanish if i interpret your change correctly... i think it would be better to empty all threat lists where the related player is listed...so if creature should aggro again and player is not visible he should be ignored by ai ...

I just tested it and poisons are not removed with this. The threat lists (if i get it right) are already emptied in Spell::EffectSanctuary, which is also called when player uses Vanish, but it doesn't help, there is still something that makes creatures, which are close enough, get aggro again, even through stealth...

Link to comment
Share on other sites

Sorry, but i don't get what you mean. I tested it with poisons applied to my weapons as well as poisons and DoT effects ticking on me and none of them was removed during Vanish.

My inspiration for this correction was hunter's Feign Death (Aura::HandleFeignDeath), which seems to work fine. It has similar effect as Vanish, and it is using the InterruptNonMeleeSpells() function, which was missing in the Vanish handling part, so I don't understand why it is wrong to have this function also in Vanish...

Link to comment
Share on other sites

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