TrinityCore / WowPacketParser

World of Warcraft Packet Parser
GNU General Public License v3.0
410 stars 352 forks source link

Protobuf output: don't set SpellStart/SpellGo struct before the packet is read #793

Closed BAndysc closed 10 months ago

BAndysc commented 10 months ago

This PR modifies the order in which the SpellStart/SpellGo properties are assigned within the protobuf output. Before the change, the property was set, then parsing was done. When an exception occurs within the parsing code, the property is in a weird state - the spell start/go is not null, but the data inside is.

After the change, the value is assigned only after the packet is parsed.