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
  #2  
Old 09-15-2005, 02:59 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

hey Windcatcher,

thanks for the detailed report... good to see your still lurking around somewhere.

The code which calls FinishTrade() allready takes care of calling Reset right after both finishes, so that code is fine, the only thing which needed adjusting was the code to trade with NPCs, which needed a Reset after the finish. Then you can kill the Reset in Finish Trade:

Code:
Index: trading.cpp
==================================================================
--- trading.cpp (revision 483)
+++ trading.cpp (working copy)
@@ -428,8 +428,7 @@
        // Money @merth: look into how NPC's receive cash
        this->AddMoneyToPP(other->trade->cp, other->trade->sp, other->trade->gp,
 other->trade->pp, true);

-       // Clear trade inventory
-       trade->Reset();
+       //Do not reset the trade here, done by the caller.
 }

 bool Client::CheckTradeLoreConflict(Client* other)
Index: client_packet.cpp
===================================================================
--- client_packet.cpp   (revision 483)
+++ client_packet.cpp   (working copy)
@@ -2966,10 +2967,12 @@
                }
        }
        else if(with){
+               //trading with an NPC
                EQZonePacket* outapp = new EQZonePacket(OP_FinishTrade,0);
                QueuePacket(outapp);
                safe_delete(outapp);
                FinishTrade(with->CastToNPC());
+               trade->Reset();
        }

        return;
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 07:25 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