diff options
74 files changed, 230 insertions, 230 deletions
diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index 8695679c756..29ef589bf24 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -573,7 +573,7 @@ void AchievementMgr::LoadFromDB(QueryResult_AutoPtr achievementResult, QueryResu CompletedAchievementData& ca = m_completedAchievements[achievement_id]; ca.date = time_t(fields[1].GetUInt64()); ca.changed = false; - } while(achievementResult->NextRow()); + } while (achievementResult->NextRow()); } if(criteriaResult) @@ -602,7 +602,7 @@ void AchievementMgr::LoadFromDB(QueryResult_AutoPtr achievementResult, QueryResu progress.counter = counter; progress.date = date; progress.changed = false; - } while(criteriaResult->NextRow()); + } while (criteriaResult->NextRow()); } } @@ -1848,7 +1848,7 @@ void AchievementMgr::SendAllAchievementData() bool cAchievements = false; bool cProgress = false; - while( !cAchievements || !cProgress ) + while ( !cAchievements || !cProgress ) { data.clear(); send = false; @@ -2045,7 +2045,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaData() // counting data by and data types ++count; - } while(result->NextRow()); + } while (result->NextRow()); // post loading checks for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId) @@ -2148,7 +2148,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements() } m_allCompletedAchievements.insert(achievement_id); - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString(">> Loaded %lu realm completed achievements.",(unsigned long)m_allCompletedAchievements.size()); diff --git a/src/game/AddonMgr.cpp b/src/game/AddonMgr.cpp index afa92c49020..a8f914b69ae 100644 --- a/src/game/AddonMgr.cpp +++ b/src/game/AddonMgr.cpp @@ -64,7 +64,7 @@ void AddonMgr::LoadFromDB() SavedAddon addon(name, crc); m_knownAddons.push_back(addon); - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString(">> Loaded %u known addons", count); diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 9d5e01f0014..46a2f05e021 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -547,7 +547,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId // At first we need to compare free space in bg and our selection pool int32 diffAli = aliFree - int32(m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount()); int32 diffHorde = hordeFree - int32(m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount()); - while( abs(diffAli - diffHorde) > 1 && (m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() > 0 || m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() > 0) ) + while ( abs(diffAli - diffHorde) > 1 && (m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() > 0 || m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() > 0) ) { //each cycle execution we need to kick at least 1 group if (diffAli < diffHorde) @@ -750,7 +750,7 @@ bool BattleGroundQueue::CheckSkirmishForSameFaction(BattleGroundBracketId bracke } /* -this method is called when group is inserted, or player / group is removed from BG Queue - there is only one player's status changed, so we don't use while(true) cycles to invite whole queue +this method is called when group is inserted, or player / group is removed from BG Queue - there is only one player's status changed, so we don't use while (true) cycles to invite whole queue it must be called after fully adding the members of a group to ensure group joining should be called from BattleGround::RemovePlayer function in some cases */ @@ -1158,7 +1158,7 @@ void BattleGroundMgr::DeleteAllBattleGrounds() for (uint32 bgTypeId = 0; bgTypeId < MAX_BATTLEGROUND_TYPE_ID; ++bgTypeId) { // ~BattleGround call unregistring BG from queue - while(!BGFreeSlotQueue[bgTypeId].empty()) + while (!BGFreeSlotQueue[bgTypeId].empty()) delete BGFreeSlotQueue[bgTypeId].front(); } } @@ -2107,7 +2107,7 @@ void BattleGroundMgr::LoadBattleMastersEntry() mBattleMastersMap[entry] = BattleGroundTypeId(bgTypeId); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u battlemaster entries", count ); diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index d105c13ee07..3b0981422c8 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -145,7 +145,7 @@ void WorldSession::HandleCharEnum(QueryResult_AutoPtr result) if(Player::BuildEnumData(result, &data)) ++num; } - while( result->NextRow() ); + while ( result->NextRow() ); } data.put<uint8>(0, num); diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 3b618a5e6d7..207306efb5f 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -772,7 +772,7 @@ ChatCommand * ChatHandler::getCommandTable() SetDataForCommandInTable(commandTable, name.c_str(), fields[1].GetUInt16(), fields[2].GetCppString(), name); - } while(result->NextRow()); + } while (result->NextRow()); } } @@ -872,7 +872,7 @@ void ChatHandler::SendSysMessage(const char *str) char* buf = strdup(str); char* pos = buf; - while(char* line = LineFromMessage(pos)) + while (char* line = LineFromMessage(pos)) { FillSystemMessageData(&data, line); m_session->SendPacket(&data); @@ -890,7 +890,7 @@ void ChatHandler::SendGlobalSysMessage(const char *str) char* buf = strdup(str); char* pos = buf; - while(char* line = LineFromMessage(pos)) + while (char* line = LineFromMessage(pos)) { FillSystemMessageData(&data, line); sWorld.SendGlobalMessage(&data); @@ -908,7 +908,7 @@ void ChatHandler::SendGlobalGMSysMessage(const char *str) char* buf = strdup(str); char* pos = buf; - while(char* line = LineFromMessage(pos)) + while (char* line = LineFromMessage(pos)) { FillSystemMessageData(&data, line); sWorld.SendGlobalGMMessage(&data); @@ -1137,7 +1137,7 @@ valid examples: { const std::string validCommands = "cHhr|"; - while(*message) + while (*message) { // find next pipe command message = strchr(message, '|'); @@ -1180,7 +1180,7 @@ valid examples: ItemRandomPropertiesEntry const* itemProperty; ItemRandomSuffixEntry const* itemSuffix; - while(!reader.eof()) + while (!reader.eof()) { if (validSequence == validSequenceIterator) { @@ -1318,7 +1318,7 @@ valid examples: { propertyId = 0; negativeNumber = false; - while((c = reader.get())!=':') + while ((c = reader.get())!=':') { if(c >='0' && c<='9') { @@ -1347,7 +1347,7 @@ valid examples: } // ignore other integers - while((c >='0' && c <='9') || c==':') + while ((c >='0' && c <='9') || c==':') { reader.ignore(1); c = reader.peek(); @@ -1359,7 +1359,7 @@ valid examples: uint32 questid= 0; // read questid char c = reader.peek(); - while(c >='0' && c<='9') + while (c >='0' && c<='9') { reader.ignore(1); questid *= 10; @@ -1378,7 +1378,7 @@ valid examples: } c = reader.peek(); // level - while(c !='|' && c!='\0') + while (c !='|' && c!='\0') { reader.ignore(1); c = reader.peek(); @@ -1397,7 +1397,7 @@ valid examples: char c = reader.peek(); // base64 encoded stuff - while(c !='|' && c!='\0') + while (c !='|' && c!='\0') { reader.ignore(1); c = reader.peek(); @@ -1421,7 +1421,7 @@ valid examples: char c = reader.peek(); // skillpoints? whatever, drop it - while(c !='|' && c!='\0') + while (c !='|' && c!='\0') { reader.ignore(1); c = reader.peek(); @@ -1435,7 +1435,7 @@ valid examples: uint32 spellid = 0; // read spell entry char c = reader.peek(); - while(c >='0' && c<='9') + while (c >='0' && c<='9') { reader.ignore(1); spellid *= 10; @@ -1454,7 +1454,7 @@ valid examples: uint32 spellid = 0; // read spell entry char c = reader.peek(); - while(c >='0' && c<='9') + while (c >='0' && c<='9') { reader.ignore(1); spellid *= 10; @@ -1478,7 +1478,7 @@ valid examples: char c = reader.peek(); // skip progress - while(c !='|' && c!='\0') + while (c !='|' && c!='\0') { reader.ignore(1); c = reader.peek(); @@ -1493,7 +1493,7 @@ valid examples: reader.getline(buffer, 256, ':'); uint32 glyphId = 0; char c = reader.peek(); - while(c>='0' && c <='9') + while (c>='0' && c <='9') { glyphId *= 10; glyphId += c-'0'; @@ -1927,7 +1927,7 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* linkType, char** s return NULL; // skip spaces - while(*text==' '||*text=='\t'||*text=='\b') + while (*text==' '||*text=='\t'||*text=='\b') ++text; if (!*text) @@ -1975,7 +1975,7 @@ char* ChatHandler::extractKeyFromLink(char* text, char const* const* linkTypes, return NULL; // skip spaces - while(*text==' '||*text=='\t'||*text=='\b') + while (*text==' '||*text=='\t'||*text=='\b') ++text; if (!*text) diff --git a/src/game/CreatureGroups.cpp b/src/game/CreatureGroups.cpp index 6b497129fe8..72efb6ef136 100644 --- a/src/game/CreatureGroups.cpp +++ b/src/game/CreatureGroups.cpp @@ -144,7 +144,7 @@ void CreatureGroupManager::LoadCreatureFormations() CreatureGroupMap[memberGUID] = group_member; } - while(result->NextRow()) ; + while (result->NextRow()) ; sLog.outString(); sLog.outString( ">> Loaded %u creatures in formations", total_records ); diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index b5fc989bb61..8695d70fef9 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -147,7 +147,7 @@ bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/) WorldPacket data(opcode, 0); - while(!ifs.eof()) + while (!ifs.eof()) { std::string type; ifs >> type; @@ -689,7 +689,7 @@ bool ChatHandler::HandleDebugHostileRefList(const char * /*args*/) HostileReference* ref = target->getHostileRefManager().getFirst(); uint32 cnt = 0; PSendSysMessage("Hostil reference list of %s (guid %u)",target->GetName(), target->GetGUIDLow()); - while(ref) + while (ref) { if(Unit * unit = ref->getSource()->getOwner()) { @@ -806,7 +806,7 @@ bool ChatHandler::HandleDebugSendLargePacketCommand(const char* /*args*/) { const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. "; std::ostringstream ss; - while(ss.str().size() < 128000) + while (ss.str().size() < 128000) ss << stuffingString; SendSysMessage(ss.str().c_str()); return true; diff --git a/src/game/GameEventMgr.cpp b/src/game/GameEventMgr.cpp index b8479e24ddc..30e06eefb7d 100644 --- a/src/game/GameEventMgr.cpp +++ b/src/game/GameEventMgr.cpp @@ -265,7 +265,7 @@ void GameEventMgr::LoadFromDB() pGameEvent.description = fields[6].GetCppString(); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u game events", count ); @@ -318,7 +318,7 @@ void GameEventMgr::LoadFromDB() ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u game event saves in game events", count ); } @@ -420,7 +420,7 @@ void GameEventMgr::LoadFromDB() GuidList& crelist = mGameEventCreatureGuids[internal_event_id]; crelist.push_back(guid); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u creatures in game events", count ); @@ -469,7 +469,7 @@ void GameEventMgr::LoadFromDB() GuidList& golist = mGameEventGameobjectGuids[internal_event_id]; golist.push_back(guid); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u gameobjects in game events", count ); @@ -532,7 +532,7 @@ void GameEventMgr::LoadFromDB() equiplist.push_back(std::pair<uint32, ModelEquip>(guid, newModelEquipSet)); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u model/equipment changes in game events", count ); @@ -578,7 +578,7 @@ void GameEventMgr::LoadFromDB() QuestRelList& questlist = mGameEventCreatureQuests[event_id]; questlist.push_back(QuestRelation(id, quest)); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u quests additions in game events", count ); } @@ -623,7 +623,7 @@ void GameEventMgr::LoadFromDB() QuestRelList& questlist = mGameEventGameObjectQuests[event_id]; questlist.push_back(QuestRelation(id, quest)); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u quests additions in game events", count ); @@ -669,7 +669,7 @@ void GameEventMgr::LoadFromDB() mQuestToEventConditions[quest].condition = condition; mQuestToEventConditions[quest].num = num; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u quest event conditions in game events", count ); } @@ -715,7 +715,7 @@ void GameEventMgr::LoadFromDB() ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u conditions in game events", count ); } @@ -767,7 +767,7 @@ void GameEventMgr::LoadFromDB() ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u condition saves in game events", count ); } @@ -812,7 +812,7 @@ void GameEventMgr::LoadFromDB() ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u npcflags in game events", count ); } @@ -881,7 +881,7 @@ void GameEventMgr::LoadFromDB() ++count; vendors.push_back(newEntry); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u vendor additions in game events", count ); } @@ -925,7 +925,7 @@ void GameEventMgr::LoadFromDB() ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u npc gossip textids in game events", count ); } @@ -970,7 +970,7 @@ void GameEventMgr::LoadFromDB() mGameEventBattleGroundHolidays[event_id] = fields[1].GetUInt32(); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u battleground holidays in game events", count ); } @@ -1027,7 +1027,7 @@ void GameEventMgr::LoadFromDB() IdList& poollist = mGameEventPoolIds[internal_event_id]; poollist.push_back(entry); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u pools in game events", count ); } diff --git a/src/game/Group.cpp b/src/game/Group.cpp index d93b9e12b5a..d1aff29b218 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -58,7 +58,7 @@ Group::~Group() else sLog.outError("Group::~Group: battleground group is not linked to the correct battleground."); } Rolls::iterator itr; - while(!RollId.empty()) + while (!RollId.empty()) { itr = RollId.begin(); Roll *r = *itr; @@ -175,7 +175,7 @@ bool Group::LoadGroupFromDB(const uint64 &leaderGuid, QueryResult_AutoPtr result do { LoadMemberFromDB((*result)[0].GetUInt32(), (*result)[1].GetUInt8(), (*result)[2].GetUInt8()); - } while( result->NextRow() ); + } while ( result->NextRow() ); // group too small if(GetMembersCount() < 2) return false; diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index bb79814906e..8a0821bf6ad 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -307,7 +307,7 @@ bool Guild::LoadRanksFromDB(QueryResult_AutoPtr guildRanksResult) rankRights |= GR_RIGHT_ALL; AddRank(rankName,rankRights,rankMoney); - }while( guildRanksResult->NextRow() ); + }while ( guildRanksResult->NextRow() ); if (m_Ranks.size() < GUILD_RANKS_MIN_COUNT) // if too few ranks, renew them { diff --git a/src/game/HostileRefManager.cpp b/src/game/HostileRefManager.cpp index efcc544c69f..5e0ccaf15b0 100644 --- a/src/game/HostileRefManager.cpp +++ b/src/game/HostileRefManager.cpp @@ -40,7 +40,7 @@ void HostileRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry co float size = pSingleTarget ? 1.0f : getSize(); // if pSingleTarget do not divide threat ref = getFirst(); - while(ref != NULL) + while (ref != NULL) { float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, fThreat, (pThreatSpell ? GetSpellSchoolMask(pThreatSpell) : SPELL_SCHOOL_MASK_NORMAL), pThreatSpell); if(pVictim == getOwner()) @@ -57,7 +57,7 @@ void HostileRefManager::addTempThreat(float fThreat, bool apply) { HostileReference* ref = getFirst(); - while(ref != NULL) + while (ref != NULL) { if (apply) { @@ -94,7 +94,7 @@ void HostileRefManager::setOnlineOfflineState(bool bIsOnline) HostileReference* ref; ref = getFirst(); - while(ref != NULL) + while (ref != NULL) { ref->setOnlineOfflineState(bIsOnline); ref = ref->next(); @@ -107,7 +107,7 @@ void HostileRefManager::setOnlineOfflineState(bool bIsOnline) void HostileRefManager::updateThreatTables() { HostileReference* ref = getFirst(); - while(ref) + while (ref) { ref->updateOnlineStatus(); ref = ref->next(); @@ -121,7 +121,7 @@ void HostileRefManager::updateThreatTables() void HostileRefManager::deleteReferences() { HostileReference* ref = getFirst(); - while(ref) + while (ref) { HostileReference* nextRef = ref->next(); ref->removeReference(); @@ -136,7 +136,7 @@ void HostileRefManager::deleteReferences() void HostileRefManager::deleteReferencesForFaction(uint32 faction) { HostileReference* ref = getFirst(); - while(ref) + while (ref) { HostileReference* nextRef = ref->next(); if(ref->getSource()->getOwner()->getFactionTemplateEntry()->faction == faction) @@ -154,7 +154,7 @@ void HostileRefManager::deleteReferencesForFaction(uint32 faction) void HostileRefManager::deleteReference(Unit *pCreature) { HostileReference* ref = getFirst(); - while(ref) + while (ref) { HostileReference* nextRef = ref->next(); if(ref->getSource()->getOwner() == pCreature) @@ -173,7 +173,7 @@ void HostileRefManager::deleteReference(Unit *pCreature) void HostileRefManager::setOnlineOfflineState(Unit *pCreature, bool bIsOnline) { HostileReference* ref = getFirst(); - while(ref) + while (ref) { HostileReference* nextRef = ref->next(); if(ref->getSource()->getOwner() == pCreature) diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp index 4915a557a27..111d88e223b 100644 --- a/src/game/IdleMovementGenerator.cpp +++ b/src/game/IdleMovementGenerator.cpp @@ -58,12 +58,12 @@ bool RotateMovementGenerator::Update(Unit& owner, const uint32& diff) if(m_direction == ROTATE_DIRECTION_LEFT) { angle += (float)diff * M_PI * 2 / m_maxDuration; - while(angle >= M_PI * 2 ) angle -= M_PI * 2; + while (angle >= M_PI * 2 ) angle -= M_PI * 2; } else { angle -= (float)diff * M_PI * 2 / m_maxDuration; - while(angle < 0) angle += M_PI * 2; + while (angle < 0) angle += M_PI * 2; } owner.SetOrientation(angle); owner.SendMovementFlagUpdate(); // this is a hack. we do not have anything correct to send in the beginning diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp index 67dafee5a5e..2da09cbea04 100644 --- a/src/game/InstanceData.cpp +++ b/src/game/InstanceData.cpp @@ -57,7 +57,7 @@ bool InstanceData::IsEncounterInProgress() const void InstanceData::LoadMinionData(const MinionData *data) { - while(data->entry) + while (data->entry) { if (data->bossId < bosses.size()) minions.insert(std::make_pair(data->entry, MinionInfo(&bosses[data->bossId]))); @@ -69,7 +69,7 @@ void InstanceData::LoadMinionData(const MinionData *data) void InstanceData::LoadDoorData(const DoorData *data) { - while(data->entry) + while (data->entry) { if (data->bossId < bosses.size()) doors.insert(std::make_pair(data->entry, DoorInfo(&bosses[data->bossId], data->type, BoundaryType(data->boundary)))); diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 4428646fead..97014cc6796 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -482,7 +482,7 @@ void InstanceSaveManager::LoadResetTimes() CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", newresettime, mapid, difficulty); SetResetTimeFor(mapid,difficulty,newresettime); - } while(result->NextRow()); + } while (result->NextRow()); } // clean expired instances, references to them will be deleted in CleanupInstances @@ -566,7 +566,7 @@ void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent ev void InstanceSaveManager::Update() { time_t now = time(NULL), t; - while(!m_resetTimeQueue.empty() && (t = m_resetTimeQueue.begin()->first) < now) + while (!m_resetTimeQueue.empty() && (t = m_resetTimeQueue.begin()->first) < now) { InstResetEvent &event = m_resetTimeQueue.begin()->second; if(event.type == 0) @@ -598,13 +598,13 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr) // do not allow UnbindInstance to automatically unload the InstanceSaves lock_instLists = true; InstanceSave::PlayerListType &pList = itr->second->m_playerList; - while(!pList.empty()) + while (!pList.empty()) { Player *player = *(pList.begin()); player->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true); } InstanceSave::GroupListType &gList = itr->second->m_groupList; - while(!gList.empty()) + while (!gList.empty()) { Group *group = *(gList.begin()); group->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true); diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 773f931fd1a..a5f885aba96 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -511,7 +511,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args) pool_id = poolhandler.IsPartOfAPool<GameObject>(lowguid); if (!pool_id || poolhandler.IsSpawnedObject<GameObject>(lowguid)) found = true; - } while( result->NextRow() && (!found) ); + } while ( result->NextRow() && (!found) ); if (!found) { @@ -2549,7 +2549,7 @@ bool ChatHandler::HandleWpEventCommand(const char* args) PSendSysMessage("|cffff33ffid:|r|cff00ffff %u|r|cff00ff00, guid: |r|cff00ffff%u|r|cff00ff00, delay: |r|cff00ffff%u|r|cff00ff00, command: |r|cff00ffff%u|r|cff00ff00, datalong: |r|cff00ffff%u|r|cff00ff00, datalong2: |r|cff00ffff%u|r|cff00ff00, datatext: |r|cff00ffff%s|r|cff00ff00, posx: |r|cff00ffff%f|r|cff00ff00, posy: |r|cff00ffff%f|r|cff00ff00, posz: |r|cff00ffff%f|r|cff00ff00, orientation: |r|cff00ffff%f|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); } - while(result->NextRow()); + while (result->NextRow()); } if(show == "del") @@ -2773,7 +2773,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args) pathid = fields[0].GetUInt32(); point = fields[1].GetUInt32(); } - while( result->NextRow() ); + while ( result->NextRow() ); // We have the waypoint number and the GUID of the "master npc" // Text is enclosed in "<>", all other arguments not @@ -2969,7 +2969,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff%u|r", ev_id); PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff%u|r", ev_chance); } - while( result->NextRow() ); + while ( result->NextRow() ); return true; } @@ -3013,7 +3013,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) } } - while( result2->NextRow() ); + while ( result2->NextRow() ); if( hasError ) { @@ -3061,7 +3061,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) wpCreature->SetLevel(point > MAX_LEVEL ? MAX_LEVEL : point); } } - while( result->NextRow() ); + while ( result->NextRow() ); SendSysMessage("|cff00ff00Showing the current creature's path.|r"); return true; @@ -3186,7 +3186,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args) pCreature->AddObjectToRemoveList(); } } - while(result->NextRow()); + while (result->NextRow()); // set "wpguid" column to "empty" - no visual waypoint spawned WorldDatabase.PExecuteLog("UPDATE waypoint_data SET wpguid = '0'"); //WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '0' WHERE wpguid <> '0'"); @@ -3819,9 +3819,9 @@ bool ChatHandler::LookupPlayerSearchCommand(QueryResult_AutoPtr result, int32 li PSendSysMessage(LANG_LOOKUP_PLAYER_CHARACTER,name.c_str(),guid); ++i; - } while( chars->NextRow() && ( limit == -1 || i < limit ) ); + } while ( chars->NextRow() && ( limit == -1 || i < limit ) ); } - } while(result->NextRow()); + } while (result->NextRow()); if(i==0) // empty accounts only { diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index d1293c710ae..36471278b34 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -2311,7 +2311,7 @@ bool ChatHandler::HandleLearnAllCommand(const char* /*args*/) }; int loop = 0; - while(strcmp(allSpellList[loop], "0")) + while (strcmp(allSpellList[loop], "0")) { uint32 spell = atol((char*)allSpellList[loop++]); @@ -2354,7 +2354,7 @@ bool ChatHandler::HandleLearnAllGMCommand(const char* /*args*/) }; uint16 gmSpellIter = 0; - while( strcmp(gmSpellList[gmSpellIter], "0") ) + while ( strcmp(gmSpellList[gmSpellIter], "0") ) { uint32 spell = atol((char*)gmSpellList[gmSpellIter++]); @@ -6089,7 +6089,7 @@ bool ChatHandler::HandleBanListHelper(QueryResult_AutoPtr result) } }while ( banInfo->NextRow() ); } - }while( result->NextRow() ); + }while ( result->NextRow() ); SendSysMessage("==============================================================================="); } return true; @@ -6161,7 +6161,7 @@ bool ChatHandler::HandleBanListIPCommand(const char *args) aTm_unban->tm_year%100, aTm_unban->tm_mon+1, aTm_unban->tm_mday, aTm_unban->tm_hour, aTm_unban->tm_min, fields[3].GetString(), fields[4].GetString()); } - }while( result->NextRow() ); + }while ( result->NextRow() ); SendSysMessage("==============================================================================="); } @@ -6880,7 +6880,7 @@ bool ChatHandler::HandleGMListFullCommand(const char* /*args*/) { Field *fields = result->Fetch(); PSendSysMessage("|%15s|%6s|", fields[0].GetString(),fields[1].GetString()); - }while( result->NextRow() ); + }while ( result->NextRow() ); PSendSysMessage("========================"); } @@ -7019,7 +7019,7 @@ bool ChatHandler::HandleSendItemsCommand(const char *args) char* tail = strtok(NULL, ""); // get from tail next item str - while(char* itemStr = strtok(tail, " ")) + while (char* itemStr = strtok(tail, " ")) { // and get new tail tail = strtok(NULL, ""); @@ -7048,7 +7048,7 @@ bool ChatHandler::HandleSendItemsCommand(const char *args) return false; } - while(item_count > item_proto->GetMaxStackSize()) + while (item_count > item_proto->GetMaxStackSize()) { items.push_back(ItemPair(item_id,item_proto->GetMaxStackSize())); item_count -= item_proto->GetMaxStackSize(); diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 194794b3a07..044f37da71d 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -62,7 +62,7 @@ Map::~Map() { UnloadAll(); - while(!i_worldObjects.empty()) + while (!i_worldObjects.empty()) { WorldObject *obj = *i_worldObjects.begin(); assert(obj->m_isWorldObject); @@ -2240,7 +2240,7 @@ void Map::AddObjectToSwitchList(WorldObject *obj, bool on) void Map::RemoveAllObjectsInRemoveList() { - while(!i_objectsToSwitch.empty()) + while (!i_objectsToSwitch.empty()) { std::map<WorldObject*, bool>::iterator itr = i_objectsToSwitch.begin(); WorldObject *obj = itr->first; @@ -2257,7 +2257,7 @@ void Map::RemoveAllObjectsInRemoveList() } //sLog.outDebug("Object remover 1 check."); - while(!i_objectsToRemove.empty()) + while (!i_objectsToRemove.empty()) { std::set<WorldObject*>::iterator itr = i_objectsToRemove.begin(); WorldObject* obj = *itr; diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp index 8613a1a1de8..c0b3adf59fb 100644 --- a/src/game/MapManager.cpp +++ b/src/game/MapManager.cpp @@ -344,7 +344,7 @@ void MapManager::UnloadAll() for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter) iter->second->UnloadAll(); - while(!i_maps.empty()) + while (!i_maps.empty()) { delete i_maps.begin()->second; i_maps.erase(i_maps.begin()); diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index fbde38a19cd..f1fd4e8468e 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -43,7 +43,7 @@ void MotionMaster::Initialize() { // clear ALL movement generators (including default) - while(!empty()) + while (!empty()) { MovementGenerator *curr = top(); pop(); @@ -70,7 +70,7 @@ void MotionMaster::InitDefault() MotionMaster::~MotionMaster() { // clear ALL movement generators (including default) - while(!empty()) + while (!empty()) { MovementGenerator *curr = top(); pop(); @@ -502,7 +502,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable) return; //We set waypoint movement as new default movement generator // clear ALL movement generators (including default) - /*while(!empty()) + /*while (!empty()) { MovementGenerator *curr = top(); curr->Finalize(*i_owner); diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index dad51d76586..085ab57f6a1 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -572,7 +572,7 @@ void WorldSession::SendStablePet(uint64 guid ) data << uint8(2); // 1 = current, 2/3 = in stable (any from 4,5,... create problems with proper show) ++num; - }while( result->NextRow() ); + }while ( result->NextRow() ); } data.put<uint8>(wpos, num); // set real data to placeholder @@ -629,7 +629,7 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data ) // this slot not free, skip ++free_slot; - }while( result->NextRow() ); + }while ( result->NextRow() ); } WorldPacket data(SMSG_STABLE_RESULT, 1); diff --git a/src/game/Object.cpp b/src/game/Object.cpp index ec49a3d8604..2f279eed98d 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1379,9 +1379,9 @@ bool Position::HasInArc(float arc, const Position *obj) const return true; // move arc to range 0.. 2*pi - while( arc >= 2.0f * M_PI ) + while ( arc >= 2.0f * M_PI ) arc -= 2.0f * M_PI; - while( arc < 0 ) + while ( arc < 0 ) arc += 2.0f * M_PI; float angle = GetAngle( obj ); @@ -1397,9 +1397,9 @@ bool Position::HasInArc(float arc, const Position *obj) const //} // move angle to range -pi ... +pi - while( angle > M_PI) + while ( angle > M_PI) angle -= 2.0f * M_PI; - while(angle < -M_PI) + while (angle < -M_PI) angle += 2.0f * M_PI; float lborder = -1 * (arc/2.0f); // in range -pi..0 @@ -2070,9 +2070,9 @@ namespace Trinity float angle = i_object.GetAngle(u)-i_angle; // move angle to range -pi ... +pi - while( angle > M_PI) + while ( angle > M_PI) angle -= 2.0f * M_PI; - while(angle < -M_PI) + while (angle < -M_PI) angle += 2.0f * M_PI; // dist include size of u @@ -2167,7 +2167,7 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y, selector.InitializeAngle(); // select in positions after current nodes (selection one by one) - while(selector.NextAngle(angle)) // angle for free pos + while (selector.NextAngle(angle)) // angle for free pos { GetNearPoint2D(x,y,distance2d,absAngle+angle); z = GetPositionZ(); @@ -2207,7 +2207,7 @@ void WorldObject::GetNearPoint(WorldObject const* searcher, float &x, float &y, selector.InitializeAngle(); // select in positions after current nodes (selection one by one) - while(selector.NextUsedAngle(angle)) // angle for used pos but maybe without LOS problem + while (selector.NextUsedAngle(angle)) // angle for used pos but maybe without LOS problem { GetNearPoint2D(x,y,distance2d,absAngle+angle); z = GetPositionZ(); diff --git a/src/game/ObjectGridLoader.cpp b/src/game/ObjectGridLoader.cpp index afe5eeb6705..0e6ab9ab1ee 100644 --- a/src/game/ObjectGridLoader.cpp +++ b/src/game/ObjectGridLoader.cpp @@ -260,7 +260,7 @@ template<class T> void ObjectGridUnloader::Visit(GridRefManager<T> &m) { - while(!m.isEmpty()) + while (!m.isEmpty()) { T *obj = m.getFirst()->getSource(); // if option set then object already saved at this moment diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 9927a8109e8..3d3fe7723b4 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2782,7 +2782,7 @@ void ObjectMgr::LoadPlayerInfo() bar.step(); ++count; } - while(result->NextRow()); + while (result->NextRow()); sLog.outString(); sLog.outString( ">> Loaded %u custom player create items", count ); @@ -2847,7 +2847,7 @@ void ObjectMgr::LoadPlayerInfo() bar.step(); ++count; } - while( result->NextRow() ); + while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u player create spells", count ); @@ -2898,7 +2898,7 @@ void ObjectMgr::LoadPlayerInfo() bar.step(); ++count; } - while( result->NextRow() ); + while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u player create actions", count ); @@ -3406,7 +3406,7 @@ void ObjectMgr::LoadArenaTeams() continue; } AddArenaTeam(newArenaTeam); - }while( result->NextRow() ); + }while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u arenateam definitions", count ); @@ -3449,7 +3449,7 @@ void ObjectMgr::LoadGroups() continue; } AddGroup(group); - }while( result->NextRow() ); + }while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u group definitions", count ); @@ -3490,7 +3490,7 @@ void ObjectMgr::LoadGroups() sLog.outErrorDb("Incorrect entry in group_member table : member %d cannot be added to player %d's group!", fields[0].GetUInt32(), fields[3].GetUInt32()); CharacterDatabase.PExecute("DELETE FROM group_member WHERE memberGuid = '%d'", fields[0].GetUInt32()); } - }while( result->NextRow() ); + }while ( result->NextRow() ); } // clean groups @@ -3559,7 +3559,7 @@ void ObjectMgr::LoadGroups() InstanceSave *save = sInstanceSaveManager.AddInstanceSave(mapEntry->MapID, fields[2].GetUInt32(), Difficulty(diff), (time_t)fields[5].GetUInt64(), (fields[6].GetUInt32() == 0), true); group->BindToInstance(save, fields[3].GetBool(), true); - }while( result->NextRow() ); + }while ( result->NextRow() ); } sLog.outString(); @@ -3637,7 +3637,7 @@ void ObjectMgr::LoadQuests() Quest * newQuest = new Quest(fields); mQuestTemplates[newQuest->GetQuestId()] = newQuest; - } while( result->NextRow() ); + } while ( result->NextRow() ); std::map<uint32,uint32> usedMailTemplates; @@ -4643,7 +4643,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) scripts[tmp.id].insert(std::pair<uint32, ScriptInfo>(tmp.delay, tmp)); ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u script definitions", count ); @@ -5009,7 +5009,7 @@ void ObjectMgr::LoadGossipText() gText.Options[i].Emotes[j]._Emote = fields[cic++].GetUInt32(); } } - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u npc texts", count ); @@ -5239,7 +5239,7 @@ void ObjectMgr::LoadQuestAreaTriggers() mQuestAreaTriggerMap[trigger_ID] = quest_ID; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u quest trigger points", count ); @@ -5282,7 +5282,7 @@ void ObjectMgr::LoadTavernAreaTriggers() } mTavernAreaTriggerSet.insert(Trigger_ID); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u tavern triggers", count ); @@ -5324,7 +5324,7 @@ void ObjectMgr::LoadAreaTriggerScripts() continue; } mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u areatrigger scripts", count ); @@ -5533,7 +5533,7 @@ void ObjectMgr::LoadGraveyardZones() if(!AddGraveYardLink(safeLocId,zoneId,team,false)) sLog.outErrorDb("Table `game_graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.",safeLocId,zoneId); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u graveyard-zone links", count ); @@ -5801,7 +5801,7 @@ void ObjectMgr::LoadAreaTriggerTeleports() mAreaTriggers[Trigger_ID] = at; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u area trigger teleport definitions", count ); @@ -5916,7 +5916,7 @@ void ObjectMgr::LoadAccessRequirements() mAccessRequirements[requiremt_ID] = ar; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u access requirement definitions", count ); @@ -8526,7 +8526,7 @@ void ObjectMgr::LoadGossipMenu() ++count; } - while(result->NextRow()); + while (result->NextRow()); sLog.outString(); sLog.outString( ">> Loaded %u gossip_menu entries", count); @@ -8652,7 +8652,7 @@ void ObjectMgr::LoadGossipMenuItems() ++count; } - while(result->NextRow()); + while (result->NextRow()); if (!gossipScriptSet.empty()) { @@ -8936,7 +8936,7 @@ void ObjectMgr::LoadTransportEvents() uint32 event_count = (entry*100)+waypoint_id; TransportEventMap[event_count] = event_id; } - while(result->NextRow()); + while (result->NextRow()); sLog.outString( "\n>> Loaded %u transport events \n", result->GetRowCount() ); } @@ -9002,7 +9002,7 @@ void ObjectMgr::LoadGMTickets() m_GMTicketList.push_back(ticket); - } while( result->NextRow() ); + } while ( result->NextRow() ); result = CharacterDatabase.PQuery("SELECT MAX(guid) from gm_tickets"); diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index a56a8b40406..25cef895e51 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -707,7 +707,7 @@ void Pet::GivePetXP(uint32 xp) uint32 newXP = curXP + xp; // Check how much XP the pet should receive, and hand off have any left from previous levelups - while( newXP >= nextLvlXP && level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ) + while ( newXP >= nextLvlXP && level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ) { // Subtract newXP from amount needed for nextlevel newXP -= nextLvlXP; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index da692573e03..63bdbc51c9f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -834,7 +834,7 @@ bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) sLog.outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount); // attempt equip by one - while(titem_amount > 0) + while (titem_amount > 0) { uint16 eDest; uint8 msg = CanEquipNewItem( NULL_SLOT, eDest, titem_id, false ); @@ -2521,7 +2521,7 @@ void Player::GiveXP(uint32 xp, Unit* victim) uint32 nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP); uint32 newXP = curXP + xp + rested_bonus_xp; - while( newXP >= nextLvlXP && level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ) + while ( newXP >= nextLvlXP && level < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL) ) { newXP -= nextLvlXP; @@ -3732,7 +3732,7 @@ void Player::_LoadSpellCooldowns(QueryResult_AutoPtr result) sLog.outDebug("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime)); } - while( result->NextRow() ); + while ( result->NextRow() ); } } @@ -4895,7 +4895,7 @@ void Player::LeftChannel(Channel *c) void Player::CleanupChannels() { - while(!m_channels.empty()) + while (!m_channels.empty()) { Channel* ch = *m_channels.begin(); m_channels.erase(m_channels.begin()); // remove from player's channel list @@ -23155,7 +23155,7 @@ void Player::_LoadTalents(QueryResult_AutoPtr result) AddTalent(fields[0].GetUInt32(), fields[1].GetUInt32(), false); } - while( result->NextRow() ); + while ( result->NextRow() ); } } diff --git a/src/game/PlayerDump.cpp b/src/game/PlayerDump.cpp index 0f5a4c87123..ffa3babc179 100644 --- a/src/game/PlayerDump.cpp +++ b/src/game/PlayerDump.cpp @@ -97,7 +97,7 @@ bool findnth(std::string &str, int n, std::string::size_type &s, std::string::si { e = str.find("'",s); if (e == std::string::npos) return false; - } while(str[e-1] == '\\'); + } while (str[e-1] == '\\'); for (int i = 1; i < n; ++i) { @@ -330,7 +330,7 @@ void PlayerDumpWriter::DumpTable(std::string& dump, uint32 guid, char const*tabl } while (result->NextRow()); } - while(guids && guids_itr != guids->end()); // not set case iterate single time, set case iterate for all guids + while (guids && guids_itr != guids->end()); // not set case iterate single time, set case iterate for all guids } std::string PlayerDumpWriter::GetDump(uint32 guid) @@ -460,7 +460,7 @@ DumpReturn PlayerDumpReader::LoadDump(const std::string& file, uint32 account, s PetIds petids; CharacterDatabase.BeginTransaction(); - while(!feof(fin)) + while (!feof(fin)) { if(!fgets(buf, 32000, fin)) { diff --git a/src/game/PoolHandler.cpp b/src/game/PoolHandler.cpp index 6a63102ccce..73fe4c01b9e 100644 --- a/src/game/PoolHandler.cpp +++ b/src/game/PoolHandler.cpp @@ -558,7 +558,7 @@ void PoolHandler::LoadFromDB() SearchPair p(guid, pool_id); mGameobjectSearchMap.insert(p); - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u gameobject in pools", count ); } @@ -625,7 +625,7 @@ void PoolHandler::LoadFromDB() SearchPair p(child_pool_id, mother_pool_id); mPoolSearchMap.insert(p); - } while( result->NextRow() ); + } while ( result->NextRow() ); // Now check for circular reference for (uint16 i=0; i<max_pool_id; ++i) diff --git a/src/game/ReputationMgr.cpp b/src/game/ReputationMgr.cpp index 9027ed8b426..7d0591efc5e 100644 --- a/src/game/ReputationMgr.cpp +++ b/src/game/ReputationMgr.cpp @@ -512,7 +512,7 @@ void ReputationMgr::LoadFromDB(QueryResult_AutoPtr result) faction->Changed = false; } } - while( result->NextRow() ); + while ( result->NextRow() ); } } diff --git a/src/game/ScriptedCreature.cpp b/src/game/ScriptedCreature.cpp index c2e817007c7..2c9d569c6d7 100644 --- a/src/game/ScriptedCreature.cpp +++ b/src/game/ScriptedCreature.cpp @@ -62,7 +62,7 @@ void SummonList::DespawnEntry(uint32 entry) void SummonList::DespawnAll() { - while(!empty()) + while (!empty()) { Creature *summon = Unit::GetCreature(*m_creature, *begin()); if(!summon) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index ac82757f03c..901f17c09e2 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1629,7 +1629,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin SearchAreaTarget(tempUnitMap, max_range, PUSH_CHAIN, TargetType); tempUnitMap.remove(cur); - while(num) + while (num) { TagUnitMap.push_back(cur); --num; @@ -1642,7 +1642,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin if(TargetType == SPELL_TARGETS_CHAINHEAL) { next = tempUnitMap.begin(); - while(cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS + while (cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS || !cur->IsWithinLOSInMap(*next)) { ++next; @@ -1657,7 +1657,7 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin if(cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS) break; - while(m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE + while (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE && !m_caster->isInFrontInMap(*next, max_range) || !m_caster->canSeeOrDetect(*next, false) || !cur->IsWithinLOSInMap(*next)) @@ -2484,7 +2484,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) } unitList.clear(); - while(!manaUsers.empty() && unitList.size()<10) + while (!manaUsers.empty() && unitList.size()<10) { unitList.push_back(manaUsers.top().getUnit()); manaUsers.pop(); @@ -2502,7 +2502,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) } unitList.clear(); - while(!healedMembers.empty() && unitList.size()<1) + while (!healedMembers.empty() && unitList.size()<1) { unitList.push_back(healedMembers.top().getUnit()); healedMembers.pop(); @@ -2533,7 +2533,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && m_spellInfo->SpellFamilyFlags[0] & 0x10000000 && m_spellInfo->SpellIconID == 2214) // Circle of Healing maxsize += m_caster->HasAura(55675) ? 1 : 0; // Glyph of Circle of Healing - while(!healedMembers.empty() && unitList.size()<maxsize) + while (!healedMembers.empty() && unitList.size()<maxsize) { unitList.push_back(healedMembers.top().getUnit()); healedMembers.pop(); @@ -6984,7 +6984,7 @@ void Spell::FillRaidOrPartyManaPriorityTargets( UnitList &TagUnitMap, Unit* targ manaUsers.push(PrioritizeManaUnitWraper(*itr)); TagUnitMap.clear(); - while(!manaUsers.empty()) + while (!manaUsers.empty()) { TagUnitMap.push_back(manaUsers.top().getUnit()); manaUsers.pop(); @@ -7001,7 +7001,7 @@ void Spell::FillRaidOrPartyHealthPriorityTargets( UnitList &TagUnitMap, Unit* ta healthQueue.push(PrioritizeHealthUnitWraper(*itr)); TagUnitMap.clear(); - while(!healthQueue.empty()) + while (!healthQueue.empty()) { TagUnitMap.push_back(healthQueue.top().getUnit()); healthQueue.pop(); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ea1b922dbc3..b8032cd742f 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -412,7 +412,7 @@ void Aura::_Remove(AuraRemoveMode removeMode) assert (!m_isRemoved); m_isRemoved = true; ApplicationMap::iterator appItr = m_applications.begin(); - while(!m_applications.empty()) + while (!m_applications.empty()) { AuraApplication * aurApp = appItr->second; Unit * target = aurApp->GetTarget(); @@ -1449,7 +1449,7 @@ void Aura::SetNeedClientUpdateForTargets() const void Aura::_DeleteRemovedApplications() { - while(!m_removedApplications.empty()) + while (!m_removedApplications.empty()) { delete m_removedApplications.front(); m_removedApplications.pop_front(); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index db20d057e20..abea24dd0ba 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1143,7 +1143,7 @@ void SpellMgr::LoadSpellTargetPositions() mSpellTargetPositions[Spell_ID] = st; ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); // Check all spells for (uint32 i = 1; i < sSpellStore.GetNumRows(); ++i) @@ -1260,7 +1260,7 @@ void SpellMgr::LoadSpellProcEvents() customProc++; } ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); if (customProc) @@ -1307,7 +1307,7 @@ void SpellMgr::LoadSpellBonusess() mSpellBonusMap[entry] = sbe; ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u extra spell bonus data", count); @@ -1484,7 +1484,7 @@ void SpellMgr::LoadSpellGroups() groups.insert(std::set<uint32>::value_type(group_id)); mSpellGroupSpell.insert(SpellGroupSpellMap::value_type((SpellGroup)group_id, spell_id)); - } while( result->NextRow() ); + } while ( result->NextRow() ); for (SpellGroupSpellMap::iterator itr = mSpellGroupSpell.begin(); itr!= mSpellGroupSpell.end() ; ) { @@ -1580,7 +1580,7 @@ void SpellMgr::LoadSpellGroupStackRules() mSpellGroupStack[(SpellGroup)group_id] = (SpellGroupStackRule)stack_rule; ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u spell group stack rules", count ); @@ -2670,7 +2670,7 @@ void SpellMgr::LoadSpellAreas() mSpellAreaForAuraMap.insert(SpellAreaForAuraMap::value_type(abs(spellArea.auraSpell),sa)); ++count; - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString( ">> Loaded %u spell area requirements", count ); @@ -3267,7 +3267,7 @@ void SpellMgr::LoadSpellEnchantProcData() mSpellEnchantProcEventMap[enchantId] = spe; ++count; - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString( ">> Loaded %u enchant proc data definitions", count); @@ -3363,7 +3363,7 @@ void SpellMgr::LoadSpellRanks() int32 lastSpell = -1; // fill one chain - while(currentSpell == lastSpell && !finished) + while (currentSpell == lastSpell && !finished) { Field *fields = result->Fetch(); @@ -3977,7 +3977,7 @@ void SpellMgr::LoadSpellLinked() mSpellLinkedMap[trigger].push_back(effect); ++count; - } while( result->NextRow() ); + } while ( result->NextRow() ); sLog.outString(); sLog.outString( ">> Loaded %u linked spells", count ); diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp index aff90058a35..9c395f78528 100644 --- a/src/game/TaxiHandler.cpp +++ b/src/game/TaxiHandler.cpp @@ -124,7 +124,7 @@ void WorldSession::SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 path if (GetPlayer()->hasUnitState(UNIT_STAT_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - while(GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) + while (GetPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType()==FLIGHT_MOTION_TYPE) GetPlayer()->GetMotionMaster()->MovementExpired(false); if (mountDisplayId) diff --git a/src/game/Transports.cpp b/src/game/Transports.cpp index 8e7eb82597e..3f13ffd1ba1 100644 --- a/src/game/Transports.cpp +++ b/src/game/Transports.cpp @@ -110,7 +110,7 @@ void MapManager::LoadTransports() //t->GetMap()->Add<GameObject>((GameObject *)t); ++count; - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString( ">> Loaded %u transports", count ); @@ -128,7 +128,7 @@ void MapManager::LoadTransports() std::string name = fields[2].GetCppString(); sLog.outErrorDb("Transport %u '%s' have record (GUID: %u) in `gameobject`. Transports DON'T must have any records in `gameobject` or its behavior will be unpredictable/bugged.",entry,name.c_str(),guid); } - while(result->NextRow()); + while (result->NextRow()); } } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3e7d9b8983b..017f941ffd2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3143,7 +3143,7 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target) void Unit::_DeleteRemovedAuras() { - while(!m_removedAuras.empty()) + while (!m_removedAuras.empty()) { delete m_removedAuras.front(); m_removedAuras.pop_front(); @@ -4366,7 +4366,7 @@ AuraEffect * Unit::GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster) AuraEffect * Unit::GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 caster) const { uint32 rankSpell = spellmgr.GetFirstSpellInChain(spellId); - while(true) + while (true) { if (AuraEffect * aurEff = GetAuraEffect(rankSpell, effIndex, caster)) return aurEff; @@ -4429,7 +4429,7 @@ Aura * Unit::GetAura(uint32 spellId, uint64 casterGUID, uint8 reqEffMask) const AuraApplication * Unit::GetAuraApplicationOfRankedSpel(uint32 spellId, uint64 casterGUID, uint8 reqEffMask, AuraApplication * except) const { uint32 rankSpell = spellmgr.GetFirstSpellInChain(spellId); - while(true) + while (true) { if (AuraApplication * aurApp = GetAuraApplication(rankSpell, casterGUID, reqEffMask, except)) return aurApp; @@ -4750,7 +4750,7 @@ void Unit::RemoveDynObject(uint32 spellid) void Unit::RemoveAllDynObjects() { - while(!m_dynObjGUIDs.empty()) + while (!m_dynObjGUIDs.empty()) { DynamicObject* dynObj = GetMap()->GetDynamicObject(*m_dynObjGUIDs.begin()); if(dynObj) @@ -13933,7 +13933,7 @@ void Unit::SetDisplayId(uint32 modelId) void Unit::ClearComboPointHolders() { - while(!m_ComboPointHolders.empty()) + while (!m_ComboPointHolders.empty()) { uint32 lowguid = *m_ComboPointHolders.begin(); diff --git a/src/game/Unit.h b/src/game/Unit.h index 2dc15c4422c..de03bac1cfd 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -2084,7 +2084,7 @@ namespace Trinity template<class T> void RandomResizeList(std::list<T> &_list, uint32 _size) { - while(_list.size() > _size) + while (_list.size() > _size) { typename std::list<T>::iterator itr = _list.begin(); advance(itr, urand(0, _list.size() - 1)); diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index bd81199a375..5e860257d2e 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -173,7 +173,7 @@ int8 Vehicle::GetNextEmptySeat(int8 seatId, bool next) const { SeatMap::const_iterator seat = m_Seats.find(seatId); if(seat == m_Seats.end()) return -1; - while(seat->second.passenger || !seat->second.seatInfo->IsUsable()) + while (seat->second.passenger || !seat->second.seatInfo->IsUsable()) { if(next) { diff --git a/src/game/WaypointManager.cpp b/src/game/WaypointManager.cpp index 61d2b041092..8a694ab21ff 100644 --- a/src/game/WaypointManager.cpp +++ b/src/game/WaypointManager.cpp @@ -93,7 +93,7 @@ void WaypointStore::Load() last_id = id; - } while(result->NextRow()) ; + } while (result->NextRow()) ; sLog.outString(); sLog.outString(">> Loaded %u waypoints", count); diff --git a/src/game/World.cpp b/src/game/World.cpp index 08f75214eee..374595a50ec 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1207,7 +1207,7 @@ void World::LoadConfigSettings(bool reload) strncpy(forbiddenMaps, forbiddenmaps.c_str(), forbiddenmaps.length()); const char * delim = ","; char * token = strtok(forbiddenMaps, delim); - while(token != NULL) + while (token != NULL) { int32 mapid = strtol(token, NULL, 10); m_forbiddenMapIds.insert(mapid); @@ -1798,7 +1798,7 @@ void World::LoadAutobroadcasts() m_Autobroadcasts.push_back(message); count++; - } while(result->NextRow()); + } while (result->NextRow()); sLog.outString(); sLog.outString(">> Loaded %u autobroadcasts definitions", count); @@ -2037,7 +2037,7 @@ namespace Trinity { char* pos = text; - while(char* line = lineFromMessage(pos)) + while (char* line = lineFromMessage(pos)) { WorldPacket* data = new WorldPacket(); @@ -2112,7 +2112,7 @@ void World::SendGlobalText(const char* text, WorldSession *self) char* buf = strdup(text); char* pos = buf; - while(char* line = ChatHandler::LineFromMessage(pos)) + while (char* line = ChatHandler::LineFromMessage(pos)) { ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, 0, line, NULL); SendGlobalMessage(&data, self); @@ -2222,7 +2222,7 @@ BanReturn World::BanAccount(BanMode mode, std::string nameOrIP, std::string dura if (std::string(sess->GetPlayerName()) != author) sess->KickPlayer(); } - while(resultAccounts->NextRow()); + while (resultAccounts->NextRow()); return BAN_SUCCESS; } @@ -2374,7 +2374,7 @@ void World::UpdateSessions(uint32 diff) { ///- Add new sessions WorldSession* sess; - while(addSessQueue.next(sess)) + while (addSessQueue.next(sess)) AddSession_ (sess); ///- Then send an update signal to remaining ones diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index ad5dd007685..63f60ad061a 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -76,7 +76,7 @@ WorldSession::~WorldSession() ///- empty incoming packet queue WorldPacket* packet; - while(_recvQueue.next(packet)) + while (_recvQueue.next(packet)) delete packet; loginDatabase.PExecute("UPDATE account SET online = 0 WHERE id = %u;", GetAccountId()); @@ -296,7 +296,7 @@ bool WorldSession::Update(uint32 /*diff*/) void WorldSession::LogoutPlayer(bool Save) { // finish pending transfers before starting the logout - while(_player && _player->IsBeingTeleportedFar()) + while (_player && _player->IsBeingTeleportedFar()) HandleMoveWorldportAckOpcode(); m_playerLogout = true; @@ -381,7 +381,7 @@ void WorldSession::LogoutPlayer(bool Save) // Repop at GraveYard or other player far teleport will prevent saving player because of not present map // Teleport player immediately for correct player save - while(_player->IsBeingTeleportedFar()) + while (_player->IsBeingTeleportedFar()) HandleMoveWorldportAckOpcode(); ///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members @@ -656,7 +656,7 @@ void WorldSession::LoadTutorialsData() for (int iI = 0; iI < 8; ++iI) m_Tutorials[iI] = fields[iI].GetUInt32(); } - while( result->NextRow() ); + while ( result->NextRow() ); } m_TutorialsChanged = false; } diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index b6cac656fa9..010d59b319a 100644 --- a/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -149,7 +149,7 @@ struct boss_moroesAI : public ScriptedAI for (uint8 i = 0; i < 6; ++i) AddList.push_back(Adds[i]); - while(AddList.size() > 4) + while (AddList.size() > 4) AddList.erase((AddList.begin())+(rand()%AddList.size())); uint8 i = 0; diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index 0a1b431aa74..75f3dbead83 100644 --- a/src/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/src/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -190,7 +190,7 @@ struct boss_aranAI : public ScriptedAI } //cut down to size if we have more than 3 targets - while(targets.size() > 3) + while (targets.size() > 3) targets.erase(targets.begin()+rand()%targets.size()); uint32 i = 0; diff --git a/src/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/src/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 6383df31bdc..6caa11af714 100644 --- a/src/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/src/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -168,7 +168,7 @@ struct boss_priestess_delrissaAI : public ScriptedAI LackeyEntryList[i] = m_auiAddEntries[i]; //remove random entries - while(LackeyEntryList.size() > MAX_ACTIVE_LACKEY) + while (LackeyEntryList.size() > MAX_ACTIVE_LACKEY) LackeyEntryList.erase(LackeyEntryList.begin() + rand()%LackeyEntryList.size()); //summon all the remaining in vector diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp index c0c1244c91c..394d25e5632 100644 --- a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp +++ b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp @@ -259,7 +259,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff) events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp b/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp index 7233ae76fad..bfd3ed51d17 100644 --- a/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp +++ b/src/scripts/eastern_kingdoms/zulaman/boss_hexlord.cpp @@ -302,7 +302,7 @@ struct boss_hex_lord_malacrassAI : public ScriptedAI for (uint8 i = 0; i < 8; ++i) AddList.push_back(AddEntryList[i]); - while(AddList.size() > 4) + while (AddList.size() > 4) AddList.erase(AddList.begin()+rand()%AddList.size()); uint8 i = 0; diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index c97ea6968c1..9ef8d15a509 100644 --- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -322,7 +322,7 @@ struct npc_announcer_toc5AI : public ScriptedAI { uiFirstBoss = urand(0,4); - while(uiSecondBoss == uiFirstBoss || uiThirdBoss == uiFirstBoss || uiThirdBoss == uiSecondBoss) + while (uiSecondBoss == uiFirstBoss || uiThirdBoss == uiFirstBoss || uiThirdBoss == uiSecondBoss) { uiSecondBoss = urand(0,4); uiThirdBoss = urand(0,4); diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index a2909b4ad38..ed84bc92fd3 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -169,7 +169,7 @@ struct boss_garfrostAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 84ac04f2d54..23c35600a18 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -151,7 +151,7 @@ struct boss_tyrannusAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -216,7 +216,7 @@ struct boss_rimefangAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp index 102c95d82f6..3aef8d60c95 100644 --- a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -177,7 +177,7 @@ struct mob_ymirjar_wrathbringerAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -223,7 +223,7 @@ struct mob_ymirjar_skyCallerAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -273,7 +273,7 @@ struct mob_ymirjar_flamebearerAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -328,7 +328,7 @@ struct mob_ymirjar_deathbringerAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -375,7 +375,7 @@ struct mob_wrathbone_laborerAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -430,7 +430,7 @@ struct mob_wrathbone_coldwraithAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -480,7 +480,7 @@ struct mob_stonespine_gargoyleAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -531,7 +531,7 @@ struct mob_plagueborn_horrorAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -584,7 +584,7 @@ struct mob_iceborn_protodrakeAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -628,7 +628,7 @@ struct mob_hungering_ghoulAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -674,7 +674,7 @@ struct mob_fallen_warriorAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -727,7 +727,7 @@ struct mob_deathwhisper_torturerAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -777,7 +777,7 @@ struct mob_deathwhisper_shadowcasterAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -823,7 +823,7 @@ struct mob_deathwhisper_necrolyteAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -873,7 +873,7 @@ struct mob_wrathbone_sorcererAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -919,7 +919,7 @@ struct mob_geist_ambusherAI: public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp index 5dba116b0f5..7692dba37a5 100644 --- a/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/src/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -124,7 +124,7 @@ struct boss_anubrekhanAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_faerlina.cpp b/src/scripts/northrend/naxxramas/boss_faerlina.cpp index bdb00f40699..ab7c5a81e78 100644 --- a/src/scripts/northrend/naxxramas/boss_faerlina.cpp +++ b/src/scripts/northrend/naxxramas/boss_faerlina.cpp @@ -123,7 +123,7 @@ struct boss_faerlinaAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp index 13b49e17f5c..2f583d201b6 100644 --- a/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp +++ b/src/scripts/northrend/naxxramas/boss_four_horsemen.cpp @@ -324,7 +324,7 @@ struct boss_four_horsemenAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_gluth.cpp b/src/scripts/northrend/naxxramas/boss_gluth.cpp index 9bdb2b925e5..8e2bf131131 100644 --- a/src/scripts/northrend/naxxramas/boss_gluth.cpp +++ b/src/scripts/northrend/naxxramas/boss_gluth.cpp @@ -108,7 +108,7 @@ struct boss_gluthAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_gothik.cpp b/src/scripts/northrend/naxxramas/boss_gothik.cpp index ad890a41c21..82489258b4c 100644 --- a/src/scripts/northrend/naxxramas/boss_gothik.cpp +++ b/src/scripts/northrend/naxxramas/boss_gothik.cpp @@ -388,7 +388,7 @@ struct boss_gothikAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_grobbulus.cpp b/src/scripts/northrend/naxxramas/boss_grobbulus.cpp index c77131e1f42..28fc676e1ca 100644 --- a/src/scripts/northrend/naxxramas/boss_grobbulus.cpp +++ b/src/scripts/northrend/naxxramas/boss_grobbulus.cpp @@ -64,7 +64,7 @@ struct boss_grobbulusAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_heigan.cpp b/src/scripts/northrend/naxxramas/boss_heigan.cpp index 44c3f3384c3..89e5d5adb19 100644 --- a/src/scripts/northrend/naxxramas/boss_heigan.cpp +++ b/src/scripts/northrend/naxxramas/boss_heigan.cpp @@ -98,7 +98,7 @@ struct boss_heiganAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp b/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp index a95eddc607d..65ee26e25fb 100644 --- a/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp +++ b/src/scripts/northrend/naxxramas/boss_kelthuzad.cpp @@ -377,7 +377,7 @@ struct boss_kelthuzadAI : public BossAI if (Phase == 1) { - while(uint32 eventId = events.GetEvent()) + while (uint32 eventId = events.GetEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_loatheb.cpp b/src/scripts/northrend/naxxramas/boss_loatheb.cpp index c79e077657b..40998e4bf77 100644 --- a/src/scripts/northrend/naxxramas/boss_loatheb.cpp +++ b/src/scripts/northrend/naxxramas/boss_loatheb.cpp @@ -56,7 +56,7 @@ struct boss_loathebAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_maexxna.cpp b/src/scripts/northrend/naxxramas/boss_maexxna.cpp index fb667186c7f..810c6561c96 100644 --- a/src/scripts/northrend/naxxramas/boss_maexxna.cpp +++ b/src/scripts/northrend/naxxramas/boss_maexxna.cpp @@ -87,7 +87,7 @@ struct boss_maexxnaAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_noth.cpp b/src/scripts/northrend/naxxramas/boss_noth.cpp index 23e807f1ed8..d7400928aea 100644 --- a/src/scripts/northrend/naxxramas/boss_noth.cpp +++ b/src/scripts/northrend/naxxramas/boss_noth.cpp @@ -136,7 +136,7 @@ struct boss_nothAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp index 9caa79c36c7..dad2ed5f4ff 100644 --- a/src/scripts/northrend/naxxramas/boss_patchwerk.cpp +++ b/src/scripts/northrend/naxxramas/boss_patchwerk.cpp @@ -101,7 +101,7 @@ struct boss_patchwerkAI : public BossAI EncounterTime += diff; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_razuvious.cpp b/src/scripts/northrend/naxxramas/boss_razuvious.cpp index 4f49aa426fe..2575457aeac 100644 --- a/src/scripts/northrend/naxxramas/boss_razuvious.cpp +++ b/src/scripts/northrend/naxxramas/boss_razuvious.cpp @@ -96,7 +96,7 @@ struct boss_razuviousAI : public BossAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_sapphiron.cpp b/src/scripts/northrend/naxxramas/boss_sapphiron.cpp index 00a9762c431..964810b340d 100644 --- a/src/scripts/northrend/naxxramas/boss_sapphiron.cpp +++ b/src/scripts/northrend/naxxramas/boss_sapphiron.cpp @@ -233,7 +233,7 @@ struct boss_sapphironAI : public BossAI if (phase == PHASE_GROUND) { - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/naxxramas/boss_thaddius.cpp b/src/scripts/northrend/naxxramas/boss_thaddius.cpp index 09ba28f760c..7d3f9d0a615 100644 --- a/src/scripts/northrend/naxxramas/boss_thaddius.cpp +++ b/src/scripts/northrend/naxxramas/boss_thaddius.cpp @@ -218,7 +218,7 @@ struct boss_thaddiusAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp b/src/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp index d792fca56da..101ddf7a7a5 100644 --- a/src/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp +++ b/src/scripts/northrend/ulduar/ulduar/boss_assembly_of_iron.cpp @@ -219,7 +219,7 @@ struct boss_steelbreakerAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -329,7 +329,7 @@ struct boss_runemaster_molgeimAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -499,7 +499,7 @@ struct boss_stormcaller_brundirAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/src/scripts/northrend/vault_of_archavon/boss_archavon.cpp index b2c2e8d904c..ea077af48ed 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -104,7 +104,7 @@ struct boss_archavonAI : public ScriptedAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -167,7 +167,7 @@ struct mob_archavon_warderAI : public ScriptedAI //npc 32353 events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp index 427d33a74c4..3916b6d71c6 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -111,7 +111,7 @@ struct boss_emalonAI : public BossAI if (me->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -229,7 +229,7 @@ struct mob_tempest_minionAI : public ScriptedAI } } - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp index 52de285ac76..5fbe7378c85 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -115,7 +115,7 @@ struct boss_koralonAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -174,7 +174,7 @@ struct mob_flame_warderAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/src/scripts/northrend/vault_of_archavon/boss_toravon.cpp index 8746a9ff04e..5540acd6ad1 100644 --- a/src/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/src/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -104,7 +104,7 @@ struct boss_toravonAI : public ScriptedAI if (m_creature->hasUnitState(UNIT_STAT_CASTING)) return; - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { @@ -157,7 +157,7 @@ struct mob_frost_warderAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/outland/black_temple/boss_mother_shahraz.cpp b/src/scripts/outland/black_temple/boss_mother_shahraz.cpp index 1a18d5fc36c..b8596e1bf62 100644 --- a/src/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/src/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -202,7 +202,7 @@ struct boss_shahrazAI : public ScriptedAI ++BeamCount; uint32 Beam = CurrentBeam; if (BeamCount > 3) - while(CurrentBeam == Beam) + while (CurrentBeam == Beam) CurrentBeam = rand()%3; } else BeamTimer -= diff; diff --git a/src/scripts/outland/black_temple/boss_supremus.cpp b/src/scripts/outland/black_temple/boss_supremus.cpp index c7cc7055ffa..88e701d8f13 100644 --- a/src/scripts/outland/black_temple/boss_supremus.cpp +++ b/src/scripts/outland/black_temple/boss_supremus.cpp @@ -174,7 +174,7 @@ struct boss_supremusAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/outland/black_temple/boss_warlord_najentus.cpp b/src/scripts/outland/black_temple/boss_warlord_najentus.cpp index 12f1eb80975..838bbef5d75 100644 --- a/src/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/src/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -140,7 +140,7 @@ struct boss_najentusAI : public ScriptedAI events.Update(diff); - while(uint32 eventId = events.ExecuteEvent()) + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) { diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp index 54b8666dd97..e992d6258f8 100644 --- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -665,7 +665,7 @@ struct boss_fathomguard_caribdisAI : public ScriptedAI // It can be cast on any of the mobs Unit *pUnit = NULL; - while(pUnit == NULL || !pUnit->isAlive()) + while (pUnit == NULL || !pUnit->isAlive()) { pUnit = selectAdvisorUnit(); } diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 156d57cb47a..3ba2272463c 100644 --- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -235,7 +235,7 @@ struct boss_morogrim_tidewalkerAI : public ScriptedAI if (pTarget) itr = list.find(pTarget->GetGUID()); ++counter; - } while(itr != list.end()); + } while (itr != list.end()); if (pTarget) { |