Merge pull request #3596 from ille/master
use effectMask to calculate mechanicMask in ModSpellDuration Closes #1599
This commit is contained in:
@@ -13042,16 +13042,16 @@ int32 Unit::CalcSpellDuration(SpellInfo const* spellProto)
|
||||
return duration;
|
||||
}
|
||||
|
||||
int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive)
|
||||
int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask)
|
||||
{
|
||||
// don't mod permament auras duration
|
||||
// don't mod permanent auras duration
|
||||
if (duration < 0)
|
||||
return duration;
|
||||
|
||||
// cut duration only of negative effects
|
||||
if (!positive)
|
||||
{
|
||||
int32 mechanic = spellProto->GetAllEffectsMechanicMask();
|
||||
int32 mechanic = spellProto->GetSpellMechanicMaskByEffectMask(effectMask);
|
||||
|
||||
int32 durationMod;
|
||||
int32 durationMod_always = 0;
|
||||
|
||||
@@ -2068,7 +2068,7 @@ class Unit : public WorldObject
|
||||
float ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effect_index, float value) const;
|
||||
int32 CalculateSpellDamage(Unit const* target, SpellInfo const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const;
|
||||
int32 CalcSpellDuration(SpellInfo const* spellProto);
|
||||
int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive);
|
||||
int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask);
|
||||
void ModSpellCastTime(SpellInfo const* spellProto, int32 & castTime, Spell* spell=NULL);
|
||||
float CalculateLevelPenalty(SpellInfo const* spellProto) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user