From 77cf3ebc918e19e97fda782a5e8ec7306fe7d0b3 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 7 Sep 2022 11:41:14 +0200 Subject: [PATCH] Core/Spells: removed another duplicate haste application for periodic auras --- src/server/game/Entities/Unit/Unit.cpp | 2 +- src/server/game/Spells/Auras/SpellAuras.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 95a8fdd3b2..9638909cb9 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3023,7 +3023,7 @@ Aura* Unit::_TryStackingOrRefreshingExistingAura(AuraCreateInfo& createInfo) createInfo.CasterGUID = createInfo.Caster->GetGUID(); // world gameobjects can't own auras and they send empty casterguid -// checked on sniffs with spell 22247 + // checked on sniffs with spell 22247 if (createInfo.CasterGUID.IsGameObject()) { createInfo.Caster = nullptr; diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index baa52990df..0ea5c6e732 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -885,11 +885,7 @@ void Aura::RefreshDuration(bool withMods) Unit* caster = GetCaster(); if (withMods && caster) { - int32 duration = m_spellInfo->GetMaxDuration(); - // Calculate duration of periodics affected by haste. - if (caster->HasAuraTypeWithAffectMask(SPELL_AURA_PERIODIC_HASTE, m_spellInfo) || m_spellInfo->HasAttribute(SPELL_ATTR5_SPELL_HASTE_AFFECTS_PERIODIC)) - duration = int32(duration * caster->GetFloatValue(UNIT_MOD_CAST_SPEED)); - + int32 duration = m_spellInfo->CalcDuration(caster); SetMaxDuration(duration); SetDuration(duration); }