Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17133
Modified Files:
dragdrop.cpp items.cpp
Log Message:
fixes for an annoying drop bug that occured with stackable items
fixes for missing maps.
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.242
retrieving revision 1.243
diff -C2 -d -r1.242 -r1.243
*** dragdrop.cpp 22 Aug 2004 02:29:50 -0000 1.242
--- dragdrop.cpp 28 Aug 2004 14:42:04 -0000 1.243
***************
*** 743,747 ****
else if ( pCont->canStack( pItem ) )
{
! if ( pCont->amount() + pItem->amount() <= 60000 )
{
pCont->setAmount( pCont->amount() + pItem->amount() );
--- 743,747 ----
else if ( pCont->canStack( pItem ) )
{
! if ( pCont->amount() + pItem->amount() <= 65535 )
{
pCont->setAmount( pCont->amount() + pItem->amount() );
***************
*** 749,763 ****
pItem->remove();
pCont->update(); // Need to update the amount
}
else
{
! // The delta between 60000 and pCont->amount() sub our Amount is the
// new amount
! pItem->setAmount( pItem->amount() - ( 60000 - pCont->amount() ) );
! pCont->setAmount( 60000 ); // Max out the amount
pCont->update();
}
- return;
}
--- 749,766 ----
pItem->remove();
pCont->update(); // Need to update the amount
+ pCont->resendTooltip();
+ return;
}
else
{
! // The delta between 65535 and pCont->amount() sub our Amount is the
// new amount
! pItem->setAmount( pItem->amount() - ( 65535 - pCont->amount() ) );
! pItem->resendTooltip();
! pCont->setAmount( 65535 ); // Max out the amount
pCont->update();
+ pCont->resendTooltip();
}
}
***************
*** 781,784 ****
--- 784,788 ----
else
{
+ pItem->removeFromCont();
pItem->moveTo( pCont->pos() + Coord_cl( 0, 0, 2 ) );
}
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.441
retrieving revision 1.442
diff -C2 -d -r1.441 -r1.442
*** items.cpp 27 Aug 2004 14:41:15 -0000 1.441
--- items.cpp 28 Aug 2004 14:42:04 -0000 1.442
***************
*** 97,101 ****
this->basedef_ = src.basedef_;
this->totalweight_ = amount_ * weight();
! moveTo( src.pos_ );
}
--- 97,102 ----
this->basedef_ = src.basedef_;
this->totalweight_ = amount_ * weight();
! this->multi_ = 0;
! moveTo( src.pos_, true );
}
|