wpdev-commits Mailing List for Wolfpack Emu (Page 72)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
From: Klaus M. \(naddel_tdv\) <nad...@us...> - 2004-08-02 21:04:45
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/buildings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3075/items/buildings Modified Files: lightsources.xml Log Message: added torches and skull candles Index: lightsources.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/buildings/lightsources.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** lightsources.xml 21 Jul 2004 04:18:27 -0000 1.14 --- lightsources.xml 2 Aug 2004 21:04:37 -0000 1.15 *************** *** 470,473 **** --- 470,474 ---- <id>0x1853</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Skullcandle (W/E) (Off)</category> </item> *************** *** 476,479 **** --- 477,481 ---- <id>0x1854</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Skullcandle 1 (W/E) (On)</category> </item> *************** *** 494,497 **** --- 496,500 ---- <id>0x1857</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Skullcandle 1 (N/S) (Off)</category> </item> *************** *** 500,503 **** --- 503,507 ---- <id>0x1858</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Skullcandle 1 (N/S) (On)</category> </item> *************** *** 519,522 **** --- 523,527 ---- <id>0xa12</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Torch (On)</category> </item> *************** *** 535,538 **** --- 540,544 ---- <id>0xf64</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Torch (W/E) (Off)</category> </item> *************** *** 541,544 **** --- 547,551 ---- <id>0xf6b</id> <nodecay /> + <events>lightsource</events> <category>Decoration\Lightsources\Torch (N/S) (Off)</category> </item> |
From: Klaus M. \(naddel_tdv\) <nad...@us...> - 2004-08-02 21:04:22
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3000 Modified Files: lightsource.py Log Message: added torches and skull candles Index: lightsource.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/lightsource.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lightsource.py 9 Jul 2004 21:47:45 -0000 1.7 --- lightsource.py 2 Aug 2004 21:04:08 -0000 1.8 *************** *** 1,2 **** --- 1,3 ---- + #===============================================================# # ) (\_ | WOLFPACK 13.0.0 Scripts # *************** *** 11,15 **** # List of "burning" lightsources ! burning = [ 0x9fd, 0xa02, 0xa07, 0xa0c, 0xa0f, 0xa12, 0xa15, 0xa1a, 0xa22, 0xb1a, 0xb1d, 0xb20, 0xb22, 0xb24, 0xb26, 0x142c, 0x1430, 0x1434 ] ids = { --- 12,16 ---- # List of "burning" lightsources ! burning = [ 0x9fd, 0xa02, 0xa07, 0xa0c, 0xa0f, 0xa12, 0xa15, 0xa1a, 0xa22, 0xb1a, 0xb1d, 0xb20, 0xb22, 0xb24, 0xb26, 0x142c, 0x1430, 0x1434, 0x1854, 0x1858 ] ids = { *************** *** 77,81 **** 0x1434 : 0x1437, 0x1437 : 0x1434 ! } --- 78,95 ---- 0x1434 : 0x1437, 0x1437 : 0x1434 ! ! # Skull Candles ! 0x1853 : 0x1854, ! 0x1854 : 0x1853, ! ! 0x1857 : 0x1858, ! 0x1858 : 0x1857, ! ! # Torches ! 0xa12 : 0xf64, ! 0xf64 : 0xa12, ! ! 0xa12 : 0xf6b, ! 0xf6b : 0xa12 } |
From: Richard M. <dr...@us...> - 2004-08-02 16:28:46
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7101 Modified Files: ChangeLog.wolfpack FAQ.html Log Message: Updates Index: FAQ.html =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/FAQ.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FAQ.html 16 Jul 2004 10:46:57 -0000 1.7 --- FAQ.html 2 Aug 2004 16:28:37 -0000 1.8 *************** *** 44,47 **** --- 44,48 ---- <li><a href="#18">When will _______ bug or problem be fixed?</a></li> <li><a href="#19">Why is _______ feature is not working the same as on Sphere?</a></li> + <li><a href="#20">I'm using the CVS scripts with a release binary, why do I get errors?</a></li> </ul> </div> *************** *** 410,413 **** --- 411,426 ---- Please do not ask the developers or file bug reports about this! </div> + <a href="#top" style="font-size:9pt;">Return To Questions</a><br /><br /> + </li> + <!-- Answer 20 --> + <li><a name="20" class="question">I'm using the CVS scripts with a release binary, why do I get errors?</a><br /> + <div class="answer"> + This is a common problem we see. People need to understand that CVS scripts are meant to be + used with a CVS binary. Using the bleeding edge scripts with a standard Wolfpack release will + result in errors. This is because with script changes there are usually core changes to follow + with them.<br /><br /> + Please do not use CVS scripts with a release binary. CVS is for developers or for experienced + users and scripters. + </div> <a href="#top" style="font-size:9pt;">Return To Questions</a><br /> <a href="index.html" style="font-size:9pt;">Return To Overview</a><br /><br /> Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ChangeLog.wolfpack 22 Jul 2004 17:25:20 -0000 1.35 --- ChangeLog.wolfpack 2 Aug 2004 16:28:37 -0000 1.36 *************** *** 76,80 **** - Magic fixes: Fire, Poison, Energy and Paralyze fields should work better. Mass dispell can now wipe out these fields. ! - Scrolls are now usable and actually cast the spell. For scrolls the following rules are in effect: 50% decreased mana usage. --- 76,80 ---- - Magic fixes: Fire, Poison, Energy and Paralyze fields should work better. Mass dispell can now wipe out these fields. ! - Scrolls are now usable and actually cast the spell. For scrolls the following rules are in effect: 50% decreased mana usage. *************** *** 102,105 **** --- 102,106 ---- - Healers do not resurrect. - Large gumps can potentially crash remote clients. + - Multis are not currently supported. Wolfpack 12.9.7 Beta (4. July 2004) |
From: Correa <thi...@us...> - 2004-08-02 04:17:34
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26174 Modified Files: configure.py Log Message: ops, forgot a , Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** configure.py 30 Jul 2004 02:28:40 -0000 1.12 --- configure.py 2 Aug 2004 04:17:26 -0000 1.13 *************** *** 167,171 **** parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! parser.add_option("--static", action="store_true" dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() --- 167,171 ---- parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() |
From: Correa <thi...@us...> - 2004-07-30 02:28:55
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14713 Modified Files: configure.py Log Message: bug fix Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.py 29 Jul 2004 21:14:11 -0000 1.11 --- configure.py 30 Jul 2004 02:28:40 -0000 1.12 *************** *** 90,93 **** --- 90,99 ---- "/usr/lib/[Pp]ython*/config/libpython*.so", \ "/usr/local/lib/[Pp]ython*/config/libpython*.so"] + PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython*.a", \ + "/usr/local/lib/[Pp]ython*/libpython*.a", \ + "/usr/lib/libpython*.a", \ + "/usr/lib/[Pp]ython*/libpython*.a", \ + "/usr/lib/[Pp]ython*/config/libpython*.a", \ + "/usr/local/lib/[Pp]ython*/config/libpython*.a"] PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ "/usr/include/[Pp]ython*/Python.h"] *************** *** 161,165 **** parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! parser.add_option("--static", dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() --- 167,171 ---- parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! parser.add_option("--static", action="store_true" dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() |
From: Correa <thi...@us...> - 2004-07-29 21:14:20
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29247 Modified Files: configure.py Log Message: added endianess detect code added UCS2/UCS4 detection Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** configure.py 29 Jul 2004 20:54:09 -0000 1.10 --- configure.py 29 Jul 2004 21:14:11 -0000 1.11 *************** *** 114,117 **** --- 114,131 ---- sys.stdout.write( "Wolfpack requires Python version greater than 2.3.0 " ) sys.exit(); + + sys.stdout.write( "Checking unicode support... " ) + if sys.maxunicode > 65535: + sys.stdout.write( "failed\n" ) + sys.stdout.write( "Wolfpack currently requires python to be compiled with UCS2, its compiled with UCS4\n" ) + sys.exit(); + else: + sys.stdout.write( "ok\n" ) + + sys.stdout.write( "Checking CPU byte order... %s" % sys.byteorder ) + if sys.byteorder != 'little': + sys.stdout.write("\nError: Wolfpack currently only supports little endian systems\n" ) + sys.exit(); + sys.stdout.write( "Searching for Python library... " ) |
From: Correa <thi...@us...> - 2004-07-29 20:54:18
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25681 Modified Files: configure.py Log Message: added --static Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** configure.py 28 Jul 2004 04:46:06 -0000 1.9 --- configure.py 29 Jul 2004 20:54:09 -0000 1.10 *************** *** 70,89 **** elif sys.platform == "linux2": PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] elif sys.platform == "freebsd4": PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] else: --- 70,95 ---- elif sys.platform == "linux2": PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] ! PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/libpython*.a", \ ! "/usr/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/[Pp]ython*/config/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.a"] PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] elif sys.platform == "freebsd4": PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] else: *************** *** 91,94 **** --- 97,104 ---- sys.exit() + # if --static + if options.staticlink: + PYTHONLIBSEARCHPATH = PYTHONLIBSTATICSEARCHPATH + # if it was overiden... if options.py_incpath: *************** *** 137,141 **** parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! (options, args) = parser.parse_args() --- 147,151 ---- parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! parser.add_option("--static", dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() |
From: Correa <thi...@us...> - 2004-07-29 19:46:07
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11418/commands Modified Files: add.py Log Message: doc update Index: add.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/add.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** add.py 9 Jul 2004 21:08:36 -0000 1.8 --- add.py 29 Jul 2004 19:45:58 -0000 1.9 *************** *** 232,234 **** --- 232,236 ---- If neither a npc nor an item id is passed to the add command, a menu with all categorized item and npc definitions is shown. + The menu is automatically generated from the definitions of items and NPCs + based on the <category> tag. """ |
From: Correa <thi...@us...> - 2004-07-29 19:36:39
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8973/python Modified Files: pyspawnregion.cpp Log Message: doc update and minor improvement Index: pyspawnregion.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pyspawnregion.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyspawnregion.cpp 27 Jul 2004 04:15:20 -0000 1.1 --- pyspawnregion.cpp 29 Jul 2004 19:36:22 -0000 1.2 *************** *** 32,37 **** /* ! \object region ! \description This object type represents a region within the ultima online world. */ typedef struct --- 32,37 ---- /* ! \object spawnregion ! \description This object type represents a spawnregion within the Ultima Online world. */ typedef struct *************** *** 46,50 **** /*! ! The typedef for Wolfpack Python items */ static PyTypeObject wpSpawnRegionType = --- 46,50 ---- /*! ! The typedef for Wolfpack Python items */ static PyTypeObject wpSpawnRegionType = *************** *** 64,82 **** /* \method spawnregion.removeitem - \description \param serial */ ! static PyObject* wpSpawnRegion_removeitem( wpSpawnRegion* self, PyObject* args ) { SERIAL serial; ! if ( !PyArg_ParseTuple( args, "i:spawnregion.removeitem(serial)", &serial ) ) { return 0; } ! QPtrList<cUObject> items = self->pRegion->spawnedItems(); // Copy ! cUObject *object; ! for (object = items.first(); object; object = items.next()) { if ( object->serial() == serial ) --- 64,91 ---- /* \method spawnregion.removeitem \param serial + \description Remove the given object from a spawnregion, freeing the slot for a new item + to be spawned. */ ! static PyObject* wpSpawnRegion_remove( wpSpawnRegion* self, PyObject* args ) { SERIAL serial; ! if ( !PyArg_ParseTuple( args, "i:spawnregion.remove(serial)", &serial ) ) { return 0; } ! QPtrList<cUObject> objects; ! if ( isItemSerial(serial) ) ! { ! objects = self->pRegion->spawnedItems(); // Copy ! } ! else ! { ! objects = self->pRegion->spawnedNpcs(); // Copy ! } ! cUObject *object; ! for (object = objects.first(); object; object = objects.next()) { if ( object->serial() == serial ) *************** *** 87,117 **** /* ! \method spawnregion.removenpc ! \description ! \param serial */ ! static PyObject* wpSpawnRegion_removenpc( wpSpawnRegion* self, PyObject* args ) { ! SERIAL serial; ! if ( !PyArg_ParseTuple( args, "i:spawnregion.removenpc(serial)", &serial ) ) { return 0; } - - QPtrList<cUObject> items = self->pRegion->spawnedNpcs(); // Copy - cUObject *object; - - for (object = items.first(); object; object = items.next()) - { - if ( object->serial() == serial ) - object->remove(); - } - Py_RETURN_NONE; } static PyMethodDef wpSpawnRegionMethods[] = { ! { "removeitem", ( getattrofunc ) wpSpawnRegion_removeitem, METH_VARARGS, NULL }, ! { "removenpc", ( getattrofunc ) wpSpawnRegion_removenpc, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; --- 96,117 ---- /* ! \method spawnregion.spawn ! \param baseids [Optional] is a list of BaseIDs to be spawned from ! \description Remove the given object from a spawnregion, freeing the slot for a new item ! to be spawned. */ ! static PyObject* wpSpawnRegion_spawn( wpSpawnRegion* self, PyObject* args ) { ! PyObject* baseids = 0; ! if ( !PyArg_ParseTuple( args, "|O!:spawnregion.spawn([baseids])", &PyList_Type, &baseids ) ) { return 0; } } static PyMethodDef wpSpawnRegionMethods[] = { ! { "remove", ( getattrofunc ) wpSpawnRegion_remove, METH_VARARGS, NULL }, ! { "spawn", ( getattrofunc ) wpSpawnRegion_spawn, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; *************** *** 141,154 **** } /* ! \rproperty spawnregion.curnpcspawn */ ! else if ( !strcmp( name, "curnpcspawn" ) ) { return PyInt_FromLong( self->pRegion->npcs() ); } /* ! \rproperty spawnregion.curitemspawn */ ! else if ( !strcmp( name, "curitemspawn" ) ) { return PyInt_FromLong( self->pRegion->items() ); --- 141,154 ---- } /* ! \rproperty spawnregion.npcspawncount */ ! else if ( !strcmp( name, "npcspawncount" ) ) { return PyInt_FromLong( self->pRegion->npcs() ); } /* ! \rproperty spawnregion.itemspawncount */ ! else if ( !strcmp( name, "itemspawncount" ) ) { return PyInt_FromLong( self->pRegion->items() ); *************** *** 194,198 **** } /* ! \rproperty spawnregion.spawneditems */ else if ( !strcmp( name, "spawnednpcs" ) ) --- 194,198 ---- } /* ! \rproperty spawnregion.spawnednpcs */ else if ( !strcmp( name, "spawnednpcs" ) ) |
From: Correa <thi...@us...> - 2004-07-29 19:36:31
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8973 Modified Files: wolf.dsp Log Message: doc update and minor improvement Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.267 retrieving revision 1.268 diff -C2 -d -r1.267 -r1.268 *** wolf.dsp 27 Jul 2004 04:15:20 -0000 1.267 --- wolf.dsp 29 Jul 2004 19:36:19 -0000 1.268 *************** *** 745,748 **** --- 745,756 ---- # Begin Source File + SOURCE=.\python\pyspawnregion.cpp + # End Source File + # Begin Source File + + SOURCE=.\python\pyspawnregion.h + # End Source File + # Begin Source File + SOURCE=.\python\pytooltip.cpp # End Source File |
From: Klaus M. <nad...@us...> - 2004-07-28 19:55:44
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16136 Modified Files: freeze.py Log Message: import fix Index: freeze.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/freeze.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** freeze.py 9 Jul 2004 21:08:36 -0000 1.2 --- freeze.py 28 Jul 2004 19:55:29 -0000 1.3 *************** *** 16,19 **** --- 16,20 ---- import wolfpack from wolfpack.utilities import booleantoggle + from wolfpack.consts import GRAY def freeze( socket, command, arguments ): |
From: Correa <thi...@us...> - 2004-07-28 04:46:15
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1226 Modified Files: configure.py Log Message: small improvement Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** configure.py 27 Jul 2004 19:44:48 -0000 1.8 --- configure.py 28 Jul 2004 04:46:06 -0000 1.9 *************** *** 169,175 **** sys.stdout.write("Generating Visual Studio project files...\n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"]) ! sys.stdout.write("Done") ! sys.stdout.write("Configure finished. Please run make now.") if __name__ == "__main__": ! main() \ No newline at end of file --- 169,175 ---- sys.stdout.write("Generating Visual Studio project files...\n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"]) ! sys.stdout.write("Done\n") ! sys.stdout.write("Configure finished. Please run make now.\n") if __name__ == "__main__": ! main() |
From: Sebastian H. <dar...@us...> - 2004-07-27 19:45:01
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5188 Modified Files: configure.py Log Message: Fix for serverinfo Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** configure.py 26 Jul 2004 05:47:25 -0000 1.7 --- configure.py 27 Jul 2004 19:44:48 -0000 1.8 *************** *** 77,83 **** --- 77,93 ---- PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ "/usr/include/[Pp]ython*/Python.h"] + elif sys.platform == "freebsd4": + PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ + "/usr/local/lib/[Pp]ython*/libpython*.so", \ + "/usr/lib/libpython*.so", \ + "/usr/lib/[Pp]ython*/libpython*.so", \ + "/usr/lib/[Pp]ython*/config/libpython*.so", \ + "/usr/local/lib/[Pp]ython*/config/libpython*.so"] + PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ + "/usr/include/[Pp]ython*/Python.h"] else: sys.stdout.write("ERROR: Unknown platform %s to checkPython()" % sys.platform ) + sys.exit() # if it was overiden... |
From: Correa <thi...@us...> - 2004-07-27 06:35:33
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23998/network Modified Files: asyncnetio.cpp uopacket.cpp uosocket.cpp uosocket.h uotxpackets.cpp uotxpackets.h Log Message: clean ups Index: uotxpackets.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uotxpackets.h,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** uotxpackets.h 2 Jul 2004 06:01:31 -0000 1.110 --- uotxpackets.h 27 Jul 2004 06:35:23 -0000 1.111 *************** *** 1123,1127 **** ( *this )[1] = data; } ! void setCoord( Coord_cl coord ); void setDirection( unsigned char data ) { --- 1123,1127 ---- ( *this )[1] = data; } ! void setCoord( const Coord_cl& coord ); void setDirection( unsigned char data ) { *************** *** 2328,2332 **** } void addTile( unsigned short id, short x, short y, short z ); ! void addTile( unsigned short id, Coord_cl coords ) { addTile( id, coords.x, coords.y, coords.z ); --- 2328,2332 ---- } void addTile( unsigned short id, short x, short y, short z ); ! void addTile( unsigned short id, const Coord_cl& coords ) { addTile( id, coords.x, coords.y, coords.z ); Index: uopacket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uopacket.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** uopacket.cpp 2 Jun 2004 15:04:09 -0000 1.43 --- uopacket.cpp 27 Jul 2004 06:35:22 -0000 1.44 *************** *** 498,502 **** cUOPacket& cUOPacket::operator=( cUOPacket& p ) { ! assign( p ); return *this; } --- 498,503 ---- cUOPacket& cUOPacket::operator=( cUOPacket& p ) { ! if ( &p != this ) ! assign( p ); return *this; } Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** asyncnetio.cpp 22 Jul 2004 13:38:32 -0000 1.46 --- asyncnetio.cpp 27 Jul 2004 06:35:22 -0000 1.47 *************** *** 402,406 **** { mapsMutex.lock(); // do not disturb me here. ! for ( const_iterator it = buffers.begin(); it != buffers.end(); ++it ) { // Read all avaliable data. --- 402,406 ---- { mapsMutex.lock(); // do not disturb me here. ! for ( const_iterator it(buffers.begin()); it != buffers.end(); ++it ) { // Read all avaliable data. Index: uosocket.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.h,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** uosocket.h 22 Jul 2004 13:38:33 -0000 1.120 --- uosocket.h 27 Jul 2004 06:35:22 -0000 1.121 *************** *** 268,272 **** void attachTarget( cTargetRequest* request ); void attachTarget( cTargetRequest* request, UINT16 multiid ); ! void attachTarget( cTargetRequest* request, std::vector<stTargetItem> items, INT16 xOffset = 0, INT16 yOffset = 0, INT16 zOffset = 0 ); void cancelTarget(); void resendWorld( bool clean = true ); --- 268,272 ---- void attachTarget( cTargetRequest* request ); void attachTarget( cTargetRequest* request, UINT16 multiid ); ! void attachTarget( cTargetRequest* request, std::vector<stTargetItem>& items, INT16 xOffset = 0, INT16 yOffset = 0, INT16 zOffset = 0 ); void cancelTarget(); void resendWorld( bool clean = true ); Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.383 retrieving revision 1.384 diff -C2 -d -r1.383 -r1.384 *** uosocket.cpp 22 Jul 2004 13:38:33 -0000 1.383 --- uosocket.cpp 27 Jul 2004 06:35:22 -0000 1.384 *************** *** 2058,2062 **** } ! void cUOSocket::attachTarget( cTargetRequest* request, std::vector<stTargetItem> items, INT16 xOffset, INT16 yOffset, INT16 zOffset ) { // Let the old one time out --- 2058,2062 ---- } ! void cUOSocket::attachTarget( cTargetRequest* request, std::vector<stTargetItem>& items, INT16 xOffset, INT16 yOffset, INT16 zOffset ) { // Let the old one time out *************** *** 2510,2517 **** struct buyitem_st { ! buyitem_st() : buyprice( 0 ), name( "" ) { } ! buyitem_st( int bi, QString n ) : buyprice( bi ), name( n ) { } --- 2510,2517 ---- struct buyitem_st { ! buyitem_st() : buyprice( 0 ) { } ! buyitem_st( int bi, const QString& n ) : buyprice( bi ), name( n ) { } Index: uotxpackets.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uotxpackets.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** uotxpackets.cpp 21 Jul 2004 12:42:55 -0000 1.98 --- uotxpackets.cpp 27 Jul 2004 06:35:22 -0000 1.99 *************** *** 237,241 **** } ! void cUOTxDenyMove::setCoord( Coord_cl coord ) { setShort( 2, coord.x ); --- 237,241 ---- } ! void cUOTxDenyMove::setCoord( const Coord_cl& coord ) { setShort( 2, coord.x ); |
From: Correa <thi...@us...> - 2004-07-27 06:35:32
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23998 Modified Files: basechar.h dragdrop.cpp guilds.h gumps.cpp pagesystem.h player.cpp server.cpp skills.cpp spawnregions.cpp territories.cpp uobject.cpp world.cpp world.h Log Message: clean ups Index: world.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** world.h 16 Jul 2004 21:01:07 -0000 1.15 --- world.h 27 Jul 2004 06:35:22 -0000 1.16 *************** *** 87,92 **** // For the "settings" table ! void getOption( const QString name, QString& value, const QString fallback, bool newconnection = true ); ! void setOption( const QString name, const QString value, bool newconnection = true ); // Book-keeping functions --- 87,92 ---- // For the "settings" table ! void getOption( const QString& name, QString& value, const QString fallback, bool newconnection = true ); ! void setOption( const QString& name, const QString& value, bool newconnection = true ); // Book-keeping functions Index: dragdrop.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v retrieving revision 1.236 retrieving revision 1.237 diff -C2 -d -r1.236 -r1.237 *** dragdrop.cpp 18 Jul 2004 19:57:01 -0000 1.236 --- dragdrop.cpp 27 Jul 2004 06:35:21 -0000 1.237 *************** *** 161,168 **** QStringList keys = pItem->getTags(); QStringList::const_iterator it = keys.begin(); ! while ( it != keys.end() ) { splitItem->setTag( *it, pItem->getTag( *it ) ); - it++; } --- 161,167 ---- QStringList keys = pItem->getTags(); QStringList::const_iterator it = keys.begin(); ! for ( ; it != keys.end(); ++it ) { splitItem->setTag( *it, pItem->getTag( *it ) ); } Index: gumps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** gumps.cpp 5 Jul 2004 14:03:16 -0000 1.166 --- gumps.cpp 27 Jul 2004 06:35:21 -0000 1.167 *************** *** 83,87 **** void cGump::addHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, const QString& html, bool hasBack, bool canScroll ) { ! QString layout = "{htmlgump %1 %2 %3 %4 %5 %6 %7}"; layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout = layout.arg( addRawText( html ) ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 ); --- 83,87 ---- void cGump::addHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, const QString& html, bool hasBack, bool canScroll ) { ! QString layout("{htmlgump %1 %2 %3 %4 %5 %6 %7}"); layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout = layout.arg( addRawText( html ) ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 ); *************** *** 91,95 **** void cGump::addXmfHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, UINT32 clilocid, bool hasBack, bool canScroll ) { ! QString layout = "{xmfhtmlgump %1 %2 %3 %4 %5 %6 %7}"; layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout = layout.arg( clilocid ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 ); --- 91,95 ---- void cGump::addXmfHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, UINT32 clilocid, bool hasBack, bool canScroll ) { ! QString layout("{xmfhtmlgump %1 %2 %3 %4 %5 %6 %7}"); layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout = layout.arg( clilocid ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 ); *************** *** 99,103 **** void cGump::addCheckertrans( INT32 x, INT32 y, INT32 width, INT32 height ) { ! QString layout = "{checkertrans %1 %2 %3 %4}"; layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout_.push_back( layout ); --- 99,103 ---- void cGump::addCheckertrans( INT32 x, INT32 y, INT32 width, INT32 height ) { ! QString layout("{checkertrans %1 %2 %3 %4}"); layout = layout.arg( x ).arg( y ).arg( width ).arg( height ); layout_.push_back( layout ); *************** *** 106,110 **** void cGump::addCroppedText( Q_INT32 textX, Q_INT32 textY, Q_UINT32 width, Q_UINT32 height, const QString& data, Q_UINT16 hue ) { ! QString layout = "{croppedtext %1 %2 %3 %4 %5 %6}"; layout = layout.arg( textX ).arg( textY ).arg( width ).arg( height ).arg( hue ).arg( addRawText( data ) ); layout_.push_back( layout ); --- 106,110 ---- void cGump::addCroppedText( Q_INT32 textX, Q_INT32 textY, Q_UINT32 width, Q_UINT32 height, const QString& data, Q_UINT16 hue ) { ! QString layout("{croppedtext %1 %2 %3 %4 %5 %6}"); layout = layout.arg( textX ).arg( textY ).arg( width ).arg( height ).arg( hue ).arg( addRawText( data ) ); layout_.push_back( layout ); *************** *** 156,160 **** right = numrects - 1; ! QStringList rectangles = QStringList(); QStringList::const_iterator it = allrectangles.at( left ); while ( it != allrectangles.at( right + 1 ) ) --- 156,160 ---- right = numrects - 1; ! QStringList rectangles; QStringList::const_iterator it = allrectangles.at( left ); while ( it != allrectangles.at( right + 1 ) ) Index: uobject.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** uobject.cpp 20 Jul 2004 11:35:37 -0000 1.168 --- uobject.cpp 27 Jul 2004 06:35:22 -0000 1.169 *************** *** 408,413 **** void cUObject::processNode( const cElement* Tag ) { ! QString TagName = Tag->name(); ! QString Value = Tag->value(); if ( TagName == "name" ) --- 408,413 ---- void cUObject::processNode( const cElement* Tag ) { ! QString TagName(Tag->name()); ! QString Value(Tag->value()); if ( TagName == "name" ) *************** *** 695,699 **** clearEvents(); QStringList list = QStringList::split( ",", value.toString() ); ! for ( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { cPythonScript* script = ScriptManager::instance()->find( ( *it ).latin1() ); --- 695,699 ---- clearEvents(); QStringList list = QStringList::split( ",", value.toString() ); ! for ( QStringList::const_iterator it(list.begin()); it != list.end(); ++it ) { cPythonScript* script = ScriptManager::instance()->find( ( *it ).latin1() ); *************** *** 720,724 **** if the object wasn't spawned or removed from the spawnregion. */ ! PY_PROPERTY( "spawnregion", spawnregion_ ? spawnregion_->name() : "" ) PY_PROPERTY( "serial", serial_ ) PY_PROPERTY( "free", free ? 1 : 0 ) --- 720,724 ---- if the object wasn't spawned or removed from the spawnregion. */ ! PY_PROPERTY( "spawnregion", spawnregion_ ? spawnregion_->name() : QString() ) PY_PROPERTY( "serial", serial_ ) PY_PROPERTY( "free", free ? 1 : 0 ) Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** spawnregions.cpp 27 Jul 2004 04:15:20 -0000 1.64 --- spawnregions.cpp 27 Jul 2004 06:35:22 -0000 1.65 *************** *** 82,87 **** void cSpawnRegion::processNode( const cElement* Tag ) { ! QString TagName = Tag->name(); ! QString Value = Tag->value(); //<npcs> --- 82,87 ---- void cSpawnRegion::processNode( const cElement* Tag ) { ! QString TagName(Tag->name()); ! QString Value(Tag->value()); //<npcs> *************** *** 114,123 **** QStringList NpcList = Definitions::instance()->getList( listSect ); ! QStringList::iterator it = NpcList.begin(); ! while ( it != NpcList.end() ) ! { this->npcSections_.push_back( *it ); - it++; - } } } --- 114,120 ---- QStringList NpcList = Definitions::instance()->getList( listSect ); ! QStringList::const_iterator it(NpcList.begin()); ! for ( ; it != NpcList.end(); ++it ) this->npcSections_.push_back( *it ); } } *************** *** 153,162 **** QStringList itemList = Definitions::instance()->getList( listSect ); ! QStringList::iterator it = itemList.begin(); ! while ( it != itemList.end() ) ! { this->itemSections_.push_back( *it ); - it++; - } } } --- 150,156 ---- QStringList itemList = Definitions::instance()->getList( listSect ); ! QStringList::const_iterator it(itemList.begin()); ! for ( ; it != itemList.end(); ++it ) this->itemSections_.push_back( *it ); } } Index: skills.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v retrieving revision 1.226 retrieving revision 1.227 diff -C2 -d -r1.226 -r1.227 *** skills.cpp 15 Jun 2004 02:44:45 -0000 1.226 --- skills.cpp 27 Jul 2004 06:35:22 -0000 1.227 *************** *** 127,131 **** socket->attachTarget( targetRequest ); ! if ( message ) pChar->message( message ); --- 127,131 ---- socket->attachTarget( targetRequest ); ! if ( !message.isEmpty() ) pChar->message( message ); Index: pagesystem.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pagesystem.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pagesystem.h 19 Jun 2004 02:06:51 -0000 1.19 --- pagesystem.h 27 Jul 2004 06:35:21 -0000 1.20 *************** *** 225,229 **** { cPagesManager::iterator it = begin(); ! while ( it != end() ) { if ( ( *it ) == page ) --- 225,229 ---- { cPagesManager::iterator it = begin(); ! for ( ; it != end(); ++it ) { if ( ( *it ) == page ) *************** *** 232,236 **** break; } - it++; } push_front( page ); --- 232,235 ---- Index: territories.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/territories.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** territories.cpp 10 Jul 2004 23:03:29 -0000 1.49 --- territories.cpp 27 Jul 2004 06:35:22 -0000 1.50 *************** *** 83,88 **** void cTerritory::processNode( const cElement* Tag ) { ! QString TagName = Tag->name(); ! QString Value = Tag->value(); //<guards> --- 83,88 ---- void cTerritory::processNode( const cElement* Tag ) { ! QString TagName(Tag->name()); ! QString Value(Tag->value()); //<guards> *************** *** 109,118 **** { QStringList NpcList = Definitions::instance()->getList( childNode->getAttribute( "id" ) ); ! QStringList::iterator it = NpcList.begin(); ! while ( it != NpcList.end() ) ! { this->guardSections_.push_back( *it ); - it++; - } } } --- 109,115 ---- { QStringList NpcList = Definitions::instance()->getList( childNode->getAttribute( "id" ) ); ! QStringList::const_iterator it(NpcList.begin()); ! for ( ; it != NpcList.end(); ++it ) this->guardSections_.push_back( *it ); } } *************** *** 279,283 **** return this->guardSections_[RandomNum( 0, this->guardSections_.size() - 1 )]; else ! return ( char * ) 0; } --- 276,280 ---- return this->guardSections_[RandomNum( 0, this->guardSections_.size() - 1 )]; else ! return QString(); } Index: server.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** server.cpp 20 Jul 2004 12:03:38 -0000 1.12 --- server.cpp 27 Jul 2004 06:35:22 -0000 1.13 *************** *** 107,111 **** unsigned int time; QValueVector<enActionType> actionQueue; ! Private() : running( true ), secure( true ), state( STARTUP ), time( 0 ) { } --- 107,111 ---- unsigned int time; QValueVector<enActionType> actionQueue; ! Private() : running( true ), state( STARTUP ), secure( true ), time( 0 ) { } *************** *** 463,471 **** // Script NPC AI types QStringList aiSections = Definitions::instance()->getSections( WPDT_AI ); ! QStringList::const_iterator aiit = aiSections.begin(); ! while ( aiit != aiSections.end() ) { ScriptAI::registerInFactory( *aiit ); - ++aiit; } --- 463,470 ---- // Script NPC AI types QStringList aiSections = Definitions::instance()->getSections( WPDT_AI ); ! QStringList::const_iterator aiit(aiSections.begin()); ! for ( ;aiit != aiSections.end(); ++aiit ) { ScriptAI::registerInFactory( *aiit ); } Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** player.cpp 20 Jul 2004 11:35:37 -0000 1.112 --- player.cpp 27 Jul 2004 06:35:22 -0000 1.113 *************** *** 243,247 **** // Send equipment tooltips to other players as well ! for ( ItemContainer::const_iterator it = content_.begin(); it != content_.end(); ++it ) { it.data()->sendTooltip( socket ); --- 243,247 ---- // Send equipment tooltips to other players as well ! for ( ItemContainer::const_iterator it(content_.begin()); it != content_.end(); ++it ) { it.data()->sendTooltip( socket ); *************** *** 570,574 **** charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) ); ! QString affix = ""; if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() ) --- 570,574 ---- charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) ); ! QString affix(""); if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() ) *************** *** 1624,1628 **** cUObject::createTooltip( tooltip, player ); ! QString affix = " "; // Append the (frozen) tag --- 1624,1628 ---- cUObject::createTooltip( tooltip, player ); ! QString affix(" "); // Append the (frozen) tag Index: guilds.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/guilds.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** guilds.h 2 Jun 2004 15:04:05 -0000 1.6 --- guilds.h 27 Jul 2004 06:35:21 -0000 1.7 *************** *** 61,69 **** public: ! MemberInfo() { - showSign_ = true; - guildTitle_ = QString::null; - joined_ = QDateTime::currentDateTime(); } --- 61,66 ---- public: ! MemberInfo() : showSign_(true), guildTitle_(QString::null), joined_(QDateTime::currentDateTime()) { } Index: basechar.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** basechar.h 20 Jul 2004 11:35:36 -0000 1.74 --- basechar.h 27 Jul 2004 06:35:21 -0000 1.75 *************** *** 259,264 **** void resurrect(); ! void turnTo( cUObject* object ); ! void turnTo( const Coord_cl& pos ); void wear( P_ITEM ); bool isHuman() const; --- 259,264 ---- void resurrect(); ! virtual void turnTo( cUObject* object ); ! virtual void turnTo( const Coord_cl& pos ); void wear( P_ITEM ); bool isHuman() const; Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** world.cpp 18 Jul 2004 19:52:15 -0000 1.105 --- world.cpp 27 Jul 2004 06:35:22 -0000 1.106 *************** *** 800,804 **** * Gets a value from the settings table and returns the value */ ! void cWorld::getOption( const QString name, QString& value, const QString fallback, bool newconnection ) { if ( newconnection ) --- 800,804 ---- * Gets a value from the settings table and returns the value */ ! void cWorld::getOption( const QString& name, QString& value, const QString fallback, bool newconnection ) { if ( newconnection ) *************** *** 842,846 **** * Sets a value in the settings table. */ ! void cWorld::setOption( const QString name, const QString value, bool newconnection ) { if ( newconnection ) --- 842,846 ---- * Sets a value in the settings table. */ ! void cWorld::setOption( const QString& name, const QString& value, bool newconnection ) { if ( newconnection ) |
From: Correa <thi...@us...> - 2004-07-27 06:35:32
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23998/python Modified Files: global.cpp item.cpp Log Message: clean ups Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** item.cpp 20 Jul 2004 11:35:38 -0000 1.117 --- item.cpp 27 Jul 2004 06:35:23 -0000 1.118 *************** *** 440,444 **** return 0; ! QString key = pKey; return self->pItem->getTag( key ).isValid() ? PyTrue() : PyFalse(); --- 440,444 ---- return 0; ! QString key(pKey); return self->pItem->getTag( key ).isValid() ? PyTrue() : PyFalse(); Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.142 retrieving revision 1.143 diff -C2 -d -r1.142 -r1.143 *** global.cpp 20 Jul 2004 04:40:51 -0000 1.142 --- global.cpp 27 Jul 2004 06:35:23 -0000 1.143 *************** *** 621,625 **** UINT32 yBlock = y / 8; ! while ( !iter.atEnd() ) { // Create a Dictionary --- 621,625 ---- UINT32 yBlock = y / 8; ! for ( ; !iter.atEnd(); ++iter ) { // Create a Dictionary *************** *** 632,636 **** PyList_Append( list, dict ); - iter++; } --- 632,635 ---- *************** *** 1925,1934 **** QMap<QString, cAcl*>::const_iterator it = Commands::instance()->aclbegin(); ! while ( it != Commands::instance()->aclend() ) { QString name = it.key(); if ( !name.isEmpty() ) PyList_Append( list, PyString_FromString( name ) ); - ++it; } --- 1924,1932 ---- QMap<QString, cAcl*>::const_iterator it = Commands::instance()->aclbegin(); ! for ( ; it != Commands::instance()->aclend(); ++it ) { QString name = it.key(); if ( !name.isEmpty() ) PyList_Append( list, PyString_FromString( name ) ); } *************** *** 2321,2325 **** return 0; ! QString driver = "unknown"; if ( database == 1 ) --- 2319,2323 ---- return 0; ! QString driver("unknown"); if ( database == 1 ) |
From: Correa <thi...@us...> - 2004-07-27 04:15:33
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3497 Modified Files: baseregion.h commands.cpp persistentbroker.cpp pythonscript.cpp pythonscript.h spawnregions.cpp spawnregions.h wolf.dsp wolfpack.pro Log Message: initial implementation for scripted spawn regions ( bug id 154 ) few clean ups Index: spawnregions.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** spawnregions.h 3 Jun 2004 14:42:59 -0000 1.25 --- spawnregions.h 27 Jul 2004 04:15:20 -0000 1.26 *************** *** 34,38 **** #include <map> - #include <vector> class cSpawnRegion : public cBaseRegion --- 34,37 ---- *************** *** 62,86 **** // Getters ! QString name( void ) { return name_; } ! unsigned int npcs( void ) { return npcs_.count(); } ! unsigned int items( void ) { return items_.count(); } ! UI16 maxNpcs( void ) { return maxNpcAmt_; } ! UI16 maxItems( void ) { return maxItemAmt_; } QStringList rectangles( void ) { --- 61,109 ---- // Getters ! QString name( void ) const { return name_; } ! ! unsigned int npcs( void ) const { return npcs_.count(); } ! ! unsigned int items( void ) const { return items_.count(); } ! ! UI16 maxNpcs( void ) const { return maxNpcAmt_; } ! ! UI16 maxItems( void ) const { return maxItemAmt_; } + QStringList npcSections() const + { + return npcSections_; + } + + QStringList itemSections() const + { + return itemSections_; + } + + QPtrList<cUObject> spawnedItems() const + { + return items_; + } + + QPtrList<cUObject> spawnedNpcs() const + { + return npcs_; + } + QStringList rectangles( void ) { *************** *** 95,100 **** --- 118,127 ---- return rectList; } + private: virtual void processNode( const cElement* Tag ); + void spawnSingleNPC(); + void spawnSingleItem(); + void onSpawn(cUObject*); private: Index: persistentbroker.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** persistentbroker.cpp 2 Jun 2004 15:04:06 -0000 1.39 --- persistentbroker.cpp 27 Jul 2004 04:15:20 -0000 1.40 *************** *** 246,250 **** { if ( s == QString::null ) ! return ""; if ( d->sqlite ) --- 246,250 ---- { if ( s == QString::null ) ! return QString(""); if ( d->sqlite ) Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.266 retrieving revision 1.267 diff -C2 -d -r1.266 -r1.267 *** wolf.dsp 23 May 2004 11:26:28 -0000 1.266 --- wolf.dsp 27 Jul 2004 04:15:20 -0000 1.267 *************** *** 207,211 **** # Begin Source File ! SOURCE=.\maps\maps.cpp # End Source File # Begin Source File --- 207,211 ---- # Begin Source File ! SOURCE=.\muls\maps.cpp # End Source File # Begin Source File *************** *** 255,262 **** # Begin Source File - SOURCE=.\resources.cpp - # End Source File - # Begin Source File - SOURCE=.\scriptmanager.cpp # End Source File --- 255,258 ---- *************** *** 295,303 **** # Begin Source File ! SOURCE=.\timing.cpp # End Source File # Begin Source File ! SOURCE=.\timers.cpp # End Source File # Begin Source File --- 291,299 ---- # Begin Source File ! SOURCE=.\timers.cpp # End Source File # Begin Source File ! SOURCE=.\timing.cpp # End Source File # Begin Source File *************** *** 548,551 **** --- 544,552 ---- # Begin Source File + SOURCE=.\targetrequest.h + # PROP Ignore_Default_Tool 1 + # End Source File + # Begin Source File + SOURCE=.\targetrequests.h # PROP Ignore_Default_Tool 1 *************** *** 562,571 **** # Begin Source File ! SOURCE=.\timing.h # End Source File # Begin Source File ! SOURCE=.\timers.h ! # PROP Ignore_Default_Tool 1 # End Source File # Begin Source File --- 563,572 ---- # Begin Source File ! SOURCE=.\timers.h ! # PROP Ignore_Default_Tool 1 # End Source File # Begin Source File ! SOURCE=.\timing.h # End Source File # Begin Source File *************** *** 598,606 **** SOURCE=.\world.h # End Source File - # Begin Source File - - SOURCE=.\targetrequest.h - # PROP Ignore_Default_Tool 1 - # End Source File # End Group # Begin Group "Resource Files" --- 599,602 ---- Index: commands.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v retrieving revision 1.250 retrieving revision 1.251 diff -C2 -d -r1.250 -r1.251 *** commands.cpp 17 Jul 2004 12:56:51 -0000 1.250 --- commands.cpp 27 Jul 2004 04:15:19 -0000 1.251 *************** *** 72,76 **** { socket->sysMessage( tr( "Access to command '%1' was denied" ).arg( pCommand.lower() ) ); ! socket->log( QString( "Access to command '%1' was denied\n" ).arg( pCommand.lower() ) ); return; } --- 72,76 ---- { socket->sysMessage( tr( "Access to command '%1' was denied" ).arg( pCommand.lower() ) ); ! socket->log( tr( "Access to command '%1' was denied\n" ).arg( pCommand.lower() ) ); return; } *************** *** 78,82 **** // Dispatch the command if ( dispatch( socket, pCommand, pArgs ) ) ! socket->log( QString( "Used command '%1'.\n" ).arg( command ) ); } --- 78,82 ---- // Dispatch the command if ( dispatch( socket, pCommand, pArgs ) ) ! socket->log( tr( "Used command '%1'.\n" ).arg( command ) ); } *************** *** 211,215 **** if ( args.size() < 1 ) { ! socket->sysMessage( "Usage: set <key> <value>" ); return; } --- 211,215 ---- if ( args.size() < 1 ) { ! socket->sysMessage( tr("Usage: set <key> <value>") ); return; } *************** *** 536,545 **** Server::instance()->reload( "accounts" ); } ! if ( subCommand == "python" ) { Server::instance()->reload( "scripts" ); } ! ! if ( subCommand == "scripts" ) { Server::instance()->reload( "definitions" ); --- 536,544 ---- Server::instance()->reload( "accounts" ); } ! else if ( subCommand == "python" ) { Server::instance()->reload( "scripts" ); } ! else if ( subCommand == "scripts" ) { Server::instance()->reload( "definitions" ); Index: pythonscript.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** pythonscript.h 21 Jul 2004 12:42:55 -0000 1.34 --- pythonscript.h 27 Jul 2004 04:15:20 -0000 1.35 *************** *** 84,87 **** --- 84,88 ---- EVENT_CONTEXTCHECKVISIBLE, EVENT_CONTEXTCHECKENABLED, + EVENT_SPAWN, EVENT_COUNT, }; *************** *** 246,251 **** return object->getPyObject(); } else { ! Py_INCREF(Py_None); ! return Py_None; } } --- 247,251 ---- return object->getPyObject(); } else { ! Py_RETURN_NONE; } } *************** *** 255,260 **** return PyGetRegionObject(object); } else { ! Py_INCREF(Py_None); ! return Py_None; } } --- 255,259 ---- return PyGetRegionObject(object); } else { ! Py_RETURN_NONE; } } *************** *** 264,269 **** return PyGetAccountObject(object); } else { ! Py_INCREF(Py_None); ! return Py_None; } } --- 263,267 ---- return PyGetAccountObject(object); } else { ! Py_RETURN_NONE; } } *************** *** 275,283 **** inline PyObject *createPyObject(bool value) { if (value) { ! Py_INCREF(Py_True); ! return Py_True; } else { ! Py_INCREF(Py_False); ! return Py_False; } } --- 273,279 ---- inline PyObject *createPyObject(bool value) { if (value) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.198 retrieving revision 1.199 diff -C2 -d -r1.198 -r1.199 *** wolfpack.pro 20 Jul 2004 04:40:51 -0000 1.198 --- wolfpack.pro 27 Jul 2004 04:15:20 -0000 1.199 *************** *** 209,212 **** --- 209,213 ---- python/pycoord.cpp \ python/pypacket.cpp \ + python/pyspawnregion.cpp \ python/pyregion.cpp \ python/pytooltip.cpp \ Index: spawnregions.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** spawnregions.cpp 19 Jul 2004 14:30:18 -0000 1.63 --- spawnregions.cpp 27 Jul 2004 04:15:20 -0000 1.64 *************** *** 27,32 **** #include "spawnregions.h" - #include "definitions.h" #include "items.h" #include "defines.h" --- 27,32 ---- #include "spawnregions.h" + #include "definitions.h" #include "items.h" #include "defines.h" *************** *** 40,47 **** #include "sectors.h" #include "config.h" using namespace std; ! // cSpawnRegions void cSpawnRegion::init( void ) --- 40,52 ---- #include "sectors.h" #include "config.h" + #include "inlines.h" + #include "scriptmanager.h" + #include "python/pyspawnregion.h" using namespace std; ! /***************************************************************************** ! cSpawnRegion member functions ! *****************************************************************************/ void cSpawnRegion::init( void ) *************** *** 205,209 **** bool cSpawnRegion::findValidSpot(Coord_cl& pos) { // Try up to 100 times. ! for(unsigned int i = 0; i < 100; ++i) { int rndRectNum = RandomNum( 0, this->rectangles_.size() - 1 ); pos.x = RandomNum( this->rectangles_[rndRectNum].x1, this->rectangles_[rndRectNum].x2 ); --- 210,215 ---- bool cSpawnRegion::findValidSpot(Coord_cl& pos) { // Try up to 100 times. ! for(unsigned int i = 0; i < 100; ++i) ! { int rndRectNum = RandomNum( 0, this->rectangles_.size() - 1 ); pos.x = RandomNum( this->rectangles_[rndRectNum].x1, this->rectangles_[rndRectNum].x2 ); *************** *** 254,307 **** } ! Console::instance()->log( LOG_WARNING, QString( "A problem has occured in spawnregion %1. Couldn't find valid spot." ).arg( this->name_ ) ); return false; } ! // do one spawn and reset the timer ! void cSpawnRegion::reSpawn( void ) { ! unsigned int i = 0; ! for (i = 0; i < npcsPerCycle_; ++i) { ! if (npcs() < maxNpcAmt_) { ! // spawn a random npc ! // first find a valid position for the npc ! Coord_cl pos; ! if (findValidSpot(pos)) { ! QString NpcSect = this->npcSections_[RandomNum( 1, this->npcSections_.size() ) - 1]; ! P_NPC pc = cNPC::createFromScript( NpcSect, pos ); ! if (pc) ! { ! pc->setSpawnregion(this); ! if (pc->wanderType() == enFreely) ! { ! pc->setWanderType(enWanderSpawnregion); ! } ! pc->update(); ! } } } } ! for ( i = 0; i < this->itemsPerCycle_; i++ ) { ! if ( items() < this->maxItemAmt_ ) { ! // spawn a random item ! // first find a valid position for the item ! Coord_cl pos; ! if ( this->findValidSpot( pos ) ) ! { ! QString ItemSect = this->itemSections_[RandomNum( 1, this->itemSections_.size() ) - 1]; ! P_ITEM pi = cItem::createFromScript( ItemSect ); ! if ( pi != NULL ) ! { ! pi->moveTo(pos, true); ! pi->setSpawnregion(this); ! pi->update(); ! } ! } } } this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; --- 260,329 ---- } ! Console::instance()->log( LOG_WARNING, tr( "A problem has occured in spawnregion %1. Couldn't find valid spot." ).arg( this->name_ ) ); return false; } ! void cSpawnRegion::spawnSingleNPC() { ! Coord_cl pos; ! if (findValidSpot(pos)) ! { ! QString NpcSect = this->npcSections_[RandomNum( 1, this->npcSections_.size() ) - 1]; ! P_NPC pc = cNPC::createFromScript( NpcSect, pos ); ! if (pc) ! { ! pc->setSpawnregion(this); ! if (pc->wanderType() == enFreely) { ! pc->setWanderType(enWanderSpawnregion); } + pc->update(); + onSpawn( pc ); } } + } ! void cSpawnRegion::spawnSingleItem() ! { ! Coord_cl pos; ! if ( findValidSpot( pos ) ) { ! QString ItemSect = this->itemSections_[RandomNum( 1, this->itemSections_.size() ) - 1]; ! P_ITEM pi = cItem::createFromScript( ItemSect ); ! if ( pi ) { ! pi->moveTo(pos, true); ! pi->setSpawnregion(this); ! pi->update(); ! onSpawn( pi ); } } + } + + void cSpawnRegion::onSpawn(cUObject* obj) + { + cPythonScript* global = ScriptManager::instance()->getGlobalHook( EVENT_CREATE ); + + if ( global ) + { + PyObject* args = Py_BuildValue( "NN", PyGetSpawnRegionObject(this), PyGetObjectObject(obj) ); + + global->callEventHandler( EVENT_SPAWN, args ); + + Py_DECREF( args ); + } + } + + // do one spawn and reset the timer + void cSpawnRegion::reSpawn( void ) + { + unsigned int i = 0; + for (i = 0; i < npcsPerCycle_; ++i) + if (npcs() < maxNpcAmt_) + spawnSingleNPC(); // spawn a random npc + + for ( i = 0; i < this->itemsPerCycle_; i++ ) + if ( items() < this->maxItemAmt_ ) + spawnSingleItem(); // spawn a random item this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; *************** *** 311,351 **** { while ( npcs() < maxNpcAmt_ ) ! { ! // spawn a random npc ! // first find a valid position for the npc ! Coord_cl pos; ! if ( findValidSpot( pos ) ) ! { ! QString NpcSect = npcSections_[RandomNum( 1, static_cast<uint>( this->npcSections_.size() ) ) - 1]; ! P_NPC pc = cNPC::createFromScript( NpcSect, pos ); ! if ( pc != NULL ) ! { ! pc->setSpawnregion(this); ! if (pc->wanderType() == enFreely) ! { ! pc->setWanderType(enWanderSpawnregion); ! } ! pc->update(); ! } ! } ! } while (items() < maxItemAmt_) ! { ! // spawn a random item ! // first find a valid position for the item ! Coord_cl pos; ! if ( findValidSpot( pos ) ) ! { ! QString ItemSect = this->itemSections_[RandomNum( 1, this->itemSections_.size() ) - 1]; ! P_ITEM pi = cItem::createFromScript( ItemSect ); ! if ( pi ) ! { ! pi->moveTo(pos, true); ! pi->setSpawnregion(this); ! pi->update(); ! } ! } ! } this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; --- 333,340 ---- { while ( npcs() < maxNpcAmt_ ) ! spawnSingleNPC(); while (items() < maxItemAmt_) ! spawnSingleItem(); this->nextTime_ = Server::instance()->time() + RandomNum( this->minTime_, this->maxTime_ ) * MY_CLOCKS_PER_SEC; *************** *** 377,380 **** --- 366,375 ---- } + + /***************************************************************************** + cAllSpawnRegions member functions + *****************************************************************************/ + + void cAllSpawnRegions::check( void ) { Index: pythonscript.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** pythonscript.cpp 21 Jul 2004 12:42:55 -0000 1.43 --- pythonscript.cpp 27 Jul 2004 04:15:20 -0000 1.44 *************** *** 501,504 **** --- 501,512 ---- "onContextCheckEnabled", + /* + \event onSpawn + \param region The spawn region that generated the object. + \param object The object just spawned. + \condition Triggered when a spawnregion creates a new object, either NPC or item. + */ + "onSpawn", + 0 }; Index: baseregion.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/baseregion.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** baseregion.h 2 Jun 2004 15:04:03 -0000 1.24 --- baseregion.h 27 Jul 2004 04:15:08 -0000 1.25 *************** *** 57,61 **** cBaseRegion() : parent_( 0 ) { ! ;} cBaseRegion( const cElement* tag, cBaseRegion* pParent ) --- 57,61 ---- cBaseRegion() : parent_( 0 ) { ! } cBaseRegion( const cElement* tag, cBaseRegion* pParent ) |
From: Correa <thi...@us...> - 2004-07-27 04:15:33
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3497/python Added Files: pyspawnregion.cpp pyspawnregion.h Log Message: initial implementation for scripted spawn regions ( bug id 154 ) few clean ups --- NEW FILE: pyspawnregion.h --- /* * Wolfpack Emu (WP) * UO Server Emulation Program * * Copyright 2001-2004 by holders identified in AUTHORS.txt * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. * * In addition to that license, if you are running this program or modified * versions of it on a public system you HAVE TO make the complete source of * the version used by you available or provide people with a location to * download it. * * Wolfpack Homepage: http://wpdev.sf.net/ */ #if !defined(__PYSPAWNREGION_H__) #define __PYSPAWNREGION_H__ cSpawnRegion* getWpSpawnRegion( PyObject* pObj ); PyObject* PyGetSpawnRegionObject( cSpawnRegion* pRegion ); #endif // __PYSPAWNREGION_H__ --- NEW FILE: pyspawnregion.cpp --- /* * Wolfpack Emu (WP) * UO Server Emulation Program * * Copyright 2001-2004 by holders identified in AUTHORS.txt * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. * * In addition to that license, if you are running this program or modified * versions of it on a public system you HAVE TO make the complete source of * the version used by you available or provide people with a location to * download it. * * Wolfpack Homepage: http://wpdev.sf.net/ */ #include "engine.h" #include "utilities.h" #include "../spawnregions.h" #include "../uobject.h" /* \object region \description This object type represents a region within the ultima online world. */ typedef struct { PyObject_HEAD; cSpawnRegion* pRegion; } wpSpawnRegion; // Forward Declarations static PyObject* wpSpawnRegion_getAttr( wpSpawnRegion* self, char* name ); static int wpSpawnRegion_setAttr( wpSpawnRegion* self, char* name, PyObject* value ); /*! The typedef for Wolfpack Python items */ static PyTypeObject wpSpawnRegionType = { PyObject_HEAD_INIT( NULL ) 0, "wpspawnregion", sizeof( wpSpawnRegionType ), 0, wpDealloc, 0, ( getattrfunc ) wpSpawnRegion_getAttr, ( setattrfunc ) wpSpawnRegion_setAttr, 0, }; /* \method spawnregion.removeitem \description \param serial */ static PyObject* wpSpawnRegion_removeitem( wpSpawnRegion* self, PyObject* args ) { SERIAL serial; if ( !PyArg_ParseTuple( args, "i:spawnregion.removeitem(serial)", &serial ) ) { return 0; } QPtrList<cUObject> items = self->pRegion->spawnedItems(); // Copy cUObject *object; for (object = items.first(); object; object = items.next()) { if ( object->serial() == serial ) object->remove(); } Py_RETURN_NONE; } /* \method spawnregion.removenpc \description \param serial */ static PyObject* wpSpawnRegion_removenpc( wpSpawnRegion* self, PyObject* args ) { SERIAL serial; if ( !PyArg_ParseTuple( args, "i:spawnregion.removenpc(serial)", &serial ) ) { return 0; } QPtrList<cUObject> items = self->pRegion->spawnedNpcs(); // Copy cUObject *object; for (object = items.first(); object; object = items.next()) { if ( object->serial() == serial ) object->remove(); } Py_RETURN_NONE; } static PyMethodDef wpSpawnRegionMethods[] = { { "removeitem", ( getattrofunc ) wpSpawnRegion_removeitem, METH_VARARGS, NULL }, { "removenpc", ( getattrofunc ) wpSpawnRegion_removenpc, METH_VARARGS, NULL }, { NULL, NULL, 0, NULL } }; static PyObject* wpSpawnRegion_getAttr( wpSpawnRegion* self, char* name ) { /* \rproperty spawnregion.id */ if ( !strcmp( name, "id" ) ) { return QString2Python( self->pRegion->name() ); } /* \rproperty spawnregion.maxitemspawn */ else if ( !strcmp( name, "maxitemspawn" ) ) { return PyInt_FromLong( self->pRegion->maxItems() ); } /* \rproperty spawnregion.maxnpcspawn */ else if ( !strcmp( name, "maxnpcspawn" ) ) { return PyInt_FromLong( self->pRegion->maxNpcs() ); } /* \rproperty spawnregion.curnpcspawn */ else if ( !strcmp( name, "curnpcspawn" ) ) { return PyInt_FromLong( self->pRegion->npcs() ); } /* \rproperty spawnregion.curitemspawn */ else if ( !strcmp( name, "curitemspawn" ) ) { return PyInt_FromLong( self->pRegion->items() ); } /* \rproperty spawnregion.npcspawnlist */ else if ( !strcmp( name, "npcspawnlist" ) ) { QStringList sections = self->pRegion->npcSections(); PyObject* tuple = PyTuple_New( sections.size() ); for ( uint i = 0; i < sections.size(); ++i ) { PyTuple_SetItem( tuple, i, QString2Python( sections[i] ) ); } return tuple; } /* \rproperty spawnregion.itemspawnlist */ else if ( !strcmp( name, "itemspawnlist" ) ) { QStringList sections = self->pRegion->itemSections(); PyObject* tuple = PyTuple_New( sections.size() ); for ( uint i = 0; i < sections.size(); ++i ) { PyTuple_SetItem( tuple, i, QString2Python( sections[i] ) ); } return tuple; } /* \rproperty spawnregion.spawneditems */ else if ( !strcmp( name, "spawneditems" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedItems(); PyObject* list = PyList_New( objects.count() ); cUObject *object; for (object = objects.first(); object; object = objects.next() ) PyList_Append( list, PyInt_FromLong( object->serial() ) ); return list; } /* \rproperty spawnregion.spawneditems */ else if ( !strcmp( name, "spawnednpcs" ) ) { QPtrList<cUObject> objects = self->pRegion->spawnedNpcs(); PyObject* list = PyList_New( objects.count() ); cUObject *object; for (object = objects.first(); object; object = objects.next() ) PyList_Append( list, PyInt_FromLong( object->serial() ) ); return list; } return Py_FindMethod( wpSpawnRegionMethods, ( PyObject * ) self, name ); } static int wpSpawnRegion_setAttr( wpSpawnRegion* self, char* name, PyObject* value ) { Q_UNUSED( self ); Q_UNUSED( name ); Q_UNUSED( value ); // SpawnRegions have no changeable attributes yet return 0; } bool checkWpSpawnRegion( PyObject* object ) { return ( object->ob_type == &wpSpawnRegionType ); } PyObject* PyGetSpawnRegionObject( cSpawnRegion* pRegion ) { if ( !pRegion ) { Py_RETURN_NONE; } wpSpawnRegion* returnVal = PyObject_New( wpSpawnRegion, &wpSpawnRegionType ); returnVal->pRegion = pRegion; return ( PyObject * ) returnVal; } cSpawnRegion* getWpSpawnRegion( PyObject* pObj ) { if ( pObj->ob_type != &wpSpawnRegionType ) return NULL; return ( ( wpSpawnRegion * ) pObj )->pRegion; } |
From: Correa <thi...@us...> - 2004-07-26 05:47:34
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2521 Modified Files: configure.py Log Message: Adding command-line parsing Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure.py 19 Jul 2004 23:18:33 -0000 1.6 --- configure.py 26 Jul 2004 05:47:25 -0000 1.7 *************** *** 13,16 **** --- 13,17 ---- import dircache import string + from optparse import OptionParser # These are the variables we are trying to figure out *************** *** 63,67 **** return True ! def checkPython(): if sys.platform == "win32": PYTHONLIBSEARCHPATH = [ sys.prefix + "\Libs\python*.lib" ] --- 64,68 ---- return True ! def checkPython(options): if sys.platform == "win32": PYTHONLIBSEARCHPATH = [ sys.prefix + "\Libs\python*.lib" ] *************** *** 79,82 **** --- 80,90 ---- else: sys.stdout.write("ERROR: Unknown platform %s to checkPython()" % sys.platform ) + + # if it was overiden... + if options.py_incpath: + PYTHONINCSEARCHPATH = [ options.py_incpath ] + if options.py_libpath: + PYTHONLIBSEARCHPATH = [ options.py_libpath ] + sys.stdout.write( "Checking Python version... " ) if sys.hexversion >= 0x020300F0: *************** *** 112,116 **** # Entry point def main(): ! checkPython() checkQt() --- 120,134 ---- # Entry point def main(): ! ! # Setup command line parser ! parser = OptionParser(version="%prog 0.1") ! parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files") ! parser.add_option("--python-includes", dest="py_incpath", help="Python include directory") ! parser.add_option("--python-libraries", dest="py_libpath", help="Python library path") ! parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt") ! ! (options, args) = parser.parse_args() ! ! checkPython(options) checkQt() *************** *** 136,142 **** config.close() ! sys.stdout.write("Generating makefile...") ! os.execv(qt_qmake, [qt_qmake, "wolfpack.pro"]) ! if __name__ == "__main__": --- 154,164 ---- config.close() ! sys.stdout.write("Generating makefile...\n") ! os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"]) ! if options.dsp: ! sys.stdout.write("Generating Visual Studio project files...\n") ! os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"]) ! sys.stdout.write("Done") ! sys.stdout.write("Configure finished. Please run make now.") if __name__ == "__main__": |
From: Sebastian H. <dar...@us...> - 2004-07-25 23:01:10
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8935/wolfpack Modified Files: __init__.py Log Message: Fix for serverinfo Index: __init__.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/__init__.py,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** __init__.py 22 Jul 2004 16:08:43 -0000 1.62 --- __init__.py 25 Jul 2004 23:00:57 -0000 1.63 *************** *** 64,67 **** --- 64,68 ---- newplayer = _wolfpack.newplayer tickcount = _wolfpack.tickcount + currenttime = _wolfpack.currenttime packet = _wolfpack.packet getoption = _wolfpack.getoption |
From: Sebastian H. <dar...@us...> - 2004-07-25 22:59:19
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8467/magic Modified Files: circle1.py circle2.py circle4.py circle5.py circle6.py circle7.py Log Message: Fix for magic. Index: circle5.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle5.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** circle5.py 22 Jul 2004 17:22:06 -0000 1.11 --- circle5.py 25 Jul 2004 22:59:08 -0000 1.12 *************** *** 14,18 **** self.validtarget = TARGET_GROUND ! def cast(self, char, mode, args=[]): if char.player and char.controlslots >= 5: char.socket.clilocmessage(1049645) --- 14,18 ---- self.validtarget = TARGET_GROUND ! def cast(self, char, mode, args=[], target=None, item=None): if char.player and char.controlslots >= 5: char.socket.clilocmessage(1049645) *************** *** 101,105 **** self.mantra = 'Kal In Ex' ! def cast(self, char, mode, args=[]): if char.incognito or char.polymorph: char.socket.clilocmessage(1005559) --- 101,105 ---- self.mantra = 'Kal In Ex' ! def cast(self, char, mode, args=[], target=None, item=None): if char.incognito or char.polymorph: char.socket.clilocmessage(1005559) *************** *** 177,181 **** self.mantra = 'In Jux Sanct' ! def cast(self, char, mode, args=[]): if not self.consumerequirements(char, mode, args, target, item): return --- 177,181 ---- self.mantra = 'In Jux Sanct' ! def cast(self, char, mode, args=[], target=None, item=None): if not self.consumerequirements(char, mode, args, target, item): return *************** *** 321,325 **** self.validtarget = TARGET_GROUND ! def cast(self, char, mode, args=[]): if char.player and char.controlslots + 2 > 5: if char.socket: --- 321,325 ---- self.validtarget = TARGET_GROUND ! def cast(self, char, mode, args=[], target=None, item=None): if char.player and char.controlslots + 2 > 5: if char.socket: Index: circle1.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle1.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** circle1.py 22 Jul 2004 17:22:06 -0000 1.9 --- circle1.py 25 Jul 2004 22:59:08 -0000 1.10 *************** *** 60,64 **** self.mantra = 'In Mani Ylem' ! def cast(self, char, mode, args=[]): if not self.consumerequirements(char, mode, args, target, item): return --- 60,64 ---- self.mantra = 'In Mani Ylem' ! def cast(self, char, mode, args=[], target=None, item=None): if not self.consumerequirements(char, mode, args, target, item): return *************** *** 167,171 **** self.mantra = 'Flam Sanct' ! def cast(self, char, mode, args=[]): if not self.consumerequirements(char, mode, args, target, item): return --- 167,171 ---- self.mantra = 'Flam Sanct' ! def cast(self, char, mode, args=[], target=None, item=None): if not self.consumerequirements(char, mode, args, target, item): return Index: circle6.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle6.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** circle6.py 22 Jul 2004 17:22:06 -0000 1.7 --- circle6.py 25 Jul 2004 22:59:08 -0000 1.8 *************** *** 98,102 **** self.validtarget = TARGET_ITEM ! def cast(self, char, mode, args=[]): # No Mark Region if not char.region or char.region.nomark: --- 98,102 ---- self.validtarget = TARGET_ITEM ! def cast(self, char, mode, args=[], target=None, item=None): # No Mark Region if not char.region or char.region.nomark: Index: circle7.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle7.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** circle7.py 22 Jul 2004 17:22:06 -0000 1.9 --- circle7.py 25 Jul 2004 22:59:08 -0000 1.10 *************** *** 122,126 **** self.validtarget = TARGET_ITEM ! def cast(self, char, mode, args=[]): if not char.gm: if char.iscriminal(): --- 122,126 ---- self.validtarget = TARGET_ITEM ! def cast(self, char, mode, args=[], target=None, item=None): if not char.gm: if char.iscriminal(): Index: circle4.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle4.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** circle4.py 22 Jul 2004 17:22:06 -0000 1.10 --- circle4.py 25 Jul 2004 22:59:08 -0000 1.11 *************** *** 109,113 **** self.casttime = 2250 ! def cast(self, char, mode, args=[]): if not char.gm: if char.iscriminal(): --- 109,113 ---- self.casttime = 2250 ! def cast(self, char, mode, args=[], target=None, item=None): if not char.gm: if char.iscriminal(): Index: circle2.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle2.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** circle2.py 22 Jul 2004 17:22:06 -0000 1.7 --- circle2.py 25 Jul 2004 22:59:08 -0000 1.8 *************** *** 130,134 **** self.mantra = 'Uus Sanct' ! def cast(self, char, mode, args=[]): if not self.consumerequirements(char, mode, args, target, item): return --- 130,134 ---- self.mantra = 'Uus Sanct' ! def cast(self, char, mode, args=[], target=None, item=None): if not self.consumerequirements(char, mode, args, target, item): return |
From: Sebastian H. <dar...@us...> - 2004-07-24 19:02:09
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8803 Modified Files: beverage.py Log Message: More options for the beverage script Index: beverage.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/beverage.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** beverage.py 23 Jul 2004 19:40:00 -0000 1.2 --- beverage.py 24 Jul 2004 19:02:01 -0000 1.3 *************** *** 4,78 **** import random ! # Baseid: ClilocBaseId, MaxQuantity, Empty Item Id CONTAINERS = { ! 0x9c8: [1042965, 10, 0], # Jug ! 0x99f: [1042959, 5, 0], # Bottle of Ale ! 0x99b: [1042959, 5, 0], # Bottle of Liquor ! 0x9c7: [1042959, 5, 0], # Bottle of Wine # Ceramic Mugs ! 0x995: [1042982, 1, 0x995], ! 0x996: [1042982, 1, 0x995], ! 0x997: [1042982, 1, 0x995], ! 0x998: [1042982, 1, 0x995], ! 0x999: [1042982, 1, 0x995], ! 0x9CA: [1042982, 1, 0x995], # Pewter Mugs ! 0xFFF: [1042994, 1, 0xFFF], ! 0x1000: [1042994, 1, 0xFFF], ! 0x1001: [1042994, 1, 0xFFF], ! 0x1002: [1042994, 1, 0xFFF], # Goblet ! 0x99A: [1043000, 1, 0x99A], ! 0x9B3: [1043000, 1, 0x99A], ! 0x9BF: [1043000, 1, 0x99A], ! 0x9CB: [1043000, 1, 0x99A], # Glass Mug ! 0x1F7D: [1042976, 5, 0x1F81], ! 0x1F7E: [1042976, 5, 0x1F81], ! 0x1F7F: [1042976, 5, 0x1F81], ! 0x1F80: [1042976, 5, 0x1F81], ! 0x1F81: [1042976, 5, 0x1F81], ! 0x1F82: [1042976, 5, 0x1F81], ! 0x1F83: [1042976, 5, 0x1F81], ! 0x1F84: [1042976, 5, 0x1F81], ! 0x1F85: [1042976, 5, 0x1F81], ! 0x1F86: [1042976, 5, 0x1F81], ! 0x1F87: [1042976, 5, 0x1F81], ! 0x1F88: [1042976, 5, 0x1F81], ! 0x1F89: [1042976, 5, 0x1F81], ! 0x1F8A: [1042976, 5, 0x1F81], ! 0x1F8B: [1042976, 5, 0x1F81], ! 0x1F8C: [1042976, 5, 0x1F81], ! 0x1F8D: [1042976, 5, 0x1F81], ! 0x1F8E: [1042976, 5, 0x1F81], ! 0x1F8F: [1042976, 5, 0x1F81], ! 0x1F90: [1042976, 5, 0x1F81], ! 0x1F91: [1042976, 5, 0x1F81], ! 0x1F92: [1042976, 5, 0x1F81], ! 0x1F93: [1042976, 5, 0x1F81], ! 0x1F94: [1042976, 5, 0x1F81], ! 0x9EE: [1042976, 5, 0x1F81], ! 0x9EF: [1042976, 5, 0x1F81], # Pitcher ! 0x9a7: [1048128, 5, 0xFF6], ! 0xff6: [1048128, 5, 0xFF6], ! 0xff7: [1048128, 5, 0xFF6], ! 0xff8: [1048128, 5, 0xFF6], ! 0xff9: [1048128, 5, 0xFF6], ! 0x1f95: [1048128, 5, 0xFF6], ! 0x1f96: [1048128, 5, 0xFF6], ! 0x1f97: [1048128, 5, 0xFF6], ! 0x1f98: [1048128, 5, 0xFF6], ! 0x1f99: [1048128, 5, 0xFF6], ! 0x1f9a: [1048128, 5, 0xFF6], ! 0x1f9b: [1048128, 5, 0xFF6], ! 0x1f9c: [1048128, 5, 0xFF6], ! 0x1f9d: [1048128, 5, 0xFF6], ! 0x1f9e: [1048128, 5, 0xFF6], } --- 4,85 ---- import random ! # Baseid: ClilocBaseId, MaxQuantity, Empty Item Id, Fillable CONTAINERS = { ! 0x9c8: [1042965, 10, 0, False, ''], # Jug ! 0x99f: [1042959, 5, 0, False, ''], # Bottle of Ale ! 0x99b: [1042959, 5, 0, False, ''], # Bottle of Liquor ! 0x9c7: [1042959, 5, 0, False, ''], # Bottle of Wine # Ceramic Mugs ! 0x995: [1042982, 1, 0x995, True, ''], ! 0x996: [1042982, 1, 0x995, True, ''], ! 0x997: [1042982, 1, 0x995, True, ''], ! 0x998: [1042982, 1, 0x995, True, ''], ! 0x999: [1042982, 1, 0x995, True, ''], ! 0x9CA: [1042982, 1, 0x995, True, ''], ! ! # Skull Mugs ! 0xFFB: [1042988, 1, 0xFFB, True, ''], ! 0xFFC: [1042988, 1, 0xFFC, True, ''], ! 0xFFD: [1042988, 1, 0xFFD, True, ''], ! 0xFFE: [1042988, 1, 0xFFE, True, ''], # Pewter Mugs ! 0xFFF: [1042994, 1, 0xFFF, True, ''], ! 0x1000: [1042994, 1, 0x1000, True, ''], ! 0x1001: [1042994, 1, 0x1001, True, ''], ! 0x1002: [1042994, 1, 0x1002, True, ''], # Goblet ! 0x99A: [1043000, 1, 0x99A, True, ''], ! 0x9B3: [1043000, 1, 0x9B3, True, ''], ! 0x9BF: [1043000, 1, 0x9BF, True, ''], ! 0x9CB: [1043000, 1, 0x9CB, True, ''], # Glass Mug ! 0x1F7D: [1042976, 5, 0x1F81, True, 'cider'], # cider ! 0x1F7E: [1042976, 5, 0x1F82, True, 'cider'], # cider ! 0x1F7F: [1042976, 5, 0x1F83, True, 'cider'], # cider ! 0x1F80: [1042976, 5, 0x1F84, True, 'cider'], # cider ! 0x1F81: [1042976, 5, 0x1F81, True, ''], # empty ! 0x1F82: [1042976, 5, 0x1F82, True, ''], # empty ! 0x1F83: [1042976, 5, 0x1F83, True, ''], # empty ! 0x1F84: [1042976, 5, 0x1F84, True, ''], # empty ! 0x1F85: [1042976, 5, 0x1F81, True, 'liquor'], # liquor ! 0x1F86: [1042976, 5, 0x1F82, True, 'liquor'], # liquor ! 0x1F87: [1042976, 5, 0x1F83, True, 'liquor'], # liquor ! 0x1F88: [1042976, 5, 0x1F84, True, 'liquor'], # liquor ! 0x1F89: [1042976, 5, 0x1F81, True, 'milk'], # milk ! 0x1F8A: [1042976, 5, 0x1F82, True, 'milk'], # milk ! 0x1F8B: [1042976, 5, 0x1F83, True, 'milk'], # milk ! 0x1F8C: [1042976, 5, 0x1F84, True, 'milk'], # milk ! 0x1F8D: [1042976, 5, 0x1F81, True, 'wine'], # wine ! 0x1F8E: [1042976, 5, 0x1F82, True, 'wine'], # wine ! 0x1F8F: [1042976, 5, 0x1F83, True, 'wine'], # wine ! 0x1F90: [1042976, 5, 0x1F84, True, 'wine'], # wine ! 0x1F91: [1042976, 5, 0x1F81, True, 'water'], # water ! 0x1F92: [1042976, 5, 0x1F82, True, 'water'], # water ! 0x1F93: [1042976, 5, 0x1F83, True, 'water'], # water ! 0x1F94: [1042976, 5, 0x1F84, True, 'water'], # water ! 0x9EE: [1042976, 5, 0x1F82, True, 'ale'], # ale ! 0x9EF: [1042976, 5, 0x1F83, True, 'ale'], # ale # Pitcher ! 0x9a7: [1048128, 5, 0x9a7, True, ''], # empty ! 0x9ad: [1048128, 5, 0x9a7, True, ''], # milk ! 0xff6: [1048128, 5, 0xff6, True, ''], # empty ! 0xff7: [1048128, 5, 0xff7, True, ''], # empty ! 0xff8: [1048128, 5, 0xff7, True, 'water'], # water ! 0xff9: [1048128, 5, 0xff6, True, 'water'], # water ! 0x1f95: [1048128, 5, 0xff6, True, 'ale'], # ale ! 0x1f96: [1048128, 5, 0xff7, True, 'ale'], # ale ! 0x1f97: [1048128, 5, 0xff6, True, 'cider'], # cider ! 0x1f98: [1048128, 5, 0xff7, True, 'cider'], # cider ! 0x1f99: [1048128, 5, 0xff6, True, 'liquor'], # liquor ! 0x1f9a: [1048128, 5, 0xff7, True, 'liquor'], # liquor ! 0x1f9b: [1048128, 5, 0xff6, True, 'wine'], # wine ! 0x1f9c: [1048128, 5, 0xff7, True, 'wine'], # wine ! 0x1f9d: [1048128, 5, 0xff5, True, 'water'], # water ! 0x1f9e: [1048128, 5, 0xff7, True, 'water'], # water } *************** *** 100,112 **** if quantity == 0: ! return refill(char, item) else: ! return drink(char, item) # # Refill the container with something # ! def refill(char, item): ! return 0 # --- 107,213 ---- if quantity == 0: ! if CONTAINERS.has_key(item.id): ! cprops = CONTAINERS[item.id] ! ! if cprops[3]: ! char.socket.clilocmessage(500837) ! char.socket.attachtarget('beverage.refill_target', [item.serial]) ! return 1 ! return 0 else: ! return drink(char, item) ! ! # ! # Find a valid container item id for the given fluid ! # ! def updateItemIdFromFluid(item, fluid): ! if not FLUIDS.has_key(fluid): ! return ! ! origid = item.id ! ! # Search the container list ! for (key, value) in CONTAINERS.items(): ! # Refillable, EmptyId of the container are we, fluid is the same ! if value[3] and value[2] == origid and value[4] == fluid: ! item.id = key ! item.update() ! return True ! ! return False # # Refill the container with something # ! def refill_target(char, args, target): ! item = wolfpack.finditem(args[0]) ! if not item: ! return ! ! if not CONTAINERS.has_key(item.id): ! return ! ! cprops = CONTAINERS[item.id] ! ! if target.item: ! if not char.canreach(target.item, 3): ! char.socket.clilocmessage(1019045) ! return ! ! if CONTAINERS.has_key(target.item.id): ! quantity = 0 ! if target.item.hastag('quantity'): ! quantity = int(target.item.gettag('quantity')) ! ! fluid = '' ! if target.item.hastag('fluid'): ! fluid = str(target.item.gettag('fluid')) ! ! if quantity > 0 and FLUIDS.has_key(fluid): ! item.settag('fluid', fluid) ! ! # How much can we refill? ! if quantity > cprops[1]: ! quantity -= cprops[1] ! target.item.settag('quantity', quantity) ! target.item.resendtooltip() ! item.settag('quantity', cprops[1]) ! updateItemIdFromFluid(item, 'water') ! item.resendtooltip() ! ! # The source will be depleted ! else: ! item.settag('quantity', quantity) ! item.resendtooltip() ! ! cprop = CONTAINERS[target.item.id] ! if cprop[2] == 0: ! target.item.delete() ! else: ! target.item.id = cprop[2] ! target.item.update() ! target.item.deltag('quantity') ! target.item.deltag('fluid') ! target.item.resendtooltip() ! ! return # We refilled ! ! # A watersource ! if target.item.watersource: ! # Check if its depletable ! quantity = cprops[1] ! if target.item.hastag('quantity'): ! quantity = int(item.gettag('quantity')) ! ! if quantity > 0: ! item.settag('fluid', 'water') ! item.settag('quantity', quantity) ! updateItemIdFromFluid(item, 'water') ! item.resendtooltip() ! ! # Check if its a water source ! model = target.item.id ! ! # Maybe we should check the baseid of statics here to see if its a watersource # |
From: Sebastian H. <dar...@us...> - 2004-07-24 19:00:06
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8361 Modified Files: items.cpp items.h Log Message: More options for the beverage script Index: items.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.h,v retrieving revision 1.206 retrieving revision 1.207 diff -C2 -d -r1.206 -r1.207 *** items.h 20 Jul 2004 11:35:36 -0000 1.206 --- items.h 24 Jul 2004 18:59:56 -0000 1.207 *************** *** 61,69 **** unsigned char lightsource_; unsigned int decaydelay_; ! // Misc Properties bool loaded; void load(); void reset(); public: cItemBaseDef( const QCString& id ); --- 61,78 ---- unsigned char lightsource_; unsigned int decaydelay_; ! unsigned int flags_; ! // Misc Properties bool loaded; void load(); void reset(); + + inline void setWaterSource(bool data) { + if (data) { + flags_ |= 0x01; + } else { + flags_ &= ~ 0x01; + } + } public: cItemBaseDef( const QCString& id ); *************** *** 118,121 **** --- 127,135 ---- return lightsource_; } + + inline bool isWaterSource() { + load(); + return (flags_ & 0x01) != 0; + } }; *************** *** 285,288 **** --- 299,306 ---- // Basedef Properties + inline bool isWaterSource() { + return basedef_ ? basedef_->isWaterSource() : false; + } + inline float weight() { Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.426 retrieving revision 1.427 diff -C2 -d -r1.426 -r1.427 *** items.cpp 20 Jul 2004 11:35:36 -0000 1.426 --- items.cpp 24 Jul 2004 18:59:56 -0000 1.427 *************** *** 85,88 **** --- 85,89 ---- type_ = 0; lightsource_ = 0; + flags_ = 0; } *************** *** 117,120 **** --- 118,125 ---- decaydelay_ = node->value().toUInt(); } + else if ( node->name() == "watersource" ) + { + setWaterSource( node->value().toUInt() != 0 ); + } } *************** *** 2055,2058 **** --- 2060,2071 ---- PY_PROPERTY( "ownervisible", visible_ == 1 ? 1 : 0 ) PY_PROPERTY( "movable", magic_ ) + /* + \rproperty item.watersource This property indicates that this type of item is a source of + water. If there is a "quantity" tag for the item, it should be used, otherwise the source + is indepletable. + + This property is inherited from the base id of this item. + */ + PY_PROPERTY( "watersource", isWaterSource() ) return cUObject::getProperty( name ); |
From: Sebastian H. <dar...@us...> - 2004-07-23 19:42:24
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/equipment In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7456/items/equipment Modified Files: drinks.xml Log Message: More options for the beverage script Index: drinks.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/equipment/drinks.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** drinks.xml 17 Jul 2004 03:29:59 -0000 1.1 --- drinks.xml 23 Jul 2004 19:42:10 -0000 1.2 *************** *** 13,35 **** <item id="98d"> <id>0x98d</id> ! <type>105</type> ! <weight>0.5</weight> ! <buyprice>15</buyprice> ! <sellprice>7</sellprice> ! <category>Equipment\Drinks\Jug of Cider 3</category> </item> <!-- Jugs of Cider (2) --> ! <item id="98e" inherit="98d"> ! <baseid>98d</baseid> <id>0x98e</id> ! <category>Equipment\Drinks\Jug of Cider 2</category> </item> ! <!-- Jug of Cider --> ! <item id="9c8" inherit="98d"> ! <baseid>98d</baseid> <id>0x9c8</id> ! <category>Equipment\Drinks\Jug of Cider 1</category> </item> --- 13,29 ---- <item id="98d"> <id>0x98d</id> ! <category>Equipment\Drinks\Jug of Cider (3)</category> </item> <!-- Jugs of Cider (2) --> ! <item id="98e"> <id>0x98e</id> ! <category>Equipment\Drinks\Jug of Cider (2)</category> </item> ! <item id="9c8"> <id>0x9c8</id> ! <events>beverage</events> ! <weight>1.0</weight> </item> *************** *** 37,66 **** <item id="99b"> <id>0x99b</id> ! <type>105</type> ! <weight>0.5</weight> ! <buyprice>4</buyprice> ! <sellprice>4</sellprice> ! <category>Equipment\Drinks\Bottle of Liquor 1</category> </item> <!-- Bottle of Liquor (2) --> ! <item id="99c" inherit="99b"> ! <baseid>99b</baseid> <id>0x99c</id> ! <category>Equipment\Drinks\Bottle of Liquor 2</category> </item> <!-- Bottle of Liquor (3) --> ! <item id="99d" inherit="99b"> ! <baseid>99b</baseid> <id>0x99d</id> ! <category>Equipment\Drinks\Bottle of Liquor 3</category> </item> <!-- Bottle of Liquor (4) --> ! <item id="99e" inherit="99b"> ! <baseid>99b</baseid> <id>0x99e</id> ! <category>Equipment\Drinks\Bottle of Liquor 4</category> </item> --- 31,54 ---- <item id="99b"> <id>0x99b</id> ! <events>beverage</events> ! <weight>1.0</weight> </item> <!-- Bottle of Liquor (2) --> ! <item id="99c"> <id>0x99c</id> ! <category>Equipment\Drinks\Bottle of Liquor (2)</category> </item> <!-- Bottle of Liquor (3) --> ! <item id="99d"> <id>0x99d</id> ! <category>Equipment\Drinks\Bottle of Liquor (3)</category> </item> <!-- Bottle of Liquor (4) --> ! <item id="99e"> <id>0x99e</id> ! <category>Equipment\Drinks\Bottle of Liquor (4)</category> </item> *************** *** 68,137 **** <item id="99f"> <id>0x99f</id> ! <type>105</type> ! <weight>0.5</weight> ! <buyprice>8</buyprice> ! <sellprice>4</sellprice> ! <category>Equipment\Drinks\Bottle of Ale 1</category> </item> <!-- Bottles of Ale (2) --> ! <item id="9a0" inherit="99f"> ! <baseid>99f</baseid> <id>0x9a0</id> ! <category>Equipment\Drinks\Bottle of Ale 2</category> </item> <!-- Bottles of Ale (3) --> ! <item id="9a1" inherit="99f"> ! <baseid>99f</baseid> <id>0x9a1</id> ! <category>Equipment\Drinks\Bottle of Ale 3</category> </item> <!-- Bottles of Ale (4) --> ! <item id="9a2" inherit="99f"> ! <baseid>99f</baseid> <id>0x9a2</id> ! <category>Equipment\Drinks\Bottle of Ale 4</category> ! </item> ! ! <!-- Pitcher of Milk --> ! <!-- NOTE: Needs to create an empty pitcher when drunk --> ! <item id="9ad"> ! <id>0x9ad</id> ! <type>105</type> ! <weight>0.5</weight> ! <category>Equipment\Drinks\Pitcher of Milk 1</category> </item> ! <!-- Bottles of Wine (4) --> <item id="9c4"> <id>0x9c4</id> ! <type>105</type> ! <weight>0.5</weight> ! <buyprice>8</buyprice> ! <sellprice>4</sellprice> ! <category>Equipment\Drinks\Bottle of Wine 4</category> </item> <!-- Bottles of wine (3) --> ! <item id="9c5" inherit="9c4"> ! <baseid>9c4</baseid> <id>0x9c5</id> ! <category>Equipment\Drinks\Bottle of Wine 3</category> </item> <!-- Bottles of wine (2) --> ! <item id="9c6" inherit="9c4"> ! <baseid>9c4</baseid> <id>0x9c6</id> ! <category>Equipment\Drinks\Bottle of Wine 2</category> </item> <!-- Bottle of wine --> ! <item id="9c7" inherit="9c4"> ! <baseid>9c4</baseid> <id>0x9c7</id> ! <category>Equipment\Drinks\Bottle of Wine 1</category> </item> --- 56,162 ---- <item id="99f"> <id>0x99f</id> ! <events>beverage</events> ! <weight>1.0</weight> </item> <!-- Bottles of Ale (2) --> ! <item id="9a0"> <id>0x9a0</id> ! <category>Equipment\Drinks\Bottle of Ale (2)</category> </item> <!-- Bottles of Ale (3) --> ! <item id="9a1"> <id>0x9a1</id> ! <category>Equipment\Drinks\Bottle of Ale (3)</category> </item> <!-- Bottles of Ale (4) --> ! <item id="9a2"> <id>0x9a2</id> ! <category>Equipment\Drinks\Bottle of Ale (4)</category> </item> ! <!-- Bottles of Wine (4) --> <item id="9c4"> <id>0x9c4</id> ! <category>Equipment\Drinks\Bottle of Wine (4)</category> </item> <!-- Bottles of wine (3) --> ! <item id="9c5"> <id>0x9c5</id> ! <category>Equipment\Drinks\Bottle of Wine (3)</category> </item> <!-- Bottles of wine (2) --> ! <item id="9c6"> <id>0x9c6</id> ! <category>Equipment\Drinks\Bottle of Wine (2)</category> </item> <!-- Bottle of wine --> ! <item id="9c7"> <id>0x9c7</id> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <!-- Bottles --> ! <item id="bottle_ale" inherit="99f"> ! <category>Equipment\Drinks\Bottle of Ale</category> ! <tag name="fluid" value="ale" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <item id="bottle_cider" inherit="99f"> ! <category>Equipment\Drinks\Bottle of Cider</category> ! <tag name="fluid" value="cider" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <item id="bottle_liquor" inherit="99b"> ! <category>Equipment\Drinks\Bottle of Liquor</category> ! <tag name="fluid" value="liquor" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <item id="bottle_milk" inherit="99b"> ! <category>Equipment\Drinks\Bottle of Milk</category> ! <tag name="fluid" value="milk" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <item id="bottle_wine" inherit="9c7"> ! <category>Equipment\Drinks\Bottle of Wine</category> ! <tag name="fluid" value="wine" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <item id="bottle_water" inherit="99b"> ! <category>Equipment\Drinks\Bottle of Water</category> ! <tag name="fluid" value="water" /> ! <tag name="quantity" value="5" /> ! <events>beverage</events> ! <weight>1.0</weight> ! </item> ! ! <!-- Pitcher of Milk --> ! <!-- NOTE: Needs to create an empty pitcher when drunk --> ! <item id="9ad"> ! <id>0x9ad</id> ! <events>beverage</events> ! <weight>0.5</weight> ! <category>Equipment\Drinks\Pitcher of Milk 1</category> </item> *************** *** 139,143 **** <item id="ffa"> <id>0xffa</id> - <type>105</type> <weight>1.5</weight> <category>Equipment\Drinks\Bucket of Water</category> --- 164,167 ---- *************** *** 146,152 **** <item id="1f7d"> <id>0x1f7d</id> ! <weight>0.2</weight> ! <type>105</type> <category>Equipment\Drinks\Glass of Cider 1</category> </item> --- 170,178 ---- <item id="1f7d"> <id>0x1f7d</id> ! <weight>1.0</weight> ! <events>beverage</events> <category>Equipment\Drinks\Glass of Cider 1</category> + <tag name="fluid" value="cider" /> + <tag name="quantity" value="5" type="int" /> </item> *************** *** 168,173 **** <item id="1f85"> <id>0x1f85</id> ! <type>105</type> <category>Equipment\Drinks\Glass of Liquor 1</category> </item> --- 194,202 ---- <item id="1f85"> <id>0x1f85</id> ! <events>beverage</events> <category>Equipment\Drinks\Glass of Liquor 1</category> + <weight>1.0</weight> + <tag name="fluid" value="liquor" /> + <tag name="quantity" value="5" type="int" /> </item> *************** *** 189,194 **** <item id="1f89"> <id>0x1f89</id> ! <weight>0.1</weight> ! <type>105</type> <category>Equipment\Drinks\Glass of Milk 1</category> </item> --- 218,225 ---- <item id="1f89"> <id>0x1f89</id> ! <weight>1.0</weight> ! <tag name="fluid" value="milk" /> ! <tag name="quantity" value="5" type="int" /> ! <events>beverage</events> <category>Equipment\Drinks\Glass of Milk 1</category> </item> *************** *** 211,216 **** <item id="1f8d"> <id>0x1f8d</id> ! <weight>0.1</weight> ! <type>105</type> <category>Equipment\Drinks\Glass of Wine 1</category> </item> --- 242,249 ---- <item id="1f8d"> <id>0x1f8d</id> ! <weight>1.0</weight> ! <tag name="fluid" value="wine" /> ! <tag name="quantity" value="5" type="int" /> ! <events>beverage</events> <category>Equipment\Drinks\Glass of Wine 1</category> </item> *************** *** 231,238 **** </item> <item id="1f91"> <id>0x1f91</id> ! <weight>0.1</weight> ! <type>105</type> <category>Equipment\Drinks\Glass of Water 1</category> </item> --- 264,295 ---- </item> + <item id="1f81"> + <category>Equipment\Drinks\Empty Glass 1</category> + <id>0x1f81</id> + <weight>1.0</weight> + <events>beverage</events> + </item> + + <item id="1f82" inherit="1f81"> + <id>0x1f82</id> + <category>Equipment\Drinks\Empty Glass 2</category> + </item> + + <item id="1f83" inherit="1f81"> + <id>0x1f83</id> + <category>Equipment\Drinks\Empty Glass 3</category> + </item> + + <item id="1f84" inherit="1f81"> + <id>0x1f84</id> + <category>Equipment\Drinks\Empty Glass 4</category> + </item> + <item id="1f91"> <id>0x1f91</id> ! <weight>1.0</weight> ! <tag name="fluid" value="water" /> ! <tag name="quantity" value="5" type="int" /> ! <events>beverage</events> <category>Equipment\Drinks\Glass of Water 1</category> </item> *************** *** 257,262 **** <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>2</weight> ! <type>105</type> <category>Equipment\Drinks\Pitcher of Ale 1</category> </item> --- 314,321 ---- <buyprice>13</buyprice> <sellprice>6</sellprice> ! <events>beverage</events> ! <weight>1.0</weight> ! <tag name="fluid" value="ale" /> ! <tag name="quantity" value="5" type="int" /> <category>Equipment\Drinks\Pitcher of Ale 1</category> </item> *************** *** 269,276 **** <item id="1f97"> <id>0x1f97</id> ! <type>105</type> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>2</weight> <category>Equipment\Drinks\Pitcher of Cider 1</category> </item> --- 328,337 ---- <item id="1f97"> <id>0x1f97</id> ! <events>beverage</events> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>1.0</weight> ! <tag name="fluid" value="cider" /> ! <tag name="quantity" value="5" type="int" /> <category>Equipment\Drinks\Pitcher of Cider 1</category> </item> *************** *** 283,290 **** <item id="1f99"> <id>0x1f99</id> ! <type>105</type> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>2</weight> <category>Equipment\Drinks\Pitcher of Liquor 1</category> </item> --- 344,353 ---- <item id="1f99"> <id>0x1f99</id> ! <events>beverage</events> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>1.0</weight> ! <tag name="fluid" value="liquor" /> ! <tag name="quantity" value="5" type="int" /> <category>Equipment\Drinks\Pitcher of Liquor 1</category> </item> *************** *** 297,304 **** <item id="1f9b"> <id>0x1f9b</id> ! <type>105</type> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>2</weight> <category>Equipment\Drinks\Pitcher of Wine 1</category> </item> --- 360,369 ---- <item id="1f9b"> <id>0x1f9b</id> ! <events>beverage</events> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>1.0</weight> ! <tag name="fluid" value="wine" /> ! <tag name="quantity" value="5" type="int" /> <category>Equipment\Drinks\Pitcher of Wine 1</category> </item> *************** *** 312,319 **** <item id="ff8"> <id>0xff8</id> ! <type>105</type> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>2</weight> <category>Equipment\Food\Pitcher of Water 1</category> </item> --- 377,386 ---- <item id="ff8"> <id>0xff8</id> ! <events>beverage</events> <buyprice>13</buyprice> <sellprice>6</sellprice> ! <weight>1.0</weight> ! <tag name="fluid" value="water" /> ! <tag name="quantity" value="5" type="int" /> <category>Equipment\Food\Pitcher of Water 1</category> </item> |
From: Sebastian H. <dar...@us...> - 2004-07-23 19:42:23
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/professions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7456/items/professions Modified Files: cook.xml mage.xml Log Message: More options for the beverage script Index: cook.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/professions/cook.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cook.xml 17 Jul 2004 03:30:00 -0000 1.3 --- cook.xml 23 Jul 2004 19:42:11 -0000 1.4 *************** *** 534,557 **** </item> - <item id="1f81"> - <category>Professions\Cook\Decoration\Kitchen\Glass 1</category> - <id>0x1f81</id> - </item> - - <item id="1f82"> - <id>0x1f82</id> - <category>Professions\Cook\Decoration\Kitchen\Glass 2</category> - </item> - - <item id="1f83"> - <id>0x1f83</id> - <category>Professions\Cook\Decoration\Kitchen\Glass 3</category> - </item> - - <item id="1f84"> - <id>0x1f84</id> - <category>Professions\Cook\Decoration\Kitchen\Glass 4</category> - </item> - <item id="10e8"> <id>0x10e8</id> --- 534,537 ---- Index: mage.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/professions/mage.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mage.xml 20 Jul 2004 20:58:13 -0000 1.12 --- mage.xml 23 Jul 2004 19:42:11 -0000 1.13 *************** *** 980,983 **** --- 980,985 ---- <id>0xfbf</id> <category>Professions\Mage\Pen & Ink (N/S)</category> + <events>skills.inscription</events> + <weight>1.0</weight> </item> |