aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKillyana <morphone1@gmail.com>2019-06-09 21:44:37 +0200
committerKillyana <morphone1@gmail.com>2019-06-09 21:44:37 +0200
commitd7375ad33f9d23325346281c8635633db62521ac (patch)
treedc3bcf586f4994e0baffffb6051789e8d51b355a
parent12de860b4aefc02cc77b7487ef218fb584cdb552 (diff)
DB/Quest: Protect Kanati Greycloud
Closes #7501
-rw-r--r--sql/updates/world/3.3.5/2019_06_09_01_world_335.sql36
-rw-r--r--src/server/scripts/Kalimdor/zone_thousand_needles.cpp65
2 files changed, 36 insertions, 65 deletions
diff --git a/sql/updates/world/3.3.5/2019_06_09_01_world_335.sql b/sql/updates/world/3.3.5/2019_06_09_01_world_335.sql
new file mode 100644
index 00000000000..b63aef66c2e
--- /dev/null
+++ b/sql/updates/world/3.3.5/2019_06_09_01_world_335.sql
@@ -0,0 +1,36 @@
+--
+UPDATE `creature` SET `orientation`=5.448936 WHERE `id`=10638;
+DELETE FROM `script_waypoint` WHERE `entry` =10638;
+UPDATE `creature_template` SET `AIName`="SmartAI", ScriptName="" WHERE `entry` IN (10638,10720);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (10638,10720) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (1063800) 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
+(10638,0,0,0,19,0,100,0,4966,0,0,0,80,1063800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - On quest accept - Action list"),
+(1063800,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - Action list - remove npc flag"),
+(1063800,9,1,0,0,0,100,0,0,0,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - Action list - Set run off"),
+(1063800,9,2,0,0,0,100,0,0,0,0,0,19,512,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - Action list - Remove unit flag"),
+(1063800,9,3,0,0,0,100,0,0,0,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - Set faction"),
+(1063800,9,4,0,0,0,100,0,0,0,0,0,64,1,0,0,0,0,0,16,0,0,0,0,0,0,0,"Kanati Greycloud - Action list - Store target"),
+(1063800,9,5,0,0,0,100,0,2000,2000,0,0,69,0,0,0,0,0,0,8,0,0,0,-4901.4824, -1372.647, -52.6119, 5.463072,"Kanati Greycloud - Action list - move to pos"),
+(1063800,9,6,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - Action list - Say text"),
+(1063800,9,7,0,0,0,100,0,3000,3000,0,0,12,10720,8,0,0,0,0,8,0,0,0,-4878.44531, -1396.48547, -53.30289, 2.375675,"Kanati Greycloud - Action list - Summon Galak Assassin"),
+(1063800,9,8,0,0,0,100,0,0,0,0,0,12,10720,8,0,0,0,0,8,0,0,0,-4873.76416, -1397.92834, -53.46692, 2.375675,"Kanati Greycloud - Action list - Say text Galak Assassin"),
+(1063800,9,9,0,0,0,100,0,0,0,0,0,12,10720,8,0,0,0,0,8,0,0,0,-4876.83105, -1401.11694, -53.21575, 2.375675,"Kanati Greycloud - Action list - Say text Galak Assassin"),
+(10638,0,1,2,77,0,100,0,1,3,5000,5000,15,4966,0,0,0,0,0,12,1,0,0,0,0,0,0,"Kanati Greycloud - On counter - Quest explored"),
+(10638,0,2,3,61,0,100,0,0,0,0,0,18,512,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - Set unit flag"),
+(10638,0,3,4,61,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - Add npc flag"),
+(10638,0,4,5,61,0,100,0,0,0,0,0,63,1,0,1,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - reset counter"),
+(10638,0,5,6,61,0,100,0,0,0,0,0,2,104,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - reset faction"),
+(10638,0,6,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - Evade"),
+(10638,0,7,8,7,0,100,0,0,0,0,0,18,512,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - In evade - Set unit flag"),
+(10638,0,8,9,61,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - Add npc flag"),
+(10638,0,9,10,61,0,100,0,0,0,0,0,63,1,0,1,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - reset counter"),
+(10638,0,10,6,61,0,100,0,0,0,0,0,2,104,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kanati Greycloud - link - reset faction"),
+(10720,0,0,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,10638,0,0,0,0,0,0,"Galak Assassin - Just summoned - attack"),
+(10720,0,1,0,0,0,100,0,2000,7000,8000,12000,11,6533,0,0,0,0,0,2,0,0,0,0,0,0,0,"Galak Assassin - IC - Cast Net"),
+(10720,0,2,0,7,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Galak Assassin - On evade - Despawn"),
+(10720,0,3,0,6,0,100,0,0,0,0,0,63,1,1,0,0,0,0,19,10638,0,0,0,0,0,0,"Galak Assassin - On Death - Set counter");
+
+DELETE FROM `creature_template_addon` WHERE `entry`=10720;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(10720,0,0,1,0, "3616");
diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
index 377433924c8..79700dc087a 100644
--- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
@@ -24,7 +24,6 @@ SDCategory: Thousand Needles
EndScriptData */
/* ContentData
-npc_kanati
npc_lakota_windsong
npc_swiftmountain
npc_enraged_panther
@@ -38,69 +37,6 @@ EndContentData */
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
-/*#####
-# npc_kanati
-######*/
-
-enum Kanati
-{
- SAY_KAN_START = 0,
- QUEST_PROTECT_KANATI = 4966,
- NPC_GALAK_ASS = 10720
-};
-
-Position const GalakLoc = {-4867.387695f, -1357.353760f, -48.226f, 0.0f};
-
-class npc_kanati : public CreatureScript
-{
-public:
- npc_kanati() : CreatureScript("npc_kanati") { }
-
- struct npc_kanatiAI : public EscortAI
- {
- npc_kanatiAI(Creature* creature) : EscortAI(creature) { }
-
- void Reset() override { }
-
- void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override
- {
- switch (waypointId)
- {
- case 0:
- Talk(SAY_KAN_START);
- DoSpawnGalak();
- break;
- case 1:
- if (Player* player = GetPlayerForEscort())
- player->GroupEventHappens(QUEST_PROTECT_KANATI, me);
- break;
- }
- }
-
- void DoSpawnGalak()
- {
- for (int i = 0; i < 3; ++i)
- me->SummonCreature(NPC_GALAK_ASS, GalakLoc, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
- }
-
- void JustSummoned(Creature* summoned) override
- {
- summoned->AI()->AttackStart(me);
- }
-
- void QuestAccept(Player* player, Quest const* quest) override
- {
- if (quest->GetQuestId() == QUEST_PROTECT_KANATI)
- Start(false, false, player->GetGUID(), quest, true);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const override
- {
- return new npc_kanatiAI(creature);
- }
-};
-
/*######
# npc_lakota_windsong
######*/
@@ -335,7 +271,6 @@ public:
void AddSC_thousand_needles()
{
- new npc_kanati();
new npc_lakota_windsong();
new npc_paoka_swiftmountain();
new npc_enraged_panther();