WowPacketParser icon indicating copy to clipboard operation
WowPacketParser copied to clipboard

Wrong Map ID in the SQL

Open Killyana opened this issue 5 years ago • 10 comments

I parsed a sniff and the mapID returned in the sql was wrong for spawns ( 0 instead of 571):

(@CGUID+137, 30273, 0, 210, 4504, 1, 1, 0, 0, 0, 6347.772, 225.4826, 393.7119, 1.151917, 120, 10, 0, 0, 0, 1, 0, 0, 0, 12340), -- 30273 (Area: 4504 - Difficulty: 0) (possible waypoints or random movement)
(@OGUID+38, 192965, 0, 210, 4504, 1, 135, 0, 6392.244, 440.5654, 511.2919, -0.1027641, -0.105731, -0.06836033, -0.05852318, 0.9903145, 120, 255, 1, 12340), -- 192965 (Area: 4504 - Difficulty: 0)

Area and zone ID are correct

Killyana avatar Oct 21 '19 21:10 Killyana

Which patch or build does the sniff have?

mdX7 avatar Oct 21 '19 22:10 mdX7

3.3.5 12340 build

Killyana avatar Oct 21 '19 22:10 Killyana

bad news - mapid was added in 4.0.1 to updateobject, so we gotta hack a bit around to retrieve the map id. Like temporary saving the mapid after teleports and such.

https://github.com/TrinityCore/WowPacketParser/blob/3b2e80868c1097c1575139de05d51226fe7d8563/WowPacketParser/Parsing/Parsers/UpdateHandler.cs#L14-L20

mdX7 avatar Oct 27 '19 10:10 mdX7

MapID is also broken in text output. It stays 0, confirmed with 1.13 sniffs.

Kittnz avatar Nov 02 '19 14:11 Kittnz

Classic also giving 0? That's weird :/

funjoker avatar Dec 30 '19 08:12 funjoker

This might be the reason in pre-cata versions - CurrentMapId has ThreadStatic attribute so each thread has different value if you are using multithreaded parsing

https://github.com/TrinityCore/WowPacketParser/blob/b223e9fbba2f648baf983ff9b569165d4a6b7c26/WowPacketParser/Parsing/Parsers/MovementHandler.cs#L15-L16

Shauren avatar Dec 30 '19 11:12 Shauren

I'm only using 1 thread, ofc i only tested 1.13 sniff

Kittnz avatar Jan 15 '20 18:01 Kittnz

It obviously won't work if you started sniffing after being in world and before being teleported

Warpten avatar Jan 16 '20 10:01 Warpten

1.13 is using bfa packets, that has mapid in UPDATE_OBJECT, it should output correctly

Shauren avatar Jan 16 '20 10:01 Shauren

Map isn't read correctly at all. Every map stays 0 unless you have specific targets.

[21:41:19] <Kittnz> ServerToClient: SMSG_SPELL_START (0x2C3A) Length: 95 ConnIdx: 1 Time: 11/21/2019 18:11:10.891 Number: 37981
[21:41:19] <Kittnz> (Cast) CasterGUID: Full: 0x0 Player/0 R4701/S0 Map: 0 Low: 12043035
[21:41:19] <Kittnz> (Cast) CasterUnit: Full: 0x0 Player/0 R4701/S0 Map: 0 Low: 12043035
[21:41:19] <Kittnz> (Cast) CastID: Full: 0x0 Cast/3 R4468/S146 Map: 1 Low: 39241009

Kittnz avatar Jan 17 '20 19:01 Kittnz