Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 10-20-2012, 08:19 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

You're still way overthinking this. It doesn't happen often enough that it really needs to be optimized, and all of the rest of the code in that function, optimized or not, takes a tiny fraction of the time of the Save() call at the end.

This code is also really complicated for no particular reason. Imagine you had two helper functions, one that converted plat, gold, silver, copper into just copper, and the other does the reverse, converting copper into plat, gold, silver, copper. Now the function is simple, convert the player's money into copper, subtract some, then convert it back.

The absolute value of -1 is 1, whereas (uint32)-1 is 4,294,967,295. Obviously very different things.
Reply With Quote
 

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 09:14 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