From: <wel...@us...> - 2009-05-19 20:45:40
|
Revision: 3742 http://planeshift.svn.sourceforge.net/planeshift/?rev=3742&view=rev Author: weltall2 Date: 2009-05-19 20:45:31 +0000 (Tue, 19 May 2009) Log Message: ----------- fixing PS#2937 - [Trade Window] graphical glitch Modified Paths: -------------- trunk/src/server/bulkobjects/pscharinventory.cpp Modified: trunk/src/server/bulkobjects/pscharinventory.cpp =================================================================== --- trunk/src/server/bulkobjects/pscharinventory.cpp 2009-05-18 09:01:48 UTC (rev 3741) +++ trunk/src/server/bulkobjects/pscharinventory.cpp 2009-05-19 20:45:31 UTC (rev 3742) @@ -42,6 +42,7 @@ #include "../client.h" #include "../cachemanager.h" #include "../globals.h" +#include "../exchangemanager.h" //============================================================================= // Local Includes @@ -866,6 +867,18 @@ // inventoryCacheServer.SetSlotModified(bulkslot); // update cache + //we have to update clients if we are dropping an item which is being exchanged. We send a removal + //also if we are only dropping a partial stack as something is happening in that slot and to avoid + //bugs and confusion on the user it's better removing the item entirely from the exchange window + //if he/she wants to add it again it's up to him/her to do it after + if(inExchangeMode && inventory[itemIndex].exchangeOfferSlot != -1) + { + //maybe a bit over careful + Client * charClient = owner->GetActor() ? owner->GetActor()->GetClient() : NULL; + if(charClient) Exchange *exchange = psserver->exchangemanager->GetExchange(charClient->GetExchangeID()); + if(exchange) exchange->RemoveItem(charClient, inventory[itemIndex].exchangeOfferSlot, inventory[itemIndex].exchangeStackCount); + } + // Remove ALL items in stack if ( count == currentItem->GetStackCount() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |