mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-13 05:29:13 +01:00
Core/Spells: fixed calculating additional ticks from haste
This commit is contained in:
@@ -2801,7 +2801,10 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (AuraEffect const* eff = m_spellAura->GetEffect(i))
|
||||
if (int32 amplitude = eff->GetAmplitude()) // amplitude is hastened by UNIT_MOD_CAST_SPEED
|
||||
duration = std::max(std::max(origDuration / amplitude, 1) * amplitude, duration);
|
||||
{
|
||||
int32 ticks = origDuration / amplitude + (origDuration % amplitude > amplitude / 2 ? 1 : 0);
|
||||
duration = std::max(ticks * amplitude, duration);
|
||||
}
|
||||
|
||||
// if there is no periodic effect
|
||||
if (!duration)
|
||||
|
||||
Reference in New Issue
Block a user