Created
March 11, 2014 07:35
-
-
Save cyberium/9481185 to your computer and use it in GitHub Desktop.
Hunter feed pet and melee damage proc
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..7b13b71 100644 | |
--- a/src/game/Unit.cpp | |
+++ b/src/game/Unit.cpp | |
@@ -894,11 +894,6 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa | |
pVictim->AttackedBy(this); | |
} | |
- if (damagetype == DIRECT_DAMAGE || damagetype == SPELL_DIRECT_DAMAGE) | |
- { | |
- if (!spellProto || !(spellProto->AuraInterruptFlags & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE)) | |
- pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE); | |
- } | |
if (pVictim->GetTypeId() != TYPEID_PLAYER) | |
{ | |
float threat = damage * sSpellMgr.GetSpellThreatMultiplier(spellProto); | |
@@ -10047,15 +10042,21 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* pTarget, uint32 procFlag, | |
if (!IsTriggeredAtSpellProcEvent(pTarget, itr->second, procSpell, procFlag, procExtra, attType, isVictim, spellProcEvent)) | |
{ | |
// spell seem not managed by proc system, although some case need to be handled | |
+ | |
+ // only process damage case on victim | |
+ if (!isVictim || !(procFlag & PROC_FLAG_TAKEN_ANY_DAMAGE)) | |
+ continue; | |
+ | |
const SpellEntry* se = itr->second->GetSpellProto(); | |
- // 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) | |
+ // check if the aura is interruptible by damage | |
+ if (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; | |
} | |
- | |
itr->second->SetInUse(true); // prevent holder deletion | |
procTriggered.push_back(ProcTriggeredData(spellProcEvent, itr->second)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment