[wpdev-commits] xmlscripts/scripts/wolfpack __init__.py,1.57,1.58
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-07-05 12:55:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10481/wolfpack Modified Files: __init__.py Log Message: Taginfo command and wolfpack.findobject function Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** __init__.py 3 Jul 2004 00:39:59 -0000 1.57 --- __init__.py 5 Jul 2004 12:55:35 -0000 1.58 *************** *** 65,66 **** --- 65,81 ---- #getoption = _wolfpack.getoption #setoption = _wolfpack.setoption + + """ + \function wolfpack.findobject + \param serial The serial number of the object. + \return An <object id="item">item</object>, <object id="char">char</object>, or None object. + \description This function tries to find an item or character with the given serial and + returns an object if either is found. Otherwise it returns None. + """ + def findobject(serial): + if serial == -1 or serial == 0: + return None + elif serial >= 0x40000000: + return finditem(serial) + else: + return findchar(serial) |