Jump to content

[fix] trigger logic on trap activation


pasdVn

Recommended Posts

Just a small fix of a bug in SpellMgr::IsSpellProcEventCanTriggeredBy(), without paying attention to other bugs of this proc flag: It should definitly not trigger without checking other conditions!

If you just have a look at [this]spell as example, you will agree, that we have to check the spellfamilyflags in addition, because there are more spells with this proc flag (-> traps :P) than those two.

From 56484e50eba47f8e19a0712e41ce6d623c106bfb Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Sat, 13 Mar 2010 14:20:00 +0100
Subject: [PATCH] PROC_FLAG_ON_TRAP_ACTIVATION is not an "trigger-always-flag"

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

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 507ae6a..2f85b56 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1120,7 +1120,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
        return false;

    // Always trigger for this
-    if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL | PROC_FLAG_ON_TRAP_ACTIVATION))
+    if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL))
        return true;

    if (spellProcEvent)     // Exist event data
-- 
1.6.5.1.1367.gcd48

I am quite sure, that I posted this fix years ago, but did not find it anymore^^

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