Core/Quest : Fix he Missing Diplomat part 14 & 15

Author: @PolarCookie
This commit is contained in:
PolarCookie
2017-06-14 00:15:07 +02:00
committed by Iny
parent 10db211b3c
commit 7bedfcda7a
3 changed files with 85 additions and 0 deletions

View File

@@ -319,6 +319,39 @@ 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*/)
{
auto 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.51, -4105.94, 17.1, 5.3816f, TEMPSUMMON_TIMED_DESPAWN, 60000))
tervosh->CastSpell(tervosh, SPELL_TELEPORT_VISUAL, true);
}
return true;
}
};
/*######
## at_brewfest
######*/
@@ -456,6 +489,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();
}