Created
March 9, 2014 12:18
-
-
Save cyberium/9446960 to your computer and use it in GitHub Desktop.
HunterFeedPetAndDirectDamage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp | |
index 38ad185..8344526 100644 | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -896,8 +896,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa | |
if (damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE) | |
{ | |
- if (!spellProto || !(spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE)) | |
- pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE); | |
+ pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE | AURA_INTERRUPT_FLAG_DAMAGE); | |
} | |
if (pVictim->GetTypeId() != TYPEID_PLAYER) | |
{ | |
@@ -10049,9 +10048,16 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, | |
// spell seem not managed by proc system, although some case need to be handled | |
const SpellEntry* se = itr->second->GetSpellProto(); | |
+ // only process damage spell | |
+ if (!isVictim || se->DmgClass == SPELL_DAMAGE_CLASS_NONE) | |
+ continue; | |
+ | |
// check if the aura is interruptible by damage (not remove self added aura) | |
if (procSpell && procSpell->Id != se->Id && se->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DAMAGE) | |
+ { | |
+ DEBUG_FILTER_LOG(LOG_FILTER_SPELL_CAST, "ProcDamageAndSpell: Added Spell %u to remove aura due to spell list! Raison Damage received.", se->Id); | |
removedSpells.push_back(se->Id); | |
+ } | |
continue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment