diff options
author | Supabad <Supabad.trinity@gmail.com> | 2011-05-27 16:37:43 +0200 |
---|---|---|
committer | Supabad <Supabad.trinity@gmail.com> | 2011-05-27 16:37:43 +0200 |
commit | 2c1a1edef96ce99c3c9f0cdcea5969c19337d1ec (patch) | |
tree | 01880c9ef038595b24d3b409e43666c537e77d48 | |
parent | 2d1b3ccaa143f11d7cabd0d01072fa011e0481e1 (diff) |
Scripts/Ulduar: Fix mistake in previous commit.
-rw-r--r-- | src/server/scripts/Northrend/Ulduar/ulduar/boss_general_vezax.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<Player*> 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<Player*>::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); } } } |