fix(Scripts/Spells): Nether Portal - Perseverence should not increase… (#13951)

This commit is contained in:
UltraNix
2023-01-31 22:54:23 +01:00
committed by GitHub
parent 263c5e1214
commit 579a1c0fa4
3 changed files with 22 additions and 6 deletions
@@ -0,0 +1,4 @@
--
DELETE FROM `spell_script_names` WHERE `spell_id`=30421;
INSERT INTO `spell_script_names` VALUES
(30421,'spell_nether_portal_perseverence');
@@ -334,12 +334,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Attributes &= ~SPELL_ATTR0_NOT_SHAPESHIFTED; // with this spell atrribute aura can be stacked several times spellInfo->Attributes &= ~SPELL_ATTR0_NOT_SHAPESHIFTED; // with this spell atrribute aura can be stacked several times
}); });
// Nether Portal - Perseverence
ApplySpellFix({ 30421 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_2].BasePoints += 30000;
});
// Natural shapeshifter // Natural shapeshifter
ApplySpellFix({ 16834, 16835 }, [](SpellInfo* spellInfo) ApplySpellFix({ 16834, 16835 }, [](SpellInfo* spellInfo)
{ {
@@ -26,6 +26,8 @@ EndScriptData */
#include "ScriptMgr.h" #include "ScriptMgr.h"
#include "ScriptedCreature.h" #include "ScriptedCreature.h"
#include "karazhan.h" #include "karazhan.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
enum Netherspite enum Netherspite
{ {
@@ -347,7 +349,23 @@ public:
}; };
}; };
class spell_nether_portal_perseverence : public AuraScript
{
PrepareAuraScript(spell_nether_portal_perseverence);
void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
const_cast<AuraEffect*>(aurEff)->SetAmount(aurEff->GetAmount() + 30000);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_nether_portal_perseverence::HandleApply, EFFECT_2, SPELL_AURA_MOD_INCREASE_HEALTH, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
void AddSC_boss_netherspite() void AddSC_boss_netherspite()
{ {
new boss_netherspite(); new boss_netherspite();
RegisterSpellScript(spell_nether_portal_perseverence);
} }