Struct help
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Struct help
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?
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?
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Struct help
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
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
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Struct help
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.. 
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Struct help
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.
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.
- Zcoretri
- Team Member
- Posts: 1642
- Joined: Fri Jul 27, 2007 12:55 pm
- Location: SoCal
Re: Struct help
Thanks for the attachment and the info Jabantiz, gonna take a look at this now.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Struct help
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.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Struct help
Keep up the good work, Jabantiz. Maybe we will see 1096 compatible, just before it becomes obsolete this Nov
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
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
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Struct help
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.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: Struct help
Awesome, I just read the IRC logs. Well done, both of you.
Who is online
Users browsing this forum: No registered users and 0 guests