Page 1 of 1

Struct help

Posted: Thu May 03, 2012 12:17 am
by Jabantiz
I figured out that the client crash when turning in a quest (1096 client) was a packet problem, the packet differs in the last half depending on if you finished the quest or not. I started using IfVariableNotSet to to block out most of the last half of the packet, however there is 4 unknown bytes and an EQ2_16Bit_String that already use that and need to be taken out if this is a completed quest packet. Any ideas on how to do that or is it possible to just make a new struct for this same opcode?

EDIT:
Or would it be better to create a substruct for the bytes that need to be removed on a completed quest packet? Does IfVariableNotSet even work on a substruct?

Re: Struct help

Posted: Thu May 03, 2012 7:11 am
by Zcoretri
Do we have a log that shows both packet conditions? If so, can you direct me to that log.
What specific struct are we talking about?

In answer to your question about creating a Substruct for this case would be, I don't know :oops:

Re: Struct help

Posted: Thu May 03, 2012 8:02 am
by Scatman
Are those 4 unknown bytes and string the part you need to block out or in addition to what you found? Would you mind providing a small example? Im trying to figure out exactly what you mean but i cant. Maybe its the sunburn.. :P

Re: Struct help

Posted: Thu May 03, 2012 2:29 pm
by Jabantiz
We are talking about WS_QuestJournalReply, again this is for 1096. The log I used was DarklightWood_5_24_2011a.log

We had the struct set up for when you recieve the quest and as it updates, I also got some values wrong the first time around but in general starting at the map data down to, but not including, the update and onscreen stuff is droped from the packet when you turn the quest in. Just after the onscreen elements are the rewards and starting from there to the end those elements are also dropped from the packet on quest turn in. There is also some other bytes added (don't match the struct we currently have below the onscreen stuff) for turning in a completed quest.

Now in the map data, if the array is not set there is an additional 2 bytes, 16 bit string, followed by another 2 bytes that are not there if the array is set, these also don't appear if it is a quest turn in (would need 2 IfVariableNotSet 's wich isn't possible). I am attaching a .rar with 2 log files, I have broken these packets down and stripped the opcodes from the front, it is just the data. They are sloppy but should be clear enough to show what I am talking about. The quest journal.log file has 2 packets from 2 diffrent quests, 1 with the array set in map data and 1 without.

PS - Sorry for the lack of info in the original post, stayed up to late working on this. I plan to test the struct idea today unless some one can tell me of a better way to do this.

Re: Struct help

Posted: Thu May 03, 2012 5:39 pm
by Zcoretri
Thanks for the attachment and the info Jabantiz, gonna take a look at this now.

Re: Struct help

Posted: Thu May 03, 2012 10:27 pm
by Jabantiz
I went with the substruct idea and it seems to work. I have comitted my changes to the dev svn for the quest journal bug, players can now turn in quests on a 1096 client without crashing. However some how this fix has caused the on screen text to stop working when you get an update and also takes the quest off the helper. Will try to figure that out in the next couple days but for now the client doesn't crash anymore.

Re: Struct help

Posted: Fri May 04, 2012 6:59 am
by John Adams
Keep up the good work, Jabantiz. Maybe we will see 1096 compatible, just before it becomes obsolete this Nov :mrgreen:

I'm going to go out on a limb and suggest that SOE made LOTS of earth-shattering changes to their client/game in DoV, and while there are still more game-changers in AoD, I am hopeful that getting the AoD clients compatible will not be such a herculean effort. At least, I hope.

At the rate we're going, we might not finish 1096 before the next expansion comes out... Then we'll be 18 mos behind again, even though it feels we just accomplished something major ;)

Re: Struct help

Posted: Tue May 08, 2012 11:41 pm
by Jabantiz
Thanks to Zcoretri's help we were able to finally figure out the struct and modify the code to support it. Quests in 1096 client should work just as well as the other clients now, finally.

Re: Struct help

Posted: Wed May 09, 2012 9:32 am
by John Adams
Awesome, I just read the IRC logs. Well done, both of you.