aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordr-j <dr-j@users.noreply.github.com>2017-10-31 20:24:56 +0100
committerfunjoker <funjoker109@gmail.com>2021-01-21 22:30:40 +0100
commit9f32181ccb6a40149e6ddc9d165a44dd8f8a63da (patch)
tree89f5aa80de802521a86271a911c3742096b4fd39
parenta60adef3bbe45da39f783eb266175ed81d70ac54 (diff)
Quest/Script: Conversion of Bristlelimb Cage/Stillpine Captive cpp to SAI
Closes #19868 (cherry picked from commit 3bb5f17ff5ff8b208139388dce7411f6d55aa45e)
-rw-r--r--sql/updates/world/master/2021_01_20_01_world_2017_10_31_03_world.sql18
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp124
2 files changed, 18 insertions, 124 deletions
diff --git a/sql/updates/world/master/2021_01_20_01_world_2017_10_31_03_world.sql b/sql/updates/world/master/2021_01_20_01_world_2017_10_31_03_world.sql
new file mode 100644
index 00000000000..2c9cac0c146
--- /dev/null
+++ b/sql/updates/world/master/2021_01_20_01_world_2017_10_31_03_world.sql
@@ -0,0 +1,18 @@
+--
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry`=17375;
+UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry`=181714;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =181714 AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` =17375 AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18171400,1737500) 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`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(181714, 1, 0 ,0,70, 0, 100, 0, 2, 0, 0,0,80,18171400,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Bristlelimb Cage - On State Changed - Run Script'),
+(181714, 1, 1 ,0,38, 0, 100, 0, 1, 1, 0,0,32,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Bristlelimb Cage - On Data Set - Reset GO'),
+(17375, 0, 0 ,0,38, 0, 100, 0, 1, 1, 0,0,80,1737500,2,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Stillpine Captive - On Data Set - Run Script'),
+(17375, 0, 1 ,0,11, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,20,181714,5,0,0, 0, 0, 0, 'Stillpine Captive - ON respawn - Set data'),
+(1737500, 9, 0 ,0,0, 0, 100, 0, 1000, 1000, 0,0,1,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Stillpine Captive - On Script - Say'),
+(1737500, 9, 1 ,0,0, 0, 100, 0, 0, 0, 0,0,33,17375,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Stillpine Captive - On Script - Kill Credit'),
+(1737500, 9, 2 ,0,0, 0, 100, 0, 4000, 4000, 0,0,114,0,0,0,0,0,0,1,0,0,0,0, 30, 0, 0, 'Stillpine Captive - On Script - Move Foward'),
+(1737500, 9, 3 ,0,0, 0, 100, 0, 4000, 4000, 0,0,41,0,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Stillpine Captive - On Script - Despawn after 5 seconds'),
+(18171400, 9, 0 ,0, 0, 0, 100, 0, 0, 0, 0,0,64,1,0,0,0,0,0,7,0,0,0,0, 0, 0, 0, 'Bristlelimb Cage - On State Changed - Store Targetlist'),
+(18171400, 9, 1 ,0, 0, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,19,17375,5,0,0, 0, 0, 0, 'Bristlelimb Cage - Script - Send Targetlist'),
+(18171400, 9, 2 ,0, 0, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,19,17375,5,0,0, 0, 0, 0, 'Bristlelimb Cage - Script - Set Data');
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index 26e856b1a84..bc5f7b0d942 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -716,128 +716,6 @@ public:
}
};
-/*########
-## Quest: The Prophecy of Akida
-########*/
-
-enum BristlelimbCage
-{
- QUEST_THE_PROPHECY_OF_AKIDA = 9544,
- NPC_STILLPINE_CAPITIVE = 17375,
- GO_BRISTELIMB_CAGE = 181714,
-
- CAPITIVE_SAY = 0,
-
- POINT_INIT = 1,
- EVENT_DESPAWN = 1,
-};
-
-class npc_stillpine_capitive : public CreatureScript
-{
- public:
- npc_stillpine_capitive() : CreatureScript("npc_stillpine_capitive") { }
-
- struct npc_stillpine_capitiveAI : public ScriptedAI
- {
- npc_stillpine_capitiveAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- _playerGUID.Clear();
- _movementComplete = false;
- }
-
- void Reset() override
- {
- if (GameObject* cage = me->FindNearestGameObject(GO_BRISTELIMB_CAGE, 5.0f))
- {
- cage->SetLootState(GO_JUST_DEACTIVATED);
- cage->SetGoState(GO_STATE_READY);
- }
- _events.Reset();
- Initialize();
- }
-
- void StartMoving(Player* owner)
- {
- if (owner)
- {
- Talk(CAPITIVE_SAY, owner);
- _playerGUID = owner->GetGUID();
- }
- Position pos = me->GetNearPosition(3.0f, 0.0f);
- me->GetMotionMaster()->MovePoint(POINT_INIT, pos);
- }
-
- void MovementInform(uint32 type, uint32 id) override
- {
- if (type != POINT_MOTION_TYPE || id != POINT_INIT)
- return;
-
- if (Player* _player = ObjectAccessor::GetPlayer(*me, _playerGUID))
- _player->KilledMonsterCredit(me->GetEntry(), me->GetGUID());
-
- _movementComplete = true;
- _events.ScheduleEvent(EVENT_DESPAWN, 3500);
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (!_movementComplete)
- return;
-
- _events.Update(diff);
-
- if (_events.ExecuteEvent() == EVENT_DESPAWN)
- me->DespawnOrUnsummon();
- }
-
- private:
- ObjectGuid _playerGUID;
- EventMap _events;
- bool _movementComplete;
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_stillpine_capitiveAI(creature);
- }
-};
-
-class go_bristlelimb_cage : public GameObjectScript
-{
- public:
- go_bristlelimb_cage() : GameObjectScript("go_bristlelimb_cage") { }
-
- struct go_bristlelimb_cageAI : public GameObjectAI
- {
- go_bristlelimb_cageAI(GameObject* go) : GameObjectAI(go) { }
-
- bool GossipHello(Player* player) override
- {
- me->SetGoState(GO_STATE_READY);
- if (player->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE)
- {
- if (Creature* capitive = me->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true))
- {
- me->ResetDoorOrButton();
- ENSURE_AI(npc_stillpine_capitive::npc_stillpine_capitiveAI, capitive->AI())->StartMoving(player);
- return false;
- }
- }
- return true;
- }
- };
-
- GameObjectAI* GetAI(GameObject* go) const override
- {
- return new go_bristlelimb_cageAI(go);
- }
-};
-
void AddSC_azuremyst_isle()
{
new npc_draenei_survivor();
@@ -846,6 +724,4 @@ void AddSC_azuremyst_isle()
new npc_magwin();
new npc_death_ravager();
new go_ravager_cage();
- new npc_stillpine_capitive();
- new go_bristlelimb_cage();
}