mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 15:20:15 +00:00
fix: correct SMSG_SPELL_GO REFLECT miss payload size (WotLK/TBC)
WotLK and TBC parsers were reading uint32+uint8 (5 bytes) for SPELL_MISS_REFLECT entries, but the server only sends uint8 reflectResult (1 byte). This caused a 4-byte misalignment after every reflected spell, corrupting subsequent miss entries and SpellCastTargets parsing. Classic parser was already correct.
This commit is contained in:
parent
25138b5648
commit
702155ff4f
2 changed files with 6 additions and 8 deletions
|
|
@ -1403,15 +1403,14 @@ bool TbcPacketParsers::parseSpellGo(network::Packet& packet, SpellGoData& data)
|
|||
SpellGoMissEntry m;
|
||||
m.targetGuid = packet.readUInt64(); // full GUID in TBC
|
||||
m.missType = packet.readUInt8();
|
||||
if (m.missType == 11) {
|
||||
if (packet.getReadPos() + 5 > packet.getSize()) {
|
||||
if (m.missType == 11) { // SPELL_MISS_REFLECT
|
||||
if (packet.getReadPos() + 1 > packet.getSize()) {
|
||||
LOG_WARNING("[TBC] Spell go: truncated reflect payload at miss index ", i,
|
||||
"/", (int)rawMissCount);
|
||||
truncatedTargets = true;
|
||||
break;
|
||||
}
|
||||
(void)packet.readUInt32();
|
||||
(void)packet.readUInt8();
|
||||
(void)packet.readUInt8(); // reflectResult
|
||||
}
|
||||
if (i < storedMissLimit) {
|
||||
data.missTargets.push_back(m);
|
||||
|
|
|
|||
|
|
@ -3912,14 +3912,13 @@ bool SpellGoParser::parse(network::Packet& packet, SpellGoData& data) {
|
|||
break;
|
||||
}
|
||||
m.missType = packet.readUInt8();
|
||||
if (m.missType == 11) {
|
||||
if (packet.getSize() - packet.getReadPos() < 5) {
|
||||
if (m.missType == 11) { // SPELL_MISS_REFLECT
|
||||
if (packet.getSize() - packet.getReadPos() < 1) {
|
||||
LOG_WARNING("Spell go: truncated reflect payload at miss index ", i, "/", (int)rawMissCount);
|
||||
truncatedTargets = true;
|
||||
break;
|
||||
}
|
||||
(void)packet.readUInt32();
|
||||
(void)packet.readUInt8();
|
||||
(void)packet.readUInt8(); // reflectResult
|
||||
}
|
||||
if (i < storedMissLimit) {
|
||||
data.missTargets.push_back(m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue