D2GAME_PACKETS_SendPacket0xA0_A1_A2_6FC3D610 branches between 3 packets, one for 8bit, one for 16bit and one for 32bit values; however each of these packets has been typedefd to a shared packet, leading to incorrect sizes and value truncation:
|
using D2GSPacketSrvA0 = D2GSPacketSrvStatAndGuid; |
these require there own packets, or for the base packet to be a templated, eg:
template<typename T>
struct D2GSPacketSrvStatAndGuid //size of 0x08 (originally 0x07)
{
uint8_t nHeader; //0x00
PacketStatId nStat; //0x01
uint32_t dwGUID; //0x03 (Originally 0x02)
T nValue; //0x07 (Originally 0x06)
};
using D2GSPacketSrvA0 = D2GSPacketSrvStatAndGuid<uint32_t>;
using D2GSPacketSrvA1 = D2GSPacketSrvStatAndGuid<uint8_t>;
using D2GSPacketSrvA2 = D2GSPacketSrvStatAndGuid<uint16_t>;
D2GAME_PACKETS_SendPacket0xA0_A1_A2_6FC3D610branches between 3 packets, one for 8bit, one for 16bit and one for 32bit values; however each of these packets has beentypedefd to a shared packet, leading to incorrect sizes and value truncation:D2MOO/source/D2CommonDefinitions/include/D2PacketDef.h
Line 1961 in e430609
these require there own packets, or for the base packet to be a templated, eg: