mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix name query parsing for Classic/TBC
This commit is contained in:
parent
bf39c0b900
commit
6af9d6ba2d
3 changed files with 86 additions and 2 deletions
|
|
@ -995,8 +995,10 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
case Opcode::SMSG_PERIODICAURALOG:
|
||||
case Opcode::SMSG_SPELLENERGIZELOG:
|
||||
case Opcode::SMSG_ENVIRONMENTALDAMAGELOG:
|
||||
break;
|
||||
|
||||
case Opcode::SMSG_LOOT_MONEY_NOTIFY: {
|
||||
// uint32 money + uint8 soleLooter
|
||||
// Format: uint32 money + uint8 soleLooter
|
||||
if (packet.getSize() - packet.getReadPos() >= 4) {
|
||||
uint32_t amount = packet.readUInt32();
|
||||
playerMoneyCopper_ += amount;
|
||||
|
|
@ -4873,7 +4875,10 @@ std::string GameHandler::getCachedCreatureName(uint32_t entry) const {
|
|||
|
||||
void GameHandler::handleNameQueryResponse(network::Packet& packet) {
|
||||
NameQueryResponseData data;
|
||||
if (!NameQueryResponseParser::parse(packet, data)) return;
|
||||
if (!packetParsers_ || !packetParsers_->parseNameQueryResponse(packet, data)) {
|
||||
LOG_WARNING("Failed to parse SMSG_NAME_QUERY_RESPONSE (size=", packet.getSize(), ")");
|
||||
return;
|
||||
}
|
||||
|
||||
pendingNameQueries.erase(data.guid);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue