aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/3.3.5/2022_07_11_00_world.sql49
-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
4 files changed, 149 insertions, 45 deletions
diff --git a/sql/updates/world/3.3.5/2022_07_11_00_world.sql b/sql/updates/world/3.3.5/2022_07_11_00_world.sql
new file mode 100644
index 00000000000..35124d9c843
--- /dev/null
+++ b/sql/updates/world/3.3.5/2022_07_11_00_world.sql
@@ -0,0 +1,49 @@
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 5108 AND `source_type` = 2;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(5108,2,0,1,46,0,100,0,5108,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Trigger - Store Targetlist"),
+(5108,2,1,2,61,0,100,0,0,0,0,0,0,100,1,0,0,0,0,0,19,29079,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Link - Send Target 1 (Shrine of the Tempest)"),
+(5108,2,2,0,61,0,100,0,0,0,0,0,0,45,0,1,0,0,0,0,19,29079,0,0,0,0,0,0,0,"Areatrigger (The Stormwright's Shelf) - On Link - Set Data 0 1 (Shrine of the Tempest)");
+
+DELETE FROM `areatrigger_scripts` WHERE `entry` = 5108;
+INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
+(5108,"SmartTrigger");
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 5108 AND `SourceId` = 2;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(22,1,5108,2,0,9,0,12741,0,0,0,0,0,"","Group 0: Execute SAI (Action 0) if player has taken quest 'Strength of the Tempest'");
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 29079 AND `source_type` = 0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(29079,0,0,0,38,0,100,0,0,1,0,0,0,11,53062,0,0,0,0,0,12,1,0,0,0,0,0,0,0,"Shrine of the Tempest - On Data Set 0 1 - Cast 'Lightning Strike'");
+
+DELETE FROM `spell_scripts` WHERE `id` = 53062;
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sholazar_lightning_strike';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(53062,'spell_sholazar_lightning_strike');
+
+--
+DELETE FROM `spell_scripts` WHERE `id` = 51071;
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sholazar_flight_to_sholazar';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(51071,'spell_sholazar_flight_to_sholazar');
+
+DELETE FROM `creature_text` WHERE `CreatureID` = 28192;
+
+-- Yes, it is unrealistic that other 8 will be used
+DELETE FROM `spell_scripts` WHERE `id` IN (53341,53343);
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_chapter1_runeforging_credit';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(53323,'spell_chapter1_runeforging_credit'),
+(53331,'spell_chapter1_runeforging_credit'),
+(53341,'spell_chapter1_runeforging_credit'),
+(53342,'spell_chapter1_runeforging_credit'),
+(53343,'spell_chapter1_runeforging_credit'),
+(53344,'spell_chapter1_runeforging_credit'),
+(54446,'spell_chapter1_runeforging_credit'),
+(54447,'spell_chapter1_runeforging_credit'),
+(62158,'spell_chapter1_runeforging_credit'),
+(70164,'spell_chapter1_runeforging_credit');
+
+-- Already scripted.
+DELETE FROM `spell_scripts` WHERE `id` IN (40904,44997);
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();