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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #18  
Old 10-14-2012, 02:37 AM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Well, the answer is that Client::AddMoneyToPP() has a bug in it. It's hard to see because it's hideously formatted and a bizarre way to split the digits up, but whatever.

Code:
Index: client.cpp
===================================================================
--- client.cpp	(revision 2230)
+++ client.cpp	(working copy)
@@ -2154,6 +2154,7 @@
 	//tmp	= tmp - (tmp2* 10);
     //if (updateclient)
 	//	SendClientMoneyUpdate(0,tmp);
+	tmp2 = tmp;
     new_val = m_pp.copper + tmp2;
     if(new_val < 0) {
         m_pp.copper = 0;
The copper value was never assigned to tmp2 (nice variables names!) so it stayed whatever the silver value was.

If I were the truly ambitious sort I'd replace that entire function with something like this:

Code:
void Client::AddMoneyToPP(uint64 copper, bool updateclient) {
	sint32 platinum = copper / 1000;
	sint32 gold = (copper / 100) % 10;
	sint32 silver = (copper / 10) % 10;
	copper %= 10;
	AddMoneyToPP( copper, silver, gold, platinum, updateclient );
}
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 11:56 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