Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Map ID in the SQL #514

Open
Killyana opened this issue Oct 21, 2019 · 10 comments
Open

Wrong Map ID in the SQL #514

Killyana opened this issue Oct 21, 2019 · 10 comments

Comments

@Killyana
Copy link

Killyana commented Oct 21, 2019

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

@mdX7
Copy link
Member

mdX7 commented Oct 21, 2019

Which patch or build does the sniff have?

@Killyana
Copy link
Author

3.3.5 12340 build

@mdX7
Copy link
Member

mdX7 commented Oct 27, 2019

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.

[HasSniffData] // in ReadCreateObjectBlock
[Parser(Opcode.SMSG_UPDATE_OBJECT)]
public static void HandleUpdateObject(Packet packet)
{
uint map = MovementHandler.CurrentMapId;
if (ClientVersion.AddedInVersion(ClientVersionBuild.V4_0_1_13164))
map = packet.ReadUInt16("Map");

@Kittnz
Copy link
Contributor

Kittnz commented Nov 2, 2019

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

@funjoker
Copy link
Member

Classic also giving 0?
That's weird :/

@Shauren
Copy link
Member

Shauren commented Dec 30, 2019

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

[ThreadStatic]
public static uint CurrentMapId;

@Kittnz
Copy link
Contributor

Kittnz commented Jan 15, 2020

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

@Kittnz Kittnz pinned this issue Jan 16, 2020
@Kittnz Kittnz unpinned this issue Jan 16, 2020
@Warpten
Copy link
Contributor

Warpten commented Jan 16, 2020

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

@Shauren
Copy link
Member

Shauren commented Jan 16, 2020

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

@Kittnz
Copy link
Contributor

Kittnz commented Jan 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants