diff options
author | megamage <none@none> | 2009-04-29 00:15:18 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-29 00:15:18 -0500 |
commit | ce68fc9c646e5a7b6ac7f33b12fa4296586b53e8 (patch) | |
tree | 933749fff97c6c8a15084ef6ec204896a054b39d /src/game/CreatureAI.cpp | |
parent | 207c3f7afff6ee2b462bd6855487fbcbfdbd63a8 (diff) |
*Update some naxx boss scripts.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r-- | src/game/CreatureAI.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp index 59df2e866f2..4668578c1be 100644 --- a/src/game/CreatureAI.cpp +++ b/src/game/CreatureAI.cpp @@ -71,7 +71,7 @@ void CreatureAI::OnCharmed(bool apply) me->IsAIEnabled = false; } -void CreatureAI::DoZoneInCombat(Unit* pUnit) +void CreatureAI::DoZoneInCombat(Creature* pUnit) { if (!pUnit) pUnit = me; @@ -84,6 +84,10 @@ void CreatureAI::DoZoneInCombat(Unit* pUnit) return; } + if(!pUnit->getVictim()) + if(Unit *target = pUnit->SelectNearestTarget()) + AttackStart(target); + if (!pUnit->CanHaveThreatList() || pUnit->getThreatManager().isThreatListEmpty()) { sLog.outError("DoZoneInCombat called for creature that either cannot have threat list or has empty threat list (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0); |