Scripts/Spells: Refactor spell script internals to fix -Wcast-function-type-mismatch warning

This commit is contained in:
Shauren
2025-08-16 15:31:10 +02:00
parent 7fe0d4a81c
commit de80c713d0
18 changed files with 472 additions and 945 deletions
+3 -3
View File
@@ -769,7 +769,7 @@ class spell_mage_firestarter_dots : public AuraScript
// 108853 - Fire Blast
class spell_mage_fire_blast : public SpellScript
{
void CalcCritChance(Unit const* /*victim*/, float& critChance) const
void CalcCritChance(Unit const* /*victim*/, float& critChance)
{
critChance = 100.0f;
}
@@ -1196,7 +1196,7 @@ class spell_mage_improved_scorch : public AuraScript
return ValidateSpellInfo({ SPELL_MAGE_IMPROVED_SCORCH });
}
static bool CheckProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
static bool CheckProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
{
return eventInfo.GetProcTarget()->HealthBelowPct(aurEff->GetAmount());
}
@@ -1387,7 +1387,7 @@ class spell_mage_molten_fury : public AuraScript
return ValidateSpellInfo({ SPELL_MAGE_MOLTEN_FURY });
}
static void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
static void HandleEffectProc(AuraScript const&, AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
{
if (!eventInfo.GetActionTarget()->HealthAbovePct(aurEff->GetAmount()))
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_MAGE_MOLTEN_FURY, CastSpellExtraArgsInit{