diff options
author | Anubisss <none@none> | 2009-09-27 18:02:57 +0200 |
---|---|---|
committer | Anubisss <none@none> | 2009-09-27 18:02:57 +0200 |
commit | 82ae128317ba3acc48c3958c0f2f2f547bb9fb0f (patch) | |
tree | e3fc21c74b3a265687576c935c6a85bfebc1a5fe | |
parent | 23d7fa65e84fabdcaca290024cfaeb591c2381f3 (diff) |
*Fix a problem that freeze the server in boss Eck the Ferocious' script. Maybe this fix a crash.
--HG--
branch : trunk
-rw-r--r-- | src/bindings/scripts/scripts/northrend/gundrak/boss_eck.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bindings/scripts/scripts/northrend/gundrak/boss_eck.cpp b/src/bindings/scripts/scripts/northrend/gundrak/boss_eck.cpp index c8e23a75baf..039c7acee95 100644 --- a/src/bindings/scripts/scripts/northrend/gundrak/boss_eck.cpp +++ b/src/bindings/scripts/scripts/northrend/gundrak/boss_eck.cpp @@ -71,12 +71,12 @@ struct TRINITY_DLL_DECL boss_eckAI : public ScriptedAI } else uiSpitTimer -= diff; if (uiSpringTimer < diff) { - Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); - while (pTarget && (pTarget->GetTypeId() != TYPEID_PLAYER || pTarget == m_creature->getVictim())) - pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); - if (pTarget) + Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1); + if(pTarget && pTarget->GetTypeId() == TYPEID_PLAYER) + { DoCast(pTarget,RAND(SPELL_ECK_SPRING_1,SPELL_ECK_SPRING_2)); - uiSpringTimer = 5000 + rand()%10000; + uiSpringTimer = 5000 + rand()%10000; + } } else uiSpringTimer -= diff; //Berserk on timer or 20% of health if (!bBerserk && (uiBerserkTimer < diff || m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 20)) |