mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[12066] Optimize some parts for ++C
This commit is contained in:
parent
ba86b02dd4
commit
3707b04330
48 changed files with 163 additions and 163 deletions
|
|
@ -1019,7 +1019,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
uint32 counter = 0;
|
||||
for (QuestStatusMap::const_iterator itr = GetPlayer()->getQuestStatusMap().begin(); itr != GetPlayer()->getQuestStatusMap().end(); ++itr)
|
||||
if (itr->second.m_rewarded)
|
||||
counter++;
|
||||
++counter;
|
||||
change = counter;
|
||||
progressType = PROGRESS_HIGHEST;
|
||||
break;
|
||||
|
|
@ -1035,7 +1035,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
{
|
||||
Quest const* quest = sObjectMgr.GetQuestTemplate(itr->first);
|
||||
if (itr->second.m_rewarded && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID)
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
change = counter;
|
||||
progressType = PROGRESS_HIGHEST;
|
||||
|
|
@ -1548,7 +1548,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
|
||||
{
|
||||
if (skillIter->second->skillId == achievementCriteria->learn_skillline_spell.skillLine)
|
||||
spellCount++;
|
||||
++spellCount;
|
||||
}
|
||||
}
|
||||
change = spellCount;
|
||||
|
|
@ -1612,7 +1612,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellIter->first);
|
||||
for (SkillLineAbilityMap::const_iterator skillIter = bounds.first; skillIter != bounds.second; ++skillIter)
|
||||
if (skillIter->second->skillId == achievementCriteria->learn_skill_line.skillLine)
|
||||
spellCount++;
|
||||
++spellCount;
|
||||
}
|
||||
change = spellCount;
|
||||
progressType = PROGRESS_HIGHEST;
|
||||
|
|
|
|||
|
|
@ -1691,7 +1691,7 @@ void BattleGround::HandleTriggerBuff(ObjectGuid go_guid)
|
|||
// TODO this can be done when poolsystem works for instances
|
||||
int32 index = m_BgObjects.size() - 1;
|
||||
while (index >= 0 && m_BgObjects[index] != go_guid)
|
||||
index--;
|
||||
--index;
|
||||
if (index < 0)
|
||||
{
|
||||
sLog.outError("BattleGround (Type: %u) has buff trigger %s GOType: %u but it hasn't that object in its internal data",
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ void BattleGroundAV::Update(uint32 diff)
|
|||
return;
|
||||
|
||||
// add points from mine owning, and look if the neutral team can reclaim the mine
|
||||
for (uint8 mine = 0; mine < BG_AV_MAX_MINES; mine++)
|
||||
for (uint8 mine = 0; mine < BG_AV_MAX_MINES; ++mine)
|
||||
{
|
||||
if (m_Mine_Owner[mine] != BG_AV_TEAM_NEUTRAL)
|
||||
{
|
||||
|
|
@ -325,7 +325,7 @@ void BattleGroundAV::EndBattleGround(Team winner)
|
|||
// now we have the values give the honor/reputation to the teams:
|
||||
Team team[BG_TEAMS_COUNT] = { ALLIANCE, HORDE };
|
||||
uint32 faction[BG_TEAMS_COUNT] = { BG_AV_FACTION_A, BG_AV_FACTION_H };
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
if (tower_survived[i])
|
||||
{
|
||||
|
|
@ -619,7 +619,7 @@ void BattleGroundAV::FillInitialWorldStates(WorldPacket& data, uint32& count)
|
|||
bool stateok;
|
||||
for (uint32 i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
|
||||
{
|
||||
for (uint8 j = 0; j < BG_AV_MAX_STATES; j++)
|
||||
for (uint8 j = 0; j < BG_AV_MAX_STATES; ++j)
|
||||
{
|
||||
stateok = (m_Nodes[i].State == j);
|
||||
FillInitialWorldState(data, count, BG_AV_NodeWorldStates[i][GetWorldStateType(j, BG_AV_TEAM_ALLIANCE)],
|
||||
|
|
@ -794,16 +794,16 @@ void BattleGroundAV::Reset()
|
|||
m_RepSurviveTower = (isBGWeekend) ? BG_AV_REP_SURVIVING_TOWER_HOLIDAY : BG_AV_REP_SURVIVING_TOWER;
|
||||
m_RepOwnedMine = (isBGWeekend) ? BG_AV_REP_OWNED_MINE_HOLIDAY : BG_AV_REP_OWNED_MINE;
|
||||
|
||||
for (uint8 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
for (uint8 j = 0; j < 9; j++) // 9 quests getting tracked
|
||||
for (uint8 j = 0; j < 9; ++j) // 9 quests getting tracked
|
||||
m_Team_QuestStatus[i][j] = 0;
|
||||
m_TeamScores[i] = BG_AV_SCORE_INITIAL_POINTS;
|
||||
m_IsInformedNearLose[i] = false;
|
||||
m_ActiveEvents[BG_AV_NodeEventCaptainDead_A + i] = BG_EVENT_NONE;
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < BG_AV_MAX_MINES; i++)
|
||||
for (uint8 i = 0; i < BG_AV_MAX_MINES; ++i)
|
||||
{
|
||||
m_Mine_Owner[i] = BG_AV_TEAM_NEUTRAL;
|
||||
m_Mine_PrevOwner[i] = m_Mine_Owner[i];
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ GroupQueueInfo* BattleGroundQueue::AddGroup(Player* leader, Group* grp, BattleGr
|
|||
index += BG_TEAMS_COUNT; // BG_QUEUE_PREMADE_* -> BG_QUEUE_NORMAL_*
|
||||
|
||||
if (ginfo->GroupTeam == HORDE)
|
||||
index++; // BG_QUEUE_*_ALLIANCE -> BG_QUEUE_*_HORDE
|
||||
++index; // BG_QUEUE_*_ALLIANCE -> BG_QUEUE_*_HORDE
|
||||
|
||||
DEBUG_LOG("Adding Group to BattleGroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
|
||||
|
||||
|
|
@ -520,13 +520,13 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId
|
|||
uint32 aliCount = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE].size();
|
||||
//index to queue which group is current
|
||||
uint32 aliIndex = 0;
|
||||
for (; aliIndex < aliCount && m_SelectionPools[BG_TEAM_ALLIANCE].AddGroup((*Ali_itr), aliFree); aliIndex++)
|
||||
for (; aliIndex < aliCount && m_SelectionPools[BG_TEAM_ALLIANCE].AddGroup((*Ali_itr), aliFree); ++aliIndex)
|
||||
++Ali_itr;
|
||||
//the same thing for horde
|
||||
GroupsQueueType::const_iterator Horde_itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].begin();
|
||||
uint32 hordeCount = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_HORDE].size();
|
||||
uint32 hordeIndex = 0;
|
||||
for (; hordeIndex < hordeCount && m_SelectionPools[BG_TEAM_HORDE].AddGroup((*Horde_itr), hordeFree); hordeIndex++)
|
||||
for (; hordeIndex < hordeCount && m_SelectionPools[BG_TEAM_HORDE].AddGroup((*Horde_itr), hordeFree); ++hordeIndex)
|
||||
++Horde_itr;
|
||||
|
||||
//if ofc like BG queue invitation is set in config, then we are happy
|
||||
|
|
@ -552,7 +552,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId
|
|||
//kick alliance group, add to pool new group if needed
|
||||
if (m_SelectionPools[BG_TEAM_ALLIANCE].KickGroup(diffHorde - diffAli))
|
||||
{
|
||||
for (; aliIndex < aliCount && m_SelectionPools[BG_TEAM_ALLIANCE].AddGroup((*Ali_itr), (aliFree >= diffHorde) ? aliFree - diffHorde : 0); aliIndex++)
|
||||
for (; aliIndex < aliCount && m_SelectionPools[BG_TEAM_ALLIANCE].AddGroup((*Ali_itr), (aliFree >= diffHorde) ? aliFree - diffHorde : 0); ++aliIndex)
|
||||
++Ali_itr;
|
||||
}
|
||||
//if ali selection is already empty, then kick horde group, but if there are less horde than ali in bg - break;
|
||||
|
|
@ -568,7 +568,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BattleGroundBracketId
|
|||
//kick horde group, add to pool new group if needed
|
||||
if (m_SelectionPools[BG_TEAM_HORDE].KickGroup(diffAli - diffHorde))
|
||||
{
|
||||
for (; hordeIndex < hordeCount && m_SelectionPools[BG_TEAM_HORDE].AddGroup((*Horde_itr), (hordeFree >= diffAli) ? hordeFree - diffAli : 0); hordeIndex++)
|
||||
for (; hordeIndex < hordeCount && m_SelectionPools[BG_TEAM_HORDE].AddGroup((*Horde_itr), (hordeFree >= diffAli) ? hordeFree - diffAli : 0); ++hordeIndex)
|
||||
++Horde_itr;
|
||||
}
|
||||
if (!m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount())
|
||||
|
|
@ -609,7 +609,7 @@ bool BattleGroundQueue::CheckPremadeMatch(BattleGroundBracketId bracket_id, uint
|
|||
//add groups/players from normal queue to size of bigger group
|
||||
uint32 maxPlayers = std::max(m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount(), m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount());
|
||||
GroupsQueueType::const_iterator itr;
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
for (itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); itr != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++itr)
|
||||
{
|
||||
|
|
@ -627,7 +627,7 @@ bool BattleGroundQueue::CheckPremadeMatch(BattleGroundBracketId bracket_id, uint
|
|||
// if first is invited to BG and seconds timer expired, but we can ignore it, because players have only 80 seconds to click to enter bg
|
||||
// and when they click or after 80 seconds the queue info is removed from queue
|
||||
uint32 time_before = WorldTimer::getMSTime() - sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH);
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
if (!m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE + i].empty())
|
||||
{
|
||||
|
|
@ -648,7 +648,7 @@ bool BattleGroundQueue::CheckPremadeMatch(BattleGroundBracketId bracket_id, uint
|
|||
bool BattleGroundQueue::CheckNormalMatch(BattleGround* bg_template, BattleGroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers)
|
||||
{
|
||||
GroupsQueueType::const_iterator itr_team[BG_TEAMS_COUNT];
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
{
|
||||
itr_team[i] = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin();
|
||||
for (; itr_team[i] != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++(itr_team[i]))
|
||||
|
|
@ -863,7 +863,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
|
|||
return;
|
||||
}
|
||||
//invite those selection pools
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam);
|
||||
//start bg
|
||||
|
|
@ -890,7 +890,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
|
|||
}
|
||||
|
||||
// invite those selection pools
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
for (GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg2, (*citr)->GroupTeam);
|
||||
// start bg
|
||||
|
|
@ -940,7 +940,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
|
|||
|
||||
//optimalization : --- we dont need to use selection_pools - each update we select max 2 groups
|
||||
|
||||
for (uint32 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; i++)
|
||||
for (uint32 i = BG_QUEUE_PREMADE_ALLIANCE; i < BG_QUEUE_NORMAL_ALLIANCE; ++i)
|
||||
{
|
||||
// take the group that joined first
|
||||
itr_team[i] = m_QueuedGroups[bracket_id][i].begin();
|
||||
|
|
@ -1127,7 +1127,7 @@ void BGQueueRemoveEvent::Abort(uint64 /*e_time*/)
|
|||
|
||||
BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTesting(false)
|
||||
{
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||
for (uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
||||
m_BattleGrounds[i].clear();
|
||||
m_NextRatingDiscardUpdate = sWorld.getConfig(CONFIG_UINT32_ARENA_RATING_DISCARD_TIMER);
|
||||
m_Testing = false;
|
||||
|
|
@ -1168,7 +1168,7 @@ void BattleGroundMgr::Update(uint32 diff)
|
|||
//release lock
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < scheduled.size(); i++)
|
||||
for (uint8 i = 0; i < scheduled.size(); ++i)
|
||||
{
|
||||
uint32 arenaRating = scheduled[i] >> 32;
|
||||
ArenaType arenaType = ArenaType(scheduled[i] >> 24 & 255);
|
||||
|
|
@ -1430,7 +1430,7 @@ BattleGround* BattleGroundMgr::GetBattleGround(uint32 InstanceID, BattleGroundTy
|
|||
BattleGroundSet::iterator itr;
|
||||
if (bgTypeId == BATTLEGROUND_TYPE_NONE)
|
||||
{
|
||||
for (uint32 i = BATTLEGROUND_AV; i < MAX_BATTLEGROUND_TYPE_ID; i++)
|
||||
for (uint32 i = BATTLEGROUND_AV; i < MAX_BATTLEGROUND_TYPE_ID; ++i)
|
||||
{
|
||||
itr = m_BattleGrounds[i].find(InstanceID);
|
||||
if (itr != m_BattleGrounds[i].end())
|
||||
|
|
@ -1986,7 +1986,7 @@ void BattleGroundMgr::ScheduleQueueUpdate(uint32 arenaRating, ArenaType arenaTyp
|
|||
//we will use only 1 number created of bgTypeId and bracket_id
|
||||
uint64 schedule_id = ((uint64)arenaRating << 32) | (arenaType << 24) | (bgQueueTypeId << 16) | (bgTypeId << 8) | bracket_id;
|
||||
bool found = false;
|
||||
for (uint8 i = 0; i < m_QueueUpdateScheduler.size(); i++)
|
||||
for (uint8 i = 0; i < m_QueueUpdateScheduler.size(); ++i)
|
||||
{
|
||||
if (m_QueueUpdateScheduler[i] == schedule_id)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recv_data*/)
|
|||
data << uint32(0); // Holidays.dbc priority
|
||||
data << uint32(0); // Holidays.dbc calendarFilterType
|
||||
|
||||
for(uint32 j = 0; j < 26; j++)
|
||||
for(uint32 j = 0; j < 26; ++j)
|
||||
data << uint32(0); // Holidays.dbc date
|
||||
|
||||
for(uint32 j = 0; j < 10; j++)
|
||||
for(uint32 j = 0; j < 10; ++j)
|
||||
data << uint32(0); // Holidays.dbc duration
|
||||
|
||||
for(uint32 j = 0; j < 10; j++)
|
||||
for(uint32 j = 0; j < 10; ++j)
|
||||
data << uint32(0); // Holidays.dbc calendarFlags
|
||||
|
||||
data << ""; // Holidays.dbc textureFilename
|
||||
|
|
@ -139,7 +139,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recv_data)
|
|||
// {
|
||||
// uint8 unk12,unk13;
|
||||
// ObjectGuid guid;
|
||||
// for (int i=0;i<count;i++)
|
||||
// for (int i = 0; i < count; ++i)
|
||||
// {
|
||||
// recv_data >> guid.ReadAsPacked();
|
||||
// recv_data >> (uint8)unk12;
|
||||
|
|
|
|||
|
|
@ -102,9 +102,9 @@ Cell::Visit(const CellPair& standing_cell, TypeContainerVisitor<T, CONTAINER>& v
|
|||
m.Visit(*this, visitor);
|
||||
|
||||
// loop the cell range
|
||||
for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; x++)
|
||||
for (uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x)
|
||||
{
|
||||
for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; y++)
|
||||
for (uint32 y = begin_cell.y_coord; y <= end_cell.y_coord; ++y)
|
||||
{
|
||||
CellPair cell_pair(x, y);
|
||||
//lets skip standing cell since we already visited it
|
||||
|
|
|
|||
|
|
@ -1574,7 +1574,7 @@ bool ChatHandler::isValidChatMessage(const char* message)
|
|||
case 'c':
|
||||
color = 0;
|
||||
// validate color, expect 8 hex chars
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
char c;
|
||||
reader >> c;
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ bool Corpse::LoadFromDB(uint32 lowguid, Field* fields)
|
|||
|
||||
// Load equipment
|
||||
Tokens data = StrSplit(fields[16].GetCppString(), " ");
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; slot++)
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
uint32 visualbase = slot * 2;
|
||||
uint32 item_id = GetUInt32ValueFromArray(data, visualbase);
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
{
|
||||
// amount of real actions
|
||||
uint32 count = 0;
|
||||
for (uint32 j = 0; j < MAX_ACTIONS; j++)
|
||||
for (uint32 j = 0; j < MAX_ACTIONS; ++j)
|
||||
if (pHolder.Event.action[j].type != ACTION_T_NONE)
|
||||
++count;
|
||||
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
|
|||
break;
|
||||
}
|
||||
|
||||
for (uint32 j = 0; j < MAX_ACTIONS; j++)
|
||||
for (uint32 j = 0; j < MAX_ACTIONS; ++j)
|
||||
{
|
||||
uint16 action_type = fields[10 + (j * 4)].GetUInt16();
|
||||
if (action_type >= ACTION_T_END)
|
||||
|
|
|
|||
|
|
@ -541,7 +541,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
{
|
||||
TalentEntry const* talentInfo = sTalentStore.LookupEntry(i);
|
||||
if (!talentInfo) continue;
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; ++j)
|
||||
if (talentInfo->RankID[j])
|
||||
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i, j);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -983,7 +983,7 @@ void GameEventMgr::SendEventMails(int16 event_id)
|
|||
template <>
|
||||
int16 GameEventMgr::GetGameEventId<Creature>(uint32 guid_or_poolid)
|
||||
{
|
||||
for (uint16 i = 0; i < mGameEventCreatureGuids.size(); i++) // 0 <= i <= 2*(S := mGameEvent.size()) - 2
|
||||
for (uint16 i = 0; i < mGameEventCreatureGuids.size(); ++i) // 0 <= i <= 2*(S := mGameEvent.size()) - 2
|
||||
for (GuidList::const_iterator itr = mGameEventCreatureGuids[i].begin(); itr != mGameEventCreatureGuids[i].end(); ++itr)
|
||||
if (*itr == guid_or_poolid)
|
||||
return i + 1 - mGameEvent.size(); // -S *1 + 1 <= . <= 1*S - 1
|
||||
|
|
@ -994,7 +994,7 @@ int16 GameEventMgr::GetGameEventId<Creature>(uint32 guid_or_poolid)
|
|||
template <>
|
||||
int16 GameEventMgr::GetGameEventId<GameObject>(uint32 guid_or_poolid)
|
||||
{
|
||||
for (uint16 i = 0; i < mGameEventGameobjectGuids.size(); i++)
|
||||
for (uint16 i = 0; i < mGameEventGameobjectGuids.size(); ++i)
|
||||
for (GuidList::const_iterator itr = mGameEventGameobjectGuids[i].begin(); itr != mGameEventGameobjectGuids[i].end(); ++itr)
|
||||
if (*itr == guid_or_poolid)
|
||||
return i + 1 - mGameEvent.size(); // -S *1 + 1 <= . <= 1*S - 1
|
||||
|
|
@ -1005,7 +1005,7 @@ int16 GameEventMgr::GetGameEventId<GameObject>(uint32 guid_or_poolid)
|
|||
template <>
|
||||
int16 GameEventMgr::GetGameEventId<Pool>(uint32 guid_or_poolid)
|
||||
{
|
||||
for (uint16 i = 0; i < mGameEventSpawnPoolIds.size(); i++)
|
||||
for (uint16 i = 0; i < mGameEventSpawnPoolIds.size(); ++i)
|
||||
for (IdList::const_iterator itr = mGameEventSpawnPoolIds[i].begin(); itr != mGameEventSpawnPoolIds[i].end(); ++itr)
|
||||
if (*itr == guid_or_poolid)
|
||||
return i;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ void AddItemsSetItem(Player* player, Item* item)
|
|||
eff->setid = setid;
|
||||
|
||||
size_t x = 0;
|
||||
for (; x < player->ItemSetEff.size(); x++)
|
||||
for (; x < player->ItemSetEff.size(); ++x)
|
||||
if (!player->ItemSetEff[x])
|
||||
break;
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ void AddItemsSetItem(Player* player, Item* item)
|
|||
|
||||
++eff->item_count;
|
||||
|
||||
for (uint32 x = 0; x < 8; x++)
|
||||
for (uint32 x = 0; x < 8; ++x)
|
||||
{
|
||||
if (!set->spells[x])
|
||||
continue;
|
||||
|
|
@ -79,7 +79,7 @@ void AddItemsSetItem(Player* player, Item* item)
|
|||
continue;
|
||||
|
||||
uint32 z = 0;
|
||||
for (; z < 8; z++)
|
||||
for (; z < 8; ++z)
|
||||
if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])
|
||||
break;
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ void AddItemsSetItem(Player* player, Item* item)
|
|||
continue;
|
||||
|
||||
// new spell
|
||||
for (uint32 y = 0; y < 8; y++)
|
||||
for (uint32 y = 0; y < 8; ++y)
|
||||
{
|
||||
if (!eff->spells[y]) // free slot
|
||||
{
|
||||
|
|
@ -121,7 +121,7 @@ void RemoveItemsSetItem(Player* player, ItemPrototype const* proto)
|
|||
|
||||
ItemSetEffect* eff = NULL;
|
||||
size_t setindex = 0;
|
||||
for (; setindex < player->ItemSetEff.size(); setindex++)
|
||||
for (; setindex < player->ItemSetEff.size(); ++setindex)
|
||||
{
|
||||
if (player->ItemSetEff[setindex] && player->ItemSetEff[setindex]->setid == setid)
|
||||
{
|
||||
|
|
@ -136,7 +136,7 @@ void RemoveItemsSetItem(Player* player, ItemPrototype const* proto)
|
|||
|
||||
--eff->item_count;
|
||||
|
||||
for (uint32 x = 0; x < 8; x++)
|
||||
for (uint32 x = 0; x < 8; ++x)
|
||||
{
|
||||
if (!set->spells[x])
|
||||
continue;
|
||||
|
|
@ -145,7 +145,7 @@ void RemoveItemsSetItem(Player* player, ItemPrototype const* proto)
|
|||
if (set->items_to_triggerspell[x] <= eff->item_count)
|
||||
continue;
|
||||
|
||||
for (uint32 z = 0; z < 8; z++)
|
||||
for (uint32 z = 0; z < 8; ++z)
|
||||
{
|
||||
if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1327,7 +1327,7 @@ bool ChatHandler::HandleLookupAchievementCommand(char* args)
|
|||
{
|
||||
CompletedAchievementData const* completed = target ? target->GetAchievementMgr().GetCompleteData(id) : NULL;
|
||||
ShowAchievementListHelper(achEntry, LocaleConstant(loc), completed ? &completed->date : NULL, target);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1441,7 +1441,7 @@ bool ChatHandler::HandleLookupFactionCommand(char* args)
|
|||
{
|
||||
FactionState const* repState = target ? target->GetReputationMgr().GetState(factionEntry) : NULL;
|
||||
ShowFactionListHelper(factionEntry, LocaleConstant(loc), repState, target);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2367,7 +2367,7 @@ bool ChatHandler::HandleNpcSubNameCommand(char* /*args*/)
|
|||
return true;
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < strlen(args); i++)
|
||||
for (uint8 i = 0; i < strlen(args); ++i)
|
||||
{
|
||||
if (!isalpha(args[i]) && args[i]!=' ')
|
||||
{
|
||||
|
|
@ -5031,7 +5031,7 @@ bool ChatHandler::HandleLookupTitleCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in CharTitles.dbc
|
||||
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); ++id)
|
||||
{
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
if (titleInfo)
|
||||
|
|
@ -5236,7 +5236,7 @@ bool ChatHandler::HandleCharacterTitlesCommand(char* args)
|
|||
char const* knownStr = GetMangosString(LANG_KNOWN);
|
||||
|
||||
// Search in CharTitles.dbc
|
||||
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sCharTitlesStore.GetNumRows(); ++id)
|
||||
{
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
if (titleInfo && target->HasTitle(titleInfo))
|
||||
|
|
|
|||
|
|
@ -2678,7 +2678,7 @@ bool ChatHandler::HandleAddItemSetCommand(char* args)
|
|||
DETAIL_LOG(GetMangosString(LANG_ADDITEMSET), itemsetId);
|
||||
|
||||
bool found = false;
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; id++)
|
||||
for (uint32 id = 0; id < sItemStorage.MaxEntry; ++id)
|
||||
{
|
||||
ItemPrototype const* pProto = sItemStorage.LookupEntry<ItemPrototype>(id);
|
||||
if (!pProto)
|
||||
|
|
@ -3167,7 +3167,7 @@ bool ChatHandler::HandleLookupItemSetCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in ItemSet.dbc
|
||||
for (uint32 id = 0; id < sItemSetStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sItemSetStore.GetNumRows(); ++id)
|
||||
{
|
||||
ItemSetEntry const* set = sItemSetStore.LookupEntry(id);
|
||||
if (set)
|
||||
|
|
@ -3230,7 +3230,7 @@ bool ChatHandler::HandleLookupSkillCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in SkillLine.dbc
|
||||
for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sSkillLineStore.GetNumRows(); ++id)
|
||||
{
|
||||
SkillLineEntry const* skillInfo = sSkillLineStore.LookupEntry(id);
|
||||
if (skillInfo)
|
||||
|
|
@ -3355,7 +3355,7 @@ bool ChatHandler::HandleLookupSpellCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in Spell.dbc
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sSpellStore.GetNumRows(); ++id)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(id);
|
||||
if (spellInfo)
|
||||
|
|
@ -3532,7 +3532,7 @@ bool ChatHandler::HandleLookupObjectCommand(char* args)
|
|||
|
||||
uint32 counter = 0;
|
||||
|
||||
for (uint32 id = 0; id < sGOStorage.MaxEntry; id++)
|
||||
for (uint32 id = 0; id < sGOStorage.MaxEntry; ++id)
|
||||
{
|
||||
GameObjectInfo const* gInfo = sGOStorage.LookupEntry<GameObjectInfo>(id);
|
||||
if (!gInfo)
|
||||
|
|
@ -3598,7 +3598,7 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(char* args)
|
|||
uint32 counter = 0; // Counter for figure out that we found smth.
|
||||
|
||||
// Search in TaxiNodes.dbc
|
||||
for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); id++)
|
||||
for (uint32 id = 0; id < sTaxiNodesStore.GetNumRows(); ++id)
|
||||
{
|
||||
TaxiNodesEntry const* nodeEntry = sTaxiNodesStore.LookupEntry(id);
|
||||
if (nodeEntry)
|
||||
|
|
@ -6460,7 +6460,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
|
|||
}
|
||||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
PSendSysMessage("player binds: %d", counter);
|
||||
|
|
@ -6483,7 +6483,7 @@ bool ChatHandler::HandleInstanceListBindsCommand(char* /*args*/)
|
|||
}
|
||||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6537,7 +6537,7 @@ bool ChatHandler::HandleInstanceUnbindCommand(char* args)
|
|||
else
|
||||
PSendSysMessage("bound for a nonexistent map %u", itr->first);
|
||||
player->UnbindInstance(itr, Difficulty(i));
|
||||
counter++;
|
||||
++counter;
|
||||
}
|
||||
else
|
||||
++itr;
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ void MapPersistentStateManager::_DelHelper(DatabaseType& db, const char* fields,
|
|||
{
|
||||
Field* fields = result->Fetch();
|
||||
std::ostringstream ss;
|
||||
for (size_t i = 0; i < fieldTokens.size(); i++)
|
||||
for (size_t i = 0; i < fieldTokens.size(); ++i)
|
||||
{
|
||||
std::string fieldValue = fields[i].GetCppString();
|
||||
db.escape_string(fieldValue);
|
||||
|
|
|
|||
|
|
@ -1351,7 +1351,7 @@ void ObjectMgr::LoadCreatures()
|
|||
void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1367,7 +1367,7 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
|
|||
void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1573,7 +1573,7 @@ void ObjectMgr::LoadGameObjectAddon()
|
|||
void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -1589,7 +1589,7 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
|
|||
void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data)
|
||||
{
|
||||
uint8 mask = data->spawnMask;
|
||||
for (uint8 i = 0; mask != 0; i++, mask >>= 1)
|
||||
for (uint8 i = 0; mask != 0; ++i, mask >>= 1)
|
||||
{
|
||||
if (mask & 1)
|
||||
{
|
||||
|
|
@ -2659,7 +2659,7 @@ void ObjectMgr::LoadPetLevelInfo()
|
|||
pLevelInfo->mana = fields[3].GetUInt16();
|
||||
pLevelInfo->armor = fields[9].GetUInt16();
|
||||
|
||||
for (int i = 0; i < MAX_STATS; i++)
|
||||
for (int i = 0; i < MAX_STATS; ++i)
|
||||
{
|
||||
pLevelInfo->stats[i] = fields[i + 4].GetUInt16();
|
||||
}
|
||||
|
|
@ -3515,7 +3515,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
bar2.step();
|
||||
Field* fields = result->Fetch();
|
||||
count++;
|
||||
++count;
|
||||
|
||||
uint32 memberGuidlow = fields[0].GetUInt32();
|
||||
ObjectGuid memberGuid = ObjectGuid(HIGHGUID_PLAYER, memberGuidlow);
|
||||
|
|
@ -3585,7 +3585,7 @@ void ObjectMgr::LoadGroups()
|
|||
{
|
||||
bar2.step();
|
||||
Field* fields = result->Fetch();
|
||||
count++;
|
||||
++count;
|
||||
|
||||
uint32 leaderGuidLow = fields[0].GetUInt32();
|
||||
uint32 mapId = fields[1].GetUInt32();
|
||||
|
|
@ -4660,7 +4660,7 @@ void ObjectMgr::LoadInstanceTemplate()
|
|||
SQLInstanceLoader loader;
|
||||
loader.Load(sInstanceTemplate);
|
||||
|
||||
for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++)
|
||||
for (uint32 i = 0; i < sInstanceTemplate.MaxEntry; ++i)
|
||||
{
|
||||
InstanceTemplate const* temp = GetInstanceTemplate(i);
|
||||
if (!temp)
|
||||
|
|
@ -5981,7 +5981,7 @@ void ObjectMgr::LoadGameobjectInfo()
|
|||
loader.Load(sGOStorage);
|
||||
|
||||
// some checks
|
||||
for (uint32 id = 1; id < sGOStorage.MaxEntry; id++)
|
||||
for (uint32 id = 1; id < sGOStorage.MaxEntry; ++id)
|
||||
{
|
||||
GameObjectInfo const* goInfo = sGOStorage.LookupEntry<GameObjectInfo>(id);
|
||||
if (!goInfo)
|
||||
|
|
@ -7350,7 +7350,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->_generic.questID) // quest related objects, has visual effects
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -7359,7 +7359,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->spellFocus.questID) // quest related objects, has visual effect
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -7368,7 +7368,7 @@ void ObjectMgr::LoadGameObjectForQuests()
|
|||
if (goInfo->goober.questId) //quests objects
|
||||
{
|
||||
mGameObjectForQuestSet.insert(go_entry);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ bool PathFinder::getSteerTarget(const float* startPos, const float* endPos,
|
|||
if ((steerPathFlags[ns] & DT_STRAIGHTPATH_OFFMESH_CONNECTION) ||
|
||||
!inRangeYZX(&steerPath[ns * VERTEX_SIZE], startPos, minTargetDist, 1000.0f))
|
||||
break;
|
||||
ns++;
|
||||
++ns;
|
||||
}
|
||||
// Failed to find good point to steer to.
|
||||
if (ns >= nsteerPath)
|
||||
|
|
@ -651,7 +651,7 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
return DT_FAILURE;
|
||||
|
||||
dtVcopy(&smoothPath[nsmoothPath * VERTEX_SIZE], iterPos);
|
||||
nsmoothPath++;
|
||||
++nsmoothPath;
|
||||
|
||||
// Move towards target a small advancement at a time until target reached or
|
||||
// when ran out of memory to store the path.
|
||||
|
|
@ -702,7 +702,7 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
if (nsmoothPath < maxSmoothPathSize)
|
||||
{
|
||||
dtVcopy(&smoothPath[nsmoothPath * VERTEX_SIZE], iterPos);
|
||||
nsmoothPath++;
|
||||
++nsmoothPath;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -716,7 +716,7 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
{
|
||||
prevRef = polyRef;
|
||||
polyRef = polys[npos];
|
||||
npos++;
|
||||
++npos;
|
||||
}
|
||||
|
||||
for (uint32 i = npos; i < npolys; ++i)
|
||||
|
|
@ -731,7 +731,7 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
if (nsmoothPath < maxSmoothPathSize)
|
||||
{
|
||||
dtVcopy(&smoothPath[nsmoothPath * VERTEX_SIZE], startPos);
|
||||
nsmoothPath++;
|
||||
++nsmoothPath;
|
||||
}
|
||||
// Move position at the other side of the off-mesh link.
|
||||
dtVcopy(iterPos, endPos);
|
||||
|
|
@ -745,7 +745,7 @@ dtStatus PathFinder::findSmoothPath(const float* startPos, const float* endPos,
|
|||
if (nsmoothPath < maxSmoothPathSize)
|
||||
{
|
||||
dtVcopy(&smoothPath[nsmoothPath * VERTEX_SIZE], iterPos);
|
||||
nsmoothPath++;
|
||||
++nsmoothPath;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -682,7 +682,7 @@ bool Pet::CanTakeMoreActiveSpells(uint32 spellid)
|
|||
|
||||
uint8 x;
|
||||
|
||||
for (x = 0; x < activecount; x++)
|
||||
for (x = 0; x < activecount; ++x)
|
||||
{
|
||||
if (chainstart == chainstartstore[x])
|
||||
break;
|
||||
|
|
@ -1764,7 +1764,7 @@ bool Pet::resetTalents(bool no_cost)
|
|||
if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask))
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; ++j)
|
||||
if (talentInfo->RankID[j])
|
||||
removeSpell(talentInfo->RankID[j], !IsPassiveSpell(talentInfo->RankID[j]), false);
|
||||
}
|
||||
|
|
@ -1958,7 +1958,7 @@ void Pet::ToggleAutocast(uint32 spellid, bool apply)
|
|||
else
|
||||
{
|
||||
AutoSpellList::iterator itr2 = m_autospells.begin();
|
||||
for (i = 0; i < m_autospells.size() && m_autospells[i] != spellid; ++i, itr2++)
|
||||
for (i = 0; i < m_autospells.size() && m_autospells[i] != spellid; ++i, ++itr2)
|
||||
; // just search
|
||||
|
||||
if (i < m_autospells.size())
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ Player::~Player()
|
|||
m_transport->RemovePassenger(this);
|
||||
}
|
||||
|
||||
for (size_t x = 0; x < ItemSetEff.size(); x++)
|
||||
for (size_t x = 0; x < ItemSetEff.size(); ++x)
|
||||
if (ItemSetEff[x])
|
||||
delete ItemSetEff[x];
|
||||
|
||||
|
|
@ -1539,7 +1539,7 @@ bool Player::BuildEnumData(QueryResult* result, WorldPacket* p_data)
|
|||
|
||||
|
||||
Tokens data = StrSplit(fields[19].GetCppString(), " ");
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; slot++)
|
||||
for (uint8 slot = 0; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
uint32 visualbase = slot * 2;
|
||||
uint32 item_id = GetUInt32ValueFromArray(data, visualbase);
|
||||
|
|
@ -3809,7 +3809,7 @@ void Player::_SetCreateBits(UpdateMask* updateMask, Player* target) const
|
|||
}
|
||||
else
|
||||
{
|
||||
for (uint16 index = 0; index < m_valuesCount; index++)
|
||||
for (uint16 index = 0; index < m_valuesCount; ++index)
|
||||
{
|
||||
if (GetUInt32Value(index) != 0 && updateVisualBits.GetBit(index))
|
||||
updateMask->SetBit(index);
|
||||
|
|
@ -19753,7 +19753,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
|
|||
|
||||
uint8 GemColor = gemProperty->color;
|
||||
|
||||
for (uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1)
|
||||
for (uint8 b = 0, tmpcolormask = 1; b < 4; ++b, tmpcolormask <<= 1)
|
||||
{
|
||||
if (tmpcolormask & GemColor)
|
||||
++curcount[b];
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static bool findtoknth(std::string& str, int n, std::string::size_type& s, std::
|
|||
{
|
||||
int i; s = e = 0;
|
||||
std::string::size_type size = str.size();
|
||||
for (i = 1; s < size && i < n; s++) if (str[s] == ' ') ++i;
|
||||
for (i = 1; s < size && i < n; ++s) if (str[s] == ' ') ++i;
|
||||
if (i < n)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ void WorldSession::HandleQueryQuestsCompletedOpcode(WorldPacket& /*recv_data */)
|
|||
if (itr->second.m_rewarded)
|
||||
{
|
||||
data << uint32(itr->first);
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
data.put<uint32>(0, count);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ void ReputationMgr::SendInitialReputations()
|
|||
for (FactionStateList::iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
|
||||
{
|
||||
// fill in absent fields
|
||||
for (; a != itr->first; a++)
|
||||
for (; a != itr->first; ++a)
|
||||
{
|
||||
data << uint8(0x00);
|
||||
data << uint32(0x00000000);
|
||||
|
|
@ -179,7 +179,7 @@ void ReputationMgr::SendInitialReputations()
|
|||
}
|
||||
|
||||
// fill in absent fields
|
||||
for (; a != 128; a++)
|
||||
for (; a != 128; ++a)
|
||||
{
|
||||
data << uint8(0x00);
|
||||
data << uint32(0x00000000);
|
||||
|
|
@ -207,7 +207,7 @@ void ReputationMgr::Initialize()
|
|||
m_reveredFactionCount = 0;
|
||||
m_exaltedFactionCount = 0;
|
||||
|
||||
for (unsigned int i = 1; i < sFactionStore.GetNumRows(); i++)
|
||||
for (unsigned int i = 1; i < sFactionStore.GetNumRows(); ++i)
|
||||
{
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(i);
|
||||
|
||||
|
|
|
|||
|
|
@ -327,9 +327,9 @@ PlayerSocial* SocialMgr::LoadFromDB(QueryResult* result, ObjectGuid guid)
|
|||
social->m_playerSocialMap[friend_guid] = FriendInfo(flags, note);
|
||||
|
||||
if (flags & SOCIAL_FLAG_IGNORED)
|
||||
ignoreCounter++;
|
||||
++ignoreCounter;
|
||||
else
|
||||
friendCounter++;
|
||||
++friendCounter;
|
||||
}
|
||||
while (result->NextRow());
|
||||
delete result;
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ class Spell
|
|||
if (m_delayAtDamageCount >= 2)
|
||||
return true;
|
||||
|
||||
m_delayAtDamageCount++;
|
||||
++m_delayAtDamageCount;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4811,7 +4811,7 @@ void Aura::HandleModThreat(bool apply, bool Real)
|
|||
m_modifier.m_amount += multiplier * level_diff;
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
for (int8 x = 0; x < MAX_SPELL_SCHOOL; x++)
|
||||
for (int8 x = 0; x < MAX_SPELL_SCHOOL; ++x)
|
||||
if (m_modifier.m_miscvalue & int32(1 << x))
|
||||
ApplyPercentModFloatVar(target->m_threatModifier[x], float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
|
@ -5631,7 +5631,7 @@ void Aura::HandlePeriodicHealthFunnel(bool apply, bool /*Real*/)
|
|||
|
||||
void Aura::HandleAuraModResistanceExclusive(bool apply, bool /*Real*/)
|
||||
{
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; ++x)
|
||||
{
|
||||
if (m_modifier.m_miscvalue & int32(1 << x))
|
||||
{
|
||||
|
|
@ -5644,7 +5644,7 @@ void Aura::HandleAuraModResistanceExclusive(bool apply, bool /*Real*/)
|
|||
|
||||
void Aura::HandleAuraModResistance(bool apply, bool /*Real*/)
|
||||
{
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; ++x)
|
||||
{
|
||||
if (m_modifier.m_miscvalue & int32(1 << x))
|
||||
{
|
||||
|
|
@ -5666,7 +5666,7 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool /*Real*/)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; x++)
|
||||
for (int8 x = SPELL_SCHOOL_NORMAL; x < MAX_SPELL_SCHOOL; ++x)
|
||||
{
|
||||
if (m_modifier.m_miscvalue & int32(1 << x))
|
||||
GetTarget()->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), BASE_PCT, float(m_modifier.m_amount), apply);
|
||||
|
|
@ -5678,7 +5678,7 @@ void Aura::HandleModResistancePercent(bool apply, bool /*Real*/)
|
|||
{
|
||||
Unit* target = GetTarget();
|
||||
|
||||
for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
|
||||
for (int8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
{
|
||||
if (m_modifier.m_miscvalue & int32(1 << i))
|
||||
{
|
||||
|
|
@ -5703,7 +5703,7 @@ void Aura::HandleModBaseResistance(bool apply, bool /*Real*/)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
|
||||
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; ++i)
|
||||
if (m_modifier.m_miscvalue & (1 << i))
|
||||
GetTarget()->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(m_modifier.m_amount), apply);
|
||||
}
|
||||
|
|
@ -5721,7 +5721,7 @@ void Aura::HandleAuraModStat(bool apply, bool /*Real*/)
|
|||
return;
|
||||
}
|
||||
|
||||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
|
||||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
{
|
||||
// -1 or -2 is all stats ( misc < -2 checked in function beginning )
|
||||
if (m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue == i)
|
||||
|
|
@ -5825,7 +5825,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
|
|||
uint32 curHPValue = target->GetHealth();
|
||||
uint32 maxHPValue = target->GetMaxHealth();
|
||||
|
||||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; i++)
|
||||
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i)
|
||||
{
|
||||
if (m_modifier.m_miscvalue == i || m_modifier.m_miscvalue == -1)
|
||||
{
|
||||
|
|
@ -8405,7 +8405,7 @@ void Aura::HandleAuraAddMechanicAbilities(bool apply, bool Real)
|
|||
|
||||
// spell give the player a new castbar with some spells.. this is a clientside process..
|
||||
// serverside just needs to register the new spells so that player isn't kicked as cheater
|
||||
for (int i = 0; i < MAX_OVERRIDE_SPELLS; i++)
|
||||
for (int i = 0; i < MAX_OVERRIDE_SPELLS; ++i)
|
||||
if (uint32 spellId = spellSet->Spells[i])
|
||||
static_cast<Player*>(target)->addSpell(spellId, true, false, false, false);
|
||||
|
||||
|
|
@ -8414,7 +8414,7 @@ void Aura::HandleAuraAddMechanicAbilities(bool apply, bool Real)
|
|||
else
|
||||
{
|
||||
target->SetUInt16Value(PLAYER_FIELD_BYTES2, 0, 0);
|
||||
for (int i = 0; i < MAX_OVERRIDE_SPELLS; i++)
|
||||
for (int i = 0; i < MAX_OVERRIDE_SPELLS; ++i)
|
||||
if (uint32 spellId = spellSet->Spells[i])
|
||||
static_cast<Player*>(target)->removeSpell(spellId, false , false, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class MANGOS_DLL_SPEC SpellAuraHolder
|
|||
if (m_procCharges == 0)
|
||||
return false;
|
||||
|
||||
m_procCharges--;
|
||||
--m_procCharges;
|
||||
SendAuraUpdate(false);
|
||||
return m_procCharges == 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4153,7 +4153,7 @@ void Spell::EffectHeal(SpellEffectIndex /*eff_idx*/)
|
|||
{
|
||||
if (targetAura->GetSpellProto()->EffectApplyAuraName[idx] == SPELL_AURA_PERIODIC_HEAL)
|
||||
break;
|
||||
idx++;
|
||||
++idx;
|
||||
}
|
||||
|
||||
int32 tickheal = targetAura->GetModifier()->m_amount;
|
||||
|
|
|
|||
|
|
@ -2689,7 +2689,7 @@ void SpellMgr::LoadSpellChains()
|
|||
if (!talentInfo->RankID[1])
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; ++j)
|
||||
{
|
||||
uint32 spell_id = talentInfo->RankID[j];
|
||||
if (!spell_id)
|
||||
|
|
@ -3452,7 +3452,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
|||
++family_count;
|
||||
|
||||
spellSet.insert(PetLevelupSpellSet::value_type(spell->spellLevel, spell->Id));
|
||||
count++;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32>& mapids)
|
|||
keyFrames[j].distSinceStop = tmpDist;
|
||||
}
|
||||
|
||||
for (int i = int(keyFrames.size()) - 1; i >= 0; i--)
|
||||
for (int i = int(keyFrames.size()) - 1; i >= 0; --i)
|
||||
{
|
||||
int j = (i + (firstStop + 1)) % keyFrames.size();
|
||||
tmpDist += keyFrames[(j + 1) % keyFrames.size()].distFromPrev;
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ void WaypointManager::AddLastNode(uint32 id, float x, float y, float z, float o,
|
|||
/// - Insert after a certain point
|
||||
void WaypointManager::AddAfterNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid)
|
||||
{
|
||||
for (uint32 i = GetLastPoint(id, 0); i > point; i--)
|
||||
for (uint32 i = GetLastPoint(id, 0); i > point; --i)
|
||||
WorldDatabase.PExecuteLog("UPDATE creature_movement SET point=point+1 WHERE id=%u AND point=%u", id, i);
|
||||
|
||||
_addNode(id, point + 1, x, y, z, o, delay, wpGuid);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
|
|||
Vector3 d(gridBox.hi - gridBox.lo);
|
||||
if (d.x < 0 || d.y < 0 || d.z < 0)
|
||||
throw std::logic_error("negative node extents");
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (nodeBox.hi[i] < gridBox.lo[i] || nodeBox.lo[i] > gridBox.hi[i])
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
|
|||
if (center <= split)
|
||||
{
|
||||
// stay left
|
||||
i++;
|
||||
++i;
|
||||
if (clipL < maxb)
|
||||
clipL = maxb;
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
|
|||
int t = dat.indices[i];
|
||||
dat.indices[i] = dat.indices[right];
|
||||
dat.indices[right] = t;
|
||||
right--;
|
||||
--right;
|
||||
if (clipR > minb)
|
||||
clipR = minb;
|
||||
}
|
||||
|
|
@ -198,7 +198,7 @@ void BIH::subdivide(int left, int right, std::vector<uint32>& tempTree, buildDat
|
|||
tempTree[nodeIndex + 2] = floatToRawIntBits(prevClip);
|
||||
}
|
||||
// count stats for the unused leaf
|
||||
depth++;
|
||||
++depth;
|
||||
stats.updateLeaf(depth, 0);
|
||||
// now we keep going as we are, with a new nodeIndex:
|
||||
nodeIndex = nextIndex;
|
||||
|
|
@ -281,7 +281,7 @@ bool BIH::readFromFile(FILE* rf)
|
|||
|
||||
void BIH::BuildStats::updateLeaf(int depth, int n)
|
||||
{
|
||||
numLeaves++;
|
||||
++numLeaves;
|
||||
minDepth = std::min(depth, minDepth);
|
||||
maxDepth = std::max(depth, maxDepth);
|
||||
sumDepth += depth;
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ class BIH
|
|||
stack[stackPos].node = back;
|
||||
stack[stackPos].tnear = (tb >= intervalMin) ? tb : intervalMin;
|
||||
stack[stackPos].tfar = intervalMax;
|
||||
stackPos++;
|
||||
++stackPos;
|
||||
// update ray interval for front node
|
||||
intervalMax = (tf <= intervalMax) ? tf : intervalMax;
|
||||
continue;
|
||||
|
|
@ -247,7 +247,7 @@ class BIH
|
|||
if (stackPos == 0)
|
||||
return;
|
||||
// move back up the stack
|
||||
stackPos--;
|
||||
--stackPos;
|
||||
intervalMin = stack[stackPos].tnear;
|
||||
if (maxDist < intervalMin)
|
||||
continue;
|
||||
|
|
@ -303,7 +303,7 @@ class BIH
|
|||
// point is in both nodes
|
||||
// push back right node
|
||||
stack[stackPos].node = right;
|
||||
stackPos++;
|
||||
++stackPos;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
|
@ -336,7 +336,7 @@ class BIH
|
|||
if (stackPos == 0)
|
||||
return;
|
||||
// move back up the stack
|
||||
stackPos--;
|
||||
--stackPos;
|
||||
node = stack[stackPos].node;
|
||||
}
|
||||
}
|
||||
|
|
@ -386,8 +386,8 @@ class BIH
|
|||
for (int i = 0; i < 6; ++i) numLeavesN[i] = 0;
|
||||
}
|
||||
|
||||
void updateInner() { numNodes++; }
|
||||
void updateBVH2() { numBVH2++; }
|
||||
void updateInner() { ++numNodes; }
|
||||
void updateBVH2() { ++numBVH2; }
|
||||
void updateLeaf(int depth, int n);
|
||||
void printStats();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ namespace VMAP
|
|||
|
||||
// temporary use defines to simplify read/check code (close file and return at fail)
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { \
|
||||
fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); }readOperation++;
|
||||
fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); } ++readOperation;
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { \
|
||||
fclose(rf); printf("cmpfail, %s!=%s\n", V, S);return(false); }
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ namespace VMAP
|
|||
return false;
|
||||
}
|
||||
|
||||
for (uint32 i = 0, indexNo = 0; indexNo < nvectors; indexNo++, i += 3)
|
||||
for (uint32 i = 0, indexNo = 0; indexNo < nvectors; ++indexNo, i += 3)
|
||||
{
|
||||
Vector3 v = Vector3(vectorarray[i + 0], vectorarray[i + 1], vectorarray[i + 2]);
|
||||
v = modelPosition.transform(v);
|
||||
|
|
@ -369,7 +369,7 @@ namespace VMAP
|
|||
|
||||
// temporary use defines to simplify read/check code (close file and return at fail)
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { \
|
||||
fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); }readOperation++;
|
||||
fclose(rf); printf("readfail, op = %i\n", readOperation); return(false); } ++readOperation;
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { \
|
||||
fclose(rf); printf("cmpfail, %s!=%s\n", V, S);return(false); }
|
||||
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ void CliRunnable::run()
|
|||
char* command_str = fgets(commandbuf, sizeof(commandbuf), stdin);
|
||||
if (command_str != NULL)
|
||||
{
|
||||
for (int x = 0; command_str[x]; x++)
|
||||
for (int x = 0; command_str[x]; ++x)
|
||||
if (command_str[x] == '\r' || command_str[x] == '\n')
|
||||
{
|
||||
command_str[x] = 0;
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_putindependent(struct soap* soap)
|
|||
int i;
|
||||
struct soap_plist* pp;
|
||||
if (soap->version == 1 && soap->encodingStyle && !(soap->mode & (SOAP_XML_TREE | SOAP_XML_GRAPH)))
|
||||
for (i = 0; i < SOAP_PTRHASH; i++)
|
||||
for (i = 0; i < SOAP_PTRHASH; ++i)
|
||||
for (pp = soap->pht[i]; pp; pp = pp->next)
|
||||
if (pp->mark1 == 2 || pp->mark2 == 2)
|
||||
if (soap_putelement(soap, pp->ptr, "id", pp->id, pp->type))
|
||||
|
|
@ -595,55 +595,55 @@ SOAP_FMAC3 struct SOAP_ENV__Fault* SOAP_FMAC4 soap_in_SOAP_ENV__Fault(struct soa
|
|||
if (soap_flag_faultcode && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in__QName(soap, "faultcode", &a->faultcode, ""))
|
||||
{
|
||||
soap_flag_faultcode--;
|
||||
--soap_flag_faultcode;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_faultstring && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "faultstring", &a->faultstring, "xsd:string"))
|
||||
{
|
||||
soap_flag_faultstring--;
|
||||
--soap_flag_faultstring;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_faultactor && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "faultactor", &a->faultactor, "xsd:string"))
|
||||
{
|
||||
soap_flag_faultactor--;
|
||||
--soap_flag_faultactor;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_detail && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerToSOAP_ENV__Detail(soap, "detail", &a->detail, ""))
|
||||
{
|
||||
soap_flag_detail--;
|
||||
--soap_flag_detail;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Code && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Code", &a->SOAP_ENV__Code, ""))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Code--;
|
||||
--soap_flag_SOAP_ENV__Code;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Reason && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerToSOAP_ENV__Reason(soap, "SOAP-ENV:Reason", &a->SOAP_ENV__Reason, ""))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Reason--;
|
||||
--soap_flag_SOAP_ENV__Reason;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Node && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "SOAP-ENV:Node", &a->SOAP_ENV__Node, "xsd:string"))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Node--;
|
||||
--soap_flag_SOAP_ENV__Node;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Role && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "SOAP-ENV:Role", &a->SOAP_ENV__Role, "xsd:string"))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Role--;
|
||||
--soap_flag_SOAP_ENV__Role;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Detail && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerToSOAP_ENV__Detail(soap, "SOAP-ENV:Detail", &a->SOAP_ENV__Detail, ""))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Detail--;
|
||||
--soap_flag_SOAP_ENV__Detail;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
@ -765,7 +765,7 @@ SOAP_FMAC3 struct SOAP_ENV__Reason* SOAP_FMAC4 soap_in_SOAP_ENV__Reason(struct s
|
|||
if (soap_flag_SOAP_ENV__Text && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "SOAP-ENV:Text", &a->SOAP_ENV__Text, "xsd:string"))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Text--;
|
||||
--soap_flag_SOAP_ENV__Text;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
@ -896,7 +896,7 @@ SOAP_FMAC3 struct SOAP_ENV__Detail* SOAP_FMAC4 soap_in_SOAP_ENV__Detail(struct s
|
|||
if (soap_flag___any && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_inliteral(soap, "-any", &a->__any))
|
||||
{
|
||||
soap_flag___any--;
|
||||
--soap_flag___any;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
@ -1023,13 +1023,13 @@ SOAP_FMAC3 struct SOAP_ENV__Code* SOAP_FMAC4 soap_in_SOAP_ENV__Code(struct soap*
|
|||
if (soap_flag_SOAP_ENV__Value && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in__QName(soap, "SOAP-ENV:Value", &a->SOAP_ENV__Value, ""))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Value--;
|
||||
--soap_flag_SOAP_ENV__Value;
|
||||
continue;
|
||||
}
|
||||
if (soap_flag_SOAP_ENV__Subcode && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerToSOAP_ENV__Code(soap, "SOAP-ENV:Subcode", &a->SOAP_ENV__Subcode, ""))
|
||||
{
|
||||
soap_flag_SOAP_ENV__Subcode--;
|
||||
--soap_flag_SOAP_ENV__Subcode;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
@ -1260,7 +1260,7 @@ SOAP_FMAC3 struct ns1__executeCommand* SOAP_FMAC4 soap_in_ns1__executeCommand(st
|
|||
if (soap_flag_command && (soap->error == SOAP_TAG_MISMATCH || soap->error == SOAP_NO_TAG))
|
||||
if (soap_in_string(soap, "command", &a->command, "xsd:string"))
|
||||
{
|
||||
soap_flag_command--;
|
||||
--soap_flag_command;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
@ -1378,7 +1378,7 @@ SOAP_FMAC3 struct ns1__executeCommandResponse* SOAP_FMAC4 soap_in_ns1__executeCo
|
|||
if (soap_flag_result && soap->error == SOAP_TAG_MISMATCH)
|
||||
if (soap_in_PointerTostring(soap, "result", &a->result, "xsd:string"))
|
||||
{
|
||||
soap_flag_result--;
|
||||
--soap_flag_result;
|
||||
continue;
|
||||
}
|
||||
if (soap->error == SOAP_TAG_MISMATCH)
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ int PatchHandler::svc(void)
|
|||
|
||||
PatchCache::~PatchCache()
|
||||
{
|
||||
for (Patches::iterator i = patches_.begin(); i != patches_.end(); i++)
|
||||
for (Patches::iterator i = patches_.begin(); i != patches_.end(); ++i)
|
||||
delete i->second;
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ void PatchCache::LoadPatchMD5(const char* szFileName)
|
|||
|
||||
bool PatchCache::GetHash(const char* pat, ACE_UINT8 mymd5[MD5_DIGEST_LENGTH])
|
||||
{
|
||||
for (Patches::iterator i = patches_.begin(); i != patches_.end(); i++)
|
||||
for (Patches::iterator i = patches_.begin(); i != patches_.end(); ++i)
|
||||
if (!stricmp(pat, i->first.c_str()))
|
||||
{
|
||||
memcpy(mymd5, i->second->md5, MD5_DIGEST_LENGTH);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ void BigNumber::SetQword(uint64 val)
|
|||
void BigNumber::SetBinary(const uint8* bytes, int len)
|
||||
{
|
||||
uint8 t[1000];
|
||||
for (int i = 0; i < len; i++)
|
||||
for (int i = 0; i < len; ++i)
|
||||
t[i] = bytes[len - 1 - i];
|
||||
BN_bin2bn(t, len, _bn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ bool DBCFileLoader::Load(const char* filename, const char* fmt)
|
|||
|
||||
fieldsOffset = new uint32[fieldCount];
|
||||
fieldsOffset[0] = 0;
|
||||
for (uint32 i = 1; i < fieldCount; i++)
|
||||
for (uint32 i = 1; i < fieldCount; ++i)
|
||||
{
|
||||
fieldsOffset[i] = fieldsOffset[i - 1];
|
||||
if (fmt[i - 1] == 'b' || fmt[i - 1] == 'X') // byte fields
|
||||
|
|
@ -173,7 +173,7 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
|
|||
{
|
||||
uint32 maxi = 0;
|
||||
//find max index
|
||||
for (uint32 y = 0; y < recordCount; y++)
|
||||
for (uint32 y = 0; y < recordCount; ++y)
|
||||
{
|
||||
uint32 ind = getRecord(y).getUInt(i);
|
||||
if (ind > maxi)maxi = ind;
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ QueryNamedResult* MySQLConnection::QueryNamed(const char* sql)
|
|||
return NULL;
|
||||
|
||||
QueryFieldNames names(fieldCount);
|
||||
for (uint32 i = 0; i < fieldCount; i++)
|
||||
for (uint32 i = 0; i < fieldCount; ++i)
|
||||
names[i] = fields[i].name;
|
||||
|
||||
QueryResultMysql* queryResult = new QueryResultMysql(result, fields, rowCount, fieldCount);
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ QueryNamedResult* PostgreSQLConnection::QueryNamed(const char* sql)
|
|||
return NULL;
|
||||
|
||||
QueryFieldNames names(fieldCount);
|
||||
for (uint32 i = 0; i < fieldCount; i++)
|
||||
for (uint32 i = 0; i < fieldCount; ++i)
|
||||
names[i] = PQfname(result, i);
|
||||
|
||||
QueryResultPostgre* queryResult = new QueryResultPostgre(result, rowCount, fieldCount);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ QueryResultMysql::QueryResultMysql(MYSQL_RES* result, MYSQL_FIELD* fields, uint6
|
|||
mCurrentRow = new Field[mFieldCount];
|
||||
MANGOS_ASSERT(mCurrentRow);
|
||||
|
||||
for (uint32 i = 0; i < mFieldCount; i++)
|
||||
for (uint32 i = 0; i < mFieldCount; ++i)
|
||||
mCurrentRow[i].SetType(ConvertNativeType(fields[i].type));
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ bool QueryResultMysql::NextRow()
|
|||
return false;
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < mFieldCount; i++)
|
||||
for (uint32 i = 0; i < mFieldCount; ++i)
|
||||
mCurrentRow[i].SetValue(row[i]);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ QueryResultPostgre::QueryResultPostgre(PGresult* result, uint64 rowCount, uint32
|
|||
mCurrentRow = new Field[mFieldCount];
|
||||
MANGOS_ASSERT(mCurrentRow);
|
||||
|
||||
for (uint32 i = 0; i < mFieldCount; i++)
|
||||
for (uint32 i = 0; i < mFieldCount; ++i)
|
||||
mCurrentRow[i].SetType(ConvertNativeType(PQftype(result, i)));
|
||||
}
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ bool QueryResultPostgre::NextRow()
|
|||
}
|
||||
|
||||
char* pPQgetvalue;
|
||||
for (int j = 0; j < mFieldCount; j++)
|
||||
for (int j = 0; j < mFieldCount; ++j)
|
||||
{
|
||||
pPQgetvalue = PQgetvalue(mResult, mTableIndex, j);
|
||||
if (pPQgetvalue && !(*pPQgetvalue))
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ void SqlQueryHolder::SetResult(size_t index, QueryResult* result)
|
|||
|
||||
SqlQueryHolder::~SqlQueryHolder()
|
||||
{
|
||||
for (size_t i = 0; i < m_queries.size(); i++)
|
||||
for (size_t i = 0; i < m_queries.size(); ++i)
|
||||
{
|
||||
/// if the result was never used, free the resources
|
||||
/// results used already (getresult called) are expected to be deleted
|
||||
|
|
@ -215,7 +215,7 @@ bool SqlQueryHolderEx::Execute(SqlConnection* conn)
|
|||
LOCK_DB_CONN(conn);
|
||||
/// we can do this, we are friends
|
||||
std::vector<SqlQueryHolder::SqlResultPair>& queries = m_holder->m_queries;
|
||||
for (size_t i = 0; i < queries.size(); i++)
|
||||
for (size_t i = 0; i < queries.size(); ++i)
|
||||
{
|
||||
/// execute all queries in the holder and pass the results
|
||||
char const* sql = queries[i].first;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void BarGoLink::init(int row_count)
|
|||
#else
|
||||
printf("[");
|
||||
#endif
|
||||
for (int i = 0; i < indic_len; i++) printf(empty);
|
||||
for (int i = 0; i < indic_len; ++i) printf(empty);
|
||||
#ifdef _WIN32
|
||||
printf("\x3D 0%%\r\x3D");
|
||||
#else
|
||||
|
|
@ -97,8 +97,8 @@ void BarGoLink::step()
|
|||
#else
|
||||
printf("\r[");
|
||||
#endif
|
||||
for (i = 0; i < n; i++) printf(full);
|
||||
for (; i < indic_len; i++) printf(empty);
|
||||
for (i = 0; i < n; ++i) printf(full);
|
||||
for (; i < indic_len; ++i) printf(empty);
|
||||
float percent = (((float)n / (float)indic_len) * 100);
|
||||
#ifdef _WIN32
|
||||
printf("\x3D %i%% \r\x3D", (int)percent);
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ void WINAPI ServiceMain(DWORD argc, char* argv[])
|
|||
|
||||
GetModuleFileName(0, path, sizeof(path) / sizeof(path[0]));
|
||||
|
||||
for (i = 0; i < std::strlen(path); i++)
|
||||
for (i = 0; i < std::strlen(path); ++i)
|
||||
{
|
||||
if (path[i] == '\\') last_slash = i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ BOOL WheatyExceptionReport::GetLogicalAddress(
|
|||
// the linear address.
|
||||
for (unsigned i = 0;
|
||||
i < pNtHdr->FileHeader.NumberOfSections;
|
||||
i++, pSection++)
|
||||
++i, ++pSection)
|
||||
{
|
||||
DWORD_PTR sectionStart = pSection->VirtualAddress;
|
||||
DWORD_PTR sectionEnd = sectionStart
|
||||
|
|
@ -871,10 +871,10 @@ char* WheatyExceptionReport::DumpTypeIndex(
|
|||
pszCurrBuffer += sprintf(pszCurrBuffer, "\r\n");
|
||||
|
||||
// Iterate through each of the children
|
||||
for (unsigned i = 0; i < dwChildrenCount; i++)
|
||||
for (unsigned i = 0; i < dwChildrenCount; ++i)
|
||||
{
|
||||
// Add appropriate indentation level (since this routine is recursive)
|
||||
for (unsigned j = 0; j <= nestingLevel + 1; j++)
|
||||
for (unsigned j = 0; j <= nestingLevel + 1; ++j)
|
||||
pszCurrBuffer += sprintf(pszCurrBuffer, "\t");
|
||||
|
||||
// Recurse for each of the child types
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12065"
|
||||
#define REVISION_NR "12066"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue