Page 1 of 1

world structure

Posted: Mon May 22, 2017 4:18 pm
by Ememjr
so i am diving into the structure for OP_EqExanmineInfoCmd
this is harder learning than the opcodes lol

any i would really like to know how to fix this,
the first thing i have noticed nice sata server 63119
is the following will need changed since the packettype has changed so in miscfunctions.cpp
change to this, adding the version for 63119

Code: Select all

int16 GetItemPacketType(int32 version) {
	int16 item_version;
	if (version >= 63119)
		item_version = 0x56FE;
	else if (version >= 60024)
		item_version = 0x51FE;
also there needs to be a change to the world struct for ( i dont even know) but here is a screen shot)
item.JPG
for now i want to add a header_info_unkown right after header_info_unknown20 and i am not sure how to do properly

Re: world structure

Posted: Mon May 22, 2017 9:13 pm
by Jabantiz
Item structs are by far some of the hardest to work with, so many conditionals that can exclude other elements, and so many unknowns that seem to have no effect on the examine window. It is a huge pain to work with.

Looking at the screen shot you gave it actually looks right. You want condition to be 100, weight is no longer used so you want that to be 0 and as this is a generic item you want the two skill values to be FF FF FF FF, so that all lines up.

My best guess would be the change is in the footer as the most likely change on live with items in recent years is adornments and all of that is contained in the footer. We never did figure out CoE adornments 100% though (when they added the ability for them to gain levels) and they have only added on since then it would be easy for those to mess with the struct of even a generic item.

Re: world structure

Posted: Tue May 23, 2017 3:08 am
by Ememjr
ok maybe i was going the wrong way and sent the wrong screen shot the above is a packet from emu here is a packet from live
item2.JPG
as you can see condidtion and weight have shifted

also the packet type at locs 09-10 changed from FE 51 to FE 56 which i noted a fix for above
packet subtype at loc 1 is 0 now before it was 80,(where is the subtype determined

and thats as far as i got so far was hoping to correct as i go

Re: world structure

Posted: Tue May 23, 2017 4:07 am
by Ememjr
just a little update i was able to add the unknown 21 as an int32 right after unknown 21 in my items structs but had to do it under the 60174 and the struct lines up well now as i read that log from live

i tried added a copy of the 60174 struct and changed the number to 63119 but the analizer was still using struct client version 60174 which i dont understand why

so i will now put that in my world and see what i messed up . i mean fixed

Re: world structure

Posted: Tue May 23, 2017 4:14 am
by Ememjr
lol what looks good on paper doesnt alway look good
borked it on my end, i am propably missing so code side to make sure that hte new element i added actually gets put in the packet lol

Re: world structure

Posted: Tue May 23, 2017 9:37 am
by John Adams
Jabantiz wrote: Mon May 22, 2017 9:13 pm Item structs are by far some of the hardest to work with, so many conditionals that can exclude other elements, and so many unknowns that seem to have no effect on the examine window. It is a huge pain to work with.
It is quite brilliant, though... imo :) The fact EQ2Emu is >>the only<< multi-client emulator ... ever ... on this scale anyway. The thing that screwed us with this amazing benefit is developers changing the terrain and assets dramatically between releases. Although that too could be compensated for in an emulator. It's just too much work for our .25 developer(s) ;)

Re: world structure

Posted: Tue May 23, 2017 10:19 am
by Ememjr
well i am trying hopefully it gets easier once i get how everything intertwines with each other

Re: world structure

Posted: Tue May 23, 2017 10:50 am
by Jabantiz
If the element is in the struct then it will be in the packet, if you never directly set the element it defaults to 0.

As for analyzer not detecting the new struct, the header is a sub struct so you need to find the parent struct and make a copy of that for the new version. The parent struct will not use any version that is greater then itself, I believe this holds true for world as well and why it not be working.

Also note that the packet type/version determines what the client expects, as it was updated on your server to the newest values it will probably expose a bunch of broken elements in the item structs. We have been able to use older versions to avoid updating these structs but that will only last for so long and as you saw on the emu the old versions no longer work right so there will probably be a lot of changes that will need to be made to get it working again.

Re: world structure

Posted: Tue May 23, 2017 11:48 am
by Ememjr
well thats my intent on helping getting them working right

some on the things that dont work correctly now without my changes
spell books (no_name, all the info not matched up
status_item (take a look at harvested items they are all showing that they can be sold for status instead of be a crafitng item
crafting_flag if i turn this of in the code then the sell for staus footer disappears
there were a few more but dont recall them right off hand till i get back home

Re: world structure

Posted: Wed May 24, 2017 7:49 am
by Ememjr
so i got the basic structure for items working, as in regular items that are simple, still working on the no spell book structure, then will tackle the equipment items structure, on the spells i got the info lines correct again, recast, power, duration etc, and the effects fixed for new version, the killer is it doesnt want to show spell name but ill get it. also when looking at a packet for a spell there seems to be repaeated info in the packet, but the PA does allow me to get to those sections, is there a trick to that

Re: world structure

Posted: Wed May 24, 2017 2:24 pm
by Jabantiz
The second part is for PvP, it is exactly the same as the first part and I believe the server takes care of duping the info for the second part. I believe the name is the last thing in the packet (I might be thinking of items) and anything after is part of the pvp section

Re: world structure

Posted: Wed May 24, 2017 2:54 pm
by Ememjr
awe ok, so when the pvp checkbox is checked, it will display the second part

Re: world structure

Posted: Wed May 24, 2017 2:55 pm
by Ememjr
it was wierd i opened an examine window, and as i was hovering over other items in the bag, the details were changing in the open examine windows as well as a popup window you get when you normally hover