Jump to content

[Fix][7722] CreatureEventAi not casting triggered spell


Guest Trazom

Recommended Posts

What features does the patch add?

For action type ACTION_T_CAST, spell is not cast when caster is casting another spell, even if param3 flag CAST_TRIGGERED is set

For which repository revision was the patch created?

master [7694]

Is there a thread in the bug report section or at lighthouse?

None I know

Who has been writing this patch?

Myself

src/game/CreatureEventAI.cpp |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index a63ca11..ae79dd7 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -622,7 +622,7 @@ void CreatureEventAI::ProcessAction(uint16 type, uint32 param1, uint32 param2, u
            }

            //Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered
-            bool canCast = !(caster->IsNonMeleeSpellCasted(false) && (param3 & CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS));
+            bool canCast = !(caster->IsNonMeleeSpellCasted(false)) || (param3 & (CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS));

            // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them
            if(param3 & CAST_AURA_NOT_PRESENT)

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