Code style (game + scripts only):

"while(" --> "while ("

--HG--
branch : trunk
This commit is contained in:
Spp
2010-04-07 19:13:19 +02:00
parent 182e9a20b1
commit 2e127f7a30
74 changed files with 230 additions and 230 deletions
+5 -5
View File
@@ -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());
+1 -1
View File
@@ -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);
+4 -4
View File
@@ -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 );
+1 -1
View File
@@ -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);
+18 -18
View File
@@ -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)
+1 -1
View File
@@ -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 );
+3 -3
View File
@@ -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;
+15 -15
View File
@@ -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 );
}
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
{
+8 -8
View File
@@ -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)
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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))));
+4 -4
View File
@@ -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);
+9 -9
View File
@@ -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
{
+7 -7
View File
@@ -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();
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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());
+3 -3
View File
@@ -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);
+2 -2
View File
@@ -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);
+8 -8
View File
@@ -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();
+1 -1
View File
@@ -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
+20 -20
View File
@@ -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");
+1 -1
View File
@@ -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;
+5 -5
View File
@@ -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() );
}
}
+3 -3
View File
@@ -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))
{
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -512,7 +512,7 @@ void ReputationMgr::LoadFromDB(QueryResult_AutoPtr result)
faction->Changed = false;
}
}
while( result->NextRow() );
while ( result->NextRow() );
}
}
+1 -1
View File
@@ -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)
+8 -8
View File
@@ -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();
+2 -2
View File
@@ -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();
+9 -9
View File
@@ -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 );
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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());
}
}
+5 -5
View File
@@ -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();
+1 -1
View File
@@ -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));
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -93,7 +93,7 @@ void WaypointStore::Load()
last_id = id;
} while(result->NextRow()) ;
} while (result->NextRow()) ;
sLog.outString();
sLog.outString(">> Loaded %u waypoints", count);
+6 -6
View File
@@ -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
+4 -4
View File
@@ -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;
}
@@ -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;
@@ -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;
@@ -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
@@ -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)
{
@@ -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;
@@ -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);
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -124,7 +124,7 @@ struct boss_anubrekhanAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -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)
{
@@ -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)
{
@@ -108,7 +108,7 @@ struct boss_gluthAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -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)
{
@@ -64,7 +64,7 @@ struct boss_grobbulusAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -98,7 +98,7 @@ struct boss_heiganAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -377,7 +377,7 @@ struct boss_kelthuzadAI : public BossAI
if (Phase == 1)
{
while(uint32 eventId = events.GetEvent())
while (uint32 eventId = events.GetEvent())
{
switch(eventId)
{
@@ -56,7 +56,7 @@ struct boss_loathebAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -87,7 +87,7 @@ struct boss_maexxnaAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -136,7 +136,7 @@ struct boss_nothAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -101,7 +101,7 @@ struct boss_patchwerkAI : public BossAI
EncounterTime += diff;
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -96,7 +96,7 @@ struct boss_razuviousAI : public BossAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -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)
{
@@ -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;
@@ -174,7 +174,7 @@ struct boss_supremusAI : public ScriptedAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -140,7 +140,7 @@ struct boss_najentusAI : public ScriptedAI
events.Update(diff);
while(uint32 eventId = events.ExecuteEvent())
while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -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();
}
@@ -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)
{