aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
index 4821269e2a1..b241be0f7d7 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/the_scarlet_enclave.cpp
@@ -461,6 +461,38 @@ bool GossipSelect_npc_death_knight_initiate(Player *player, Creature *_Creature,
return true;
}
+/*######
+## npc_salanar_the_horseman
+######*/
+
+struct TRINITY_DLL_DECL npc_salanar_the_horsemanAI : public ScriptedAI
+{
+ npc_salanar_the_horsemanAI(Creature *c) : ScriptedAI(c) {Reset();}
+
+ void Reset() { }
+
+ void MoveInLineOfSight(Unit *who)
+ {
+ if( (who->GetTypeId() == TYPEID_UNIT) && ((Creature*)who)->isVehicle() && m_creature->IsWithinDistInMap(who, 25.0f) )
+ {
+ if( Unit *charmer = who->GetCharmer() )
+ {
+ if( charmer->GetTypeId() == TYPEID_PLAYER && ((Player*)charmer)->GetQuestStatus(12680) == QUEST_STATUS_INCOMPLETE )
+ {
+ ((Player*)charmer)->KilledMonster(28767,m_creature->GetGUID());
+ ((Player*)charmer)->ExitVehicle();
+ // TODO: dismiss Vehicle; Now we cant do it from script.
+ }
+ }
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_salanar_the_horseman(Creature *_Creature)
+{
+ return new npc_salanar_the_horsemanAI(_Creature);
+}
+
void AddSC_the_scarlet_enclave()
{
Script *newscript;
@@ -486,4 +518,9 @@ void AddSC_the_scarlet_enclave()
newscript->pGossipSelect = &GossipSelect_npc_death_knight_initiate;
newscript->GetAI = &GetAI_npc_death_knight_initiate;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_salanar_the_horseman";
+ newscript->GetAI = &GetAI_npc_salanar_the_horseman;
+ newscript->RegisterSelf();
} \ No newline at end of file