diff options
author | Gacko <marco_ebert@icloud.com> | 2013-02-24 19:29:06 +0100 |
---|---|---|
committer | Gacko <marco_ebert@icloud.com> | 2013-02-24 19:42:21 +0100 |
commit | cb99c1d16aef4f4fc000aff7aaa3f63fadf4e9ef (patch) | |
tree | 3a5ea2447a461c0bbbbd73725045447ae1403c53 | |
parent | cf58f5a0755aba577fee604cc88e5929428b9784 (diff) |
Script/Quest: The Lonesome Watcher (12877)
Closes: #9185
See: http://www.youtube.com/watch?v=ylZRMu9CIMw
5 files changed, 87 insertions, 0 deletions
diff --git a/sql/updates/world/2013_02_24_01_world_areatrigger_scripts.sql b/sql/updates/world/2013_02_24_01_world_areatrigger_scripts.sql new file mode 100644 index 00000000000..2aebe1d2edd --- /dev/null +++ b/sql/updates/world/2013_02_24_01_world_areatrigger_scripts.sql @@ -0,0 +1,3 @@ +DELETE FROM `areatrigger_scripts` WHERE `entry`=5173; +INSERT INTO `areatrigger_scripts`(`entry`,`ScriptName`) VALUE +(5173,'at_frostgrips_hollow'); diff --git a/sql/updates/world/2013_02_24_02_world_smart_scripts.sql b/sql/updates/world/2013_02_24_02_world_smart_scripts.sql new file mode 100644 index 00000000000..7b41c82b6fa --- /dev/null +++ b/sql/updates/world/2013_02_24_02_world_smart_scripts.sql @@ -0,0 +1,7 @@ +DELETE FROM `smart_scripts` WHERE `entryorguid`=29861 AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`event_type`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES +(29861,0,54,80,2986100,2,1,'Stormforged Eradictor - Just summoned - Call timed actionlist 2986100'); + +DELETE FROM `smart_scripts` WHERE `entryorguid`=2986100 AND `source_type`=9; +INSERT INTO `smart_scripts`(`entryorguid`,`source_type`,`id`,`event_param1`,`event_param2`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`target_type`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUE +(2986100,9,0,10000,10000,12,29729,4,10000,8,6972.13,14.24,805.79,3.349,'Stormforged Eradictor - Timed actionlist - Summon Frostborn Axemaster'); diff --git a/sql/updates/world/2013_02_24_03_world_waypoint_data.sql b/sql/updates/world/2013_02_24_03_world_waypoint_data.sql new file mode 100644 index 00000000000..e97f0758304 --- /dev/null +++ b/sql/updates/world/2013_02_24_03_world_waypoint_data.sql @@ -0,0 +1,11 @@ +DELETE FROM `waypoint_data` WHERE `id`=2986200; +INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES +(2986200,0,6963.95,45.65,818.71), +(2986200,1,6965.09,39.67,820.15), +(2986200,2,6963.56,21.14,805.79); + +DELETE FROM `waypoint_data` WHERE `id`=2986100; +INSERT INTO `waypoint_data`(`id`,`point`,`position_x`,`position_y`,`position_z`) VALUES +(2986100,0,6983.18,7.150,806.33), +(2986100,1,6975.37,16.73,804.98), +(2986100,2,6967.15,13.27,806.56); diff --git a/sql/updates/world/2013_02_24_04_world_creature_template.sql b/sql/updates/world/2013_02_24_04_world_creature_template.sql new file mode 100644 index 00000000000..c9acc0d2a1a --- /dev/null +++ b/sql/updates/world/2013_02_24_04_world_creature_template.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `faction_A`=1954,`faction_H`=1954,`AIName`='SmartAI' WHERE `entry`=29861; +UPDATE `creature_template` SET `faction_A`=1954,`faction_H`=1954 WHERE `entry`=29862; diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index c031c4a3b4d..83fac35b1b6 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -425,6 +425,69 @@ class AreaTrigger_at_area_52_entrance : public AreaTriggerScript std::map<uint32, time_t> _triggerTimes; }; +/*###### + ## at_frostgrips_hollow + ######*/ + +enum FrostgripsHollow +{ + QUEST_THE_LONESOME_WATCHER = 12877, + + NPC_STORMFORGED_MONITOR = 29862, + NPC_STORMFORGED_ERADICTOR = 29861, + + TYPE_WAYPOINT = 0, + DATA_START = 0 +}; + +Position const stormforgedMonitorPosition = {6963.95f, 45.65f, 818.71f, 4.948f}; +Position const stormforgedEradictorPosition = {6983.18f, 7.15f, 806.33f, 2.228f}; + +class AreaTrigger_at_frostgrips_hollow : public AreaTriggerScript +{ +public: + AreaTrigger_at_frostgrips_hollow() : AreaTriggerScript("at_frostgrips_hollow") + { + stormforgedMonitorGUID = 0; + stormforgedEradictorGUID = 0; + } + + bool OnTrigger(Player* player, AreaTriggerEntry const* /* trigger */) + { + if (player->GetQuestStatus(QUEST_THE_LONESOME_WATCHER) != QUEST_STATUS_INCOMPLETE) + return false; + + Creature* stormforgedMonitor = Creature::GetCreature(*player, stormforgedMonitorGUID); + if (stormforgedMonitor) + return false; + + Creature* stormforgedEradictor = Creature::GetCreature(*player, stormforgedEradictorGUID); + if (stormforgedEradictor) + return false; + + if ((stormforgedMonitor = player->SummonCreature(NPC_STORMFORGED_MONITOR, stormforgedMonitorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000))) + { + stormforgedMonitorGUID = stormforgedMonitor->GetGUID(); + stormforgedMonitor->SetWalk(false); + /// The npc would search an alternative way to get to the last waypoint without this unit state. + stormforgedMonitor->AddUnitState(UNIT_STATE_IGNORE_PATHFINDING); + stormforgedMonitor->GetMotionMaster()->MovePath(NPC_STORMFORGED_MONITOR * 100, false); + } + + if ((stormforgedEradictor = player->SummonCreature(NPC_STORMFORGED_ERADICTOR, stormforgedEradictorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000))) + { + stormforgedEradictorGUID = stormforgedEradictor->GetGUID(); + stormforgedEradictor->GetMotionMaster()->MovePath(NPC_STORMFORGED_ERADICTOR * 100, false); + } + + return true; + } + +private: + uint64 stormforgedMonitorGUID; + uint64 stormforgedEradictorGUID; +}; + void AddSC_areatrigger_scripts() { new AreaTrigger_at_coilfang_waterfall(); @@ -436,4 +499,5 @@ void AddSC_areatrigger_scripts() new AreaTrigger_at_nats_landing(); new AreaTrigger_at_brewfest(); new AreaTrigger_at_area_52_entrance(); + new AreaTrigger_at_frostgrips_hollow(); } |