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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-13-2005, 07:59 AM
Windcatcher
Demi-God
 
Join Date: Jan 2002
Posts: 1,175
Default Bug in trading coins between players

I've verified this in 0.5.5, and the code in 0.5.8 is the same. It also looks like it will rear its head in 0.6.1, though I haven't tried it.

- Player 1 hands a copper piece to player 2
- Player 2 clicks accept
- Player 1 clicks accept

Player 1 has the money deducted, but player 2 never receives it. The problem has to do with who accepts the trade first. When player 2 accepts first, the trade isn't completed until player 1 also accepts. The server code calls FinishTrade() for player 1 first, since it is his acceptance that caused the trade to finally complete. The problem is that FinishTrade() calls trade->Reset() before it completes, which zeroes out the coin amounts. Therefore, when the server gets around to calling FinishTrade() for player 2, the coin amounts have been zeroed, and player 2 never gets the money.

Basically, the person who first accepts the trade can never receive money in the trade. The solution, as I see it, is that trade->Reset() should be called separately from FinishTrade(), once for each player, after all calls to FinishTrade() have completed.
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 01:22 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