Bad LDON bug
Well had to sell stuff and zone over and over until I could basically figure out what was going on here but essentially LDON points are resetting to ZERO after it reaches between 65,450 and 65,604 the exact number would be 65535 where it breaks. Is that the Cap for LDOn points now or something..
Anyway I Sold items all the way up until i had 65,450, zoned around a few times, checked merchant everything was fine, then when i sold another item and my points jumped to 65,604 I then zoned and after I zoned and clicked the LDON merchant there was yellow text on the chat window that said. "You have spent 65604 Adventure points." <----Exactly like that After checking merchant I did confirm that I had ZERO points .. Anyway does anyone know about this or have a fix for this perhaps ? Not sure if it was a Linux Related issue or whatever that's why I posted it here. Let me know and thank you folks in advance ! Morty |
Sounds like an int16 issue, but all of the structs and stuff I just checked all showed as int32 which allows for much higher numbers than 65k. Maybe there is a function somewhere that uses int16 instead of int32, but I didn't see it in the brief review that I did. Either that, or maybe the client can't handle more than 65kish due to the same issue, but hard coded into the client. Have you tried checking the point value with a quest command to verify it matches the message you are seeing in the client?
|
zone\client_packet.cpp, starting line 8303 (part of Client::FinishConnState2(...))
Code:
//validate adventure points, this cap is arbitrary As an aside, there's also an automatic skillup for swimming to 100 just below that. |
So like if i set it to 0XA0000 or 655,350 , would that work or ? btw does OXA0000= 655,350 or am I wrong ? lol
|
It really depends on what you wish to achieve. Yes, you can set it to a larger arbitrary number, or you can just remove the second check completely and let it roll over to a negative number past 0x7FFFFFFF where it will get set to 0 by the first check.
If the reason for the original check was to keep it 5 digits so it will fit in the UI then setting it to 0 for negative numbers and 99999 for anything higher than 99999 seems like a better solution. You can use plain integer numbers for the check, you don't need to convert it to hex. 0xA0000 = 655360 btw. |
So this should work right? If so is this the only place I have to do this or is there other files I need to change :
Code:
//validate adventure points, this cap is arbitrary |
That may "work", but it isn't correct. The type of those variables is sint32, so they can never be larger than 0x7FFFFFFF and the second check is meaningless.
Do you really expect someone to accumulate over 2 billion points? If they somehow do that, do you want them to lose them all when they accumulate too many? If it was me, I'd prefer capping the points rather than setting them to 0. Something like this and adjusting the number to be the maximum you want them to have saved or to fit the UI: Code:
if(m_pp.ldon_points_guk < 0) m_pp.ldon_points_guk = 0; |
From the looks of things whoever coded this was afraid that the points would be skewed so bad (how?) that the numbers would go wack either in the negative or high positive... I think thats why these checks were there. Are they relevant anymore? I would hope not.
|
Another issue that had you searched your own posts or checked your old code ,would have been fixed(ie it was fixed by somebody else a long time ago, which you promptly forgot about).
|
Quote:
|
Alright so yeah will set it up like this then..
Quote:
PS: Carytalis , quit de-railing and trolling my posts, it's against the Geneva Convention |
All times are GMT -4. The time now is 06:56 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.