aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2025-07-12 15:55:24 +0300
committerGitHub <noreply@github.com>2025-07-12 14:55:24 +0200
commit53daa087aedcc0f68c935628f181256d89914ae2 (patch)
tree071367620770ded1bc3db854c142d337c1ed8b38 /src/server/scripts/Northrend
parenta2a3c6531152fc5e8b7fabb51e932caa7b8e94f5 (diff)
Scripts/Spells: Migrate & update non-generic quest spell scripts to zone files (#31100)
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp119
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp54
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp77
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp144
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp494
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp90
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp54
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp150
8 files changed, 1177 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 1678b4867b5..caed83fb973 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1735,7 +1735,50 @@ class spell_borean_tundra_arcane_prisoner_rescue : public SpellScript
enum WeaknessToLightning
{
- SPELL_POWER_OF_THE_STORM = 46424
+ SPELL_POWER_OF_THE_STORM_ITEM = 46432,
+ SPELL_POWER_OF_THE_STORM = 46424
+};
+
+// 46444 - Weakness to Lightning: Cast on Master Script Effect
+class spell_borean_tundra_weakness_to_lightning_cast_on_master : public SpellScript
+{
+ PrepareSpellScript(spell_borean_tundra_weakness_to_lightning_cast_on_master);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_borean_tundra_weakness_to_lightning_cast_on_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 46446 - Weakness to Lightning: Cancel Power of the Storm Aura
+class spell_borean_tundra_weakness_to_lightning_cancel_aura : public SpellScript
+{
+ PrepareSpellScript(spell_borean_tundra_weakness_to_lightning_cancel_aura);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_POWER_OF_THE_STORM_ITEM });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->RemoveAurasDueToSpell(SPELL_POWER_OF_THE_STORM_ITEM);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_borean_tundra_weakness_to_lightning_cancel_aura::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
};
// 46550 - Weakness to Lightning: On Quest Complete
@@ -1790,6 +1833,77 @@ class spell_borean_tundra_signal_alliance : public SpellScript
}
};
+/*######
+## Quest 11730: Master and Servant
+######*/
+
+enum MasterAndServant
+{
+ SPELL_SUMMON_SCAVENGEBOT_004A8 = 46063,
+ SPELL_SUMMON_SENTRYBOT_57K = 46068,
+ SPELL_SUMMON_DEFENDOTANK_66D = 46058,
+ SPELL_SUMMON_SCAVENGEBOT_005B6 = 46066,
+ SPELL_SUMMON_55D_COLLECTATRON = 46034,
+ SPELL_ROBOT_KILL_CREDIT = 46027,
+ NPC_SCAVENGEBOT_004A8 = 25752,
+ NPC_SENTRYBOT_57K = 25753,
+ NPC_DEFENDOTANK_66D = 25758,
+ NPC_SCAVENGEBOT_005B6 = 25792,
+ NPC_55D_COLLECTATRON = 25793
+};
+
+// 46023 - The Ultrasonic Screwdriver
+class spell_borean_tundra_ultrasonic_screwdriver : public SpellScript
+{
+ PrepareSpellScript(spell_borean_tundra_ultrasonic_screwdriver);
+
+ bool Load() override
+ {
+ return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
+ }
+
+ bool Validate(SpellInfo const* /*spellEntry*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_SUMMON_SCAVENGEBOT_004A8,
+ SPELL_SUMMON_SENTRYBOT_57K,
+ SPELL_SUMMON_DEFENDOTANK_66D,
+ SPELL_SUMMON_SCAVENGEBOT_005B6,
+ SPELL_SUMMON_55D_COLLECTATRON,
+ SPELL_ROBOT_KILL_CREDIT
+ });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Item* castItem = GetCastItem();
+ Unit* caster = GetCaster();
+ if (Creature* target = GetHitCreature())
+ {
+ uint32 spellId = 0;
+ switch (target->GetEntry())
+ {
+ case NPC_SCAVENGEBOT_004A8: spellId = SPELL_SUMMON_SCAVENGEBOT_004A8; break;
+ case NPC_SENTRYBOT_57K: spellId = SPELL_SUMMON_SENTRYBOT_57K; break;
+ case NPC_DEFENDOTANK_66D: spellId = SPELL_SUMMON_DEFENDOTANK_66D; break;
+ case NPC_SCAVENGEBOT_005B6: spellId = SPELL_SUMMON_SCAVENGEBOT_005B6; break;
+ case NPC_55D_COLLECTATRON: spellId = SPELL_SUMMON_55D_COLLECTATRON; break;
+ default:
+ return;
+ }
+ caster->CastSpell(caster, spellId, castItem);
+ caster->CastSpell(caster, SPELL_ROBOT_KILL_CREDIT, true);
+ target->DespawnOrUnsummon();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_borean_tundra_ultrasonic_screwdriver::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
void AddSC_borean_tundra()
{
RegisterCreatureAI(npc_beryl_sorcerer);
@@ -1817,6 +1931,9 @@ void AddSC_borean_tundra()
RegisterSpellScript(spell_borean_tundra_neural_needle);
RegisterSpellScript(spell_borean_tundra_prototype_neural_needle);
RegisterSpellScript(spell_borean_tundra_arcane_prisoner_rescue);
+ RegisterSpellScript(spell_borean_tundra_weakness_to_lightning_cast_on_master);
+ RegisterSpellScript(spell_borean_tundra_weakness_to_lightning_cancel_aura);
RegisterSpellScript(spell_borean_tundra_weakness_to_lightning_on_quest_complete);
RegisterSpellScript(spell_borean_tundra_signal_alliance);
+ RegisterSpellScript(spell_borean_tundra_ultrasonic_screwdriver);
}
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 537d80d6bb7..05636c95c37 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -429,7 +429,7 @@ class spell_q12096_q12092_bark : public SpellScript
## Quest: Defending Wyrmrest Temple ID: 12372
######*/
-enum WyrmDefenderEnum
+enum DefendingWyrmrestTemple
{
// Quest data
QUEST_DEFENDING_WYRMREST_TEMPLE = 12372,
@@ -442,9 +442,13 @@ enum WyrmDefenderEnum
SPELL_RENEW = 49263, // cast to heal drakes
SPELL_WYRMREST_DEFENDER_MOUNT = 49256,
+ SPELL_SUMMON_WYRMREST_DEFENDER = 49207,
+
// Texts data
- WHISPER_MOUNTED = 0,
- BOSS_EMOTE_ON_LOW_HEALTH = 2
+ WHISPER_MOUNTED = 0,
+ BOSS_EMOTE_ON_LOW_HEALTH = 2,
+
+ NPC_WYRMREST_TEMPLE_CREDIT = 27698
};
struct npc_wyrmrest_defender : public VehicleAI
@@ -536,6 +540,48 @@ struct npc_wyrmrest_defender : public VehicleAI
}
};
+// 49213 - Defending Wyrmrest Temple: Character Script Cast From Gossip
+class spell_dragonblight_defending_wyrmrest_temple_cast_from_gossip : public SpellScript
+{
+ PrepareSpellScript(spell_dragonblight_defending_wyrmrest_temple_cast_from_gossip);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_WYRMREST_DEFENDER });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_SUMMON_WYRMREST_DEFENDER, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dragonblight_defending_wyrmrest_temple_cast_from_gossip::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 49370 - Wyrmrest Defender: Destabilize Azure Dragonshrine Effect
+class spell_dragonblight_defending_wyrmrest_temple_dummy : public SpellScript
+{
+ PrepareSpellScript(spell_dragonblight_defending_wyrmrest_temple_dummy);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitCreature())
+ if (Unit* caster = GetOriginalCaster())
+ if (Vehicle* vehicle = caster->GetVehicleKit())
+ if (Unit* passenger = vehicle->GetPassenger(0))
+ if (Player* player = passenger->ToPlayer())
+ player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_dragonblight_defending_wyrmrest_temple_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
/*######
## Quest 12053: The Might of the Horde
######*/
@@ -1070,6 +1116,8 @@ void AddSC_dragonblight()
RegisterSpellScript(spell_q12096_q12092_dummy);
RegisterSpellScript(spell_q12096_q12092_bark);
RegisterCreatureAI(npc_wyrmrest_defender);
+ RegisterSpellScript(spell_dragonblight_defending_wyrmrest_temple_cast_from_gossip);
+ RegisterSpellScript(spell_dragonblight_defending_wyrmrest_temple_dummy);
RegisterSpellScript(spell_dragonblight_warsong_battle_standard);
RegisterSpellScript(spell_dragonblight_moti_mirror_image_script_effect);
RegisterSpellScript(spell_dragonblight_moti_hourglass_cast_see_invis_on_master);
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index 29153f0ef0a..1ec851a1f8c 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -992,6 +992,80 @@ public:
explicit spell_grizzly_hills_script_cast_summon_image_of_drakuru(uint32 triggeredSpellId) : _triggeredSpellId(triggeredSpellId) { }
};
+/*######
+## Quest 12308: Escape from Silverbrook
+######*/
+
+enum EscapeFromSilverbrook
+{
+ SPELL_SUMMON_WORGEN = 48681
+};
+
+// 48682 - Escape from Silverbrook - Periodic Dummy
+class spell_grizzly_hills_escape_from_silverbrook : public SpellScript
+{
+ PrepareSpellScript(spell_grizzly_hills_escape_from_silverbrook);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_WORGEN });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_WORGEN, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_grizzly_hills_escape_from_silverbrook::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 48681 - Summon Silverbrook Worgen
+class spell_grizzly_hills_escape_from_silverbrook_summon_worgen : public SpellScript
+{
+ PrepareSpellScript(spell_grizzly_hills_escape_from_silverbrook_summon_worgen);
+
+ void ModDest(SpellDestination& dest)
+ {
+ float dist = GetEffectInfo(EFFECT_0).CalcRadius(GetCaster());
+ float angle = frand(0.75f, 1.25f) * float(M_PI);
+
+ Position pos = GetCaster()->GetNearPosition(dist, angle);
+ dest.Relocate(pos);
+ }
+
+ void Register() override
+ {
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_grizzly_hills_escape_from_silverbrook_summon_worgen::ModDest, EFFECT_0, TARGET_DEST_CASTER_SUMMON);
+ }
+};
+
+/*######
+## Quest 12414: Mounting Up
+######*/
+
+// 49285 - Hand Over Reins
+class spell_grizzly_hills_hand_over_reins : public SpellScript
+{
+ PrepareSpellScript(spell_grizzly_hills_hand_over_reins);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Creature* caster = GetCaster()->ToCreature();
+ GetHitUnit()->ExitVehicle();
+
+ if (caster)
+ caster->DespawnOrUnsummon();
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_grizzly_hills_hand_over_reins::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_grizzly_hills()
{
RegisterCreatureAI(npc_emily);
@@ -1014,4 +1088,7 @@ void AddSC_grizzly_hills()
RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_03", SPELL_ENVISION_DRAKURU_03);
RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_04", SPELL_ENVISION_DRAKURU_04);
RegisterSpellScriptWithArgs(spell_grizzly_hills_script_cast_summon_image_of_drakuru, "spell_grizzly_hills_script_cast_summon_image_of_drakuru_05", SPELL_ENVISION_DRAKURU_05);
+ RegisterSpellScript(spell_grizzly_hills_escape_from_silverbrook);
+ RegisterSpellScript(spell_grizzly_hills_escape_from_silverbrook_summon_worgen);
+ RegisterSpellScript(spell_grizzly_hills_hand_over_reins);
}
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index 1450d58956e..5809bbce402 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -560,6 +560,145 @@ class spell_fjord_the_way_to_his_heart_quest_complete : public SpellScript
}
};
+/*######
+## Quest 11396, 11399: Bring Down Those Shields
+######*/
+
+enum BringDownThoseShields
+{
+ SPELL_SCOURGING_CRYSTAL_CONTROLLER = 43878,
+ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3 = 43874
+};
+
+// 50133 - Scourging Crystal Controller
+class spell_fjord_scourging_crystal_controller : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_scourging_crystal_controller);
+
+ bool Validate(SpellInfo const* /*spellEntry*/) override
+ {
+ return ValidateSpellInfo({ SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3, SPELL_SCOURGING_CRYSTAL_CONTROLLER });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ if (target->HasAura(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
+ // Make sure nobody else is channeling the same target. Is it necessary?
+ if (!target->HasAura(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
+ GetCaster()->CastSpell(GetCaster(), SPELL_SCOURGING_CRYSTAL_CONTROLLER, GetCastItem());
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_fjord_scourging_crystal_controller::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+/*######
+## Quest 11306: Apply Heat and Stir
+######*/
+
+enum ApplyHeatAndStir
+{
+ SPELL_SPURTS_AND_SMOKE = 38594,
+ SPELL_FAILED_MIX_1 = 43376,
+ SPELL_FAILED_MIX_2 = 43378,
+ SPELL_FAILED_MIX_3 = 43970,
+ SPELL_SUCCESSFUL_MIX = 43377,
+
+ NPC_GENERIC_TRIGGER_LAB = 24042,
+
+ SAY_CONCOCTION_1 = 0,
+ SAY_CONCOCTION_2 = 1
+};
+
+// 43972 - Mixing Blood
+class spell_fjord_mixing_blood : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_mixing_blood);
+
+ void HandleEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (Creature* trigger = caster->FindNearestCreature(NPC_GENERIC_TRIGGER_LAB, 100.0f))
+ trigger->AI()->DoCastSelf(SPELL_SPURTS_AND_SMOKE);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_fjord_mixing_blood::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
+ }
+};
+
+// 43375 - Mixing Vrykul Blood
+class spell_fjord_mixing_vrykul_blood : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_mixing_vrykul_blood);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ {
+ uint8 chance = urand(0, 99);
+ uint32 spellId = 0;
+
+ // 90% chance of getting one out of three failure effects
+ if (chance < 30)
+ spellId = SPELL_FAILED_MIX_1;
+ else if (chance < 60)
+ spellId = SPELL_FAILED_MIX_2;
+ else if (chance < 90)
+ spellId = SPELL_FAILED_MIX_3;
+ else // 10% chance of successful cast
+ spellId = SPELL_SUCCESSFUL_MIX;
+
+ caster->CastSpell(caster, spellId, true);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_fjord_mixing_vrykul_blood::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 43376 - Failed Mix
+class spell_fjord_failed_mix_concoction_1 : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_failed_mix_concoction_1);
+
+ void HandleEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (Creature* trigger = caster->FindNearestCreature(NPC_GENERIC_TRIGGER_LAB, 100.0f))
+ trigger->AI()->Talk(SAY_CONCOCTION_1, caster);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_fjord_failed_mix_concoction_1::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
+ }
+};
+
+// 43378 - Failed Mix
+class spell_fjord_failed_mix_concoction_2 : public SpellScript
+{
+ PrepareSpellScript(spell_fjord_failed_mix_concoction_2);
+
+ void HandleEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* caster = GetCaster())
+ if (Creature* trigger = caster->FindNearestCreature(NPC_GENERIC_TRIGGER_LAB, 100.0f))
+ trigger->AI()->Talk(SAY_CONCOCTION_2, caster);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_fjord_failed_mix_concoction_2::HandleEffect, EFFECT_2, SPELL_EFFECT_SEND_EVENT);
+ }
+};
+
void AddSC_howling_fjord()
{
RegisterCreatureAI(npc_daegarn);
@@ -574,4 +713,9 @@ void AddSC_howling_fjord()
RegisterSpellScript(spell_fjord_the_way_to_his_heart_anuniaq_net);
RegisterSpellScript(spell_fjord_the_way_to_his_heart_reverse_cast);
RegisterSpellScript(spell_fjord_the_way_to_his_heart_quest_complete);
+ RegisterSpellScript(spell_fjord_scourging_crystal_controller);
+ RegisterSpellScript(spell_fjord_mixing_blood);
+ RegisterSpellScript(spell_fjord_mixing_vrykul_blood);
+ RegisterSpellScript(spell_fjord_failed_mix_concoction_1);
+ RegisterSpellScript(spell_fjord_failed_mix_concoction_2);
}
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 1e0d24e7717..006d9e31a7e 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -28,6 +28,7 @@
#include "SpellAuras.h"
#include "SpellScript.h"
#include "TemporarySummon.h"
+#include "Vehicle.h"
/*######
## npc_argent_valiant
@@ -1015,6 +1016,485 @@ class spell_icecrown_ebon_blade_banner : public SpellScript
}
};
+/*######
+## Quest 13400: The Hunter and the Prince
+######*/
+
+enum TheHunterAndThePrince
+{
+ SPELL_ILLIDAN_KILL_CREDIT = 61748
+};
+
+// 61752 - Illidan Kill Credit Master
+class spell_icecrown_illidan_kill_credit_master : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_illidan_kill_credit_master);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_ILLIDAN_KILL_CREDIT });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(0))
+ passenger->CastSpell(passenger, SPELL_ILLIDAN_KILL_CREDIT, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_illidan_kill_credit_master::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+/*######
+## Quest 13280, 13283: King of the Mountain
+######*/
+
+enum KingOfTheMountain
+{
+ NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
+ SPELL_PLANT_HORDE_BATTLE_STANDARD = 59643,
+ SPELL_HORDE_BATTLE_STANDARD_STATE = 59642,
+ SPELL_ALLIANCE_BATTLE_STANDARD_STATE = 4339,
+ SPELL_JUMP_ROCKET_BLAST = 4340
+};
+
+// 4338 - Plant Alliance Battle Standard
+// 59643 - Plant Horde Battle Standard
+class spell_icecrown_plant_battle_standard : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_plant_battle_standard);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ Unit* target = GetHitUnit();
+ uint32 triggeredSpellID = SPELL_ALLIANCE_BATTLE_STANDARD_STATE;
+
+ caster->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
+ if (caster->IsVehicle())
+ if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
+ player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC);
+
+ if (GetSpellInfo()->Id == SPELL_PLANT_HORDE_BATTLE_STANDARD)
+ triggeredSpellID = SPELL_HORDE_BATTLE_STANDARD_STATE;
+
+ target->RemoveAllAuras();
+ target->CastSpell(target, triggeredSpellID, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_plant_battle_standard::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 4336 - Jump Jets
+class spell_icecrown_jump_jets : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_jump_jets);
+
+ void HandleCast()
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* rocketBunny = caster->GetVehicleKit()->GetPassenger(1))
+ rocketBunny->CastSpell(rocketBunny, SPELL_JUMP_ROCKET_BLAST, true);
+ }
+
+ void Register() override
+ {
+ OnCast += SpellCastFn(spell_icecrown_jump_jets::HandleCast);
+ }
+};
+
+/*######
+## Quest 13291: Borrowed Technology / 13292: The Solution Solution (Daily) / 13239: Volatility / 13261: Volatiliy (Daily)
+######*/
+
+enum BorrowedTechnology
+{
+ SPELL_RIDE_FROST_WYRM = 59319
+};
+
+// 59318 - Grab Fake Soldier
+class spell_icecrown_grab_fake_soldier : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_grab_fake_soldier);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_RIDE_FROST_WYRM });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (!GetHitCreature())
+ return;
+ // TO DO: Being triggered is hack, but in checkcast it doesn't pass aurastate requirements.
+ // Beside that the decoy won't keep it's freeze animation state when enter.
+ GetHitCreature()->CastSpell(GetCaster(), SPELL_RIDE_FROST_WYRM, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_grab_fake_soldier::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+// 59303 - Summon Frost Wyrm
+class spell_icecrown_summon_frost_wyrm : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_summon_frost_wyrm);
+
+ void SetDest(SpellDestination& dest)
+ {
+ // Adjust effect summon position
+ Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
+ dest.RelocateOffset(offset);
+ }
+
+ void Register() override
+ {
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_icecrown_summon_frost_wyrm::SetDest, EFFECT_0, TARGET_DEST_CASTER_BACK);
+ }
+};
+
+/*######
+## Quest 12847: Second Chances
+######*/
+
+// 12601 - Second Chances: Summon Landgren's Soul Moveto Target Bunny
+class spell_icecrown_summon_soul_moveto_bunny : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_summon_soul_moveto_bunny);
+
+ void SetDest(SpellDestination& dest)
+ {
+ // Adjust effect summon position
+ Position const offset = { 0.0f, 0.0f, 2.5f, 0.0f };
+ dest.RelocateOffset(offset);
+ }
+
+ void Register() override
+ {
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_icecrown_summon_soul_moveto_bunny::SetDest, EFFECT_0, TARGET_DEST_CASTER);
+ }
+};
+
+/*######
+## Quest 13086: The Last Line Of Defense
+######*/
+
+// 57385 - Argent Cannon
+// 57412 - Reckoning Bomb
+class spell_icecrown_cannons_target : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_cannons_target);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ if (WorldLocation const* pos = GetExplTargetDest())
+ GetCaster()->CastSpell(pos->GetPosition(), GetEffectValue(), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_icecrown_cannons_target::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+/*######
+## Quest 13790, 13793, 13811, 13814: Among the Champions / 13665, 13745, 13750, 13756, 13761, 13767, 13772, 13777, 13782, 13787: The Grand Melee
+######*/
+
+class spell_icecrown_bested_trigger : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_bested_trigger);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* target = GetHitUnit()->GetCharmerOrOwnerOrSelf();
+ target->CastSpell(target, uint32(GetEffectValue()), true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_bested_trigger::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+/*######
+## Quest 13264, 13276, 13288, 13289: That's Abominable!
+######*/
+
+enum ThatsAbominable
+{
+ AREA_THE_BROKEN_FRONT = 4507,
+ AREA_MORD_RETHAR_THE_DEATH_GATE = 4508,
+
+ NPC_DRAKKARI_CHIEFTAINK = 29099,
+ NPC_ICY_GHOUL = 31142,
+ NPC_VICIOUS_GEIST = 31147,
+ NPC_RISEN_ALLIANCE_SOLDIERS = 31205,
+ NPC_RENIMATED_ABOMINATION = 31692,
+
+ QUEST_FUEL_FOR_THE_FIRE = 12690,
+
+ SPELL_BLOATED_ABOMINATION_FEIGN_DEATH = 52593,
+ SPELL_BURST_AT_THE_SEAMS_BONE = 52516,
+ SPELL_EXPLODE_ABOMINATION_MEAT = 52520,
+ SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT = 52523,
+ SPELL_TROLL_EXPLOSION = 52565,
+ SPELL_EXPLODE_TROLL_MEAT = 52578,
+ SPELL_EXPLODE_TROLL_BLOODY_MEAT = 52580,
+
+ SPELL_BURST_AT_THE_SEAMS_59576 = 59576, //script/knockback, That's Abominable
+ SPELL_BURST_AT_THE_SEAMS_59579 = 59579, //dummy
+ SPELL_BURST_AT_THE_SEAMS_52510 = 52510, //script/knockback, Fuel for the Fire
+ SPELL_BURST_AT_THE_SEAMS_52508 = 52508, //damage 20000
+ SPELL_BURST_AT_THE_SEAMS_59580 = 59580, //damage 50000
+
+ SPELL_ASSIGN_GHOUL_KILL_CREDIT_TO_MASTER = 59590,
+ SPELL_ASSIGN_GEIST_KILL_CREDIT_TO_MASTER = 60041,
+ SPELL_ASSIGN_SKELETON_KILL_CREDIT_TO_MASTER = 60039,
+
+ SPELL_DRAKKARI_SKULLCRUSHER_CREDIT = 52590,
+ SPELL_SUMMON_DRAKKARI_CHIEFTAIN = 52616,
+ SPELL_DRAKKARI_CHIEFTAINK_KILL_CREDIT = 52620
+};
+
+// 59576 - Burst at the Seams
+class spell_icecrown_burst_at_the_seams_59576 : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_burst_at_the_seams_59576);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_BURST_AT_THE_SEAMS_59576,
+ SPELL_BLOATED_ABOMINATION_FEIGN_DEATH,
+ SPELL_BURST_AT_THE_SEAMS_59579,
+ SPELL_BURST_AT_THE_SEAMS_BONE,
+ SPELL_EXPLODE_ABOMINATION_MEAT,
+ SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT
+ });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Creature* creature = GetCaster()->ToCreature())
+ {
+ creature->CastSpell(creature, SPELL_BLOATED_ABOMINATION_FEIGN_DEATH, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_59579, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_MEAT, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_burst_at_the_seams_59576::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 59579 - Burst at the Seams
+class spell_icecrown_burst_at_the_seams_59579 : public AuraScript
+{
+ PrepareAuraScript(spell_icecrown_burst_at_the_seams_59579);
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->CastSpell(target, SPELL_TROLL_EXPLOSION, true);
+ target->CastSpell(target, SPELL_EXPLODE_ABOMINATION_MEAT, true);
+ target->CastSpell(target, SPELL_EXPLODE_TROLL_MEAT, true);
+ target->CastSpell(target, SPELL_EXPLODE_TROLL_MEAT, true);
+ target->CastSpell(target, SPELL_EXPLODE_TROLL_BLOODY_MEAT, true);
+ target->CastSpell(target, SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ if (Unit* caster = GetCaster())
+ {
+ switch (target->GetEntry())
+ {
+ case NPC_ICY_GHOUL:
+ target->CastSpell(caster, SPELL_ASSIGN_GHOUL_KILL_CREDIT_TO_MASTER, true);
+ break;
+ case NPC_VICIOUS_GEIST:
+ target->CastSpell(caster, SPELL_ASSIGN_GEIST_KILL_CREDIT_TO_MASTER, true);
+ break;
+ case NPC_RISEN_ALLIANCE_SOLDIERS:
+ target->CastSpell(caster, SPELL_ASSIGN_SKELETON_KILL_CREDIT_TO_MASTER, true);
+ break;
+ }
+ }
+ target->CastSpell(target, SPELL_BURST_AT_THE_SEAMS_59580, true);
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_icecrown_burst_at_the_seams_59579::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectApplyFn(spell_icecrown_burst_at_the_seams_59579::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
+// 52593 - Bloated Abomination Feign Death
+class spell_icecrown_bloated_abom_feign_death : public AuraScript
+{
+ PrepareAuraScript(spell_icecrown_bloated_abom_feign_death);
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ target->SetDynamicFlag(UNIT_DYNFLAG_DEAD);
+ target->SetUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
+
+ if (Creature* creature = target->ToCreature())
+ creature->SetReactState(REACT_PASSIVE);
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* target = GetTarget();
+ if (Creature* creature = target->ToCreature())
+ creature->DespawnOrUnsummon();
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_icecrown_bloated_abom_feign_death::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectApplyFn(spell_icecrown_bloated_abom_feign_death::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+};
+
+// 76245 - Area Restrict Abom
+class spell_icecrown_area_restrict_abom : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_area_restrict_abom);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Creature* creature = GetHitCreature()) {
+ uint32 area = creature->GetAreaId();
+ if (area != AREA_THE_BROKEN_FRONT && area != AREA_MORD_RETHAR_THE_DEATH_GATE)
+ creature->DespawnOrUnsummon();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_area_restrict_abom::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 59590 - Assign Ghoul Kill Credit to Master
+// 60039 - Assign Skeleton Kill Credit to Master
+// 60041 - Assign Geist Kill Credit to Master
+class spell_icecrown_assign_credit_to_master : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_assign_credit_to_master);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* target = GetHitUnit())
+ {
+ if (Unit* owner = target->GetOwner())
+ {
+ owner->CastSpell(owner, GetEffectValue(), true);
+ }
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_assign_credit_to_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 52510 - Burst at the Seams
+class spell_icecrown_burst_at_the_seams_52510 : public SpellScript
+{
+ PrepareSpellScript(spell_icecrown_burst_at_the_seams_52510);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_BURST_AT_THE_SEAMS_52510,
+ SPELL_BURST_AT_THE_SEAMS_52508,
+ SPELL_BURST_AT_THE_SEAMS_59580,
+ SPELL_BURST_AT_THE_SEAMS_BONE,
+ SPELL_EXPLODE_ABOMINATION_MEAT,
+ SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT
+ });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
+ }
+
+ void HandleKnockBack(SpellEffIndex /*effIndex*/)
+ {
+ if (Unit* creature = GetHitCreature())
+ {
+ if (Unit* charmer = GetCaster()->GetCharmerOrOwner())
+ {
+ if (Player* player = charmer->ToPlayer())
+ {
+ if (player->GetQuestStatus(QUEST_FUEL_FOR_THE_FIRE) == QUEST_STATUS_INCOMPLETE)
+ {
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_MEAT, true);
+ creature->CastSpell(creature, SPELL_EXPLODE_ABOMINATION_BLOODY_MEAT, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_52508, true);
+ creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_59580, true);
+
+ player->CastSpell(player, SPELL_DRAKKARI_SKULLCRUSHER_CREDIT, true);
+ uint16 count = player->GetReqKillOrCastCurrentCount(QUEST_FUEL_FOR_THE_FIRE, NPC_DRAKKARI_CHIEFTAINK);
+ if ((count % 20) == 0)
+ player->CastSpell(player, SPELL_SUMMON_DRAKKARI_CHIEFTAIN, true);
+ }
+ }
+ }
+ }
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->ToCreature()->DespawnOrUnsummon(2s);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_burst_at_the_seams_52510::HandleKnockBack, EFFECT_1, SPELL_EFFECT_KNOCK_BACK);
+ OnEffectHitTarget += SpellEffectFn(spell_icecrown_burst_at_the_seams_52510::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_icecrown()
{
RegisterCreatureAI(npc_argent_valiant);
@@ -1032,4 +1512,18 @@ void AddSC_icecrown()
RegisterSpellScript(spell_icecrown_gift_of_the_lich_king);
RegisterSpellScript(spell_icecrown_consume_minions);
RegisterSpellScript(spell_icecrown_ebon_blade_banner);
+ RegisterSpellScript(spell_icecrown_illidan_kill_credit_master);
+ RegisterSpellScript(spell_icecrown_plant_battle_standard);
+ RegisterSpellScript(spell_icecrown_jump_jets);
+ RegisterSpellScript(spell_icecrown_grab_fake_soldier);
+ RegisterSpellScript(spell_icecrown_summon_frost_wyrm);
+ RegisterSpellScript(spell_icecrown_summon_soul_moveto_bunny);
+ RegisterSpellScript(spell_icecrown_cannons_target);
+ RegisterSpellScript(spell_icecrown_bested_trigger);
+ RegisterSpellScript(spell_icecrown_burst_at_the_seams_59576);
+ RegisterSpellScript(spell_icecrown_burst_at_the_seams_59579);
+ RegisterSpellScript(spell_icecrown_bloated_abom_feign_death);
+ RegisterSpellScript(spell_icecrown_area_restrict_abom);
+ RegisterSpellScript(spell_icecrown_assign_credit_to_master);
+ RegisterSpellScript(spell_icecrown_burst_at_the_seams_52510);
}
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index 44b483488f1..bba73b309e0 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -24,6 +24,7 @@
#include "Player.h"
#include "ScriptedEscortAI.h"
#include "SpellAuras.h"
+#include "SpellInfo.h"
#include "SpellScript.h"
#include "Vehicle.h"
#include "GameObject.h"
@@ -796,6 +797,93 @@ class spell_sholazar_flight_to_sholazar : public SpellScript
}
};
+/*######
+## Quest 12634: Some Make Lemonade, Some Make Liquor
+######*/
+
+enum SomeMakeLemonadeSomeMakeLiquor
+{
+ SPELL_BANANAS_FALL_TO_GROUND = 51836,
+ SPELL_ORANGE_FALLS_TO_GROUND = 51837,
+ SPELL_PAPAYA_FALLS_TO_GROUND = 51839,
+ SPELL_TRIGGER_SPAWN_DWARF = 52078
+};
+
+// This should be scripted in DB but our action lists aren't good enough to properly support chance
+// 51840 - Despawn Fruit Tosser
+class spell_sholazar_despawn_fruit_tosser : public SpellScript
+{
+ PrepareSpellScript(spell_sholazar_despawn_fruit_tosser);
+
+ bool Validate(SpellInfo const* /*spellEntry*/) override
+ {
+ return ValidateSpellInfo(
+ {
+ SPELL_BANANAS_FALL_TO_GROUND,
+ SPELL_ORANGE_FALLS_TO_GROUND,
+ SPELL_PAPAYA_FALLS_TO_GROUND,
+ SPELL_TRIGGER_SPAWN_DWARF
+ });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ uint32 spellId = SPELL_BANANAS_FALL_TO_GROUND;
+ switch (urand(0, 3))
+ {
+ case 1: spellId = SPELL_ORANGE_FALLS_TO_GROUND; break;
+ case 2: spellId = SPELL_PAPAYA_FALLS_TO_GROUND; break;
+ }
+ // sometimes, if you're lucky, you get a dwarf
+ if (roll_chance_i(5))
+ spellId = SPELL_TRIGGER_SPAWN_DWARF;
+
+ GetHitUnit()->CastSpell(GetCaster(), spellId);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sholazar_despawn_fruit_tosser::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+/*######
+## Quest 12805: Salvaging Life's Strength
+######*/
+
+enum SalvagingLifesStength
+{
+ NPC_SHARD_KILL_CREDIT = 29303
+};
+
+// 54190 - Lifeblood Dummy
+class spell_sholazar_lifeblood_dummy : public SpellScript
+{
+ PrepareSpellScript(spell_sholazar_lifeblood_dummy);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) }) &&
+ sObjectMgr->GetCreatureTemplate(NPC_SHARD_KILL_CREDIT);
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitUnit()->HasAura(uint32(GetEffectValue())))
+ {
+ if (Player* caster = GetCaster()->ToPlayer())
+ caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT);
+
+ GetHitUnit()->RemoveAurasDueToSpell(uint32(GetEffectValue()));
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_sholazar_lifeblood_dummy::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_sholazar_basin()
{
RegisterCreatureAI(npc_engineer_helice);
@@ -811,4 +899,6 @@ void AddSC_sholazar_basin()
RegisterSpellScript(spell_sholazar_song_of_cleansing);
RegisterSpellScript(spell_sholazar_lightning_strike);
RegisterSpellScript(spell_sholazar_flight_to_sholazar);
+ RegisterSpellScript(spell_sholazar_despawn_fruit_tosser);
+ RegisterSpellScript(spell_sholazar_lifeblood_dummy);
}
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index ef09f518892..a76580a65e6 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -1268,6 +1268,59 @@ class spell_storm_peaks_call_of_earth : public SpellScript
}
};
+/*######
+## Quest 12851: Bearly Hanging On
+######*/
+
+enum BearlyHangingOn
+{
+ NPC_FROSTGIANT = 29351,
+ NPC_FROSTWORG = 29358,
+ SPELL_FROSTGIANT_CREDIT = 58184,
+ SPELL_FROSTWORG_CREDIT = 58183,
+ SPELL_IMMOLATION = 54690,
+ SPELL_ABLAZE = 54683
+};
+
+// 54798 - FLAMING Arrow Triggered Effect
+class spell_storm_peaks_flaming_arrow_triggered_effect : public AuraScript
+{
+ PrepareAuraScript(spell_storm_peaks_flaming_arrow_triggered_effect);
+
+ void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Unit* caster = GetCaster())
+ {
+ Unit* target = GetTarget();
+ // Already in fire
+ if (target->HasAura(SPELL_ABLAZE))
+ return;
+
+ if (Player* player = caster->GetCharmerOrOwnerPlayerOrPlayerItself())
+ {
+ switch (target->GetEntry())
+ {
+ case NPC_FROSTWORG:
+ target->CastSpell(player, SPELL_FROSTWORG_CREDIT, true);
+ target->CastSpell(target, SPELL_IMMOLATION, true);
+ target->CastSpell(target, SPELL_ABLAZE, true);
+ break;
+ case NPC_FROSTGIANT:
+ target->CastSpell(player, SPELL_FROSTGIANT_CREDIT, true);
+ target->CastSpell(target, SPELL_IMMOLATION, true);
+ target->CastSpell(target, SPELL_ABLAZE, true);
+ break;
+ }
+ }
+ }
+ }
+
+ void Register() override
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_storm_peaks_flaming_arrow_triggered_effect::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
+ }
+};
+
void AddSC_storm_peaks()
{
RegisterCreatureAI(npc_brunnhildar_prisoner);
@@ -1296,4 +1349,5 @@ void AddSC_storm_peaks()
RegisterSpellScript(spell_storm_peaks_mammoth_explosion_master);
RegisterSpellScript(spell_storm_peaks_unstable_explosive_detonation);
RegisterSpellScript(spell_storm_peaks_call_of_earth);
+ RegisterSpellScript(spell_storm_peaks_flaming_arrow_triggered_effect);
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 04be09d4f51..a4b18fbd7a7 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -1029,7 +1029,8 @@ class spell_zuldrak_summon_nass : public SpellScript
enum ConvocationAtZolHeb
{
- SPELL_AKALIS_STUN = 52989
+ SPELL_AKALIS_STUN = 52989,
+ SPELL_FLICKERING_FLAMES = 53504
};
// 53010 - Convocation at Zol'Heb: Removef Akali's Stun
@@ -1053,6 +1054,148 @@ class spell_zuldrak_remove_akalis_stun : public SpellScript
}
};
+// 53350 - Quenching Mist
+class spell_zuldrak_quenching_mist : public AuraScript
+{
+ PrepareAuraScript(spell_zuldrak_quenching_mist);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_FLICKERING_FLAMES });
+ }
+
+ void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
+ {
+ GetTarget()->RemoveAurasDueToSpell(SPELL_FLICKERING_FLAMES);
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_zuldrak_quenching_mist::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
+ }
+};
+
+/*######
+## Quest 12661: Infiltrating Voltarus / 12669: So Far, So Bad / 12676: Sabotage / 12677: Hazardous Materials / 12713: Betrayal
+######*/
+
+// 55368 - Summon Stefan
+class spell_zuldrak_summon_stefan : public SpellScript
+{
+ PrepareSpellScript(spell_zuldrak_summon_stefan);
+
+ void SetDest(SpellDestination& dest)
+ {
+ // Adjust effect summon position (sniff)
+ Position const offset = { 0.0f, 0.0f, 30.0f, 0.0f };
+ dest.RelocateOffset(offset);
+ }
+
+ void Register() override
+ {
+ OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_zuldrak_summon_stefan::SetDest, EFFECT_0, TARGET_DEST_CASTER_BACK);
+ }
+};
+
+/*######
+## Quest 12527: Gluttonous Lurkers
+######*/
+
+enum GluttonousLurkers
+{
+ SPELL_SUMMON_GORGED_LURKING_BASILISK = 50928
+};
+
+// 50894 - Zul'Drak Rat
+class spell_zuldrak_zuldrak_rat : public SpellScript
+{
+ PrepareSpellScript(spell_zuldrak_zuldrak_rat);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_GORGED_LURKING_BASILISK });
+ }
+
+ void HandleScriptEffect(SpellEffIndex /* effIndex */)
+ {
+ if (GetHitAura() && GetHitAura()->GetStackAmount() >= GetSpellInfo()->StackAmount)
+ {
+ GetHitUnit()->CastSpell((Unit*) nullptr, SPELL_SUMMON_GORGED_LURKING_BASILISK, true);
+ if (Creature* basilisk = GetHitUnit()->ToCreature())
+ basilisk->DespawnOrUnsummon();
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_zuldrak_zuldrak_rat::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+/*######
+## Quest 12919: The Storm King's Vengeance
+######*/
+
+enum TheStormKingsVengeance
+{
+ SPELL_RIDE_GYMER = 43671,
+ SPELL_GRABBED = 55424,
+ SPELL_VARGUL_EXPLOSION = 55569
+};
+
+// 55516 - Gymer's Grab
+class spell_zuldrak_gymers_grab : public SpellScript
+{
+ PrepareSpellScript(spell_zuldrak_gymers_grab);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_RIDE_GYMER, SPELL_GRABBED });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ if (!GetHitCreature())
+ return;
+ CastSpellExtraArgs args(TRIGGERED_FULL_MASK);
+ args.AddSpellBP0(2);
+ GetHitCreature()->CastSpell(GetCaster(), SPELL_RIDE_GYMER, args);
+ GetHitCreature()->CastSpell(GetHitCreature(), SPELL_GRABBED, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_zuldrak_gymers_grab::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+// 55421 - Gymer's Throw
+class spell_zuldrak_gymers_throw : public SpellScript
+{
+ PrepareSpellScript(spell_zuldrak_gymers_throw);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_VARGUL_EXPLOSION });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsVehicle())
+ if (Unit* passenger = caster->GetVehicleKit()->GetPassenger(1))
+ {
+ passenger->ExitVehicle();
+ caster->CastSpell(passenger, SPELL_VARGUL_EXPLOSION, true);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_zuldrak_gymers_throw::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
void AddSC_zuldrak()
{
RegisterCreatureAI(npc_released_offspring_harkoa);
@@ -1076,4 +1219,9 @@ void AddSC_zuldrak()
RegisterSpellScript(spell_zuldrak_breaking_through_summon_zulaman_gods_master);
RegisterSpellScript(spell_zuldrak_summon_nass);
RegisterSpellScript(spell_zuldrak_remove_akalis_stun);
+ RegisterSpellScript(spell_zuldrak_quenching_mist);
+ RegisterSpellScript(spell_zuldrak_summon_stefan);
+ RegisterSpellScript(spell_zuldrak_zuldrak_rat);
+ RegisterSpellScript(spell_zuldrak_gymers_grab);
+ RegisterSpellScript(spell_zuldrak_gymers_throw);
}