mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Fix AURA_UPDATE_ALL parsing of per-effect amounts
Only read effect amount int32 for active effect indices (flags 0x01, 0x02, 0x04) instead of always reading 3. The over-read desynchronized the packet position, corrupting subsequent aura slots in ALL updates.
This commit is contained in:
parent
94d544a8a7
commit
393aca3864
1 changed files with 6 additions and 4 deletions
|
|
@ -2079,11 +2079,13 @@ bool AuraUpdateParser::parse(network::Packet& packet, AuraUpdateData& data, bool
|
||||||
aura.durationMs = static_cast<int32_t>(packet.readUInt32());
|
aura.durationMs = static_cast<int32_t>(packet.readUInt32());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aura.flags & 0x40) { // EFFECT_AMOUNTS - skip
|
if (aura.flags & 0x40) { // EFFECT_AMOUNTS
|
||||||
// 3 effect amounts
|
// Only read amounts for active effect indices (flags 0x01, 0x02, 0x04)
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
if (packet.getReadPos() < packet.getSize()) {
|
if (aura.flags & (1 << i)) {
|
||||||
packet.readUInt32();
|
if (packet.getReadPos() < packet.getSize()) {
|
||||||
|
packet.readUInt32();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue