[DiscordArchive] So still at this reading of the CDatastore. I've been studying the Wpp and I've trying to read the p
[DiscordArchive] So still at this reading of the CDatastore. I've been studying the Wpp and I've trying to read the p
Archived author: _mrfade_ • Posted: 2024-08-18T14:22:32.497000+00:00
Original source
So still at this reading of the CDatastore. I've been studying the Wpp and I've trying to read the packet.ReadPackedGuid() :
https://github.com/TrinityCore/WowPacket...r.cs#L1348
I am just wondering if Ymir chops out the first 12~ bytes of the buffer for the OPcode so the binary read actually starts at pos 12 ?
Archived author: _mrfade_ • Posted: 2024-08-18T14:23:07.028000+00:00
Original source
```
Data stored in the CDataStore [101]f 0 0 0 2a e8 a1 b7 8a 26 f3 a0 9f d8 7f 79 18 3a f e0 4e df 94 5 94 45 8 0 8 0 0 0 2 0 0 0 0 0 0 8e 41 25 12 7d 2d 13 c6 61 c8 a 43 31 6f 6a 42 bd 8f b3 40 e4 7c 6 bf 0 0 0 0 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 80 92 5b 48 3f e8 59 1f bf 0 0 0 0 89 58 db 6
OPcode : 3a18
Binary-Reader Pos : 12
Player GUID : df4ee00f
Binary-Reader Pos : 13
```
Archived author: _mrfade_ • Posted: 2024-08-18T14:23:44.152000+00:00
Original source
This is just my attempt at the packed read :
```cpp
static uint64_t ReadPackedUInt64(MemoryReader reader, uint8_t mask)
{
if (mask == 0) {
return 0;
}
uint64_t res = 0;
int i = 0;
while (i < 8) {
if ((mask & (1 << i)) != 0) {
res += static_cast<uint64_t>(reader.ReadByte()) << (i * 8);
}
++i;
}
return res;
}
```