diff options
| author | PolarCookie <sei009@post.uit.no> | 2017-10-29 23:56:21 +0100 |
|---|---|---|
| committer | Aokromes <Aokromes@users.noreply.github.com> | 2017-10-29 23:56:21 +0100 |
| commit | cfc09449fd536a3f2229ce08d2c44e40b4e61ee6 (patch) | |
| tree | e69bd776d7bf70027c8fd41ffae825290d10703e /src | |
| parent | b1ec7bb9e6af4203b04767bda19f85181309a8d6 (diff) | |
Scripts/Quest: The Missing Diplomat part 14 (ID 1265)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/World/areatrigger_scripts.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index a7d730f185a..0e603e515e1 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -291,6 +291,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(); |
