mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
fixup! spells
This commit is contained in:
@@ -250,41 +250,22 @@ class spell_sapphiron_icebolt_40 : public SpellScript
|
||||
};
|
||||
|
||||
// 28531 - Frost Aura
|
||||
enum FrostAura
|
||||
{
|
||||
SPELL_FROST_AURA = 28531,
|
||||
};
|
||||
|
||||
class spell_sapphiron_frost_aura_40 : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_sapphiron_frost_aura_40);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_FROST_AURA });
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC))
|
||||
return;
|
||||
int32 bp0 = 600;
|
||||
caster->CastCustomSpell(caster, SPELL_FROST_AURA, &bp0, nullptr, nullptr, false, nullptr, nullptr, GetCasterGUID());
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC))
|
||||
return;
|
||||
if (urand(0, 99) == 0) // 1% chance to receive extra Frost Aura tick
|
||||
amount *= 2;
|
||||
return;
|
||||
amount *= 0.5; // Reduce damage by 50% (1200bp -> 600bp)
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_sapphiron_frost_aura_40::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sapphiron_frost_aura_40::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user