rendered paste bodyIndex: src/game/MiscHandler.cpp===================================================================--- src/game/MiscHandler.cpp (Revision 3226)+++ src/game/MiscHandler.cpp (Arbeitskopie)@@ -51,10 +51,23 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data ) {- uint32 clientcount = 0;+ uint32 clientcount = 0, maxlvl, minlvl, classmask, racemask, unk1,unk2, zone;+ std::string SearchedName, SearchedGuild; sLog.outDebug( "WORLD: Recvd CMSG_WHO Message" ); + //FIXME: below only works when all parameters are given; catch special cases!+ recv_data.hexlike();+ recv_data >>minlvl;+ recv_data >>maxlvl;+ recv_data >>SearchedName;+ recv_data >>SearchedGuild; //does this just cycle till the zero termination? yes it does, see ByteBuffer.h:192+ recv_data >>classmask;+ recv_data >>racemask;+ recv_data >>unk1;+ recv_data >>zone;+ recv_data >>unk2;+ uint32 team = _player->GetTeam(); uint32 security = GetSecurity(); bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);@@ -69,10 +82,10 @@ { // PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters // MODERATOR, GAME MASTER, ADMINISTRATOR can see all- if( itr->second->GetName() &&+ if( itr->second->GetName()&&( itr->second->getLevel() <= maxlvl && itr->second->getLevel() >= minlvl))&& ( security > 0 || ( itr->second->GetTeam() == team || allowTwoSideWhoList ) &&- (itr->second->GetSession()->GetSecurity() == 0 || gmInWhoList && itr->second->isVisibleFor(_player,false) )))+ ( itr->second->GetSession()->GetSecurity() == 0 || gmInWhoList && itr->second->isVisibleFor(_player,false) ))) { clientcount++;