Scripts/Forge of Souls: Fixed spell Soul Sickness (#23843)

(cherry picked from commit 34ee2effc8)
This commit is contained in:
Keader
2019-10-03 08:49:05 -03:00
committed by Shauren
parent 9abdc4ee3d
commit 03a1b03633
3 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
--
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_forge_of_souls_soul_sickness';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(69131,'spell_forge_of_souls_soul_sickness');

View File

@@ -4591,6 +4591,15 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_CAN_TARGET_DEAD;
});
// Soul Sickness (Forge of Souls)
ApplySpellFix({ 69131 }, [](SpellInfo* spellInfo)
{
ApplySpellEffectFix(spellInfo, EFFECT_1, [](SpellEffectInfo* spellEffectInfo)
{
spellEffectInfo->ApplyAuraName = SPELL_AURA_MOD_DECREASE_SPEED;
});
});
//
// FIRELANDS SPELLS
//

View File

@@ -19,6 +19,8 @@
#include "forge_of_souls.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
#include "SpellScript.h"
enum Events
{
@@ -68,6 +70,11 @@ enum Phase
PHASE_INTRO,
};
enum ForgeSpells
{
SPELL_LETHARGY = 69133
};
class npc_sylvanas_fos : public CreatureScript
{
public:
@@ -269,8 +276,34 @@ public:
}
};
// 69131 - Soul Sickness
class spell_forge_of_souls_soul_sickness : public AuraScript
{
PrepareAuraScript(spell_forge_of_souls_soul_sickness);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_LETHARGY });
}
void HandleStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
{
Unit* target = GetTarget();
target->CastSpell(target, SPELL_LETHARGY, aurEff);
}
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_forge_of_souls_soul_sickness::HandleStun, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
void AddSC_forge_of_souls()
{
new npc_sylvanas_fos();
new npc_jaina_fos();
RegisterAuraScript(spell_forge_of_souls_soul_sickness);
}