[11757] change target of end cast procs to always be the caster, also not allow skill update when proc is called from cast end part

This commit is contained in:
Laise 2011-07-27 08:49:03 +03:00
parent 0b26ca38a7
commit 4f397bf7aa
3 changed files with 4 additions and 4 deletions

View file

@ -3221,11 +3221,11 @@ void Spell::cast(bool skipCheck)
// critical hit related part is currently done on hit so proc there, // critical hit related part is currently done on hit so proc there,
// 0 damage since any damage based procs should be on hit // 0 damage since any damage based procs should be on hit
// 0 victim proc since there is no victim proc dependent on successfull cast for caster // 0 victim proc since there is no victim proc dependent on successfull cast for caster
m_caster->ProcDamageAndSpell(m_targets.getUnitTarget(), m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo); m_caster->ProcDamageAndSpell(m_caster, m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo);
} }
else else
{ {
m_caster->ProcDamageAndSpell(m_targets.getUnitTarget(), m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo); m_caster->ProcDamageAndSpell(m_caster, m_procAttacker, 0, PROC_EX_NORMAL_HIT, 0, m_attackType, m_spellInfo);
// Immediate spell, no big deal // Immediate spell, no big deal
handle_immediate(); handle_immediate();

View file

@ -9629,7 +9629,7 @@ uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missC
void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage ) void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellEntry const * procSpell, uint32 damage )
{ {
// For melee/ranged based attack need update skills and set some Aura states // For melee/ranged based attack need update skills and set some Aura states
if (procFlag & MELEE_BASED_TRIGGER_MASK) if ((damage != 0 || procExtra != PROC_EX_NORMAL_HIT) && procFlag & MELEE_BASED_TRIGGER_MASK)
{ {
// Update skills here for players // Update skills here for players
if (GetTypeId() == TYPEID_PLAYER) if (GetTypeId() == TYPEID_PLAYER)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11756" #define REVISION_NR "11757"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__