Was finally able to get this working, mostly. For what ever reason type2 is always returning a value of 205 no matter what the struct is set at, I wasn't able to track down the cause of this so in the code I just submitted the value is hardcoded to DATA_STRUCT_SINT16, I know this is bad but seeing as the only struct that uses Type2 as of now is items I went ahead and did this so that items display correctly while the cause of this issue is tracked down.
Also it is important to note that the type that takes the most bytes needs to be in Type, in the case of items Type="float" (4 bytes) Type2="sint16" (2 bytes) if they are reversed world will produce a windows popup (like a crash would) saying that the heap is corrupted (memory was written outside of the allocation) or something like that.
Struct - Type2
Moderator: Team Members
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
- 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 - Type2
Nice work. I hope the rest of the team (including myself) get back to this soon and can help you out.
Thanks for sticking with it, Jabantiz. I know that was driving you mad.
Thanks for sticking with it, Jabantiz. I know that was driving you mad.
-
Jabantiz
- Lead Developer
- Posts: 2912
- Joined: Wed Jul 25, 2007 2:52 pm
- Location: California
Re: Struct - Type2
You have no idea...John Adams wrote:Thanks for sticking with it, Jabantiz. I know that was driving you mad.
And to make it even worse the fix was rather simple, I just didn't know how the code in packetstruct.h/.cpp and configreader.cpp worked so I overlooked this solution several times...
Who is online
Users browsing this forum: No registered users and 0 guests