[wpdev-commits] wolfpack/python char.cpp,1.177,1.178 item.cpp,1.119,1.120
Brought to you by:
rip,
thiagocorrea
From: Correa <thi...@us...> - 2004-08-12 03:18:50
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15121 Modified Files: char.cpp item.cpp Log Message: fix bug 210 ( onCreate issue, Items ) also, contains several API fixes to conform the coding standard. Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** item.cpp 10 Aug 2004 03:27:53 -0000 1.119 --- item.cpp 12 Aug 2004 03:18:24 -0000 1.120 *************** *** 315,319 **** UINT16 deleted = 0; ! deleted = self->pItem->DeleteAmount( amount, id, color ); return PyInt_FromLong( deleted ); --- 315,319 ---- UINT16 deleted = 0; ! deleted = self->pItem->deleteAmount( amount, id, color ); return PyInt_FromLong( deleted ); *************** *** 345,350 **** color = PyInt_AsLong( PyTuple_GetItem( args, 1 ) ); ! UINT16 avail = 0; ! avail = self->pItem->CountItems( id, color ); return PyLong_FromLong( avail ); --- 345,350 ---- color = PyInt_AsLong( PyTuple_GetItem( args, 1 ) ); ! unsigned int avail = 0; ! avail = self->pItem->countItems( id, color ); return PyLong_FromLong( avail ); *************** *** 677,700 **** autoStack = getArgInt( 3 ) != 0; ! // Special rules: ! // If randomPos == false but autoStack == true then manually set a random position as well ! // If randomPos == true but autoStack = false then manually set the random position ! ! if ( randomPos && !autoStack ) ! { ! self->pItem->addItem( pItem, false, handleWeight ); ! pItem->SetRandPosInCont( self->pItem ); ! } ! else if ( !randomPos && autoStack ) ! { ! Coord_cl pos = pItem->pos(); ! self->pItem->addItem( pItem, true, handleWeight ); ! if ( !pItem->free ) ! pItem->moveTo( pos ); ! } ! else ! { ! self->pItem->addItem( pItem, randomPos, handleWeight ); ! } Py_RETURN_NONE; --- 677,681 ---- autoStack = getArgInt( 3 ) != 0; ! self->pItem->addItem( pItem, randomPos, handleWeight, false, autoStack ); Py_RETURN_NONE; Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.177 retrieving revision 1.178 diff -C2 -d -r1.177 -r1.178 *** char.cpp 10 Aug 2004 03:27:51 -0000 1.177 --- char.cpp 12 Aug 2004 03:18:24 -0000 1.178 *************** *** 549,553 **** if ( pPack ) ! deleted = amount - pPack->DeleteAmount( amount, id, color ); return PyInt_FromLong( deleted ); --- 549,553 ---- if ( pPack ) ! deleted = amount - pPack->deleteAmount( amount, id, color ); return PyInt_FromLong( deleted ); *************** *** 741,748 **** P_ITEM pPack = self->pChar->getBackpack(); ! UINT16 avail = 0; if ( pPack ) ! avail = pPack->CountItems( id, color ); return PyInt_FromLong( avail ); --- 741,748 ---- P_ITEM pPack = self->pChar->getBackpack(); ! unsigned int avail = 0; if ( pPack ) ! avail = pPack->countItems( id, color ); return PyInt_FromLong( avail ); |