Skip to content

Commit

Permalink
[10765] Implement SPELL_AURA_MOD_PERIODIC_HEAL (259)
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
qsa authored and VladimirMangos committed Nov 21, 2010
1 parent d0dc734 commit ea90069
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/game/SpellAuraDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ enum AuraType
SPELL_AURA_NO_REAGENT_USE = 256,
SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS = 257,
SPELL_AURA_258 = 258,
SPELL_AURA_259 = 259,
SPELL_AURA_MOD_PERIODIC_HEAL = 259,
SPELL_AURA_SCREEN_EFFECT = 260,
SPELL_AURA_PHASE = 261,
SPELL_AURA_IGNORE_UNIT_STATE = 262,
Expand Down
2 changes: 1 addition & 1 deletion src/game/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleNoReagentUseAura, //256 SPELL_AURA_NO_REAGENT_USE Use SpellClassMask for spell select
&Aura::HandleNULL, //257 SPELL_AURA_MOD_TARGET_RESIST_BY_SPELL_CLASS Use SpellClassMask for spell select
&Aura::HandleNULL, //258 SPELL_AURA_MOD_SPELL_VISUAL
&Aura::HandleNULL, //259 corrupt healing over time spell
&Aura::HandleNoImmediateEffect, //259 SPELL_AURA_MOD_PERIODIC_HEAL implemented in Unit::SpellHealingBonus
&Aura::HandleNoImmediateEffect, //260 SPELL_AURA_SCREEN_EFFECT (miscvalue = id in ScreenEffect.dbc) not required any code
&Aura::HandlePhase, //261 SPELL_AURA_PHASE undetectable invisibility? implemented in Unit::isVisibleForOrDetect
&Aura::HandleNoImmediateEffect, //262 SPELL_AURA_IGNORE_UNIT_STATE implemented in Unit::isIgnoreUnitState & Spell::CheckCast
Expand Down
11 changes: 9 additions & 2 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6949,11 +6949,18 @@ uint32 Unit::SpellHealingBonusTaken(Unit *pCaster, SpellEntry const *spellProto,

// Healing taken percent
float minval = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT));
if(minval)
if (damagetype == DOT)
{
// overwrite max SPELL_AURA_MOD_HEALING_PCT if greater negative effect
float minDotVal = float(GetMaxNegativeAuraModifier(SPELL_AURA_MOD_PERIODIC_HEAL));
minval = (minDotVal < minval) ? minDotVal : minval;
}
if (minval)
TakenTotalMod *= (100.0f + minval) / 100.0f;

float maxval = float(GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT));
if(maxval)
// no SPELL_AURA_MOD_PERIODIC_HEAL positive cases
if (maxval)
TakenTotalMod *= (100.0f + maxval) / 100.0f;

// No heal amount for this class spells
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 "10764"
#define REVISION_NR "10765"
#endif // __REVISION_NR_H__

0 comments on commit ea90069

Please sign in to comment.