Skip to content

Commit

Permalink
[10038] Prevent double triggering heal from 63534 and ranks.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also use more simple and safe checks for added in [10035].
  • Loading branch information
zergtmn authored and VladimirMangos committed Jun 6, 2010
1 parent d0d9377 commit 5842b50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5919,7 +5919,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (!procSpell)
return false;

Aura* healingAura = pVictim->GetAura(procSpell->Id, EFFECT_INDEX_0);
// avoid double triggering from 2 auras
if (triggeredByAura->GetEffIndex() != EFFECT_INDEX_1)
return false;


// Renew
Aura* healingAura = pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_PRIEST, UI64LIT(0x40), 0, GetGUID());
if (!healingAura)
return false;

Expand Down Expand Up @@ -7029,7 +7035,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (dummySpell->SpellIconID == 2709)
{
// only melee auto attack affected and Rune Strike
if (!(procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT) && procSpell->Id != 56815)
if (procSpell && procSpell->Id != 56815)
return false;

basepoints[0] = triggerAmount * damage / 100;
Expand Down Expand Up @@ -7141,8 +7147,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (dummySpell->SpellIconID == 138)
{
// only main hand melee auto attack affected and Rune Strike
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) ||
!(procFlag & PROC_FLAG_SUCCESSFUL_MELEE_HIT) && procSpell->Id != 56815)
if ((procFlag & PROC_FLAG_SUCCESSFUL_OFFHAND_HIT) || procSpell && procSpell->Id != 56815)
return false;

// triggered_spell_id in spell data
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 "10037"
#define REVISION_NR "10038"
#endif // __REVISION_NR_H__

0 comments on commit 5842b50

Please sign in to comment.