Jump to content

[patch 303][6995] Fix Auto-Shoot Hunter


Guest Woweur

Recommended Posts

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

Hunter can't use another spell when he use auto-shoot.

For which repository revision was the patch created?

6848

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

Woweur.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index f94b221..150b857 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1953,9 +1953,13 @@ void Spell::Prepare(SpellCastTargets * targets, Aura* triggeredByAura)
    //Prevent casting at cast another spell (ServerSide check)
    if(m_caster->IsNonMeleeSpellCasted(false, true) && m_cast_count)
    {
-        SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS);
-        finish(false);
-        return;
+        // Check if player cast Auto Repeat Spell.
+        if(!m_caster->m_currentSpells[CURRENT_AUTOREPEAT_SPELL])
+        {
+            SendCastResult(SPELL_FAILED_SPELL_IN_PROGRESS);
+            finish(false);
+            return;
+        }
    }

    // Fill cost data

Link to comment
Share on other sites

Wouldn't it be more appropriate to fix Unit::IsNonMeleeSpellCasted since it has an agurment to skip autorepeat spells (aka return false if spell=autorepeat and skipping=true), which is set at true here, but it still returns true.

So one of the conditions in Unit::IsNonMeleeSpellCasted are true before the function has the time to reach the CURRENT_AUTOREPEAT_SPELL check.

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