mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Script/Quest: The Lonesome Watcher (12877)
Closes: #9185 See: http://www.youtube.com/watch?v=ylZRMu9CIMw
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`=5173;
|
||||
INSERT INTO `areatrigger_scripts`(`entry`,`ScriptName`) VALUE
|
||||
(5173,'at_frostgrips_hollow');
|
||||
7
sql/updates/world/2013_02_24_02_world_smart_scripts.sql
Normal file
7
sql/updates/world/2013_02_24_02_world_smart_scripts.sql
Normal file
@@ -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');
|
||||
11
sql/updates/world/2013_02_24_03_world_waypoint_data.sql
Normal file
11
sql/updates/world/2013_02_24_03_world_waypoint_data.sql
Normal file
@@ -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);
|
||||
@@ -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;
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user