From 2c1a1edef96ce99c3c9f0cdcea5969c19337d1ec Mon Sep 17 00:00:00 2001 From: Supabad Date: Fri, 27 May 2011 16:37:43 +0200 Subject: Scripts/Ulduar: Fix mistake in previous commit. --- .../Northrend/Ulduar/ulduar/boss_general_vezax.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp index 3f557cf26bd..83311dbdbbd 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp @@ -231,15 +231,15 @@ class boss_general_vezax : public CreatureScript { if (instance) { - std::list targets; - SelectRandomTarget(false, &targets); - if (!targets.empty()) - {// If Shaman has Shamanistic Rage and use it during the fight, it will cast Corrupted Rage on him - for (std::list::iterator itr = targets.begin(); itr != targets.end(); ++itr) - { - if (*itr->HasSpell(SPELL_SHAMANTIC_RAGE)) - *itr->CastSpell(*itr, SPELL_CORRUPTED_RAGE, false); - } + Map* map = me->GetMap(); + if (map && map->IsDungeon()) + { + // If Shaman has Shamanistic Rage and use it during the fight, it will cast Corrupted Rage on him + Map::PlayerList const& Players = map->GetPlayers(); + for (Map::PlayerList::const_iterator itr = Players.begin(); itr != Players.end(); ++itr) + if (Player* player = itr->getSource()) + if (player->HasSpell(SPELL_SHAMANTIC_RAGE)) + player->CastSpell(player, SPELL_CORRUPTED_RAGE, false); } } } -- cgit v1.2.3