aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index 116a688ec51..e071fdf1f19 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -27,9 +27,19 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
+#include "Spell.h"
#include "SpellScript.h"
#include "TemporarySummon.h"
+namespace StormwindCity
+{
+ namespace Spells
+ {
+ static constexpr uint32 MOPAllianceIntroMoviePlay = 130805;
+ static constexpr uint32 FadeToBlack = 130411;
+ }
+}
+
enum TidesOfWarData
{
QUEST_TIDES_OF_WAR = 46727,
@@ -494,6 +504,56 @@ private:
EventMap _events;
};
+// 130804 - The King's Command Movie Aura
+class spell_the_kings_command_movie_aura : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ StormwindCity::Spells::FadeToBlack
+ });
+ }
+
+ void HandleHitTarget(SpellEffIndex /*effIndex*/) const
+ {
+ Unit* hitUnit = GetHitUnit();
+
+ hitUnit->CastSpell(hitUnit, StormwindCity::Spells::FadeToBlack, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .OriginalCastId = GetSpell()->m_castId
+ });
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_the_kings_command_movie_aura::HandleHitTarget, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+};
+
+class spell_the_kings_command_movie_aura_aura : public AuraScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({
+ StormwindCity::Spells::MOPAllianceIntroMoviePlay
+ });
+ }
+
+ void HandleAfterEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
+ {
+ Unit* target = GetTarget();
+
+ target->CastSpell(target, StormwindCity::Spells::MOPAllianceIntroMoviePlay, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
+ });
+ }
+
+ void Register() override
+ {
+ AfterEffectRemove += AuraEffectRemoveFn(spell_the_kings_command_movie_aura_aura::HandleAfterEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
void AddSC_stormwind_city()
{
// Creature
@@ -515,4 +575,5 @@ void AddSC_stormwind_city()
// Spells
RegisterSpellScript(spell_despawn_sailor_memory);
RegisterSpellScript(spell_kultiras_skip_intro);
+ RegisterSpellAndAuraScriptPair(spell_the_kings_command_movie_aura, spell_the_kings_command_movie_aura_aura);
}