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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
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
 


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 10:57 PM.


 

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