mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Scripts/Item): Fix Fel Mana Potion not benefiting from Alchemist'… (#19281)
fix(Scripts/Item): Fix Fel Mana Potion not benefiting from Alchemist's Stone
This commit is contained in:
@@ -3990,6 +3990,38 @@ class spell_item_eye_of_grillok_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
enum FelManaPotion
|
||||
{
|
||||
SPELL_FEL_MANA_POTION = 38929,
|
||||
SPELL_ALCHEMIST_STONE = 17619,
|
||||
SPELL_ALCHEMIST_STONE_ENERGIZE = 21400
|
||||
};
|
||||
|
||||
class spell_item_fel_mana_potion : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_fel_mana_potion)
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_ALCHEMIST_STONE, SPELL_ALCHEMIST_STONE_ENERGIZE });
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (caster->HasAura(SPELL_ALCHEMIST_STONE))
|
||||
{
|
||||
uint32 val = GetSpellInfo()->Effects[EFFECT_0].BasePoints * 0.4f;
|
||||
caster->CastCustomSpell(SPELL_ALCHEMIST_STONE_ENERGIZE, SPELLVALUE_BASE_POINT0, val, caster, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_item_fel_mana_potion::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_ENERGIZE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -4112,5 +4144,6 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_venomhide_feed);
|
||||
RegisterSpellScript(spell_item_scroll_of_retribution);
|
||||
RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura);
|
||||
RegisterSpellScript(spell_item_fel_mana_potion);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user