MephisTools / diablo2-protocol

Diablo 2 network protocol
MIT License
76 stars 19 forks source link

fix packets #44

Open louis030195 opened 5 years ago

louis030195 commented 5 years ago

d2gsToClient : D2GS_LIFEANDMANAUPDATE {"unitLife":33747,"unitMana":16680,"unitStamina":32919,"x":51372,"y":838,"unknown":0}

D2GS_EVENTMESSAGES {"unknown":[2,4,0,0,0,0,0,108,97,100,121,98,111,121,0,0,0,0,0,0,0,0,0,85,114,117,107,117,98,97,108,0,0,0,0,0,0,0,0]}

D2GS_UNITCASTSKILL {"unitType":0,"unitId":2,"skill":53,"unknown":6712,"x":2560,"y":17764}

D2GS_PLAYERSTOP {"unitType":0,"unitId":2,"unknown":0,"x":17761,"y":6713,"life":99}

louis030195 commented 5 years ago
louis030195 commented 5 years ago

D2GS_UPDATEITEMOSKILL {"unknown":0,"unitId":1160380416,"skill":6772,"baseLevel":0,"bonusAmount":1}

rom1504 commented 5 years ago

check https://github.com/eezstreet/OpenD2/blob/12305f1aabb71f7f62a4bea2016c12de48fe80b6/Shared/D2Packets.hpp and https://github.com/killerbonzai/BlueVex2/blob/18293f2489189c740ab0be8d3f6ca36c03f9b4d5/D2Packets/Packet/D2Packet.cs

and https://github.com/louis030195/diablo2-protocol/wiki/Diablo-2-implementations-and-docs

rom1504 commented 5 years ago

it would be convenient to report the buffer suspected to be wrong here.

louis030195 commented 5 years ago

https://github.com/killerbonzai/BlueVex2/blob/18293f2489189c740ab0be8d3f6ca36c03f9b4d5/D2Packets/GameServer/GameServerPackets.cs#L3960

rom1504 commented 5 years ago

-> it's a bitfield.

feel free to use bitfieldLE like I did for walk verify (reader.ReadInt32(15); means 15 bit, reader.ReadInt32(0x10); means 0x10 === 16 bits)

On Tue, Jan 15, 2019 at 9:47 AM Sonlight notifications@github.com wrote:

https://github.com/killerbonzai/BlueVex2/blob/18293f2489189c740ab0be8d3f6ca36c03f9b4d5/D2Packets/GameServer/GameServerPackets.cs#L3960

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/louis030195/diablo2-protocol/issues/44#issuecomment-454311480, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_poSFG84TIzWcZLqpCUL_fG6zgYfks5vDZWOgaJpZM4Z_peD .

louis030195 commented 5 years ago

D2GS_ALLYPARTYINFO {"unitType":0,"unitLife":100,"unitId":36,"unitAreaId":25821259}

louis030195 commented 5 years ago

maybe

d2gsToClient : D2GS_CHARTOOBJ {"unknown":0,"playerId":6619264,"movementType":12,"destinationType":51,"objectId":33756886,"xCoordinate":1324,"yCoordinate":35840} raw d2gsToClient D2GS_CHARTOOBJ <Buffer 10 00 80 00 65 00 0c 33 d6 16 03 02 2c 05 00 8c>

d2gsToClient : D2GS_CHARTOOBJ {"unknown":0,"playerId":6619264,"movementType":242,"destinationType":66,"objectId":33994279,"xCoordinate":159,"yCoordinate":64542} raw d2gsToClient D2GS_CHARTOOBJ <Buffer 10 00 80 00 65 00 f2 42 27 b6 06 02 9f 00 1e fc>

d2gsToClient : D2GS_CHARTOOBJ {"unknown":3,"playerId":268435456,"movementType":0,"destinationType":128,"objectId":3456132352,"xCoordinate":54834,"yCoordinate":790} raw d2gsToClient D2GS_CHARTOOBJ <Buffer 10 03 00 00 00 10 00 80 00 65 00 ce 32 d6 16 03>

rom1504 commented 5 years ago

What's the previous packets ?

This is probably due to previous packets being broken.

On Mon, Jan 21, 2019, 20:16 Louis Beaumont notifications@github.com wrote:

received compressed packet D2GS_LOADACT {"act":0,"mapId":336199680,"areaId":5188,"unkwown":88448}

in act 3 town (areaId 75)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MephisTools/diablo2-protocol/issues/44#issuecomment-456175127, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_qSbHjtgONpbd73AklJQv9rYhGb-ks5vFhIbgaJpZM4Z_peD .