[wpdev-commits] wolfpack dragdrop.cpp,1.201,1.202
Brought to you by:
rip,
thiagocorrea
|
From: <dar...@us...> - 2003-09-20 02:11:34
|
Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv4911
Modified Files:
dragdrop.cpp
Log Message:
Fixed a drag & drop glitch.
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.201
retrieving revision 1.202
diff -C2 -d -r1.201 -r1.202
*** dragdrop.cpp 15 Sep 2003 12:49:05 -0000 1.201
--- dragdrop.cpp 20 Sep 2003 02:11:29 -0000 1.202
***************
*** 483,491 ****
// If not handeled: Equip the item if the NPC is owned by us
- // To prevent bad effects remove it from the clients view first
- cUOTxRemoveObject rObject;
- rObject.setSerial( pItem->serial() );
- socket->send( &rObject );
-
P_CHAR pChar = socket->player();
--- 483,486 ----
***************
*** 511,514 ****
--- 506,517 ----
if( pChar == pOtherChar )
{
+ // If we don't send this packet, the client creates some sort of "ghost image" in the container.
+ cUOPacket packet( 0x23, 26 );
+ packet.setShort( 1, pItem->id() );
+ packet.setShort( 6, pItem->amount() );
+ packet.setInt( 8, pChar->serial() );
+ packet.setInt( 17, pChar->getBackpack()->serial() );
+ socket->send( &packet );
+
pItem->toBackpack( pChar );
return;
***************
*** 737,745 ****
// We may also drop into *any* locked chest
// So we can have post-boxes ;o)
- // Spellbooks are containers for us as well
if( pCont->type() == 1 || pCont->type() == 8 || pCont->type() == 63 || pCont->type() == 65 || pCont->type() == 66 )
{
// If we're dropping it onto the closed container
! if( dropPos.distance( pCont->pos() ) == 0 )
{
pCont->addItem( pItem );
--- 740,747 ----
// We may also drop into *any* locked chest
// So we can have post-boxes ;o)
if( pCont->type() == 1 || pCont->type() == 8 || pCont->type() == 63 || pCont->type() == 65 || pCont->type() == 66 )
{
// If we're dropping it onto the closed container
! if( dropPos.x == 0xFFFF && dropPos.y == 0xFFFF )
{
pCont->addItem( pItem );
|