fix: consume all SpellCastTargets bytes in WotLK SpellGoParser

Applied the same SpellCastTargets fix from SpellStartParser (dd64724)
to SpellGoParser: after parsing hit/miss target lists, now reads the
full target section (UNIT/UNIT_MINIPET/CORPSE/GAMEOBJECT packed GUID,
ITEM/TRADE_ITEM packed GUID, SOURCE/DEST PackedGuid+3floats, null-
terminated STRING). Also adds targetGuid field to SpellGoData so
callers can read the primary target. Prevents stream misalignment on
ground-targeted AoE spells (e.g. Blizzard, Rain of Fire).
This commit is contained in:
Kelsi 2026-03-17 22:26:05 -07:00
parent dd64724dbb
commit 6f936f258f
2 changed files with 45 additions and 0 deletions

View file

@ -1875,6 +1875,7 @@ struct SpellGoData {
std::vector<uint64_t> hitTargets;
uint8_t missCount = 0;
std::vector<SpellGoMissEntry> missTargets;
uint64_t targetGuid = 0; ///< Primary target GUID from SpellCastTargets (0 = none/AoE)
bool isValid() const { return spellId != 0; }
};