Core/Misc: Fix some GCC warnings

This commit is contained in:
Shauren
2024-11-12 16:39:24 +01:00
parent af4dcc93ed
commit 4e551741cf
4 changed files with 25 additions and 42 deletions

View File

@@ -4369,7 +4369,8 @@ void Spell::update(uint32 difftime)
m_caster->SendMessageToSet(empowerSetStage.Write(), true);
m_empower->CompletedStages = completedStages;
m_caster->ToUnit()->SetSpellEmpowerStage(completedStages);
if (Unit* unitCaster = m_caster->ToUnit())
unitCaster->SetSpellEmpowerStage(completedStages);
CallScriptEmpowerStageCompletedHandlers(completedStages);
}