Jump to content

[fix] Procflag death


Guest Lightguard

Recommended Posts

"2"

- This patch would add procflag death (16777216) required by a few spells like Undying Resolve.

"2"

- 7819

"2"

- Didin't find any.

diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 7c72d2e..c8a8a09 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -943,7 +943,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 | PROC_FLAG_ON_TRAP_ACTIVATION | PROC_FLAG_ON_DEATH))
        return true;

    if (spellProcEvent)     // Exist event data
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 8061dbe..bc6cb4f 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -351,7 +351,9 @@ enum ProcFlags
   PROC_FLAG_ON_TRAP_ACTIVATION            = 0x00200000,    // 21 On trap activation

   PROC_FLAG_TAKEN_OFFHAND_HIT             = 0x00400000,    // 22 Taken off-hand melee attacks(not used)
-   PROC_FLAG_SUCCESSFUL_OFFHAND_HIT        = 0x00800000     // 23 Successful off-hand melee attacks
+   PROC_FLAG_SUCCESSFUL_OFFHAND_HIT        = 0x00800000,    // 23 Successful off-hand melee attacks
+
+   PROC_FLAG_ON_DEATH                      = 0x01000000     // 24 On caster's death
};

#define MELEE_BASED_TRIGGER_MASK (PROC_FLAG_SUCCESSFUL_MILEE_HIT        | \\
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 5ea3681..f706bfd 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -9411,6 +9411,7 @@ void Unit::setDeathState(DeathState s)
        // remove aurastates allowing special moves
        ClearAllReactives();
        ClearDiminishings();
+        ProcDamageAndSpell(this, PROC_FLAG_NONE, PROC_FLAG_ON_DEATH, PROC_EX_NONE, 0);
    }
    else if(s == JUST_ALIVED)
    {

Patchfile

mysql> SELECT entry FROM wow_dbc.spell_309 WHERE ProcFlags=16777216;
+-------+
| entry |
+-------+
| 42454 | 
| 43504 | 
| 43546 | 
| 44541 | 
| 45469 | 
| 49163 | 
| 51915 | 
| 52418 | 
| 57348 | 
| 57378 | 
+-------+
10 rows in set (1.36 sec)

Link to comment
Share on other sites

  • 11 months later...
anyone reviewed this patch?

because in 9773 the spell http://www.wowhead.com/spell=51915 is still bugged, though it doesn't revive the player

I dont think this spell should revive player. It should only proc ( and this patch allows proc of it ) spawn of http://www.wowhead.com/npc=28534 and this npc have to cast http://www.wowhead.com/spell=51918 on dead player to revive him

Link to comment
Share on other sites

  • 9 months later...
×
×
  • 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