Core/Spells: removed another duplicate haste application for periodic auras

This commit is contained in:
Ovahlord committed 2022-09-12 09:15:32 +02:00
1 parent 7e72ee241f
commit 77cf3ebc91
2 files changed
+2 -6

No files matched your search

+1 -1
View File
@@ -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;
+1 -5
View File
@@ -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);
}