RO Structs

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: RO Structs

#11 Post by kLabMouse »

Double Posting....

Anyway, I think there is a big problem with Struct Align, because Client/Server is not compiled with "pragma pack".
Take a good look at "/* this+0x.... */" after each "char" or "unsigned char", sometimes next piece of data is not at +1 position.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: RO Structs

#12 Post by Technology »

kLabMouse wrote:Double Posting....

Anyway, I think there is a big problem with Struct Align, because Client/Server is not compiled with "pragma pack".
Take a good look at "/* this+0x.... */" after each "char" or "unsigned char", sometimes next piece of data is not at +1 position.
Could you post an example of this in the structs please?
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: RO Structs

#13 Post by EternalHarvest »

Can it be fixed with inserting unused fields of necessary lengths?

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: RO Structs

#14 Post by Technology »

EternalHarvest wrote:Can it be fixed with inserting unused fields of necessary lengths?
yea, i was thinking we could do this as last resort solution too.
But lets first confirm there is a problem before we even begin to think of solving it.

Btw, take a look at some pack strings in these files:

Code: Select all

src/Network/Send/kRO$ grep -r --include="*.pm" " x" *
Is this struct alignment, bit-fields, some sort of padding or just missing packstring info?
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: RO Structs

#15 Post by kLabMouse »

Technology wrote:Could you post an example of this in the structs please?
I've forgot where it was, but I know, there was some discussion on IRC in about 6~9mo ago about some packet, that had no good struct because of "char" type used in it.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: RO Structs

#16 Post by Technology »

Btw, EQUIPMENTITEM_EXTRAINFO3's length in 02D0 on kRO seems to be 28 instead of 26 now.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: RO Structs

#17 Post by kLabMouse »

Technology wrote:Btw, EQUIPMENTITEM_EXTRAINFO3's length in 02D0 on kRO seems to be 28 instead of 26 now.
So what are additional 2 bytes?

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: RO Structs

#18 Post by kLabMouse »

kLabMouse wrote:
Technology wrote:Btw, EQUIPMENTITEM_EXTRAINFO3's length in 02D0 on kRO seems to be 28 instead of 26 now.
So what are additional 2 bytes?
Checked. No info on additional 2 bytes.

But.. they added COSTUME item type.
So may-be it's related to it.

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: RO Structs

#19 Post by EternalHarvest »

kLabMouse wrote:But.. they added COSTUME item type.
Image

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: RO Structs

#20 Post by kLabMouse »

Uploading latest Works.
Packets up to 0x824 + HEADER's up to 0x83f
+ ENUM's
Attachments
packet_structs_and_enums.zip
Packet Struct and ENUMS Up to May 2010
(105.58 KiB) Downloaded 288 times

Locked