mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Scripts/Forge of Souls: Fixed spell Soul Sickness (#23843)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user