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

This commit is contained in:
Keader
2019-10-03 08:49:05 -03:00
committed by GitHub
parent 16fde1ffad
commit 34ee2effc8
3 changed files with 43 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

@@ -4894,6 +4894,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].SpellClassMask[0] |= 0x00004000; // Drain soul
});
// Soul Sickness (Forge of Souls)
ApplySpellFix({ 69131 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_MOD_DECREASE_SPEED;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];

View File

@@ -20,6 +20,8 @@
#include "Player.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "SpellAuras.h"
#include "SpellScript.h"
enum Events
{
@@ -69,6 +71,11 @@ enum Phase
PHASE_INTRO,
};
enum ForgeSpells
{
SPELL_LETHARGY = 69133
};
class npc_sylvanas_fos : public CreatureScript
{
public:
@@ -276,8 +283,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);
}