mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 16:23:52 +00:00
Vanilla/Turtle WoW compatibility: fix UPDATE_OBJECT, chat, equipment, creatures
- Route SMSG_UPDATE_OBJECT through polymorphic parsers for correct vanilla format (uint8 updateFlags, 6 speeds vs WotLK uint16/9) - Fix SMSG_DESTROY_OBJECT for vanilla (8 bytes, no isDeath field) - Add MSG_MOVE_* handlers for other player movement relay - Add ClassicPacketParsers::parseMessageChat with targetGuid read and monster-type name handling - Resolve chat sender names from player name cache before display - Fix CSV DBC field 0 always treated as numeric ID (fixes 16+ garbled Turtle CSVs including Map, AreaTable, Spell, CreatureDisplayInfo) - Add CSV DBC validation: reject garbled CSVs (>80% zero IDs) and fall back to binary DBC files - Fix ItemDisplayInfo texture component field index (14+ not 15+) for binary DBC with gender-aware suffix resolution - Spawn other players as visible M2 models via creature callback - Map name cache dedup prevents overwrites from duplicate CSV records
This commit is contained in:
parent
430c2bdcfa
commit
fb0ae26fe6
13 changed files with 689 additions and 106 deletions
|
|
@ -395,12 +395,51 @@ bool TbcPacketParsers::parseUpdateObject(network::Packet& packet, UpdateObjectDa
|
|||
}
|
||||
}
|
||||
|
||||
// Parse update blocks
|
||||
// Parse update blocks — dispatching movement via virtual parseMovementBlock()
|
||||
data.blocks.reserve(data.blockCount);
|
||||
for (uint32_t i = 0; i < data.blockCount; ++i) {
|
||||
LOG_DEBUG("Parsing block ", i + 1, " / ", data.blockCount);
|
||||
UpdateBlock block;
|
||||
if (!UpdateObjectParser::parseUpdateBlock(packet, block)) {
|
||||
|
||||
// Read update type
|
||||
uint8_t updateTypeVal = packet.readUInt8();
|
||||
block.updateType = static_cast<UpdateType>(updateTypeVal);
|
||||
LOG_DEBUG("Update block: type=", (int)updateTypeVal);
|
||||
|
||||
bool ok = false;
|
||||
switch (block.updateType) {
|
||||
case UpdateType::VALUES: {
|
||||
block.guid = UpdateObjectParser::readPackedGuid(packet);
|
||||
ok = UpdateObjectParser::parseUpdateFields(packet, block);
|
||||
break;
|
||||
}
|
||||
case UpdateType::MOVEMENT: {
|
||||
block.guid = UpdateObjectParser::readPackedGuid(packet);
|
||||
ok = this->parseMovementBlock(packet, block);
|
||||
break;
|
||||
}
|
||||
case UpdateType::CREATE_OBJECT:
|
||||
case UpdateType::CREATE_OBJECT2: {
|
||||
block.guid = UpdateObjectParser::readPackedGuid(packet);
|
||||
uint8_t objectTypeVal = packet.readUInt8();
|
||||
block.objectType = static_cast<ObjectType>(objectTypeVal);
|
||||
ok = this->parseMovementBlock(packet, block);
|
||||
if (ok) {
|
||||
ok = UpdateObjectParser::parseUpdateFields(packet, block);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case UpdateType::OUT_OF_RANGE_OBJECTS:
|
||||
case UpdateType::NEAR_OBJECTS:
|
||||
ok = true;
|
||||
break;
|
||||
default:
|
||||
LOG_WARNING("Unknown update type: ", (int)updateTypeVal);
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
LOG_ERROR("Failed to parse update block ", i + 1);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue