[7730] Some optimizantion and code style.

Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
zhenya 2009-04-28 21:03:25 +04:00 committed by AlexDereka
parent a4373c887d
commit 8144f30199
69 changed files with 536 additions and 536 deletions

View file

@ -44,7 +44,7 @@ Group::Group()
m_lootThreshold = ITEM_QUALITY_UNCOMMON;
m_subGroupsCounts = NULL;
for(int i=0; i<TARGETICONCOUNT; i++)
for (int i=0; i<TARGETICONCOUNT; ++i)
m_targetIcons[i] = 0;
}
@ -69,7 +69,7 @@ Group::~Group()
// it is undefined whether objectmgr (which stores the groups) or instancesavemgr
// will be unloaded first so we must be prepared for both cases
// this may unload some instance saves
for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
for(BoundInstancesMap::iterator itr2 = m_boundInstances[i].begin(); itr2 != m_boundInstances[i].end(); ++itr2)
itr2->second.save->RemoveGroup(this);
@ -154,7 +154,7 @@ bool Group::LoadGroupFromDB(const uint64 &leaderGuid, QueryResult *result, bool
m_looterGuid = MAKE_NEW_GUID((*result)[3].GetUInt32(), 0, HIGHGUID_PLAYER);
m_lootThreshold = (ItemQualities)(*result)[4].GetUInt16();
for(int i=0; i<TARGETICONCOUNT; i++)
for(int i=0; i<TARGETICONCOUNT; ++i)
m_targetIcons[i] = (*result)[5+i].GetUInt64();
if(!external) delete result;
@ -860,7 +860,7 @@ void Group::SetTargetIcon(uint8 id, uint64 guid)
// clean other icons
if( guid != 0 )
for(int i=0; i<TARGETICONCOUNT; i++)
for(int i=0; i<TARGETICONCOUNT; ++i)
if( m_targetIcons[i] == guid )
SetTargetIcon(i, 0);
@ -904,7 +904,7 @@ void Group::SendTargetIconList(WorldSession *session)
WorldPacket data(MSG_RAID_TARGET_UPDATE, (1+TARGETICONCOUNT*9));
data << (uint8)1;
for(int i=0; i<TARGETICONCOUNT; i++)
for(int i=0; i<TARGETICONCOUNT; ++i)
{
if(m_targetIcons[i] == 0)
continue;
@ -1079,7 +1079,7 @@ bool Group::_addMember(const uint64 &guid, const char* name, bool isAssistant, u
if(!isRaidGroup()) // reset targetIcons for non-raid-groups
{
for(int i=0; i<TARGETICONCOUNT; i++)
for(int i=0; i<TARGETICONCOUNT; ++i)
m_targetIcons[i] = 0;
}
@ -1158,7 +1158,7 @@ void Group::_setLeader(const uint64 &guid)
Player *player = objmgr.GetPlayer(slot->guid);
if(player)
{
for(uint8 i = 0; i < TOTAL_DIFFICULTIES; i++)
for(uint8 i = 0; i < TOTAL_DIFFICULTIES; ++i)
{
for(BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end();)
{