aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authormaximius <none@none>2009-11-20 15:06:21 -0800
committermaximius <none@none>2009-11-20 15:06:21 -0800
commit4072c0bdbf77cb1456d5b5f8e77f40d58b0ff154 (patch)
tree0e769270b7053fdf5bab2dac89e60128777e5f9e /src/bindings/scripts
parentf18767dc77a6878923cf55aa2c9fc7913816f636 (diff)
*Different creature searcher method for Dalaran Mageguards, thanks manuel
*Fix a minor typo in recent AH change that (probably) prevented anybody from bidding, sorry D: --HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/scripts/northrend/dalaran.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/bindings/scripts/scripts/northrend/dalaran.cpp b/src/bindings/scripts/scripts/northrend/dalaran.cpp
index 0367f128b22..2c41e3f5477 100644
--- a/src/bindings/scripts/scripts/northrend/dalaran.cpp
+++ b/src/bindings/scripts/scripts/northrend/dalaran.cpp
@@ -73,24 +73,24 @@ struct TRINITY_DLL_DECL npc_mageguard_dalaranAI : public Scripted_NoMovementAI
switch (m_creature->GetEntry())
{
case 29254:
- if (pPlayer->GetTeam() == HORDE)
- if (Creature *pOutdoorNPC = me->FindNearestCreature(NPC_APPLEBOUGH_A, 35.0f))
+ if (pPlayer->GetTeam() == HORDE) // Horde unit found in Alliance area
+ if (Creature *pOutdoorNPC = GetClosestCreatureWithEntry(me, NPC_APPLEBOUGH_A, 35.0f))
{
- if (me->isInBackInMap(pWho, 12.0f))
- DoCast(pWho, SPELL_TRESPASSER_A);
+ if (me->isInBackInMap(pWho, 12.0f)) // In my line of sight, "outdoors", and behind me
+ DoCast(pWho, SPELL_TRESPASSER_A); // Teleport the Horde unit out
}
- else // In my line of sight, and "indoors"
- DoCast(pWho, SPELL_TRESPASSER_A); // Teleport the Horde unit out
+ else // In my line of sight, and "indoors"
+ DoCast(pWho, SPELL_TRESPASSER_A); // Teleport the Horde unit out
break;
case 29255:
- if (pPlayer->GetTeam() == ALLIANCE)
- if (Creature *pOutdoorNPC = me->FindNearestCreature(NPC_SWEETBERRY_H, 35.0f))
+ if (pPlayer->GetTeam() == ALLIANCE) // Alliance unit found in Horde area
+ if (Creature *pOutdoorNPC = GetClosestCreatureWithEntry(me, NPC_SWEETBERRY_H, 35.0f))
{
- if (me->isInBackInMap(pWho, 12.0f))
- DoCast(pWho, SPELL_TRESPASSER_H);
+ if (me->isInBackInMap(pWho, 12.0f)) // In my line of sight, "outdoors", and behind me
+ DoCast(pWho, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
}
- else // In my line of sight, and "indoors"
- DoCast(pWho, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
+ else // In my line of sight, and "indoors"
+ DoCast(pWho, SPELL_TRESPASSER_H); // Teleport the Alliance unit out
break;
}
me->SetOrientation(me->GetHomePosition().GetOrientation());