aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2020-05-23 02:44:18 +0200
committerKillyana <morphone1@gmail.com>2020-05-23 02:44:18 +0200
commitfd66e291b5595635411116b5b0946b476719a2ab (patch)
treef7f1ac115194bdc32b675e132729717402aa1ede
parent5ba021844dc6d14d17915a3736354e30c4b872ec (diff)
DB/Quest: Convert "HELP!" & "Corki's Gone Missing Again!" & "Cho'war the Pillager" to SAI
Closes #24649
-rw-r--r--sql/updates/world/3.3.5/2020_05_22_00_world.sql43
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp140
2 files changed, 43 insertions, 140 deletions
diff --git a/sql/updates/world/3.3.5/2020_05_22_00_world.sql b/sql/updates/world/3.3.5/2020_05_22_00_world.sql
new file mode 100644
index 00000000000..1583dd91191
--- /dev/null
+++ b/sql/updates/world/3.3.5/2020_05_22_00_world.sql
@@ -0,0 +1,43 @@
+--
+UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`='' WHERE `entry` IN (18445,18369,20812);
+UPDATE `gameobject_template` SET `Data2`=300000, `AIName`='SmartGameObjectAI', `ScriptName`='' WHERE `entry` IN (182521,182349,182350);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (182521,182349,182350) AND `source_type`=1;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18445,18369,20812) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1844500,1836900,2081200) 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
+(182521, 1, 0 ,1,70, 0, 100, 0, 2, 0, 0,0,64,1,0,0,0,0,0,16,0,0,0,0, 0, 0, 0, 'Corkis Prison - On State Changed - Store Targetlist'),
+(182521, 1, 1 ,2,61, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,19,18445,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Send Targetlist'),
+(182521, 1, 2 ,0,61, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,19,18445,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Set Data'),
+(18445, 0, 0 ,0,38, 0, 100, 0, 1, 1, 0,0,80,1844500,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Corki - On Data Set - Action list'),
+(1844500, 9, 0 ,0,0, 0, 100, 0, 0, 0, 0,0,1,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Say'),
+(1844500, 9, 1 ,0,0, 0, 100, 0, 0, 0, 0,0,33,18444,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Kill Credit'),
+(1844500, 9, 2 ,0,0, 0, 100, 0, 4000, 4000, 0,0,69,0,0,0,0,0,0,8,0,0,0,-896.082, 8687.346, 170.455, 3.81311, 'Corki - Action listt - Move Foward'),
+(1844500, 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, 'Corki - Action list - Despawn after 5 seconds'),
+(182349, 1, 0 ,1,70, 0, 100, 0, 2, 0, 0,0,64,1,0,0,0,0,0,16,0,0,0,0, 0, 0, 0, 'Corkis Prison - On State Changed - Store Targetlist'),
+(182349, 1, 1 ,2,61, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,19,18369,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Send Targetlist'),
+(182349, 1, 2 ,0,61, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,19,18369,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Set Data'),
+(18369, 0, 0 ,0,38, 0, 100, 0, 1, 1, 0,0,80,1836900,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Corki - On Data Set - Action list'),
+(1836900, 9, 0 , 0, 0, 0, 100, 0, 0, 0, 0,0,1,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Say'),
+(1836900, 9, 1 , 0, 0, 0, 100, 0, 0, 0, 0,0,33,18369,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Kill Credit'),
+(1836900, 9, 2 , 0, 0, 0, 100, 0, 4000, 4000, 0,0,114,0,0,0,0,0,0,1,0,0,0,0, 25, 0, 0, 'Corki - Action list - Move Foward'),
+(1836900, 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, 'Corki - Action list - Despawn after 5 seconds'),
+(182350, 1, 0 ,1,70, 0, 100, 0, 2, 0, 0,0,64,1,0,0,0,0,0,16,0,0,0,0, 0, 0, 0, 'Corkis Prison - On State Changed - Store Targetlist'),
+(182350, 1, 1 ,2,61, 0, 100, 0, 0, 0, 0,0,100,1,0,0,0,0,0,19,20812,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Send Targetlist'),
+(182350, 1, 2 ,0,61, 0, 100, 0, 0, 0, 0,0,45,1,1,0,0,0,0,19,20812,0,0,0, 0, 0, 0, 'Corkis Prison - Script - Set Data'),
+(20812, 0, 0 ,0,38, 0, 100, 0, 1, 1, 0,0,80,2081200,0,0,0,0,0,1,0,0,0,0, 0, 0, 0, 'Corki - On Data Set - Action list'),
+(2081200, 9, 0 , 0, 0, 0, 100, 0, 0, 0, 0,0,1,0,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Say'),
+(2081200, 9, 1 , 0, 0, 0, 100, 0, 0, 0, 0,0,33,20812,0,0,0,0,0,12,1,0,0,0, 0, 0, 0, 'Corki - Action list - Kill Credit'),
+(2081200, 9, 2 , 0, 0, 0, 100, 0, 4000, 4000, 0,0,69,0,0,0,0,0,0,8,0,0,0,-1001.022, 8113.366, -95.849, 0.352908, 'Corki - Action list - Move Foward'),
+(2081200, 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, 'Corki - Action list - Despawn after 5 seconds');
+
+UPDATE `creature` SET `position_x`=-2563.89,`position_y`=6288.29,`position_z`=15.295,`orientation`=5.23599 WHERE `id` IN (18369);
+UPDATE `creature` SET `position_x`=-918.143,`position_y`=8663.94,`position_z`=172.542,`orientation`=0.523599 WHERE `id` IN (18445);
+
+DELETE FROM `creature_questender` WHERE `id` IN (18369,18445);
+INSERT INTO `creature_questender` (`id`, `quest`) VALUES
+(18445, 9954);
+
+DELETE FROM `creature_queststarter` WHERE `id` IN (18369,18445);
+INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES
+(18369, 9923),
+(18445, 9955);
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index 5245e967bcd..42273903322 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -216,144 +216,6 @@ public:
};
-/*######
-## go_corkis_prison and npc_corki
-######*/
-
-enum CorkiData
-{
- // first quest
- QUEST_HELP = 9923,
- NPC_CORKI = 18445,
- NPC_CORKI_CREDIT_1 = 18369,
- GO_CORKIS_PRISON = 182349,
- CORKI_SAY_THANKS = 0,
- // 2nd quest
- QUEST_CORKIS_GONE_MISSING_AGAIN = 9924,
- NPC_CORKI_2 = 20812,
- GO_CORKIS_PRISON_2 = 182350,
- CORKI_SAY_PROMISE = 0,
- // 3rd quest
- QUEST_CHOWAR_THE_PILLAGER = 9955,
- NPC_CORKI_3 = 18369,
- NPC_CORKI_CREDIT_3 = 18444,
- GO_CORKIS_PRISON_3 = 182521,
- CORKI_SAY_LAST = 0
-};
-
-class go_corkis_prison : public GameObjectScript
-{
-public:
- go_corkis_prison() : GameObjectScript("go_corkis_prison") { }
-
- struct go_corkis_prisonAI : public GameObjectAI
- {
- go_corkis_prisonAI(GameObject* go) : GameObjectAI(go) { }
-
- bool GossipHello(Player* player) override
- {
- me->SetGoState(GO_STATE_READY);
- if (me->GetEntry() == GO_CORKIS_PRISON)
- {
- if (Creature* corki = me->FindNearestCreature(NPC_CORKI, 25, true))
- {
- corki->GetMotionMaster()->MovePoint(1, me->GetPositionX() + 5, me->GetPositionY(), me->GetPositionZ());
- if (player)
- player->KilledMonsterCredit(NPC_CORKI_CREDIT_1);
- }
- }
-
- if (me->GetEntry() == GO_CORKIS_PRISON_2)
- {
- if (Creature* corki = me->FindNearestCreature(NPC_CORKI_2, 25, true))
- {
- corki->GetMotionMaster()->MovePoint(1, me->GetPositionX() - 5, me->GetPositionY(), me->GetPositionZ());
- if (player)
- player->KilledMonsterCredit(NPC_CORKI_2);
- }
- }
-
- if (me->GetEntry() == GO_CORKIS_PRISON_3)
- {
- if (Creature* corki = me->FindNearestCreature(NPC_CORKI_3, 25, true))
- {
- corki->GetMotionMaster()->MovePoint(1, me->GetPositionX() + 4, me->GetPositionY(), me->GetPositionZ());
- if (player)
- player->KilledMonsterCredit(NPC_CORKI_CREDIT_3);
- }
- }
- return true;
- }
- };
-
- GameObjectAI* GetAI(GameObject* go) const override
- {
- return new go_corkis_prisonAI(go);
- }
-};
-
-class npc_corki : public CreatureScript
-{
-public:
- npc_corki() : CreatureScript("npc_corki") { }
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_corkiAI(creature);
- }
-
- struct npc_corkiAI : public ScriptedAI
- {
- npc_corkiAI(Creature* creature) : ScriptedAI(creature)
- {
- Initialize();
- }
-
- void Initialize()
- {
- Say_Timer = 5000;
- ReleasedFromCage = false;
- }
-
- uint32 Say_Timer;
- bool ReleasedFromCage;
-
- void Reset() override
- {
- Initialize();
- }
-
- void UpdateAI(uint32 diff) override
- {
- if (ReleasedFromCage)
- {
- if (Say_Timer <= diff)
- {
- me->DespawnOrUnsummon();
- ReleasedFromCage = false;
- }
- else
- Say_Timer -= diff;
- }
- }
-
- void MovementInform(uint32 type, uint32 id) override
- {
- if (type == POINT_MOTION_TYPE && id == 1)
- {
- Say_Timer = 5000;
- ReleasedFromCage = true;
- if (me->GetEntry() == NPC_CORKI)
- Talk(CORKI_SAY_THANKS);
- if (me->GetEntry() == NPC_CORKI_2)
- Talk(CORKI_SAY_PROMISE);
- if (me->GetEntry() == NPC_CORKI_3)
- Talk(CORKI_SAY_LAST);
- }
- };
- };
-};
-
/*#####
## npc_kurenai_captive
#####*/
@@ -836,8 +698,6 @@ public:
void AddSC_nagrand()
{
new npc_maghar_captive();
- new npc_corki();
- new go_corkis_prison();
new npc_kurenai_captive();
new npc_nagrand_banner();
new condition_nagrand_banner();