mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 19:37:01 +00:00
[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:
parent
5ec0c18d2c
commit
9e5e0cf3b4
2 changed files with 5 additions and 4 deletions
|
|
@ -11221,8 +11221,9 @@ int32 Unit::CalculateSpellDuration(SpellEntry const* spellProto, SpellEffectInde
|
||||||
int32 mechanic = GetEffectMechanic(spellProto, effect_index);
|
int32 mechanic = GetEffectMechanic(spellProto, effect_index);
|
||||||
// Find total mod value (negative bonus)
|
// Find total mod value (negative bonus)
|
||||||
int32 durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, mechanic);
|
int32 durationMod_always = target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD, mechanic);
|
||||||
// Modify from SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL aura (stack always ?)
|
// Modify from SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL aura for negatve effects (stack always ?)
|
||||||
durationMod_always+=target->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_DURATION_OF_EFFECTS_BY_DISPEL, spellProto->Dispel);
|
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)
|
// Find max mod (negative bonus)
|
||||||
int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic);
|
int32 durationMod_not_stack = target->GetMaxNegativeAuraModifierByMiscValue(SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK, mechanic);
|
||||||
|
|
||||||
|
|
@ -13538,4 +13539,4 @@ bool Unit::CheckAndIncreaseCastCounter()
|
||||||
|
|
||||||
++m_castCounter;
|
++m_castCounter;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9428"
|
#define REVISION_NR "9429"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue