diff options
| author | offl <11556157+offl@users.noreply.github.com> | 2022-02-01 16:01:34 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-26 00:21:13 +0100 |
| commit | a2236616ccf6c5cb778933e7bf808b387e29fded (patch) | |
| tree | e6f457791a7676266d135c7e9d2b097f7c85b032 /src/server/scripts/Northrend | |
| parent | c60c5455d2b813ee481f49a752d2b7d434fd47dd (diff) | |
Scripts/Quest: Rework Mystery of the Infinite & Mystery of the Infinite, Redux (#27677)
(cherry picked from commit f205e25b337ceb10a9bec111a46406f4af9dc3e2)
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/zone_dragonblight.cpp | 67 |
1 files changed, 57 insertions, 10 deletions
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 48a18a7a649..b790a1d7b10 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -15,16 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Dragonblight -SD%Complete: 100 -SDComment: -SDCategory: Dragonblight -EndScriptData */ - -/* ContentData -EndContentData */ - #include "ScriptMgr.h" #include "CombatAI.h" #include "CreatureAIImpl.h" @@ -36,6 +26,7 @@ EndContentData */ #include "ScriptedGossip.h" #include "SpellInfo.h" #include "SpellScript.h" +#include "TemporarySummon.h" #include "Vehicle.h" /*##### @@ -732,6 +723,60 @@ class spell_warsong_battle_standard : public SpellScript } }; +/*###### +## Quest 12470 & 13343: Mystery of the Infinite & Mystery of the Infinite, Redux +######*/ + +enum MysteryOfTheInfinite +{ + SPELL_MIRROR_IMAGE_AURA = 49889 +}; + +// 49686 - Mystery of the Infinite: Script Effect Player Cast Mirror Image +class spell_moti_mirror_image_script_effect : public SpellScript +{ + PrepareSpellScript(spell_moti_mirror_image_script_effect); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_MIRROR_IMAGE_AURA }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_MIRROR_IMAGE_AURA); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_moti_mirror_image_script_effect::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +// 50020 - Mystery of the Infinite: Hourglass cast See Invis on Master +class spell_moti_hourglass_cast_see_invis_on_master : public SpellScript +{ + PrepareSpellScript(spell_moti_hourglass_cast_see_invis_on_master); + + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* caster = GetCaster()) + if (TempSummon* casterSummon = caster->ToTempSummon()) + if (Unit* summoner = casterSummon->GetSummonerUnit()) + summoner->CastSpell(summoner, uint32(GetEffectValue())); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_moti_hourglass_cast_see_invis_on_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_dragonblight() { new npc_commander_eligor_dawnbringer(); @@ -740,4 +785,6 @@ void AddSC_dragonblight() new npc_wyrmrest_defender(); new npc_torturer_lecraft(); RegisterSpellScript(spell_warsong_battle_standard); + RegisterSpellScript(spell_moti_mirror_image_script_effect); + RegisterSpellScript(spell_moti_hourglass_cast_see_invis_on_master); } |
