Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-01-2011, 06:49 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

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;
if(m_pp.ldon_points_guk > 999999) m_pp.ldon_points_guk = 999999;
That is the only place you would need to make this particular change as far as I can see, but you would need to test with numbers approaching and exceeding whatever limit you decide on to see if there are any other issues.
Reply With Quote
  #2  
Old 06-01-2011, 07:22 AM
image
Demi-God
 
Join Date: Jan 2002
Posts: 1,290
Default

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.
__________________
www.eq2emu.com
EQ2Emu Co-Founder / EQ2Emu Developer
EQEMu Co-Founder / Former EQEMu Developer / GuildWars / Zek Seasons Servers
Reply With Quote
  #3  
Old 06-01-2011, 01:06 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

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).
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:17 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3