aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2022-07-12 00:31:59 +0300
committerGitHub <noreply@github.com>2022-07-12 00:31:59 +0300
commit1c96eebcc185026cac4a84875195fb93c0485d08 (patch)
tree93a4ea325c48ccbd451ea27f180e0461a11f706c /src
parent37fcaf64ef0f4b16debbe16178c032dca7e91563 (diff)
Scripts/Quest: Update few quests (#28108)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp40
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp60
-rw-r--r--src/server/scripts/World/areatrigger_scripts.cpp45
3 files changed, 100 insertions, 45 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index eca32c1a9dd..98f94d82c55 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -1098,6 +1098,45 @@ class spell_gift_of_the_harvester : public SpellScript
}
};
+/*######
+## Quest 12842: Runeforging: Preparation For Battle
+######*/
+
+enum Runeforging
+{
+ SPELL_RUNEFORGING_CREDIT = 54586
+};
+
+/* 53323 - Rune of Swordshattering
+ 53331 - Rune of Lichbane
+ 53341 - Rune of Cinderglacier
+ 53342 - Rune of Spellshattering
+ 53343 - Rune of Razorice
+ 53344 - Rune of the Fallen Crusader
+ 54446 - Rune of Swordbreaking
+ 54447 - Rune of Spellbreaking
+ 62158 - Rune of the Stoneskin Gargoyle
+ 70164 - Rune of the Nerubian Carapace */
+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();
@@ -1114,4 +1153,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 4a41db8db79..44b483488f1 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -738,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 sObjectMgr->GetBroadcastText(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);
@@ -751,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 889c5de3d86..02517d954c5 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 "DBCStructure.h"
#include "GameObject.h"
@@ -109,31 +90,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* /*trigger*/) 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
######*/
@@ -463,7 +419,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();