Ejemplo n.º 1
0
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
{
    ObjectGuid guid;
    recv_data >> guid;
    uint32 bytesLeft = recv_data.wpos() - recv_data.rpos();

    sLog.outDebug("Received CMSG_NAME_QUERY from %s. Guid %s bytesleft %u.",
        _player->GetGuidStr().c_str(), guid.GetString().c_str(), bytesLeft);

    switch (bytesLeft)
    {
        case 4:
        {
            uint32 realmId;
            recv_data >> realmId;
            if (!realmId)
                realmId = realmID;

            // actually will never happen
            if (realmID != realmId)
            {
                sLog.outError("Warning! Quering players from other realms is not supported. Queried realm id: %u This realm id: %u Guid: %s",
                    realmId, realmID, guid.GetString().c_str());

                WorldPacket data(SMSG_NAME_QUERY_RESPONSE, 9);
                data << guid.WriteAsPacked();
                data << uint8(1);
                SendPacket(&data);
                return;
            }

            Player* pChar = sObjectMgr.GetPlayer(guid);
            if (pChar)
                SendNameQueryOpcode(pChar, realmId);
            else
                SendNameQueryOpcodeFromDB(guid, realmId);
            break;
        }
        case 8:
        {
            uint64 unk64;
            recv_data >> unk64;
            sLog.outDebug("Received unhandled CMSG_NAME_QUERY with uint64 value " UI64FMTD, unk64);
            break;
        }
        case 12:
        {
            uint32 unk32;
            uint64 unk64;
            recv_data >> unk32 >> unk64;
            sLog.outDebug("Received unhandled CMSG_NAME_QUERY with int32 value %u and uint64 value " UI64FMTD, unk32, unk64);
            break;
        }
    }
}
Ejemplo n.º 2
0
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
{
    uint64 guid;

    recv_data >> guid;

    if (Player *pChar = ObjectAccessor::FindPlayer(guid))
        SendNameQueryOpcode(pChar);
    else
        SendNameQueryOpcodeFromDB(guid);
}
Ejemplo n.º 3
0
void WorldSession::HandleNameQueryOpcode(WorldPacket & recv_data) {
	uint64 guid;

	recv_data >> guid;

	Player *pChar = sObjectMgr->GetPlayer(guid);

	if (pChar)
		SendNameQueryOpcode(pChar);
	else
		SendNameQueryOpcodeFromDB(guid);
}
Ejemplo n.º 4
0
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
{
    ObjectGuid guid;

    recv_data >> guid;

    Player* pChar = sObjectMgr.GetPlayer(guid);

    if (pChar)
        { SendNameQueryOpcode(pChar); }
    else
        { SendNameQueryOpcodeFromDB(guid); }
}
Ejemplo n.º 5
0
void WorldSession::HandleNameQueryOpcode( WorldPacket & recv_data )
{
    ObjectGuid guid;

    recv_data >> guid;

    Player *pChar = sObjectMgr.GetPlayer(guid);
    if (pChar)
        SendNameQueryOpcode(pChar);
    else
        if (guid!=auctionbot.GetAHBObjectGuid().GetRawValue())
            SendNameQueryOpcodeFromDB(guid);
        else
            SendFakeNameForAHBotQueryOPcode();
}
Ejemplo n.º 6
0
void WorldSession::HandleNameQueryOpcode( WorldPacket & recv_data )
{
    CHECK_PACKET_SIZE(recv_data, 8);

    uint64 guid;

    recv_data >> guid;

    Player *pChar = objmgr.GetPlayer(guid);

    if (pChar)
        SendNameQueryOpcode(pChar);
    else
        SendNameQueryOpcodeFromDB(guid);
}