diff options
Diffstat (limited to 'src')
3 files changed, 99 insertions, 45 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 09331dc0fa5..7c724732bd9 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -1102,6 +1102,43 @@ class spell_gift_of_the_harvester : public SpellScript } }; +/*###### +## Quest 12842: Runeforging: Preparation For Battle +######*/ + +enum Runeforging +{ + SPELL_RUNEFORGING_CREDIT = 54586 +}; + +/* 53343 - Rune of Razorice + 53344 - Rune of the Fallen Crusader + 62158 - Rune of the Stoneskin Gargoyle + 326805 - Rune of Sanguination + 326855 - Rune of Spellwarding + 326911 - Rune of Hysteria + 326977 - Rune of Unending Thirst + 327082 - Rune of the Apocalypse */ +class spell_chapter1_runeforging_credit : public SpellScript +{ + PrepareSpellScript(spell_chapter1_runeforging_credit); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_RUNEFORGING_CREDIT }); + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), SPELL_RUNEFORGING_CREDIT); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_chapter1_runeforging_credit::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY); + } +}; + void AddSC_the_scarlet_enclave_c1() { new npc_unworthy_initiate(); @@ -1118,4 +1155,5 @@ void AddSC_the_scarlet_enclave_c1() new npc_dkc1_gothik(); RegisterCreatureAI(npc_scarlet_ghoul); RegisterSpellScript(spell_gift_of_the_harvester); + RegisterSpellScript(spell_chapter1_runeforging_credit); } diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp index bb5f2945292..f3df07211b5 100644 --- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp +++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "CombatAI.h" +#include "DB2Stores.h" #include "Map.h" #include "MotionMaster.h" #include "ObjectAccessor.h" @@ -737,6 +738,64 @@ class spell_sholazar_song_of_cleansing : public SpellScript } }; +/*###### +## Quest 12741: Strength of the Tempest +######*/ + +enum StrengthOfTheTempest +{ + SPELL_CREATE_POWER_OF_THE_TEMPEST = 53067 +}; + +// 53062 - Lightning Strike +class spell_sholazar_lightning_strike : public SpellScript +{ + PrepareSpellScript(spell_sholazar_lightning_strike); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_CREATE_POWER_OF_THE_TEMPEST }); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetHitUnit()->CastSpell(GetHitUnit(), SPELL_CREATE_POWER_OF_THE_TEMPEST); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_sholazar_lightning_strike::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + +/*###### +## Quest 12521: Where in the World is Hemet Nesingwary? +######*/ + +// 51071 - Flight to Sholazar (Missile Warning) +class spell_sholazar_flight_to_sholazar : public SpellScript +{ + PrepareSpellScript(spell_sholazar_flight_to_sholazar); + + bool Validate(SpellInfo const* spellInfo) override + { + return sBroadcastTextStore.LookupEntry(uint32(spellInfo->GetEffect(EFFECT_0).CalcValue())); + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + // 51076 (triggers 51071) is Area Aura - Party and applies on player too (no aura in sniffs on player) + // That makes both player and creature say + if (Creature* caster = GetCaster()->ToCreature()) + caster->Unit::Say(uint32(GetEffectValue()), caster); + } + + void Register() override + { + OnEffectHit += SpellEffectFn(spell_sholazar_flight_to_sholazar::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_sholazar_basin() { RegisterCreatureAI(npc_engineer_helice); @@ -750,4 +809,6 @@ void AddSC_sholazar_basin() RegisterSpellScript(spell_sholazar_take_sputum_sample); RegisterSpellScript(spell_sholazar_sputum_collected); RegisterSpellScript(spell_sholazar_song_of_cleansing); + RegisterSpellScript(spell_sholazar_lightning_strike); + RegisterSpellScript(spell_sholazar_flight_to_sholazar); } diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 08cb28587ce..fa3126893e3 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -15,25 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Areatrigger_Scripts -SD%Complete: 100 -SDComment: Scripts for areatriggers -SDCategory: Areatrigger -EndScriptData */ - -/* ContentData -at_coilfang_waterfall 4591 -at_legion_teleporter 4560 Teleporter TO Invasion Point: Cataclysm -at_stormwright_shelf q12741 -at_last_rites q12019 -at_sholazar_waygate q12548 -at_nats_landing q11209 -at_bring_your_orphan_to q910 q910 q1800 q1479 q1687 q1558 q10951 q10952 -at_brewfest -at_area_52_entrance -EndContentData */ - #include "ScriptMgr.h" #include "AreaTriggerAI.h" #include "DB2Structure.h" @@ -111,31 +92,6 @@ class AreaTrigger_at_legion_teleporter : public AreaTriggerScript }; /*###### -## at_stormwright_shelf -######*/ - -enum StormwrightShelf -{ - QUEST_STRENGTH_OF_THE_TEMPEST = 12741, - - SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST = 53067 -}; - -class AreaTrigger_at_stormwright_shelf : public AreaTriggerScript -{ - public: - AreaTrigger_at_stormwright_shelf() : AreaTriggerScript("at_stormwright_shelf") { } - - bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override - { - if (!player->isDead() && player->GetQuestStatus(QUEST_STRENGTH_OF_THE_TEMPEST) == QUEST_STATUS_INCOMPLETE) - player->CastSpell(player, SPELL_CREATE_TRUE_POWER_OF_THE_TEMPEST, false); - - return true; - } -}; - -/*###### ## at_scent_larkorwi ######*/ @@ -455,7 +411,6 @@ void AddSC_areatrigger_scripts() { new AreaTrigger_at_coilfang_waterfall(); new AreaTrigger_at_legion_teleporter(); - new AreaTrigger_at_stormwright_shelf(); new AreaTrigger_at_scent_larkorwi(); new AreaTrigger_at_sholazar_waygate(); new AreaTrigger_at_nats_landing(); |