Skip to content

Commit

Permalink
[c12810] Correct feeding hunter pet. Main problem was caused by commi…
Browse files Browse the repository at this point in the history
…t [c12803]

(based on commit [12604] - 630caa9)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information
Cyberium authored and xfurry committed Apr 13, 2014
1 parent ef46370 commit 4026eb0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,11 +1165,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->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_DIRECT_DAMAGE))
pVictim->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_DIRECT_DAMAGE);
}
if (pVictim->GetTypeId() != TYPEID_PLAYER)
{
float threat = damage * sSpellMgr.GetSpellThreatMultiplier(spellProto);
Expand Down Expand Up @@ -10670,15 +10665,22 @@ 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->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_DAMAGE)
// check if the aura is interruptible by damage
if (se->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_DAMAGE)
{
itr->second->GetAuraByEffectIndex(EFFECT_INDEX_0)->GetModifier()->m_auraname;
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));
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12809"
#define REVISION_NR "12810"
#endif // __REVISION_NR_H__

0 comments on commit 4026eb0

Please sign in to comment.