mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
refactor: derive turtle opcodes from classic
This commit is contained in:
parent
0b6265bc55
commit
6ede9a2968
12 changed files with 428 additions and 394 deletions
|
|
@ -2007,13 +2007,20 @@ bool TurtlePacketParsers::parseUpdateObject(network::Packet& packet, UpdateObjec
|
|||
}
|
||||
|
||||
bool TurtlePacketParsers::parseMonsterMove(network::Packet& packet, MonsterMoveData& data) {
|
||||
// Turtle realms can emit both vanilla-like and WotLK-like monster move bodies.
|
||||
// Try the canonical Turtle/vanilla parser first, then fall back to WotLK layout.
|
||||
// Turtle realms can emit vanilla-like, TBC-like, and WotLK-like monster move
|
||||
// bodies. Try the lower-expansion layouts first before the WotLK parser that
|
||||
// expects an extra unk byte after the packed GUID.
|
||||
size_t start = packet.getReadPos();
|
||||
if (MonsterMoveParser::parseVanilla(packet, data)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
packet.setReadPos(start);
|
||||
if (TbcPacketParsers::parseMonsterMove(packet, data)) {
|
||||
LOG_DEBUG("[Turtle] SMSG_MONSTER_MOVE parsed via TBC fallback layout");
|
||||
return true;
|
||||
}
|
||||
|
||||
auto looksLikeWotlkMonsterMove = [&](network::Packet& probe) -> bool {
|
||||
const size_t probeStart = probe.getReadPos();
|
||||
uint64_t guid = UpdateObjectParser::readPackedGuid(probe);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue