game: fix SMSG_SPELL_GO miss-entry consumption in WotLK and TBC parsers

Both SpellGoParser::parse (WotLK) and TbcPacketParsers::parseSpellGo
(TBC) read missCount but did not consume the per-miss (guid + missType)
entries that follow, leaving unread bytes in the packet and silently
corrupting any subsequent parsing of cast-flags–gated spell data.

- Add SpellGoMissEntry{targetGuid, missType} and missTargets vector
  to SpellGoData
- WotLK parser now reads packed GUIDs + missType per miss entry
- TBC parser now reads full uint64 GUIDs + missType per miss entry
  (9 bytes per entry, bounds-checked)
- handleSpellGo now shows MISS/DODGE/PARRY/BLOCK combat text
  for each missed target when the local player cast the spell,
  complementing the existing SMSG_SPELLLOGMISS path
- Remove unused foliageLikeModel variable in m2_renderer pass-2 loop
  (fix unused-variable warning)
- Update smoke model comment in m2_renderer to reflect current state
This commit is contained in:
Kelsi 2026-03-09 23:00:21 -07:00
parent 06a628dae2
commit 6951b7803d
5 changed files with 42 additions and 4 deletions

View file

@ -1766,6 +1766,11 @@ public:
};
/** SMSG_SPELL_GO data (simplified) */
struct SpellGoMissEntry {
uint64_t targetGuid = 0;
uint8_t missType = 0; // 0=MISS 1=DODGE 2=PARRY 3=BLOCK 4=EVADE 5=IMMUNE 6=DEFLECT 7=ABSORB 8=RESIST
};
struct SpellGoData {
uint64_t casterGuid = 0;
uint64_t casterUnit = 0;
@ -1773,8 +1778,9 @@ struct SpellGoData {
uint32_t spellId = 0;
uint32_t castFlags = 0;
uint8_t hitCount = 0;
std::vector<uint64_t> hitTargets;
std::vector<uint64_t> hitTargets;
uint8_t missCount = 0;
std::vector<SpellGoMissEntry> missTargets;
bool isValid() const { return spellId != 0; }
};