Core/Spells: dropped old dot clipping implementation and restored TC period and duration calculations in preparation of re-implementing it
This commit is contained in:
1 parent
6d89d242a7
commit
e3e4b2cf16
15 files changed
+227
-242
No files matched your search
@@ -2446,6 +2446,24 @@ float WorldObject::ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effec
|
||||
return value;
|
||||
}
|
||||
|
||||
int32 WorldObject::CalcSpellDuration(SpellInfo const* spellInfo) const
|
||||
{
|
||||
uint8 comboPoints = 0;
|
||||
if (Unit const* unit = ToUnit())
|
||||
comboPoints = unit->GetComboPoints();
|
||||
|
||||
int32 minduration = spellInfo->GetDuration();
|
||||
int32 maxduration = spellInfo->GetMaxDuration();
|
||||
|
||||
int32 duration = 0;
|
||||
if (spellInfo->HasAttribute(SPELL_ATTR1_FINISHING_MOVE_DURATION) && comboPoints && minduration != -1 && minduration != maxduration)
|
||||
duration = minduration + int32((maxduration - minduration) * comboPoints / 5);
|
||||
else
|
||||
duration = minduration;
|
||||
|
||||
return duration;
|
||||
}
|
||||
|
||||
int32 WorldObject::ModSpellDuration(SpellInfo const* spellInfo, WorldObject const* target, int32 duration, bool positive, uint32 effectMask)
|
||||
{
|
||||
// don't mod permanent auras duration
|
||||
|
||||
Reference in new issue
Block a user