net: fix SMSG_SPLINE_MOVE_UNSET_FLYING and parse UNROOT/UNSET_HOVER/WATER_WALK

Previously these four spline-move opcodes were silently consumed with
packet.setReadPos(getSize()), skipping even the packed-GUID read.

- SMSG_SPLINE_MOVE_UNSET_FLYING: now reads packed guid and fires
  unitMoveFlagsCallback_(guid, 0) to clear the flying animation state on
  nearby entities (counterpart to SMSG_SPLINE_MOVE_SET_FLYING).
- SMSG_SPLINE_MOVE_UNROOT, SMSG_SPLINE_MOVE_UNSET_HOVER,
  SMSG_SPLINE_MOVE_WATER_WALK: now properly parse the packed guid instead
  of consuming the full packet; no animation-state callback needed.
This commit is contained in:
Kelsi 2026-03-10 11:42:54 -07:00
parent 84558fda69
commit cfc6dc37c8

View file

@ -5165,11 +5165,22 @@ void GameHandler::handlePacket(network::Packet& packet) {
// ---- Spline move flag changes for other units ----
case Opcode::SMSG_SPLINE_MOVE_UNROOT:
case Opcode::SMSG_SPLINE_MOVE_UNSET_FLYING:
case Opcode::SMSG_SPLINE_MOVE_UNSET_HOVER:
case Opcode::SMSG_SPLINE_MOVE_WATER_WALK:
packet.setReadPos(packet.getSize());
case Opcode::SMSG_SPLINE_MOVE_WATER_WALK: {
// Minimal parse: PackedGuid only — no animation-relevant state change.
if (packet.getSize() - packet.getReadPos() >= 1) {
(void)UpdateObjectParser::readPackedGuid(packet);
}
break;
}
case Opcode::SMSG_SPLINE_MOVE_UNSET_FLYING: {
// PackedGuid + synthesised move-flags=0 → clears flying animation.
if (packet.getSize() - packet.getReadPos() < 1) break;
uint64_t guid = UpdateObjectParser::readPackedGuid(packet);
if (guid == 0 || guid == playerGuid || !unitMoveFlagsCallback_) break;
unitMoveFlagsCallback_(guid, 0u); // clear flying/CAN_FLY
break;
}
// ---- Quest failure notification ----
case Opcode::SMSG_QUESTGIVER_QUEST_FAILED: {