diff options
author | offl <offl@users.noreply.github.com> | 2020-06-14 19:16:55 +0200 |
---|---|---|
committer | Killyana <morphone1@gmail.com> | 2020-06-14 19:16:55 +0200 |
commit | a117450ce9178c4afc769b3b747a24fbc6100912 (patch) | |
tree | 498f51e14351fcc44e71cd88de82e79ad768e880 | |
parent | aa3ccb4657ad42aa50bc3633acd15540a17936b8 (diff) |
DB/Instance: Convert some Uldaman scripts to DB
Closes #24744
-rw-r--r-- | sql/updates/world/3.3.5/2020_06_14_10_world.sql | 10 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp | 102 |
2 files changed, 10 insertions, 102 deletions
diff --git a/sql/updates/world/3.3.5/2020_06_14_10_world.sql b/sql/updates/world/3.3.5/2020_06_14_10_world.sql new file mode 100644 index 00000000000..7a403c85ad5 --- /dev/null +++ b/sql/updates/world/3.3.5/2020_06_14_10_world.sql @@ -0,0 +1,10 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` = 822; +DELETE FROM `areatrigger_involvedrelation` WHERE `id` = 822; +INSERT INTO `areatrigger_involvedrelation` (`id`,`quest`) VALUES +(822,2240); + +UPDATE `creature_template` SET `AIName` = "SmartAI", `ScriptName` = "" WHERE `entry` = 4863; +DELETE FROM `smart_scripts` WHERE `entryorguid` = 4863 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 +(4863,0,0,0,0,0,100,0,8000,12000,30000,40000,0,11,3636,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Jadespine Basilisk - In Combat - Cast 'Crystalline Slumber'"); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 037885f124d..032187105c6 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -18,14 +18,11 @@ /* ScriptData SDName: Uldaman SD%Complete: 100 -SDComment: Quest support: 2240, 2278 + 1 trash mob. SDCategory: Uldaman EndScriptData */ /* ContentData -npc_jadespine_basilisk go_keystone_chamber -at_map_chamber EndContentData */ #include "ScriptMgr.h" @@ -37,76 +34,6 @@ EndContentData */ #include "uldaman.h" /*###### -## npc_jadespine_basilisk -######*/ - -enum Spells -{ - SPELL_CRYSTALLINE_SLUMBER = 3636, -}; - -class npc_jadespine_basilisk : public CreatureScript -{ - public: - - npc_jadespine_basilisk() - : CreatureScript("npc_jadespine_basilisk") - { - } - - struct npc_jadespine_basiliskAI : public ScriptedAI - { - npc_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } - - void Initialize() - { - uiCslumberTimer = 2000; - } - - uint32 uiCslumberTimer; - - void Reset() override - { - Initialize(); - } - - void JustEngagedWith(Unit* /*who*/) override - { - } - - void UpdateAI(uint32 uiDiff) override - { - //Return since we have no target - if (!UpdateVictim()) - return; - - //uiCslumberTimer - if (uiCslumberTimer <= uiDiff) - { - //Cast - DoCastVictim(SPELL_CRYSTALLINE_SLUMBER, true); - - //Stop attacking target thast asleep and pick new target - uiCslumberTimer = 28000; - - me->GetThreatManager().ResetThreat(me->GetVictim()); - - } else uiCslumberTimer -= uiDiff; - - DoMeleeAttackIfReady(); - } - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return GetUldamanAI<npc_jadespine_basiliskAI>(creature); - } -}; - -/*###### ## go_keystone_chamber ######*/ @@ -134,36 +61,7 @@ class go_keystone_chamber : public GameObjectScript } }; -/*###### -## at_map_chamber -######*/ - -enum MapChamber -{ - QUEST_HIDDEN_CHAMBER = 2240 -}; - -class AreaTrigger_at_map_chamber : public AreaTriggerScript -{ - public: - - AreaTrigger_at_map_chamber() - : AreaTriggerScript("at_map_chamber") - { - } - - bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) override - { - if (player->GetQuestStatus(QUEST_HIDDEN_CHAMBER) == QUEST_STATUS_INCOMPLETE) - player->AreaExploredOrEventHappens(QUEST_HIDDEN_CHAMBER); - - return true; - } -}; - void AddSC_uldaman() { - new npc_jadespine_basilisk(); new go_keystone_chamber(); - new AreaTrigger_at_map_chamber(); } |