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:
parent
a40387cd4c
commit
d9f4ba5e1d
2 changed files with 37 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 38929;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(38929, 'spell_item_fel_mana_potion');
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue