From abbb896cfb73017cf1c313d597984a9ce0a9dcab Mon Sep 17 00:00:00 2001 From: Nay Date: Thu, 30 Aug 2012 22:44:03 +0100 Subject: Core: Fix many "errors"/warnings and coding style (2) Scripts; also reverted a change to AuthSocket Errors were found using Cppcheck, open-source static analysis tool --- src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/server/scripts/Northrend') diff --git a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp index 2ea234775c0..d335d36e112 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp @@ -314,15 +314,14 @@ class boss_gothik : public CreatureScript bool CheckGroupSplitted() { - bool checklife = false; - bool checkdead = false; - Map* map = me->GetMap(); if (map && map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); if (!PlayerList.isEmpty()) { + bool checklife = false; + bool checkdead = false; for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { if (i->getSource() && i->getSource()->isAlive() && -- cgit v1.2.3