Skip to content

Instantly share code, notes, and snippets.

@idostyle
Created February 8, 2012 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idostyle/1770381 to your computer and use it in GitHub Desktop.
Save idostyle/1770381 to your computer and use it in GitHub Desktop.
commit 66a35b8aa694e7462d90150d372e0758477384c6
Author: tobmaps <spambot42@yandex.ru>
Date: Sun Apr 24 05:20:20 2011 +0700
[p125] Fixed a bug with proc some spells even if you fully absorbed enemy's damage. Now absorb effects will protect your stealth from interruption by damage and for example your Inner Fire or Earth Shield will not proc if you absorbing damage. Patch by me
Signed-off-by: idostyle@zoit <idostyl3@googlemail.com>
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 0abfb37..45a18c5 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -14060,10 +14060,18 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag,
continue;
ProcTriggeredData triggerData(itr->second->GetBase());
// Defensive procs are active on absorbs (so absorption effects are not a hindrance)
- bool active = (damage > 0) || (procExtra & (PROC_EX_ABSORB|PROC_EX_BLOCK) && isVictim);
+ bool active = damage || (procExtra & PROC_EX_BLOCK && isVictim);
if (isVictim)
procExtra &= ~PROC_EX_INTERNAL_REQ_FAMILY;
+
SpellEntry const* spellProto = itr->second->GetBase()->GetSpellProto();
+
+ // only auras that has triggered spell should proc from fully absorbed damage
+ if (procExtra & PROC_EX_ABSORB && isVictim)
+ if (damage || spellProto->EffectTriggerSpell[0] ||
+ spellProto->EffectTriggerSpell[1] || spellProto->EffectTriggerSpell[2])
+ active = true;
+
if(!IsTriggeredAtSpellProcEvent(pTarget, triggerData.aura, procSpell, procFlag, procExtra, attType, isVictim, active, triggerData.spellProcEvent))
continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment