[9429] Fix problems related to SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL and duration reduction of some positive auras

Signed-off-by: Lightguard <Lightguard@tauri.hu>
This commit is contained in:
Blaymoira 2010-02-21 16:49:10 +01:00 committed by Lightguard
parent 5ec0c18d2c
commit 9e5e0cf3b4
2 changed files with 5 additions and 4 deletions

View file

@ -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);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9428"
#define REVISION_NR "9429"
#endif // __REVISION_NR_H__