Scripts/Pit of Saron: Geist Ambusher should only jump once, on entering combat

This commit is contained in:
Shauren
2012-04-07 21:38:33 +02:00
parent b06bb9e505
commit cb30a06756
@@ -240,12 +240,13 @@ class mob_geist_ambusher : public CreatureScript
_leapingFaceMaulCooldown = 9000; _leapingFaceMaulCooldown = 9000;
} }
void MoveInLineOfSight(Unit* who) void EnterCombat(Unit* who)
{ {
if (who->GetTypeId() != TYPEID_PLAYER) if (who->GetTypeId() != TYPEID_PLAYER)
return; return;
if (me->IsWithinDistInMap(who, 30.0f)) // the max range is determined by aggro range
if (me->GetDistance(who) > 5.0f)
DoCast(who, SPELL_LEAPING_FACE_MAUL); DoCast(who, SPELL_LEAPING_FACE_MAUL);
} }