Author | Message | Time |
---|---|---|
ShadowDancer | what means this packets, packet 07 activates a room and packet 08 deactivates a room, these are virtual rooms with a constant size of 1 screen. you can see it in this graphic: [img]http://images.cjb.net/e75bd.jpg[/img] normally 9 rooms are active per time, except when you are in a border or a corner then will be 6 or 4. in d2 each room is an object not just a pieze of a big map. if d2 tryes to load a unit in a nonloaded room it will crash. Our player is allways on the center room in the graphic red rooms are active, if we move to the room 2 then: a 07 packet will come for: 16, 15, 14 and then a 08 for: 5, 6, 7... this means that 5,6,7 will be removed as objects and 14,15,16 will be added. again: we move from 2 to 9 then: 07 packet will come for 11, 12, 13 and 08 for 4, 3 and 16. the format... 07 (word) x pos (word) y pos (byte) level. using level we can get the amounts of rooms from levels.txt. the x and y pos must be mul by 5 to matter with the subtile cordinates that we normally use. checking each room of one level, going from object to object, for example monsters, urns, etc you can make a very basic clientless pathing runtime like me (H). well, this is all that i know about this packet... surelly this post is plagued of errors :( but i think it can be usefull for others to research new things. Shadow. | August 13, 2006, 2:30 PM |
Ringo | lol, isnt this already documented in d2gs packet research topic? I dont get why it needs re-documenting, its very very basic. :-* | August 13, 2006, 4:01 PM |
ShadowDancer | [quote] 0x07 D2GS_MAPADD Lengh = 6 07 C0 04 A8 03 01 (WORD) Floor Section X (WORD) Floor Section Y (BYTE) Floor Section ID X and Y will not match up to the X and Y in witch you stand, this packet is for notifying D2 what floor file to load. This is normal done in 4 sections at a time. 0x08 D2GS_MAPREM Lengh = 6 08 D1 04 9E 03 01 (WORD) Floor Section X (WORD) Floor Section Y (BYTE) Floor Section ID Speficys where to remove floor sections from the screen. [/quote] [quote] X and Y will not match up to the X and Y in witch you stand, this packet is for notifying D2 what floor file to load. [/quote] it easy says: ignore this packet (?) lol and it never says what to do with x and y.... [quote] This is normal done in 4 sections at a time. [/quote] .... | August 13, 2006, 4:54 PM |
Myndfyr | I removed this from BNBDR because it can use some *major* cleaning, and because we only need it in one place (here or there). If it gets good we'll move this topic into BNBDR. | August 14, 2006, 11:01 PM |
Ringo | [quote author=ShadowDancer link=topic=15536.msg156754#msg156754 date=1155488046] it easy says: ignore this packet (?) lol and it never says what to do with x and y.... [/quote] I dont mean to rude in anyway, but theres not much can be done with this unless you have some form of floor data to work with, for example: [img]http://www.geocities.com/ringomail711/A1Town_w.gif[/img] The place I would be looking into if I was you, would be 0x03. It souldnt be to hard to find relationships between the seed in 0x03, and the shape of the map, depending what map you need to path find across, that is :) | August 20, 2006, 10:16 AM |
ShadowDancer | [qoute]I dont mean to rude in anyway [/qoute] yes, excuse me... [qoute]It souldnt be to hard to find relationships between the seed in 0x03, and the shape of the map, depending what map you need to path find across, that is [/qoute] i tryed to look what 03 does... and it does a lot of things ^^ from 1.10 libs: [code] packet 3: (d2common) D2Common.dll:00C214A0 ; --------------------------------------------------------------------------- D2Common.dll:00C214A0 mov edx, ds:dword_CAA620 D2Common.dll:00C214A6 test edx, edx D2Common.dll:00C214A8 jnz short loc_C214C8 D2Common.dll:00C214AA push 251h D2Common.dll:00C214AF push offset aCProjectsD2_74 ; "C:\\projects\\D2\\head\\Diablo2\\Source\\D2Co"... D2Common.dll:00C214B4 push offset aSgptdrlglevelt ; "sgptDrlgLevelTypeDefs" D2Common.dll:00C214B9 call near ptr unk_C84352 D2Common.dll:00C214BE add esp, 0Ch D2Common.dll:00C214C1 push 0FFFFFFFFh D2Common.dll:00C214C3 call near ptr unk_C8446F D2Common.dll:00C214C8 D2Common.dll:00C214C8 loc_C214C8: ; CODE XREF: D2Common.dll:00C214A8j D2Common.dll:00C214C8 mov eax, [esp+4] D2Common.dll:00C214CC lea ecx, [eax+eax*2] D2Common.dll:00C214CF lea ecx, [ecx+ecx*4] D2Common.dll:00C214D2 shl ecx, 4 D2Common.dll:00C214D5 add ecx, eax D2Common.dll:00C214D7 lea eax, [edx+ecx*8] D2Common.dll:00C214DA test eax, eax D2Common.dll:00C214DC jz short loc_C214F4 D2Common.dll:00C214DE mov dl, [eax+780h] D2Common.dll:00C214E4 mov al, [esp+8] D2Common.dll:00C214E8 cmp dl, al D2Common.dll:00C214EA jnz short loc_C214F4 D2Common.dll:00C214EC mov eax, 1 D2Common.dll:00C214F1 retn 8 D2Common.dll:00C214F4 ; --------------------------------------------------------------------------- D2Common.dll:00C214F4 D2Common.dll:00C214F4 loc_C214F4: ; CODE XREF: D2Common.dll:00C214DCj D2Common.dll:00C214F4 ; D2Common.dll:00C214EAj D2Common.dll:00C214F4 xor eax, eax D2Common.dll:00C214F6 retn 8 D2Common.dll:00C214F6 ; --------------------------------------------------------------------------- .text:6FDBA040 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ .text:6FDBA040 .text:6FDBA040 .text:6FDBA040 public D2Common_11126 .text:6FDBA040 D2Common_11126 proc near .text:6FDBA040 .text:6FDBA040 arg_0 = dword ptr 4 .text:6FDBA040 arg_4 = dword ptr 8 .text:6FDBA040 .text:6FDBA040 mov eax, [esp+arg_0] .text:6FDBA044 test eax, eax .text:6FDBA046 jz short locret_6FDBA076 .text:6FDBA048 cmp dword ptr [eax], 3 .text:6FDBA04B jnz short locret_6FDBA076 .text:6FDBA04D mov eax, [eax+14h] .text:6FDBA050 test eax, eax .text:6FDBA052 jz short locret_6FDBA076 .text:6FDBA054 mov ecx, [esp+arg_4] .text:6FDBA058 test ecx, ecx .text:6FDBA05A jg short loc_6FDBA065 .text:6FDBA05C xor ecx, ecx .text:6FDBA05E mov [eax+0Ah], cx .text:6FDBA062 retn 8 .text:6FDBA065 ; --------------------------------------------------------------------------- .text:6FDBA065 .text:6FDBA065 loc_6FDBA065: ; CODE XREF: D2Common_11126+1Aj .text:6FDBA065 cmp ecx, 7FFFh .text:6FDBA06B jl short loc_6FDBA072 .text:6FDBA06D mov ecx, 7FFFh .text:6FDBA072 .text:6FDBA072 loc_6FDBA072: ; CODE XREF: D2Common_11126+2Bj .text:6FDBA072 mov [eax+0Ah], cx .text:6FDBA076 .text:6FDBA076 locret_6FDBA076: ; CODE XREF: D2Common_11126+6j .text:6FDBA076 ; D2Common_11126+Bj ... .text:6FDBA076 retn 8 .text:6FDBA076 D2Common_11126 endp .text:6FDBA080 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ .text:6FDBA080 .text:6FDBA080 .text:6FDBA080 public D2Common_11127 .text:6FDBA080 D2Common_11127 proc near .text:6FDBA080 .text:6FDBA080 arg_0 = dword ptr 4 .text:6FDBA080 .text:6FDBA080 mov eax, [esp+arg_0] .text:6FDBA084 test eax, eax .text:6FDBA086 jz short loc_6FDBA09B .text:6FDBA088 cmp dword ptr [eax], 3 .text:6FDBA08B jnz short loc_6FDBA09B .text:6FDBA08D mov eax, [eax+14h] .text:6FDBA090 test eax, eax .text:6FDBA092 jz short loc_6FDBA09B .text:6FDBA094 movsx eax, word ptr [eax+0Ah] .text:6FDBA098 retn 4 .text:6FDBA09B ; --------------------------------------------------------------------------- .text:6FDBA09B .text:6FDBA09B loc_6FDBA09B: ; CODE XREF: D2Common_11127+6j .text:6FDBA09B ; D2Common_11127+Bj ... .text:6FDBA09B xor eax, eax .text:6FDBA09D retn 4 .text:6FDBA09D D2Common_11127 endp (d2client) .text:6FAB2160 mov edx, [ecx+8] .text:6FAB2163 xor eax, eax .text:6FAB2165 mov ax, [ecx+6] .text:6FAB2169 push eax .text:6FAB216A push edx .text:6FAB216B mov edx, [ecx+2] .text:6FAB216E mov cl, [ecx+1] .text:6FAB2171 call sub_6FAA9290 .text:6FAB2176 retn Stack[000016AC]:0012FB58 db 3 Stack[000016AC]:0012FB59 db 0 Stack[000016AC]:0012FB5A db 15h Stack[000016AC]:0012FB5B db 9 Stack[000016AC]:0012FB5C db 0E4h ; S Stack[000016AC]:0012FB5D db 60h ; ` Stack[000016AC]:0012FB5E db 1 Stack[000016AC]:0012FB5F db 0 Stack[000016AC]:0012FB60 db 64h ; d Stack[000016AC]:0012FB61 db 51h ; Q Stack[000016AC]:0012FB62 db 0C6h ; ¦ Stack[000016AC]:0012FB63 db 24h ; $ .text:6FAA9290 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ .text:6FAA9290 .text:6FAA9290 .text:6FAA9290 sub_6FAA9290 proc near ; CODE XREF: sub_6FAB2160+11p .text:6FAA9290 .text:6FAA9290 var_CC = dword ptr -0CCh .text:6FAA9290 var_90 = dword ptr -90h .text:6FAA9290 var_88 = dword ptr -88h .text:6FAA9290 var_80 = dword ptr -80h .text:6FAA9290 var_68 = dword ptr -68h .text:6FAA9290 var_64 = dword ptr -64h .text:6FAA9290 var_50 = dword ptr -50h .text:6FAA9290 var_44 = dword ptr -44h .text:6FAA9290 var_28 = dword ptr -28h .text:6FAA9290 .text:6FAA9290 sub esp, 6Ch .text:6FAA9293 push ebx .text:6FAA9294 mov ebx, ecx .text:6FAA9296 mov al, bl .text:6FAA9298 push ebp .text:6FAA9299 push esi .text:6FAA929A inc al .text:6FAA929C push edi .text:6FAA929D mov ebp, edx .text:6FAA929F mov byte ptr [esp+7Ch+var_68], al .text:6FAA92A3 xor edi, edi .text:6FAA92A5 .text:6FAA92A5 loc_6FAA92A5: ; CODE XREF: sub_6FAA9290+57j .text:6FAA92A5 mov ecx, [esp+7Ch+var_68] .text:6FAA92A9 push ecx .text:6FAA92AA push edi .text:6FAA92AB call D2Common_11226 .text:6FAA92B0 test eax, eax .text:6FAA92B2 jz short loc_6FAA92E3 .text:6FAA92B4 xor esi, esi .text:6FAA92B6 .text:6FAA92B6 loc_6FAA92B6: ; CODE XREF: sub_6FAA9290+51j .text:6FAA92B6 lea edx, [esp+84h+var_44] .text:6FAA92BA push edx .text:6FAA92BB push esi .text:6FAA92BC push edi .text:6FAA92BD call D2Common_11227 .text:6FAA92C2 mov al, byte ptr [esp+90h+var_50] .text:6FAA92C6 cmp al, 30h .text:6FAA92C8 jz short loc_6FAA92DD .text:6FAA92CA test al, al .text:6FAA92CC jz short loc_6FAA92DD .text:6FAA92CE lea eax, [esp+90h+var_50] .text:6FAA92D2 lea ecx, [esp+90h+var_80] .text:6FAA92D6 push eax .text:6FAA92D7 push ecx .text:6FAA92D8 call D2CMP_10095 .text:6FAA92DD .text:6FAA92DD loc_6FAA92DD: ; CODE XREF: sub_6FAA9290+38j .text:6FAA92DD ; sub_6FAA9290+3Cj .text:6FAA92DD inc esi .text:6FAA92DE cmp esi, 20h .text:6FAA92E1 jl short loc_6FAA92B6 .text:6FAA92E3 .text:6FAA92E3 loc_6FAA92E3: ; CODE XREF: sub_6FAA9290+22j .text:6FAA92E3 inc edi .text:6FAA92E4 cmp edi, 24h .text:6FAA92E7 jl short loc_6FAA92A5 .text:6FAA92E9 lea edx, [esp+98h+var_88] .text:6FAA92ED push offset aDataGlobalTile ; "data\\global\\tiles\\act1\\barracks\\warp.dt"... .text:6FAA92F2 push edx .text:6FAA92F3 call D2CMP_10095 .text:6FAA92F8 lea eax, [esp+0A0h+var_90] .text:6FAA92FC push offset aDataGlobalTi_0 ; "data\\global\\tiles\\act1\\outdoors\\blank.d"... .text:6FAA9301 push eax .text:6FAA9302 call D2CMP_10095 .text:6FAA9307 mov eax, dword_6FBA7984 .text:6FAA930C test eax, eax .text:6FAA930E jz short loc_6FAA9316 .text:6FAA9310 push eax .text:6FAA9311 call D2Common_10039 .text:6FAA9316 .text:6FAA9316 loc_6FAA9316: ; CODE XREF: sub_6FAA9290+7Ej .text:6FAA9316 mov esi, [esp+0ACh+var_28] .text:6FAA931D mov cl, byte ptr dword_6FBA795C .text:6FAA9323 push offset loc_6FACD840 .text:6FAA9328 push offset loc_6FACD660 .text:6FAA932D push esi .text:6FAA932E push 0 .text:6FAA9330 push ecx .text:6FAA9331 push 0 .text:6FAA9333 push 1 .text:6FAA9335 push ebp .text:6FAA9336 push ebx .text:6FAA9337 call D2Common_10038 .text:6FAA933C mov cl, byte_6FBA79D0 .text:6FAA9342 mov dword_6FBA7984, eax .text:6FAA9347 test cl, cl .text:6FAA9349 jz short loc_6FAA936C .text:6FAA934B cmp bl, 1 .text:6FAA934E jnz short loc_6FAA936C .text:6FAA9350 test eax, eax .text:6FAA9352 jz short loc_6FAA936C .text:6FAA9354 push 1 .text:6FAA9356 push 0 .text:6FAA9358 push 5 .text:6FAA935A call sub_6FB29370 .text:6FAA935F mov edx, dword_6FBA7984 .text:6FAA9365 push eax .text:6FAA9366 push edx .text:6FAA9367 call D2Common_10932 .text:6FAA936C .text:6FAA936C loc_6FAA936C: ; CODE XREF: sub_6FAA9290+B9j .text:6FAA936C ; sub_6FAA9290+BEj ... .text:6FAA936C mov ecx, ebx .text:6FAA936E mov byte_6FBA79D0, 0 .text:6FAA9375 and ecx, 0FFh .text:6FAA937B call sub_6FB245B0 .text:6FAA9380 mov ecx, 1 .text:6FAA9385 call sub_6FB242E0 .text:6FAA938A mov ecx, dword_6FBA7988 .text:6FAA9390 xor eax, eax .text:6FAA9392 mov [ecx], eax .text:6FAA9394 mov [ecx+4], eax .text:6FAA9397 mov edx, dword_6FBA7988 .text:6FAA939D mov eax, [esp+0E4h+var_64] .text:6FAA93A4 mov [edx], ebp .text:6FAA93A6 mov ecx, dword_6FBA7988 .text:6FAA93AC mov [ecx+4], eax .text:6FAA93AF call sub_6FACF730 .text:6FAA93B4 call sub_6FAA4A30 .text:6FAA93B9 call sub_6FB203C0 .text:6FAA93BE mov dword_6FBA798C, esi .text:6FAA93C4 call sub_6FB5CB60 .text:6FAA93C9 mov cl, bl .text:6FAA93CB call sub_6FB5C9E0 .text:6FAA93D0 lea edx, [esp+0E4h+var_CC] .text:6FAA93D4 push ebp .text:6FAA93D5 push offset aSeedD ; "Seed: %d" .text:6FAA93DA push edx .text:6FAA93DB call _sprintf .text:6FAA93E0 lea eax, [esp+0F0h+var_CC] .text:6FAA93E4 push eax .text:6FAA93E5 call Fog_10029 .text:6FAA93EA add esp, 10h .text:6FAA93ED mov dword_6FB75814, 1 .text:6FAA93F7 call ds:GetTickCount .text:6FAA93FD mov ecx, dword_6FBA778C .text:6FAA9403 add eax, 2710h .text:6FAA9408 pop edi .text:6FAA9409 pop esi .text:6FAA940A pop ebp .text:6FAA940B cmp eax, ecx .text:6FAA940D pop ebx .text:6FAA940E jbe short loc_6FAA9415 .text:6FAA9410 mov dword_6FBA778C, eax .text:6FAA9415 .text:6FAA9415 loc_6FAA9415: ; CODE XREF: sub_6FAA9290+17Ej .text:6FAA9415 add esp, 6Ch .text:6FAA9418 retn 8 .text:6FAA9418 sub_6FAA9290 endp ; sp = -68h .text:6FAA9418 .text:6FAA9418 ; --------------------------------------------------------------------------- .text:6FAA941B align 10h .text:6FAA9420 .text:6FAA9420 loc_6FAA9420: ; DATA XREF: sub_6FAA9450:loc_6FAA9542o .text:6FAA9420 call D2gfx_10024 .text:6FAA9425 call D2gfx_10001 .text:6FAA942A retn 0Ch [/code] seen the packet 03 it is like one param is used to inicialize a random function and based in it the map is builded. | August 21, 2006, 7:04 AM |
Ringo | Your on the right track now :) | August 22, 2006, 8:48 PM |