From d9056adc8acd4915100f24af66f803bca897a80b Mon Sep 17 00:00:00 2001 From: Trazom62 Date: Sat, 27 Feb 2010 16:29:58 +0100 Subject: refactor UnitAI::SelectTarget to allow having a predicate function (1st step). --HG-- branch : trunk --- .../crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp | 2 +- src/scripts/northrend/naxxramas/boss_four_horsemen.cpp | 2 +- src/scripts/northrend/naxxramas/boss_razuvious.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/scripts') diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 6fc53263ed1..ee594a17f8b 100644 --- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -794,7 +794,7 @@ struct boss_hunter_toc5AI : public ScriptedAI if (uiShootTimer <= uiDiff) { - if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST,0,30)) + if (Unit* pTarget = SelectTarget(SELECT_TARGET_FARTHEST,0,30.0f)) { uiTargetGUID = pTarget->GetGUID(); DoCast(pTarget, DUNGEON_MODE(SPELL_SHOOT,SPELL_SHOOT_H)); diff --git a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 78277186571..43ca22e7a21 100644 --- a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -327,7 +327,7 @@ struct boss_four_horsemenAI : public BossAI if (caster) { - if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45)) + if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f)) DoCast(pTarget, SPELL_PRIMARY(id)); } else diff --git a/src/scripts/northrend/naxxramas/boss_razuvious.cpp b/src/scripts/northrend/naxxramas/boss_razuvious.cpp index a58bb5636db..4f49aa426fe 100644 --- a/src/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/src/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -109,7 +109,7 @@ struct boss_razuviousAI : public BossAI events.ScheduleEvent(EVENT_SHOUT, 25000); return; case EVENT_KNIFE: - if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45)) + if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f)) DoCast(pTarget, SPELL_JAGGED_KNIFE); events.ScheduleEvent(EVENT_KNIFE, 10000); return; -- cgit v1.2.3