mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Scripts/Quest: The Missing Diplomat part 14 (ID 1265)
This commit is contained in:
16
sql/updates/world/3.3.5/2017_10_29_13_world_335.sql
Normal file
16
sql/updates/world/3.3.5/2017_10_29_13_world_335.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- The Missing Diplomat, id 1265
|
||||
|
||||
DELETE FROM `areatrigger_involvedrelation` WHERE `id` in (302,1667);
|
||||
INSERT INTO `areatrigger_involvedrelation` VALUES (1667,1265);
|
||||
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry` = 302;
|
||||
INSERT INTO `areatrigger_scripts` VALUES (302,'at_sentry_point');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 4967 AND `GroupID` = 0 and `ID` = 0;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(4967, 0, 0, 'Go with grace, and may the Lady\'s magic protect you.', 12, 0, 100, 0, 0, 0, 1751, 0, "Archmage Tervosh - On Quest 'The Missing Diplomat' Finished");
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE entryorguid = 4967 AND id in (2,3);
|
||||
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
|
||||
(4967, 0, 2, 3, 20, 0, 100, 0, 1265, 0, 0, 0, 11, 7120, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Archmage Tervosh - On Quest 'The Missing Diplomat' Finished - Cast Proudmoore's Defense"),
|
||||
(4967, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, "Archmage Tervosh - On Quest 'The Missing Diplomat' Finished - Say Line 0");
|
||||
@@ -290,6 +290,38 @@ class AreaTrigger_at_nats_landing : public AreaTriggerScript
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## at_sentry_point
|
||||
######*/
|
||||
|
||||
enum SentryPoint
|
||||
{
|
||||
SPELL_TELEPORT_VISUAL = 799, // TODO Find the correct spell
|
||||
QUEST_MISSING_DIPLO_PT14 = 1265,
|
||||
NPC_TERVOSH = 4967
|
||||
};
|
||||
|
||||
class AreaTrigger_at_sentry_point : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
AreaTrigger_at_sentry_point() : AreaTriggerScript("at_sentry_point") { }
|
||||
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/)
|
||||
{
|
||||
QuestStatus quest_status = player->GetQuestStatus(QUEST_MISSING_DIPLO_PT14);
|
||||
if (!player->IsAlive() || quest_status == QUEST_STATUS_NONE || quest_status == QUEST_STATUS_REWARDED)
|
||||
return false;
|
||||
|
||||
if (!player->FindNearestCreature(NPC_TERVOSH, 100.0f))
|
||||
{
|
||||
if (Creature* tervosh = player->SummonCreature(NPC_TERVOSH, -3476.51f, -4105.94f, 17.1f, 5.3816f, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
tervosh->CastSpell(tervosh, SPELL_TELEPORT_VISUAL, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## at_brewfest
|
||||
######*/
|
||||
@@ -488,6 +520,7 @@ void AddSC_areatrigger_scripts()
|
||||
new AreaTrigger_at_last_rites();
|
||||
new AreaTrigger_at_sholazar_waygate();
|
||||
new AreaTrigger_at_nats_landing();
|
||||
new AreaTrigger_at_sentry_point();
|
||||
new AreaTrigger_at_brewfest();
|
||||
new AreaTrigger_at_area_52_entrance();
|
||||
new AreaTrigger_at_frostgrips_hollow();
|
||||
|
||||
Reference in New Issue
Block a user