mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: consume SpellCastTargets bytes after miss list in Classic/TBC SpellGo
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Added skipClassicSpellCastTargets() and skipTbcSpellCastTargets() calls in parseSpellGo() for both expansions, matching the same fix applied to WotLK SpellGoParser and both SpellStartParsers. Prevents packet stream misalignment for ground-targeted and AoE spells (Blizzard, Rain of Fire, Flamestrike, etc.) where the server appends DEST_LOCATION or other target fields after the hit/miss lists.
This commit is contained in:
parent
6f936f258f
commit
87cb293297
2 changed files with 8 additions and 0 deletions
|
|
@ -762,6 +762,10 @@ bool ClassicPacketParsers::parseSpellGo(network::Packet& packet, SpellGoData& da
|
|||
return false;
|
||||
}
|
||||
|
||||
// SpellCastTargets follows the miss list — consume all target bytes so that
|
||||
// any subsequent fields (e.g. castFlags extras) are not misaligned.
|
||||
skipClassicSpellCastTargets(packet, &data.targetGuid);
|
||||
|
||||
LOG_DEBUG("[Classic] Spell go: spell=", data.spellId, " hits=", (int)data.hitCount,
|
||||
" misses=", (int)data.missCount);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1423,6 +1423,10 @@ bool TbcPacketParsers::parseSpellGo(network::Packet& packet, SpellGoData& data)
|
|||
}
|
||||
data.missCount = static_cast<uint8_t>(data.missTargets.size());
|
||||
|
||||
// SpellCastTargets follows the miss list — consume all target bytes so that
|
||||
// any subsequent fields are not misaligned for ground-targeted AoE spells.
|
||||
skipTbcSpellCastTargets(packet, &data.targetGuid);
|
||||
|
||||
LOG_DEBUG("[TBC] Spell go: spell=", data.spellId, " hits=", (int)data.hitCount,
|
||||
" misses=", (int)data.missCount);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue