From 0b0532e96a635e71d746252ad80057d58be44ef5 Mon Sep 17 00:00:00 2001 From: offl Date: Tue, 10 Nov 2020 00:36:00 +0200 Subject: DB/Quest: Convert & update support for 'Prison Break' (11587) to SAI (cherry picked from commit dc4cb8f1d3895316c6ecc7a47c392a6da7a9f948) --- src/server/scripts/Spells/spell_quest.cpp | 17 +++++--------- src/server/scripts/World/go_scripts.cpp | 38 ------------------------------- 2 files changed, 6 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 004d83198a9..37492620dee 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -422,8 +422,7 @@ class spell_q11515_fel_siphon_dummy : public SpellScriptLoader enum Quest11587Data { SPELL_SUMMON_ARCANE_PRISONER_MALE = 45446, // Summon Arcane Prisoner - Male - SPELL_SUMMON_ARCANE_PRISONER_FEMALE = 45448, // Summon Arcane Prisoner - Female - SPELL_ARCANE_PRISONER_KILL_CREDIT = 45456 // Arcane Prisoner Kill Credit + SPELL_SUMMON_ARCANE_PRISONER_FEMALE = 45448 // Summon Arcane Prisoner - Female }; class spell_q11587_arcane_prisoner_rescue : public SpellScriptLoader @@ -437,20 +436,16 @@ class spell_q11587_arcane_prisoner_rescue : public SpellScriptLoader bool Validate(SpellInfo const* /*spellEntry*/) override { - return ValidateSpellInfo({ SPELL_SUMMON_ARCANE_PRISONER_MALE, SPELL_SUMMON_ARCANE_PRISONER_FEMALE, SPELL_ARCANE_PRISONER_KILL_CREDIT }); + return ValidateSpellInfo({ SPELL_SUMMON_ARCANE_PRISONER_MALE, SPELL_SUMMON_ARCANE_PRISONER_FEMALE }); } void HandleDummy(SpellEffIndex /*effIndex*/) { Unit* caster = GetCaster(); - if (Unit* unitTarget = GetHitUnit()) - { - uint32 spellId = SPELL_SUMMON_ARCANE_PRISONER_MALE; - if (rand32() % 2) - spellId = SPELL_SUMMON_ARCANE_PRISONER_FEMALE; - caster->CastSpell(caster, spellId, true); - unitTarget->CastSpell(caster, SPELL_ARCANE_PRISONER_KILL_CREDIT, true); - } + uint32 spellId = SPELL_SUMMON_ARCANE_PRISONER_MALE; + if (rand32() % 2) + spellId = SPELL_SUMMON_ARCANE_PRISONER_FEMALE; + caster->CastSpell(caster, spellId, true); } void Register() override diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 8dce2e9965e..1d79f16cba2 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -471,43 +471,6 @@ public: } }; -/*###### -## go_arcane_prison -######*/ - -enum ArcanePrison -{ - QUEST_PRISON_BREAK = 11587, - SPELL_ARCANE_PRISONER_KILL_CREDIT = 45456 -}; - -class go_arcane_prison : public GameObjectScript -{ -public: - go_arcane_prison() : GameObjectScript("go_arcane_prison") { } - - struct go_arcane_prisonAI : public GameObjectAI - { - go_arcane_prisonAI(GameObject* go) : GameObjectAI(go) { } - - bool OnGossipHello(Player* player) override - { - if (player->GetQuestStatus(QUEST_PRISON_BREAK) == QUEST_STATUS_INCOMPLETE) - { - me->SummonCreature(25318, 3485.089844f, 6115.7422188f, 70.966812f, 0, TEMPSUMMON_TIMED_DESPAWN, 1min); - player->CastSpell(player, SPELL_ARCANE_PRISONER_KILL_CREDIT, true); - return true; - } - return false; - } - }; - - GameObjectAI* GetAI(GameObject* go) const override - { - return new go_arcane_prisonAI(go); - } -}; - /*###### ## go_blood_filled_orb ######*/ @@ -1384,7 +1347,6 @@ void AddSC_go_scripts() new go_tele_to_violet_stand(); new go_matrix_punchograph(); new go_scourge_cage(); - new go_arcane_prison(); new go_blood_filled_orb(); new go_soulwell(); new go_amberpine_outhouse(); -- cgit v1.2.3