mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7730] Some optimizantion and code style.
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
parent
a4373c887d
commit
8144f30199
69 changed files with 536 additions and 536 deletions
|
|
@ -99,7 +99,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
// recheck
|
||||
CHECK_PACKET_SIZE(recv_data,4+4+(player_name.size()+1)+(guild_name.size()+1)+4+4+4+(4*zones_count)+4);
|
||||
|
||||
for(uint32 i = 0; i < zones_count; i++)
|
||||
for(uint32 i = 0; i < zones_count; ++i)
|
||||
{
|
||||
uint32 temp;
|
||||
recv_data >> temp; // zone id, 0 if zone is unknown...
|
||||
|
|
@ -118,7 +118,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
sLog.outDebug("Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
|
||||
|
||||
std::wstring str[4]; // 4 is client limit
|
||||
for(uint32 i = 0; i < str_count; i++)
|
||||
for(uint32 i = 0; i < str_count; ++i)
|
||||
{
|
||||
// recheck (have one more byte)
|
||||
CHECK_PACKET_SIZE(recv_data,recv_data.rpos());
|
||||
|
|
@ -157,7 +157,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
|
||||
//TODO: Guard Player map
|
||||
HashMapHolder<Player>::MapType& m = ObjectAccessor::Instance().GetPlayers();
|
||||
for(HashMapHolder<Player>::MapType::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
for(HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||
{
|
||||
if (security == SEC_PLAYER)
|
||||
{
|
||||
|
|
@ -192,7 +192,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
uint32 pzoneid = itr->second->GetZoneId();
|
||||
|
||||
bool z_show = true;
|
||||
for(uint32 i = 0; i < zones_count; i++)
|
||||
for(uint32 i = 0; i < zones_count; ++i)
|
||||
{
|
||||
if(zoneids[i] == pzoneid)
|
||||
{
|
||||
|
|
@ -228,7 +228,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
|
|||
aname = areaEntry->area_name[GetSessionDbcLocale()];
|
||||
|
||||
bool s_show = true;
|
||||
for(uint32 i = 0; i < str_count; i++)
|
||||
for(uint32 i = 0; i < str_count; ++i)
|
||||
{
|
||||
if (!str[i].empty())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue