Skip to content

Commit

Permalink
[9429] Fix problems related to SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_…
Browse files Browse the repository at this point in the history
…DISPEL and duration reduction of some positive auras

Signed-off-by: Lightguard <Lightguard@tauri.hu>
  • Loading branch information
Blaymoira authored and Ligthguard committed Feb 21, 2010
1 parent da96847 commit 9ebf71d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/game/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11221,8 +11221,9 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
int32 mechanic = GetEffectMechanic(spellProto, effect_index);
// Find total mod value (negative bonus)
int32 durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, mechanic);
// Modify from SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL aura (stack always ?)
durationMod_always+=target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->Dispel);
// Modify from SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL aura for negatve effects (stack always ?)
if (!IsPositiveEffect(spellProto->Id, effect_index))
durationMod_always+=target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->Dispel);
// Find max mod (negative bonus)
int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic);

Expand Down Expand Up @@ -13538,4 +13539,4 @@ bool Unit::CheckAndIncreaseCastCounter()

++m_castCounter;
return true;
}
}
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 "9428"
#define REVISION_NR "9429"
#endif // __REVISION_NR_H__

0 comments on commit 9ebf71d

Please sign in to comment.