aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLopin <davca.hr@seznam.cz>2011-06-25 19:14:20 +0200
committerLopin <davca.hr@seznam.cz>2011-06-25 19:14:20 +0200
commitcb40eb556ad23a90508a285ea1cc049888ebf7a9 (patch)
tree5033f2f8155b9f4dc678176e769bb4b7021915ef /src
parent0b1fffcc700462d1a6c829ba8e08361c25b5a698 (diff)
Scripts/Nexus: Fixed logic in Intense Cold achievement. Thanks joschiwald for notice
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
index 7a7afb229e9..e5a62406ecd 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp
@@ -266,15 +266,16 @@ class achievement_intense_cold : public AchievementCriteriaScript
bool OnCheck(Player* player, Unit* target)
{
- std::list<uint64> intenseColdList = CAST_AI(boss_keristrasza::boss_keristraszaAI, target->ToCreature()->AI())->intenseColdList;
- if (intenseColdList.empty())
- return true;
+ if (!target)
+ return false;
- for (std::list<uint64>::iterator itr = intenseColdList.begin(); itr != intenseColdList.end(); ++itr)
- if (player->GetGUID() != *itr)
- return true;
+ std::list<uint64> intenseColdList = CAST_AI(boss_keristrasza::boss_keristraszaAI, target->ToCreature()->AI())->intenseColdList;
+ if (!intenseColdList.empty())
+ for (std::list<uint64>::iterator itr = intenseColdList.begin(); itr != intenseColdList.end(); ++itr)
+ if (player->GetGUID() == *itr)
+ return false;
- return false;
+ return true;
}
};