I did, need test.
diff --git a/src/game/ChatHandler.cpp b/src/game/ChatHandler.cpp
index 0d80814..cca4e42 100644
--- a/src/game/ChatHandler.cpp
+++ b/src/game/ChatHandler.cpp
@@ -198,10 +198,15 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
{
- WorldPacket data(SMSG_CHAT_PLAYER_NOT_FOUND, (to.size()+1));
- data<<to;
- SendPacket(&data);
- return;
+ QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM characters WHERE name = '%s' AND online > 1", to.c_str());
+ if (!result)
+ {
+ WorldPacket data(SMSG_CHAT_PLAYER_NOT_FOUND, (to.size()+1));
+ data<<to;
+ SendPacket(&data);
+ }
+ return;
+ delete result;
}
if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER )
diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp
index 75a9798..97d5168 100644
--- a/src/game/MiscHandler.cpp
+++ b/src/game/MiscHandler.cpp
@@ -157,9 +157,9 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
continue;
}
- // do not process players which are not in world
+ /* // do not process players which are not in world
if(!(itr->second->IsInWorld()))
- continue;
+ continue; */
// check if target is globally visible for player
if (!(itr->second->IsVisibleGloballyFor(_player)))
@@ -247,6 +247,38 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
if ((++clientcount) == 49)
break;
}
+ if (clientcount < 49)
+ {
+ // Fake players on WHO LIST 0, 1, 2, 3, 4, 5 6
+ QueryResult *result = CharacterDatabase.Query("SELECT guid,name,race,class,level,zone,gender FROM characters WHERE online>1");
+ if (result)
+ {
+ do
+ {
+ Field *fields = result->Fetch();
+
+ std::string pname = fields[1].GetCppString();
+ std::string gname;
+ uint8 lvl = fields[4].GetUInt8();
+ uint32 class_ = fields[3].GetUInt32();
+ uint32 race = fields[2].GetUInt32();
+ uint32 pzoneid = fields[5].GetUInt32();
+ uint8 gender = fields[6].GetUInt8();
+
+ data << pname; // player name
+ data << gname; // guild name
+ data << uint32(lvl); // player level
+ data << uint32(class_); // player class
+ data << uint32(race); // player race
+ data << uint8(gender); // player gender
+ data << uint32(pzoneid); // player zone id
+
+ if ((++clientcount) == 49)
+ break;
+ } while (result->NextRow());
+ }
+ delete result;
+ }
uint32 count = m.size();
data.put( 0, clientcount ); // insert right count, listed count
add
Compiled without errors, but not show fake player in who list. May be classic has another pocket structure.