mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Scripts/Spells): Convert some Druid spells to SpellScript (#16414)
Co-authored-by: joschiwald <736792+joschiwald@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (34246, 60779) AND `ScriptName` = 'spell_dru_idol_lifebloom';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(34246, 'spell_dru_idol_lifebloom'),
|
||||
(60779, 'spell_dru_idol_lifebloom');
|
||||
@@ -12465,32 +12465,6 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
|
||||
|
||||
switch (spellProto->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Nourish vs Idol of the Flourishing Life
|
||||
if (spellProto->SpellFamilyFlags[1] & 0x02000000)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(64949, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
|
||||
// Lifebloom vs Idol of Lush Moss/Increased Lifebloom Periodic
|
||||
if (spellProto->SpellFamilyFlags[1] & 00000010)
|
||||
{
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(60779, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
|
||||
if (AuraEffect const* relicAurEff = GetAuraEffect(34246, EFFECT_0))
|
||||
{
|
||||
DoneAdvertisedBenefit += relicAurEff->GetAmount();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
{
|
||||
// Impurity
|
||||
|
||||
@@ -439,6 +439,13 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000040, 0x00000000, 0x00000000);
|
||||
});
|
||||
|
||||
// Idol of the Flourishing Life
|
||||
ApplySpellFix({ 64949 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000000, 0x02000000, 0x00000000);
|
||||
spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER;
|
||||
});
|
||||
|
||||
ApplySpellFix({
|
||||
34231, // Libram of the Lightbringer
|
||||
60792, // Libram of Tolerance
|
||||
|
||||
@@ -500,6 +500,31 @@ class spell_dru_glyph_of_starfire : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 34246 - Idol of the Emerald Queen
|
||||
// 60779 - Idol of Lush Moss
|
||||
class spell_dru_idol_lifebloom : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_idol_lifebloom);
|
||||
|
||||
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
|
||||
{
|
||||
if (!spellMod)
|
||||
{
|
||||
spellMod = new SpellModifier(GetAura());
|
||||
spellMod->op = SPELLMOD_DOT;
|
||||
spellMod->type = SPELLMOD_FLAT;
|
||||
spellMod->spellId = GetId();
|
||||
spellMod->mask = aurEff->GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
|
||||
}
|
||||
spellMod->value = aurEff->GetAmount() / 7;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_dru_idol_lifebloom::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 29166 - Innervate
|
||||
class spell_dru_innervate : public AuraScript
|
||||
{
|
||||
@@ -1158,6 +1183,7 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterSpellScript(spell_dru_dash);
|
||||
RegisterSpellScript(spell_dru_enrage);
|
||||
RegisterSpellScript(spell_dru_glyph_of_starfire);
|
||||
RegisterSpellScript(spell_dru_idol_lifebloom);
|
||||
RegisterSpellScript(spell_dru_innervate);
|
||||
RegisterSpellScript(spell_dru_lifebloom);
|
||||
RegisterSpellScript(spell_dru_living_seed);
|
||||
|
||||
Reference in New Issue
Block a user