diff options
author | offl <offl@users.noreply.github.com> | 2020-11-10 00:36:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-28 23:59:23 +0100 |
commit | 0b0532e96a635e71d746252ad80057d58be44ef5 (patch) | |
tree | 750b54bcc1c04238ca787d5e30d3f0ffe21548d9 | |
parent | e1bfc3996c834cfd8f6a3415a79f1da8de7910e8 (diff) |
DB/Quest: Convert & update support for 'Prison Break' (11587) to SAI
(cherry picked from commit dc4cb8f1d3895316c6ecc7a47c392a6da7a9f948)
-rw-r--r-- | sql/updates/world/master/2022_02_28_66_world_2020_11_09_04_world.sql | 36 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 17 | ||||
-rw-r--r-- | src/server/scripts/World/go_scripts.cpp | 38 |
3 files changed, 42 insertions, 49 deletions
diff --git a/sql/updates/world/master/2022_02_28_66_world_2020_11_09_04_world.sql b/sql/updates/world/master/2022_02_28_66_world_2020_11_09_04_world.sql new file mode 100644 index 00000000000..40460813e30 --- /dev/null +++ b/sql/updates/world/master/2022_02_28_66_world_2020_11_09_04_world.sql @@ -0,0 +1,36 @@ +-- Source: Sniffs +UPDATE `gameobject_template` SET `ScriptName` = "" WHERE `entry` = 187561; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` IN (45446,45448,45449); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(13,1,45446,0,0,31,0,3,24771,0,0,0,0,"","Group 0: Spell 'Summon Arcane Prisoner' (Effect 0) targets creature 'Coldarra Invisman'"), +(13,1,45448,0,0,31,0,3,24771,0,0,0,0,"","Group 0: Spell 'Summon Arcane Prisoner' (Effect 0) targets creature 'Coldarra Invisman'"), +(13,1,45449,0,0,31,0,3,24771,0,0,0,0,"","Group 0: Spell 'Arcane Prisoner Rescue' (Effect 0) targets creature 'Coldarra Invisman'"); + +UPDATE `creature_template` SET `AIName` = "SmartAI" WHERE `entry` IN (25318,25320); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (25318,25320) AND `source_type` = 0; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 2531800 AND `source_type` = 9; +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 +(25318,0,0,0,54,0,100,0,0,0,0,0,0,80,2531800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Just Summoned - Run Script"), +(25320,0,0,0,54,0,100,0,0,0,0,0,0,80,2531800,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Just Summoned - Run Script"), + +(2531800,9,0,0,0,0,100,0,0,0,0,0,0,66,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Script - Set Orientation Owner"), +(2531800,9,1,0,0,0,100,0,2000,2000,0,0,0,11,45456,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Script - Cast 'Arcane Prisoner Kill Credit'"), +(2531800,9,2,0,0,0,100,0,0,0,0,0,0,11,45451,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Script - Cast 'Cosmetic Hearthstone'"), +(2531800,9,3,0,0,0,100,0,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Arcane Prisoner - On Script - Say Line 0"); + +DELETE FROM `spell_scripts` WHERE `id` = 45451; +INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`,`Comment`) VALUES +(45451,0,0,18,0,0,0,0,0,0,0,"Cosmetic Hearthstone - On Effect Hit (Dummy) - Caster Despawn Instant"); + +-- http://web.archive.org/web/20120714015749/www.wowhead.com/npc=25320 +DELETE FROM `creature_text` WHERE `CreatureID` IN (25318,25320); +INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES +(25318,0,0,"Avenge me....",12,0,100,0,0,0,24543,0,"Arcane Prisoner"), +(25318,0,1,"Thank you, $r. I shall not forget your kindness.",12,0,100,0,0,0,24544,0,"Arcane Prisoner"), +(25318,0,2,"You've saved me, $c. Thank you!",12,0,100,0,0,0,24545,0,"Arcane Prisoner"), +(25318,0,3,"Thank you, $r. Without your help I would have become one of them!",12,0,100,0,0,0,24546,0,"Arcane Prisoner"), +(25320,0,0,"Avenge me....",12,0,100,0,0,0,24543,0,"Arcane Prisoner"), +(25320,0,1,"Thank you, $r. I shall not forget your kindness.",12,0,100,0,0,0,24544,0,"Arcane Prisoner"), +(25320,0,2,"You've saved me, $c. Thank you!",12,0,100,0,0,0,24545,0,"Arcane Prisoner"), +(25320,0,3,"Thank you, $r. Without your help I would have become one of them!",12,0,100,0,0,0,24546,0,"Arcane Prisoner"); 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 @@ -472,43 +472,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(); |