Beispiel #1
0
void GuildEventLogEntry::writeGuildLogPacket(WorldPacket& data, ByteBuffer& content) const
{
    ObjectGuid guid1 = MAKE_NEW_GUID(mPlayerGuid1, 0, HIGHGUID_TYPE_PLAYER);
    ObjectGuid guid2 = MAKE_NEW_GUID(mPlayerGuid2, 0, HIGHGUID_TYPE_PLAYER);

    data.writeBit(guid1[2]);
    data.writeBit(guid1[4]);
    data.writeBit(guid2[7]);
    data.writeBit(guid2[6]);
    data.writeBit(guid1[3]);
    data.writeBit(guid2[3]);
    data.writeBit(guid2[5]);
    data.writeBit(guid1[7]);
    data.writeBit(guid1[5]);
    data.writeBit(guid1[0]);
    data.writeBit(guid2[4]);
    data.writeBit(guid2[2]);
    data.writeBit(guid2[0]);
    data.writeBit(guid2[1]);
    data.writeBit(guid1[1]);
    data.writeBit(guid1[6]);

    content.WriteByteSeq(guid2[3]);
    content.WriteByteSeq(guid2[2]);
    content.WriteByteSeq(guid2[5]);

    content << uint8_t(mNewRank);

    content.WriteByteSeq(guid2[4]);
    content.WriteByteSeq(guid1[0]);
    content.WriteByteSeq(guid1[4]);

    content << uint32_t(::time(nullptr) - mTimestamp);

    content.WriteByteSeq(guid1[7]);
    content.WriteByteSeq(guid1[3]);
    content.WriteByteSeq(guid2[0]);
    content.WriteByteSeq(guid2[6]);
    content.WriteByteSeq(guid2[7]);
    content.WriteByteSeq(guid1[5]);

    content << uint8_t(mEventType);

    content.WriteByteSeq(guid2[1]);
    content.WriteByteSeq(guid1[2]);
    content.WriteByteSeq(guid1[6]);
    content.WriteByteSeq(guid1[1]);
}