aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authoroffl <11556157+offl@users.noreply.github.com>2025-08-17 19:26:27 +0300
committerGitHub <noreply@github.com>2025-08-17 18:26:27 +0200
commit760cd824bb1fb47ae062d62f40f900595a340fb4 (patch)
tree8446e3f61d44700ca046ae84ee18ac26360464a1 /src/server/scripts/Outland
parent5649e4e76c817241034ffc4ab7bb6425329adad7 (diff)
Scripts/Spells: Migrate & update several item spell scripts to zone files (#31171)
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp73
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp56
2 files changed, 124 insertions, 5 deletions
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index 5e080361e20..320fb13f989 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -883,6 +883,77 @@ public:
explicit spell_hellfire_peninsula_translocation_falcon_watch(Translocation triggeredSpellId) : _triggeredSpellId(triggeredSpellId) { }
};
+/*######
+## Quest 9361: Helboar, the Other White Meat
+######*/
+
+enum HelboarTheOtherWhiteMeat
+{
+ SPELL_SUMMON_PURIFIED_HELBOAR_MEAT = 29277,
+ SPELL_SUMMON_TOXIC_HELBOAR_MEAT = 29278
+};
+
+// 29200 - Purify Helboar Meat
+class spell_hellfire_peninsula_purify_helboar_meat : public SpellScript
+{
+ PrepareSpellScript(spell_hellfire_peninsula_purify_helboar_meat);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUMMON_PURIFIED_HELBOAR_MEAT, SPELL_SUMMON_TOXIC_HELBOAR_MEAT });
+ }
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetCaster(), roll_chance_i(50) ? SPELL_SUMMON_PURIFIED_HELBOAR_MEAT : SPELL_SUMMON_TOXIC_HELBOAR_MEAT);
+ }
+
+ void Register() override
+ {
+ OnEffectHit += SpellEffectFn(spell_hellfire_peninsula_purify_helboar_meat::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+};
+
+/*######
+## Quest 10813: The Eyes of Grillok
+######*/
+
+enum TheEyesOfGrillok
+{
+ SPELL_EYE_OF_GRILLOK = 38495
+};
+
+// 38554 - Absorb Eye of Grillok
+class spell_hellfire_peninsula_absorb_eye_of_grillok : public AuraScript
+{
+ PrepareAuraScript(spell_hellfire_peninsula_absorb_eye_of_grillok);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_EYE_OF_GRILLOK });
+ }
+
+ void PeriodicTick(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+
+ if (Unit* caster = GetCaster())
+ GetTarget()->CastSpell(caster, SPELL_EYE_OF_GRILLOK, aurEff);
+
+ if (Creature* target = GetTarget()->ToCreature())
+ {
+ /// @todo: This is a hack, in flight missiles of spells of despawned creatures get cancelled - delay despawning by the duration of SPELL_EYE_OF_GRILLOK aura
+ target->SetVisible(false);
+ target->DespawnOrUnsummon(5s);
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_hellfire_peninsula_absorb_eye_of_grillok::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+};
+
void AddSC_hellfire_peninsula()
{
new npc_colonel_jules();
@@ -895,4 +966,6 @@ void AddSC_hellfire_peninsula()
RegisterSpellScript(spell_hellfire_peninsula_send_vengeance_to_player);
RegisterSpellScriptWithArgs(spell_hellfire_peninsula_translocation_falcon_watch, "spell_hellfire_peninsula_translocation_falcon_watch_tower_down", SPELL_TRANSLOCATION_FALCON_WATCH_TOWER_DOWN);
RegisterSpellScriptWithArgs(spell_hellfire_peninsula_translocation_falcon_watch, "spell_hellfire_peninsula_translocation_falcon_watch_tower_up", SPELL_TRANSLOCATION_FALCON_WATCH_TOWER_UP);
+ RegisterSpellScript(spell_hellfire_peninsula_purify_helboar_meat);
+ RegisterSpellScript(spell_hellfire_peninsula_absorb_eye_of_grillok);
}
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index c0f9081764b..b8b1df1d382 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -464,7 +464,7 @@ public:
## Quest 10857: Teleport This!
######*/
-enum DetonateTeleporter
+enum TeleportThis
{
SPELL_TELEPORTER_KILL_CREDIT_1 = 38982, // 22348
SPELL_TELEPORTER_KILL_CREDIT_2 = 38983, // 22351
@@ -475,9 +475,9 @@ enum DetonateTeleporter
};
// 38920 - Detonate Teleporter
-class spell_detonate_teleporter : public SpellScript
+class spell_netherstorm_detonate_teleporter : public SpellScript
{
- PrepareSpellScript(spell_detonate_teleporter);
+ PrepareSpellScript(spell_netherstorm_detonate_teleporter);
bool Load() override
{
@@ -527,7 +527,52 @@ class spell_detonate_teleporter : public SpellScript
void Register() override
{
- OnEffectHitTarget += SpellEffectFn(spell_detonate_teleporter::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
+ OnEffectHitTarget += SpellEffectFn(spell_netherstorm_detonate_teleporter::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+/*######
+## Quest 10409: Deathblow to the Legion
+######*/
+
+enum DeathblowToTheLegion
+{
+ SPELL_SOCRETHAR_TO_SEAT = 35743,
+ SPELL_SOCRETHAR_FROM_SEAT = 35744,
+
+ AREA_INVASION_POINT_OVERLORD = 3900,
+ AREA_SOCRETHARS_SEAT = 3742
+};
+
+// 35745 - Socrethar's Stone
+class spell_netherstorm_socrethars_stone : public SpellScript
+{
+ PrepareSpellScript(spell_netherstorm_socrethars_stone);
+
+ bool Validate(SpellInfo const* /*spell*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SOCRETHAR_TO_SEAT, SPELL_SOCRETHAR_FROM_SEAT });
+ }
+
+ void HandleDummy(SpellEffIndex /* effIndex */)
+ {
+ Unit* caster = GetCaster();
+ switch (caster->GetAreaId())
+ {
+ case AREA_INVASION_POINT_OVERLORD:
+ caster->CastSpell(caster, SPELL_SOCRETHAR_TO_SEAT);
+ break;
+ case AREA_SOCRETHARS_SEAT:
+ caster->CastSpell(caster, SPELL_SOCRETHAR_FROM_SEAT);
+ break;
+ default:
+ return;
+ }
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_netherstorm_socrethars_stone::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -536,5 +581,6 @@ void AddSC_netherstorm()
new npc_commander_dawnforge();
new at_commander_dawnforge();
new npc_phase_hunter();
- RegisterSpellScript(spell_detonate_teleporter);
+ RegisterSpellScript(spell_netherstorm_detonate_teleporter);
+ RegisterSpellScript(spell_netherstorm_socrethars_stone);
}