[wpdev-commits] wolfpack/python char.cpp,1.196,1.197
Brought to you by:
rip,
thiagocorrea
From: Incanus <inc...@us...> - 2004-09-26 21:36:35
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13916/python Modified Files: char.cpp Log Message: Added an onResurrect event. Changed char.resurrect to accept the source of the resurrection as an optional parameter. Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.196 retrieving revision 1.197 diff -C2 -d -r1.196 -r1.197 *** char.cpp 19 Sep 2004 22:13:35 -0000 1.196 --- char.cpp 26 Sep 2004 21:36:24 -0000 1.197 *************** *** 616,619 **** --- 616,620 ---- \method char.resurrect \description Resurrect the character. + \param source Defaults to None. */ static PyObject* wpChar_resurrect( wpChar* self, PyObject* args ) *************** *** 623,627 **** Py_RETURN_FALSE; ! self->pChar->resurrect(); Py_RETURN_TRUE; --- 624,639 ---- Py_RETURN_FALSE; ! PyObject* source = Py_None; ! ! if ( !PyArg_ParseTuple( args, "|O:char.resurrect( source )", &source ) ) ! return 0; ! ! cUObject* pSource = 0; ! if ( source != Py_None ) ! { ! PyConvertObject( source, &pSource ); ! } ! ! self->pChar->resurrect( pSource ); Py_RETURN_TRUE; |