[wpdev-commits] wolfpack/python char.cpp,1.95,1.96 global.cpp,1.78,1.79
Brought to you by:
rip,
thiagocorrea
|
From: <thi...@us...> - 2003-08-06 00:20:36
|
Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1:/tmp/cvs-serv32628/python
Modified Files:
char.cpp global.cpp
Log Message:
Fixing our METH_NOARG calls... they were wrong according to Python 2.3 docs :(
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** char.cpp 4 Aug 2003 07:28:17 -0000 1.95
--- char.cpp 6 Aug 2003 00:20:33 -0000 1.96
***************
*** 70,77 ****
}
- // Forward Declarations
- #define pGetInt( a, b ) if( !strcmp( name, a ) ) return PyInt_FromLong( self->pChar->b );
- #define pGetStr( a, b ) if( !strcmp( name, a ) ) return PyString_FromString( self->pChar->b );
-
PyObject *wpChar_getAttr( wpChar *self, char *name );
int wpChar_setAttr( wpChar *self, char *name, PyObject *value );
--- 70,73 ----
***************
*** 114,118 ****
Resends the character.
*/
! PyObject* wpChar_update( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 110,114 ----
Resends the character.
*/
! static PyObject* wpChar_update( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 128,132 ****
Removes the character from view.
*/
! PyObject* wpChar_removefromview( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 124,128 ----
Removes the character from view.
*/
! static PyObject* wpChar_removefromview( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 144,148 ****
Displays a message to the character if connected.
*/
! PyObject* wpChar_message( wpChar* self, PyObject* args )
{
P_PLAYER player = dynamic_cast<P_PLAYER>(self->pChar);
--- 140,144 ----
Displays a message to the character if connected.
*/
! static PyObject* wpChar_message( wpChar* self, PyObject* args )
{
P_PLAYER player = dynamic_cast<P_PLAYER>(self->pChar);
***************
*** 173,177 ****
Moves the char to the specified location
*/
! PyObject* wpChar_moveto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 169,173 ----
Moves the char to the specified location
*/
! static PyObject* wpChar_moveto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 229,233 ****
Plays a creature specific sound.
*/
! PyObject* wpChar_sound( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 225,229 ----
Plays a creature specific sound.
*/
! static PyObject* wpChar_sound( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 247,251 ****
Plays a soundeffect originating from the char
*/
! PyObject* wpChar_soundeffect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 243,247 ----
Plays a soundeffect originating from the char
*/
! static PyObject* wpChar_soundeffect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 269,273 ****
Returns the distance towards a given object or position
*/
! PyObject* wpChar_distanceto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 265,269 ----
Returns the distance towards a given object or position
*/
! static PyObject* wpChar_distanceto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 311,315 ****
Lets the character perform an action
*/
! PyObject* wpChar_action( wpChar* self, PyObject* args )
{
if( PyTuple_Size( args ) < 1 || !PyInt_Check( PyTuple_GetItem( args, 0 ) ) )
--- 307,311 ----
Lets the character perform an action
*/
! static PyObject* wpChar_action( wpChar* self, PyObject* args )
{
if( PyTuple_Size( args ) < 1 || !PyInt_Check( PyTuple_GetItem( args, 0 ) ) )
***************
*** 327,331 ****
toward some object or position
*/
! PyObject* wpChar_directionto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 323,327 ----
toward some object or position
*/
! static PyObject* wpChar_directionto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 373,377 ****
and minimum and maximum arguments.
*/
! PyObject* wpChar_checkskill( wpChar* self, PyObject* args )
{
if( self->pChar->free )
--- 369,373 ----
and minimum and maximum arguments.
*/
! static PyObject* wpChar_checkskill( wpChar* self, PyObject* args )
{
if( self->pChar->free )
***************
*** 394,398 ****
it returns Py_None.
*/
! PyObject* wpChar_itemonlayer( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 390,394 ----
it returns Py_None.
*/
! static PyObject* wpChar_itemonlayer( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 411,415 ****
Returns the combat skill currently used by the character
*/
! PyObject* wpChar_combatskill( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 407,411 ----
Returns the combat skill currently used by the character
*/
! static PyObject* wpChar_combatskill( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 431,435 ****
and returns how much have been really consumed.
*/
! PyObject* wpChar_useresource( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 427,431 ----
and returns how much have been really consumed.
*/
! static PyObject* wpChar_useresource( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 461,465 ****
Resurrects the current character
*/
! PyObject* wpChar_resurrect( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 457,461 ----
Resurrects the current character
*/
! static PyObject* wpChar_resurrect( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 475,479 ****
Kills the current character
*/
! PyObject* wpChar_kill( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 471,475 ----
Kills the current character
*/
! static PyObject* wpChar_kill( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 491,495 ****
This cannot be used for healing!
*/
! PyObject* wpChar_damage( wpChar* self, PyObject* args )
{
if( self->pChar->free )
--- 487,491 ----
This cannot be used for healing!
*/
! static PyObject* wpChar_damage( wpChar* self, PyObject* args )
{
if( self->pChar->free )
***************
*** 520,524 ****
Shows an emote above the chars head
*/
! PyObject* wpChar_emote( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 516,520 ----
Shows an emote above the chars head
*/
! static PyObject* wpChar_emote( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 539,543 ****
The character says something.
*/
! PyObject* wpChar_say( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 535,539 ----
The character says something.
*/
! static PyObject* wpChar_say( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 565,569 ****
available
*/
! PyObject* wpChar_countresource( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 561,565 ----
available
*/
! static PyObject* wpChar_countresource( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 591,595 ****
}
! PyObject* wpChar_isitem( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 587,591 ----
}
! static PyObject* wpChar_isitem( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 598,602 ****
}
! PyObject* wpChar_ischar( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 594,598 ----
}
! static PyObject* wpChar_ischar( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 608,612 ****
Returns the custom tag passed
*/
! PyObject* wpChar_gettag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 604,608 ----
Returns the custom tag passed
*/
! static PyObject* wpChar_gettag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 639,643 ****
Sets a custom tag
*/
! PyObject* wpChar_settag( wpChar* self, PyObject* args )
{
if( self->pChar->free )
--- 635,639 ----
Sets a custom tag
*/
! static PyObject* wpChar_settag( wpChar* self, PyObject* args )
{
if( self->pChar->free )
***************
*** 672,676 ****
Checks if a certain tag exists
*/
! PyObject* wpChar_hastag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 668,672 ----
Checks if a certain tag exists
*/
! static PyObject* wpChar_hastag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 691,695 ****
Deletes a given tag
*/
! PyObject* wpChar_deltag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 687,691 ----
Deletes a given tag
*/
! static PyObject* wpChar_deltag( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 711,715 ****
* Sends MakeMenu defined as xml file to this character
*/
! PyObject* wpChar_sendmakemenu( wpChar* self, PyObject* args )
{
P_PLAYER player = dynamic_cast<P_PLAYER>( self->pChar );
--- 707,711 ----
* Sends MakeMenu defined as xml file to this character
*/
! static PyObject* wpChar_sendmakemenu( wpChar* self, PyObject* args )
{
P_PLAYER player = dynamic_cast<P_PLAYER>( self->pChar );
***************
*** 733,737 ****
Adds a follower
*/
! PyObject* wpChar_addfollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 729,733 ----
Adds a follower
*/
! static PyObject* wpChar_addfollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 761,765 ****
Removes a follower
*/
! PyObject* wpChar_removefollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 757,761 ----
Removes a follower
*/
! static PyObject* wpChar_removefollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 790,794 ****
Checks if the Char has a follower
*/
! PyObject* wpChar_hasfollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 786,790 ----
Checks if the Char has a follower
*/
! static PyObject* wpChar_hasfollower( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 820,824 ****
Resends the healthbar to the environment.
*/
! PyObject* wpChar_updatehealth( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 816,820 ----
Resends the healthbar to the environment.
*/
! static PyObject* wpChar_updatehealth( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 833,837 ****
Resends the mana to this character.
*/
! PyObject* wpChar_updatemana( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 829,833 ----
Resends the mana to this character.
*/
! static PyObject* wpChar_updatemana( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 855,859 ****
Resends the Stamina to this character.
*/
! PyObject* wpChar_updatestamina( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 851,855 ----
Resends the Stamina to this character.
*/
! static PyObject* wpChar_updatestamina( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 877,881 ****
Resends all stats to this character.
*/
! PyObject* wpChar_updatestats( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 873,877 ----
Resends all stats to this character.
*/
! static PyObject* wpChar_updatestats( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 900,904 ****
What weapon is the character currently wearing?
*/
! PyObject* wpChar_getweapon( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 896,900 ----
What weapon is the character currently wearing?
*/
! static PyObject* wpChar_getweapon( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 912,916 ****
Turns towards a specific object.
*/
! PyObject* wpChar_turnto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 908,912 ----
Turns towards a specific object.
*/
! static PyObject* wpChar_turnto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 946,950 ****
Mounts this character on a specific mount.
*/
! PyObject* wpChar_mount( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 942,946 ----
Mounts this character on a specific mount.
*/
! static PyObject* wpChar_mount( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 975,979 ****
Unmounts this character and returns the old mount.
*/
! PyObject* wpChar_unmount( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 971,975 ----
Unmounts this character and returns the old mount.
*/
! static PyObject* wpChar_unmount( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 991,995 ****
Equips a given item on this character.
*/
! PyObject* wpChar_equip( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 987,991 ----
Equips a given item on this character.
*/
! static PyObject* wpChar_equip( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1013,1017 ****
Gets or Autocreates a bankbox for the character.
*/
! PyObject* wpChar_getbankbox( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1009,1013 ----
Gets or Autocreates a bankbox for the character.
*/
! static PyObject* wpChar_getbankbox( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1030,1034 ****
Gets or Autocreates a backpack for the character.
*/
! PyObject* wpChar_getbackpack( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1026,1030 ----
Gets or Autocreates a backpack for the character.
*/
! static PyObject* wpChar_getbackpack( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1042,1046 ****
Shows a moving effect moving toward a given object or coordinate.
*/
! PyObject* wpChar_movingeffect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1038,1042 ----
Shows a moving effect moving toward a given object or coordinate.
*/
! static PyObject* wpChar_movingeffect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1097,1101 ****
Shows an effect staying with this character.
*/
! PyObject* wpChar_effect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1093,1097 ----
Shows an effect staying with this character.
*/
! static PyObject* wpChar_effect( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1136,1140 ****
Adds a temp effect to this character.
*/
! PyObject* wpChar_dispel( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1132,1136 ----
Adds a temp effect to this character.
*/
! static PyObject* wpChar_dispel( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1208,1212 ****
Adds a temp effect to this character.
*/
! PyObject* wpChar_addtimer( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1204,1208 ----
Adds a temp effect to this character.
*/
! static PyObject* wpChar_addtimer( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1256,1260 ****
Checks if we can stand at a certain point.
*/
! PyObject* wpChar_maywalk( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1252,1256 ----
Checks if we can stand at a certain point.
*/
! static PyObject* wpChar_maywalk( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1283,1287 ****
Are we criminal.
*/
! PyObject* wpChar_iscriminal( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1279,1283 ----
Are we criminal.
*/
! static PyObject* wpChar_iscriminal( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1295,1299 ****
Are we a murderer.
*/
! PyObject* wpChar_ismurderer( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1291,1295 ----
Are we a murderer.
*/
! static PyObject* wpChar_ismurderer( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1307,1311 ****
Make this character criminal.
*/
! PyObject* wpChar_criminal( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1303,1307 ----
Make this character criminal.
*/
! static PyObject* wpChar_criminal( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1326,1330 ****
Let's this character attack someone else.
*/
! PyObject* wpChar_attack( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1322,1326 ----
Let's this character attack someone else.
*/
! static PyObject* wpChar_attack( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1350,1354 ****
The character should follow someone else.
*/
! PyObject* wpChar_follow( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1346,1350 ----
The character should follow someone else.
*/
! static PyObject* wpChar_follow( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1379,1383 ****
Disturbs whatever this character is doing right now.
*/
! PyObject* wpChar_disturb( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1375,1379 ----
Disturbs whatever this character is doing right now.
*/
! static PyObject* wpChar_disturb( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1398,1402 ****
The character should follow someone else.
*/
! PyObject* wpChar_goto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
--- 1394,1398 ----
The character should follow someone else.
*/
! static PyObject* wpChar_goto( wpChar* self, PyObject* args )
{
if( !self->pChar || self->pChar->free )
***************
*** 1433,1437 ****
to this if you want to update the socket itself.
*/
! PyObject* wpChar_updateflags( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1429,1433 ----
to this if you want to update the socket itself.
*/
! static PyObject* wpChar_updateflags( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1448,1452 ****
The second parameter specifies the range the character needs to be in.
*/
! PyObject* wpChar_canreach( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
--- 1444,1448 ----
The second parameter specifies the range the character needs to be in.
*/
! static PyObject* wpChar_canreach( wpChar* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 1491,1569 ****
static PyMethodDef wpCharMethods[] =
{
! { "moveto", (getattrofunc)wpChar_moveto, METH_VARARGS, "Moves the character to the specified location." },
! { "resurrect", (getattrofunc)wpChar_resurrect, METH_VARARGS, "Resurrects the character." },
! { "kill", (getattrofunc)wpChar_kill, METH_VARARGS, "This kills the character." },
! { "damage", (getattrofunc)wpChar_damage, METH_VARARGS, "This damages the current character." },
! { "update", (getattrofunc)wpChar_update, METH_VARARGS, "Resends the char to all clients in range." },
! { "updateflags", (getattrofunc)wpChar_updateflags, METH_VARARGS, "Resends the character if flags have changed (take care, this might look like a move)." },
! { "removefromview", (getattrofunc)wpChar_removefromview, METH_VARARGS, "Removes the char from all surrounding clients." },
! { "message", (getattrofunc)wpChar_message, METH_VARARGS, "Displays a message above the characters head - only visible for the player." },
! { "soundeffect", (getattrofunc)wpChar_soundeffect, METH_VARARGS, "Plays a soundeffect for the character." },
! { "distanceto", (getattrofunc)wpChar_distanceto, METH_VARARGS, "Distance to another object or a given position." },
! { "action", (getattrofunc)wpChar_action, METH_VARARGS, "Lets the char perform an action." },
! { "directionto", (getattrofunc)wpChar_directionto, METH_VARARGS, "Distance to another object or a given position." },
! { "checkskill", (getattrofunc)wpChar_checkskill, METH_VARARGS, "Performs a skillcheck for the character." },
! { "itemonlayer", (getattrofunc)wpChar_itemonlayer, METH_VARARGS, "Returns the item currently weared on a specific layer, or returns none." },
! { "combatskill", (getattrofunc)wpChar_combatskill, METH_VARARGS, "Returns the combat skill the character would currently use." },
! { "getweapon", (getattrofunc)wpChar_getweapon, METH_VARARGS, "What weapon does the character currently wear." },
! { "useresource", (getattrofunc)wpChar_useresource, METH_VARARGS, "Consumes a resource posessed by the char." },
! { "countresource", (getattrofunc)wpChar_countresource, METH_VARARGS, "Counts the amount of a certain resource the user has." },
! { "emote", (getattrofunc)wpChar_emote, METH_VARARGS, "Shows an emote above the character." },
! { "say", (getattrofunc)wpChar_say, METH_VARARGS, "The character begins to talk." },
! { "turnto", (getattrofunc)wpChar_turnto, METH_VARARGS, "Turns towards a specific object and resends if neccesary." },
! { "equip", (getattrofunc)wpChar_equip, METH_VARARGS, "Equips a given item on this character." },
! { "maywalk", (getattrofunc)wpChar_maywalk, METH_VARARGS, "Checks if this character may walk to a specific cell." },
! { "sound", (getattrofunc)wpChar_sound, METH_VARARGS, "Play a creature specific sound." },
! { "disturb", (getattrofunc)wpChar_disturb, METH_VARARGS, "Disturbs whatever this character is doing right now." },
! { "canreach", (getattrofunc)wpChar_canreach, METH_VARARGS, "Checks if this character can reach a certain object." },
// Mostly NPC functions
! { "attack", (getattrofunc)wpChar_attack, METH_VARARGS, "Let's the character attack someone else." },
! { "goto", (getattrofunc)wpChar_goto, METH_VARARGS, "The character should go to a coordinate." },
! { "follow", (getattrofunc)wpChar_follow, METH_VARARGS, "The character should follow someone else." },
! { "addtimer", (getattrofunc)wpChar_addtimer, METH_VARARGS, "Adds a timer to this character." },
! { "dispel", (getattrofunc)wpChar_dispel, METH_VARARGS, "Dispels this character (with special options)." },
// Update Stats
! { "updatestats", (getattrofunc)wpChar_updatestats, METH_VARARGS, "Resends other stats to this character." },
! { "updatemana", (getattrofunc)wpChar_updatemana, METH_VARARGS, "Resends the manabar to this character." },
! { "updatestamina", (getattrofunc)wpChar_updatestamina, METH_VARARGS, "Resends the stamina bar to this character." },
! { "updatehealth", (getattrofunc)wpChar_updatehealth, METH_VARARGS, "Resends the healthbar to the environment." },
// Mount/Unmount
! { "unmount", (getattrofunc)wpChar_unmount, METH_VARARGS, "Unmounts this character and returns the character it was previously mounted." },
! { "mount", (getattrofunc)wpChar_mount, METH_VARARGS, "Mounts this on a specific mount." },
// Effects
! { "movingeffect", (getattrofunc)wpChar_movingeffect, METH_VARARGS, "Shows a moving effect moving toward a given object or coordinate." },
! { "effect", (getattrofunc)wpChar_effect, METH_VARARGS, "Shows an effect staying with this character." },
// Bank/Backpack
! { "getbankbox", (getattrofunc)wpChar_getbankbox, METH_VARARGS, "Gets and autocreates a bankbox for the character." },
! { "getbackpack", (getattrofunc)wpChar_getbackpack, METH_VARARGS, "Gets and autocreates a backpack for the character." },
// Follower System
! { "addfollower", (getattrofunc)wpChar_addfollower, METH_VARARGS, "Adds a follower to the user." },
! { "removefollower", (getattrofunc)wpChar_removefollower, METH_VARARGS, "Removes a follower from the user." },
! { "hasfollower", (getattrofunc)wpChar_hasfollower, METH_VARARGS, "Checks if a certain character is a follower of this." },
// Tag System
! { "gettag", (getattrofunc)wpChar_gettag, METH_VARARGS, "Gets a tag assigned to a specific char." },
! { "settag", (getattrofunc)wpChar_settag, METH_VARARGS, "Sets a tag assigned to a specific char." },
! { "hastag", (getattrofunc)wpChar_hastag, METH_VARARGS, "Checks if a certain char has the specified tag." },
! { "deltag", (getattrofunc)wpChar_deltag, METH_VARARGS, "Deletes the specified tag." },
// Crafting Menu
! { "sendmakemenu", (getattrofunc)wpChar_sendmakemenu, METH_VARARGS, "Sends MakeMenu to this character." },
// Reputation System
! { "iscriminal", (getattrofunc)wpChar_iscriminal, METH_VARARGS, "Is this character criminal.." },
! { "ismurderer", (getattrofunc)wpChar_ismurderer, METH_VARARGS, "Is this character a murderer." },
! { "criminal", (getattrofunc)wpChar_criminal, METH_VARARGS, "Make this character criminal." },
// Is*? Functions
! { "isitem", (getattrofunc)wpChar_isitem, METH_VARARGS, "Is this an item." },
! { "ischar", (getattrofunc)wpChar_ischar, METH_VARARGS, "Is this a char." },
{ NULL, NULL, 0, NULL }
};
--- 1487,1565 ----
static PyMethodDef wpCharMethods[] =
{
! { "moveto", (getattrofunc)wpChar_moveto, METH_VARARGS, "Moves the character to the specified location." },
! { "resurrect", (getattrofunc)wpChar_resurrect, METH_VARARGS, "Resurrects the character." },
! { "kill", (getattrofunc)wpChar_kill, METH_VARARGS, "This kills the character." },
! { "damage", (getattrofunc)wpChar_damage, METH_VARARGS, "This damages the current character." },
! { "update", (getattrofunc)wpChar_update, METH_VARARGS, "Resends the char to all clients in range." },
! { "updateflags", (getattrofunc)wpChar_updateflags, METH_VARARGS, "Resends the character if flags have changed (take care, this might look like a move)." },
! { "removefromview", (getattrofunc)wpChar_removefromview, METH_VARARGS, "Removes the char from all surrounding clients." },
! { "message", (getattrofunc)wpChar_message, METH_VARARGS, "Displays a message above the characters head - only visible for the player." },
! { "soundeffect", (getattrofunc)wpChar_soundeffect, METH_VARARGS, "Plays a soundeffect for the character." },
! { "distanceto", (getattrofunc)wpChar_distanceto, METH_VARARGS, "Distance to another object or a given position." },
! { "action", (getattrofunc)wpChar_action, METH_VARARGS, "Lets the char perform an action." },
! { "directionto", (getattrofunc)wpChar_directionto, METH_VARARGS, "Distance to another object or a given position." },
! { "checkskill", (getattrofunc)wpChar_checkskill, METH_VARARGS, "Performs a skillcheck for the character." },
! { "itemonlayer", (getattrofunc)wpChar_itemonlayer, METH_VARARGS, "Returns the item currently weared on a specific layer, or returns none." },
! { "combatskill", (getattrofunc)wpChar_combatskill, METH_VARARGS, "Returns the combat skill the character would currently use." },
! { "getweapon", (getattrofunc)wpChar_getweapon, METH_VARARGS, "What weapon does the character currently wear." },
! { "useresource", (getattrofunc)wpChar_useresource, METH_VARARGS, "Consumes a resource posessed by the char." },
! { "countresource", (getattrofunc)wpChar_countresource, METH_VARARGS, "Counts the amount of a certain resource the user has." },
! { "emote", (getattrofunc)wpChar_emote, METH_VARARGS, "Shows an emote above the character." },
! { "say", (getattrofunc)wpChar_say, METH_VARARGS, "The character begins to talk." },
! { "turnto", (getattrofunc)wpChar_turnto, METH_VARARGS, "Turns towards a specific object and resends if neccesary." },
! { "equip", (getattrofunc)wpChar_equip, METH_VARARGS, "Equips a given item on this character." },
! { "maywalk", (getattrofunc)wpChar_maywalk, METH_VARARGS, "Checks if this character may walk to a specific cell." },
! { "sound", (getattrofunc)wpChar_sound, METH_VARARGS, "Play a creature specific sound." },
! { "disturb", (getattrofunc)wpChar_disturb, METH_VARARGS, "Disturbs whatever this character is doing right now." },
! { "canreach", (getattrofunc)wpChar_canreach, METH_VARARGS, "Checks if this character can reach a certain object." },
// Mostly NPC functions
! { "attack", (getattrofunc)wpChar_attack, METH_VARARGS, "Let's the character attack someone else." },
! { "goto", (getattrofunc)wpChar_goto, METH_VARARGS, "The character should go to a coordinate." },
! { "follow", (getattrofunc)wpChar_follow, METH_VARARGS, "The character should follow someone else." },
! { "addtimer", (getattrofunc)wpChar_addtimer, METH_VARARGS, "Adds a timer to this character." },
! { "dispel", (getattrofunc)wpChar_dispel, METH_VARARGS, "Dispels this character (with special options)." },
// Update Stats
! { "updatestats", (getattrofunc)wpChar_updatestats, METH_VARARGS, "Resends other stats to this character." },
! { "updatemana", (getattrofunc)wpChar_updatemana, METH_VARARGS, "Resends the manabar to this character." },
! { "updatestamina", (getattrofunc)wpChar_updatestamina, METH_VARARGS, "Resends the stamina bar to this character." },
! { "updatehealth", (getattrofunc)wpChar_updatehealth, METH_VARARGS, "Resends the healthbar to the environment." },
// Mount/Unmount
! { "unmount", (getattrofunc)wpChar_unmount, METH_VARARGS, "Unmounts this character and returns the character it was previously mounted." },
! { "mount", (getattrofunc)wpChar_mount, METH_VARARGS, "Mounts this on a specific mount." },
// Effects
! { "movingeffect", (getattrofunc)wpChar_movingeffect, METH_VARARGS, "Shows a moving effect moving toward a given object or coordinate." },
! { "effect", (getattrofunc)wpChar_effect, METH_VARARGS, "Shows an effect staying with this character." },
// Bank/Backpack
! { "getbankbox", (getattrofunc)wpChar_getbankbox, METH_VARARGS, "Gets and autocreates a bankbox for the character." },
! { "getbackpack", (getattrofunc)wpChar_getbackpack, METH_VARARGS, "Gets and autocreates a backpack for the character." },
// Follower System
! { "addfollower", (getattrofunc)wpChar_addfollower, METH_VARARGS, "Adds a follower to the user." },
! { "removefollower", (getattrofunc)wpChar_removefollower, METH_VARARGS, "Removes a follower from the user." },
! { "hasfollower", (getattrofunc)wpChar_hasfollower, METH_VARARGS, "Checks if a certain character is a follower of this." },
// Tag System
! { "gettag", (getattrofunc)wpChar_gettag, METH_VARARGS, "Gets a tag assigned to a specific char." },
! { "settag", (getattrofunc)wpChar_settag, METH_VARARGS, "Sets a tag assigned to a specific char." },
! { "hastag", (getattrofunc)wpChar_hastag, METH_VARARGS, "Checks if a certain char has the specified tag." },
! { "deltag", (getattrofunc)wpChar_deltag, METH_VARARGS, "Deletes the specified tag." },
// Crafting Menu
! { "sendmakemenu", (getattrofunc)wpChar_sendmakemenu, METH_VARARGS, "Sends MakeMenu to this character." },
// Reputation System
! { "iscriminal", (getattrofunc)wpChar_iscriminal, METH_VARARGS, "Is this character criminal.." },
! { "ismurderer", (getattrofunc)wpChar_ismurderer, METH_VARARGS, "Is this character a murderer." },
! { "criminal", (getattrofunc)wpChar_criminal, METH_VARARGS, "Make this character criminal." },
// Is*? Functions
! { "isitem", (getattrofunc)wpChar_isitem, METH_VARARGS, "Is this an item." },
! { "ischar", (getattrofunc)wpChar_ischar, METH_VARARGS, "Is this a char." },
{ NULL, NULL, 0, NULL }
};
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** global.cpp 4 Aug 2003 07:28:18 -0000 1.78
--- global.cpp 6 Aug 2003 00:20:33 -0000 1.79
***************
*** 121,125 ****
Sends a string to the wolfpack console.
*/
! PyObject* wpConsole_send( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 121,125 ----
Sends a string to the wolfpack console.
*/
! static PyObject* wpConsole_send( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 140,144 ****
Sends a progress-bar to the wolfpack console
*/
! PyObject* wpConsole_progress( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 140,144 ----
Sends a progress-bar to the wolfpack console
*/
! static PyObject* wpConsole_progress( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 159,165 ****
Sends a [done] progress section to the console
*/
! PyObject* wpConsole_progressDone( PyObject* self )
{
Q_UNUSED(self);
clConsole.ProgressDone();
return PyInt_FromLong( 1 );
--- 159,166 ----
Sends a [done] progress section to the console
*/
! static PyObject* wpConsole_progressDone( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
clConsole.ProgressDone();
return PyInt_FromLong( 1 );
***************
*** 169,175 ****
Sends a [fail] progress section to the console
*/
! PyObject* wpConsole_progressFail( PyObject* self )
{
Q_UNUSED(self);
clConsole.ProgressFail();
return PyInt_FromLong( 1 );
--- 170,177 ----
Sends a [fail] progress section to the console
*/
! static PyObject* wpConsole_progressFail( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
clConsole.ProgressFail();
return PyInt_FromLong( 1 );
***************
*** 179,185 ****
Sends a [skip] progress section to the console
*/
! PyObject* wpConsole_progressSkip( PyObject* self )
{
Q_UNUSED(self);
clConsole.ProgressSkip();
return PyInt_FromLong( 1 );
--- 181,188 ----
Sends a [skip] progress section to the console
*/
! static PyObject* wpConsole_progressSkip( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
clConsole.ProgressSkip();
return PyInt_FromLong( 1 );
***************
*** 189,195 ****
Returns a list of Strings (the linebuffer)
*/
! PyObject* wpConsole_getbuffer( PyObject* self )
{
Q_UNUSED(self);
QStringList linebuffer = clConsole.linebuffer();
PyObject *list = PyList_New( linebuffer.count() );
--- 192,199 ----
Returns a list of Strings (the linebuffer)
*/
! static PyObject* wpConsole_getbuffer( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
QStringList linebuffer = clConsole.linebuffer();
PyObject *list = PyList_New( linebuffer.count() );
***************
*** 206,212 ****
extern QStringList commandQueue;
extern QMutex commandMutex;
! PyObject* wpConsole_reloadScripts( PyObject* self )
{
Q_UNUSED(self);
// Temporary implementation while thread comunication is not done
QMutexLocker lock(&commandMutex);
--- 210,217 ----
extern QStringList commandQueue;
extern QMutex commandMutex;
! static PyObject* wpConsole_reloadScripts( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
// Temporary implementation while thread comunication is not done
QMutexLocker lock(&commandMutex);
***************
*** 230,240 ****
static PyMethodDef wpConsole[] =
{
! { "send", wpConsole_send, METH_VARARGS, "Prints something to the wolfpack console" },
! { "progress", wpConsole_progress, METH_VARARGS, "Prints a .....[xxxx] block" },
! { "progressDone", (PyCFunction)wpConsole_progressDone, METH_NOARGS, "Prints a [done] block" },
! { "progressFail", (PyCFunction)wpConsole_progressFail, METH_NOARGS, "Prints a [fail] block" },
! { "progressSkip", (PyCFunction)wpConsole_progressSkip, METH_NOARGS, "Prints a [skip] block" },
! { "getbuffer", (PyCFunction)wpConsole_getbuffer, METH_NOARGS, "Gets the linebuffer of the console" },
! { "reloadScripts", (PyCFunction)wpConsole_reloadScripts, METH_NOARGS, "Reloads Scripts and Definitions" },
{ NULL, NULL, 0, NULL } // Terminator
};
--- 235,245 ----
static PyMethodDef wpConsole[] =
{
! { "send", wpConsole_send, METH_VARARGS, "Prints something to the wolfpack console" },
! { "progress", wpConsole_progress, METH_VARARGS, "Prints a .....[xxxx] block" },
! { "progressDone", wpConsole_progressDone, METH_NOARGS, "Prints a [done] block" },
! { "progressFail", wpConsole_progressFail, METH_NOARGS, "Prints a [fail] block" },
! { "progressSkip", wpConsole_progressSkip, METH_NOARGS, "Prints a [skip] block" },
! { "getbuffer", wpConsole_getbuffer, METH_NOARGS, "Gets the linebuffer of the console" },
! { "reloadScripts", wpConsole_reloadScripts, METH_NOARGS, "Reloads Scripts and Definitions" },
{ NULL, NULL, 0, NULL } // Terminator
};
***************
*** 243,249 ****
Gets the seconds of the current uo time
*/
! PyObject* wpTime_second( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.time().second() );
}
--- 248,255 ----
Gets the seconds of the current uo time
*/
! static PyObject* wpTime_second( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.time().second() );
}
***************
*** 252,258 ****
Gets the minutes of the current uo time
*/
! PyObject* wpTime_minute( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.time().minute() );
}
--- 258,265 ----
Gets the minutes of the current uo time
*/
! static PyObject* wpTime_minute( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.time().minute() );
}
***************
*** 261,267 ****
Gets the hours of the current uo time
*/
! PyObject* wpTime_hour( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.time().hour() );
}
--- 268,275 ----
Gets the hours of the current uo time
*/
! static PyObject* wpTime_hour( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.time().hour() );
}
***************
*** 270,276 ****
Gets the current day
*/
! PyObject* wpTime_day( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.date().day() );
}
--- 278,285 ----
Gets the current day
*/
! static PyObject* wpTime_day( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.date().day() );
}
***************
*** 279,285 ****
Gets the current month
*/
! PyObject* wpTime_month( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.date().month() );
}
--- 288,295 ----
Gets the current month
*/
! static PyObject* wpTime_month( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.date().month() );
}
***************
*** 288,294 ****
Gets the current year
*/
! PyObject* wpTime_year( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.date().year() );
}
--- 298,305 ----
Gets the current year
*/
! static PyObject* wpTime_year( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.date().year() );
}
***************
*** 297,303 ****
Gets a timestamp of the current uo time
*/
! PyObject* wpTime_timestamp( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uoTime.time().elapsed() );
}
--- 308,315 ----
Gets a timestamp of the current uo time
*/
! static PyObject* wpTime_timestamp( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uoTime.time().elapsed() );
}
***************
*** 308,318 ****
static PyMethodDef wpTime[] =
{
! { "second", (PyCFunction)wpTime_second, METH_NOARGS, "Returns the current time-seconds" },
! { "minute", (PyCFunction)wpTime_minute, METH_NOARGS, "Returns the current time-minutes" },
! { "hour", (PyCFunction)wpTime_hour, METH_NOARGS, "Returns the current time-hour" },
! { "day", (PyCFunction)wpTime_day, METH_NOARGS, "Returns the current date-day" },
! { "month", (PyCFunction)wpTime_month, METH_NOARGS, "Returns the current date-month" },
! { "year", (PyCFunction)wpTime_year, METH_NOARGS, "Returns the current date-year" },
! { "timestamp", (PyCFunction)wpTime_timestamp, METH_NOARGS, "Returns the current timestamp" },
{ NULL, NULL, 0, NULL } // Terminator
};
--- 320,330 ----
static PyMethodDef wpTime[] =
{
! { "second", wpTime_second, METH_NOARGS, "Returns the current time-seconds" },
! { "minute", wpTime_minute, METH_NOARGS, "Returns the current time-minutes" },
! { "hour", wpTime_hour, METH_NOARGS, "Returns the current time-hour" },
! { "day", wpTime_day, METH_NOARGS, "Returns the current date-day" },
! { "month", wpTime_month, METH_NOARGS, "Returns the current date-month" },
! { "year", wpTime_year, METH_NOARGS, "Returns the current date-year" },
! { "timestamp", wpTime_timestamp, METH_NOARGS, "Returns the current timestamp" },
{ NULL, NULL, 0, NULL } // Terminator
};
***************
*** 328,332 ****
Argument is just the def-section
*/
! PyObject* wpAdditem( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 340,344 ----
Argument is just the def-section
*/
! static PyObject* wpAdditem( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 345,349 ****
Adds a npc
*/
! PyObject* wpAddnpc( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 357,361 ----
Adds a npc
*/
! static PyObject* wpAddnpc( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 364,368 ****
passed serial
*/
! PyObject* wpFinditem( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 376,380 ----
passed serial
*/
! static PyObject* wpFinditem( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 381,385 ****
passed serial
*/
! PyObject* wpFindchar( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 393,397 ----
passed serial
*/
! static PyObject* wpFindchar( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 397,401 ****
* Creates a multi object based on the passed pos
*/
! PyObject* wpFindmulti( PyObject* self, PyObject* args )
{
Q_UNUSED( self );
--- 409,413 ----
* Creates a multi object based on the passed pos
*/
! static PyObject* wpFindmulti( PyObject* self, PyObject* args )
{
Q_UNUSED( self );
***************
*** 424,428 ****
Adds a tempeffect
*/
! PyObject* wpAddtimer( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 436,440 ----
Adds a tempeffect
*/
! static PyObject* wpAddtimer( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 455,459 ****
Tries to find a region for a specific position.
*/
! PyObject* wpRegion( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 467,471 ----
Tries to find a region for a specific position.
*/
! static PyObject* wpRegion( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 472,478 ****
used for object-delays and others
*/
! PyObject* wpCurrenttime( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uiCurrentTime );
}
--- 484,491 ----
used for object-delays and others
*/
! static PyObject* wpCurrenttime( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uiCurrentTime );
}
***************
*** 481,485 ****
Returns a list of Static item at a given position
*/
! PyObject *wpStatics( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 494,498 ----
Returns a list of Static item at a given position
*/
! static PyObject *wpStatics( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 522,526 ****
Returns a list of all items serials
*/
! PyObject *wpAllItemsSerials( PyObject* self, PyObject* args )
{
Q_UNUSED(args);
--- 535,539 ----
Returns a list of all items serials
*/
! static PyObject *wpAllItemsSerials( PyObject* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 538,542 ****
Returns a list of all chars serials
*/
! PyObject *wpAllCharsSerials( PyObject* self, PyObject* args )
{
Q_UNUSED(args);
--- 551,555 ----
Returns a list of all chars serials
*/
! static PyObject *wpAllCharsSerials( PyObject* self, PyObject* args )
{
Q_UNUSED(args);
***************
*** 554,558 ****
Returns a list of items at a given position (sector)
*/
! PyObject *wpItems( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 567,571 ----
Returns a list of items at a given position (sector)
*/
! static PyObject *wpItems( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 587,591 ****
Returns a list of chars at a given position (sector)
*/
! PyObject *wpChars( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 600,604 ----
Returns a list of chars at a given position (sector)
*/
! static PyObject *wpChars( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 620,624 ****
Shows a graphical effect at a certain position
*/
! PyObject *wpEffect( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 633,637 ----
Shows a graphical effect at a certain position
*/
! static PyObject *wpEffect( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 653,657 ****
Returns information about a given map cell.
*/
! PyObject *wpMap( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 666,670 ----
Returns information about a given map cell.
*/
! static PyObject *wpMap( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 674,678 ****
Returns the tiledata information for a item id.
*/
! PyObject *wpTiledata( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 687,691 ----
Returns the tiledata information for a item id.
*/
! static PyObject *wpTiledata( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 712,716 ****
Returns a stringlist out of the definitions.
*/
! PyObject *wpList( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 725,729 ----
Returns a stringlist out of the definitions.
*/
! static PyObject *wpList( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 733,737 ****
Registers a global script hook.
*/
! PyObject *wpRegisterGlobal( PyObject* self, PyObject* args )
{
if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgStr( 2 ) )
--- 746,750 ----
Registers a global script hook.
*/
! static PyObject *wpRegisterGlobal( PyObject* self, PyObject* args )
{
if( !checkArgInt( 0 ) || !checkArgInt( 1 ) || !checkArgStr( 2 ) )
***************
*** 760,764 ****
Registers a global command hook.
*/
! PyObject *wpRegisterCommand( PyObject* self, PyObject* args )
{
if( !checkArgStr( 0 ) || !checkArgStr( 1 ) )
--- 773,777 ----
Registers a global command hook.
*/
! static PyObject *wpRegisterCommand( PyObject* self, PyObject* args )
{
if( !checkArgStr( 0 ) || !checkArgStr( 1 ) )
***************
*** 786,790 ****
Coord object creation
*/
! PyObject *wpCoord( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
--- 799,803 ----
Coord object creation
*/
! static PyObject *wpCoord( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
***************
*** 808,812 ****
Multi object creation
*/
! PyObject *wpMulti( PyObject* self, PyObject* args )
{
Q_UNUSED( self);
--- 821,825 ----
Multi object creation
*/
! static PyObject *wpMulti( PyObject* self, PyObject* args )
{
Q_UNUSED( self);
***************
*** 838,844 ****
Returns uptime of server in seconds
*/
! PyObject* wpServerUptime( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( uiCurrentTime / MY_CLOCKS_PER_SEC );
}
--- 851,858 ----
Returns uptime of server in seconds
*/
! static PyObject* wpServerUptime( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( uiCurrentTime / MY_CLOCKS_PER_SEC );
}
***************
*** 847,853 ****
Returns the server version string
*/
! PyObject* wpServerVersion( PyObject* self )
{
Q_UNUSED(self);
wp_version_info wpversioninfo;
return PyString_FromString( QString("%1 %2 %3").arg( wpversioninfo.productstring.c_str() ).arg( wpversioninfo.betareleasestring.c_str() ).arg( wpversioninfo.verstring.c_str() ).latin1() );
--- 861,868 ----
Returns the server version string
*/
! static PyObject* wpServerVersion( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
wp_version_info wpversioninfo;
return PyString_FromString( QString("%1 %2 %3").arg( wpversioninfo.productstring.c_str() ).arg( wpversioninfo.betareleasestring.c_str() ).arg( wpversioninfo.verstring.c_str() ).latin1() );
***************
*** 857,863 ****
Returns the current real date/time
*/
! PyObject* wpCurrentdatetime( PyObject* self )
{
Q_UNUSED(self);
return PyString_FromString( QDateTime::currentDateTime().toString() );
}
--- 872,879 ----
Returns the current real date/time
*/
! static PyObject* wpCurrentdatetime( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyString_FromString( QDateTime::currentDateTime().toString() );
}
***************
*** 866,872 ****
Returns if the server is in starting state
*/
! PyObject* wpIsStarting( PyObject* self )
{
Q_UNUSED(self);
if( serverState == STARTUP )
return PyTrue;
--- 882,889 ----
Returns if the server is in starting state
*/
! static PyObject* wpIsStarting( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
if( serverState == STARTUP )
return PyTrue;
***************
*** 878,884 ****
Returns if the server is in running state
*/
! PyObject* wpIsRunning( PyObject* self )
{
Q_UNUSED(self);
if( serverState == RUNNING )
return PyTrue;
--- 895,902 ----
Returns if the server is in running state
*/
! static PyObject* wpIsRunning( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
if( serverState == RUNNING )
return PyTrue;
***************
*** 890,896 ****
Returns if the server is in reload state
*/
! PyObject* wpIsReloading( PyObject* self )
{
Q_UNUSED(self);
if( serverState == SCRIPTRELOAD )
return PyTrue;
--- 908,915 ----
Returns if the server is in reload state
*/
! static PyObject* wpIsReloading( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
if( serverState == SCRIPTRELOAD )
return PyTrue;
***************
*** 902,908 ****
Returns if the server is in closing state
*/
! PyObject* wpIsClosing( PyObject* self )
{
Q_UNUSED(self);
if( serverState == SHUTDOWN )
return PyTrue;
--- 921,928 ----
Returns if the server is in closing state
*/
! static PyObject* wpIsClosing( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
if( serverState == SHUTDOWN )
return PyTrue;
***************
*** 1008,1014 ****
}
! static PyObject* wpTickcount( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( getNormalizedTime() );
}
--- 1028,1035 ----
}
! static PyObject* wpTickcount( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( getNormalizedTime() );
}
***************
*** 1017,1021 ****
{
Q_UNUSED(self);
!
unsigned int id, size;
--- 1038,1042 ----
{
Q_UNUSED(self);
! Q_UNUSED(args);
unsigned int id, size;
***************
*** 1061,1084 ****
{ "registerglobal", wpRegisterGlobal, METH_VARARGS, "Registers a global script hook." },
{ "registercommand", wpRegisterCommand, METH_VARARGS, "Registers a global command hook." },
! { "serveruptime", (PyCFunction)wpServerUptime, METH_NOARGS, "Returns uptime of server in seconds." },
! { "serverversion", (PyCFunction)wpServerVersion, METH_NOARGS, "Returns the server version string." },
! { "currentdatetime", (PyCFunction)wpCurrentdatetime, METH_NOARGS, "Returns the current real date/time" },
! { "isstarting", (PyCFunction)wpIsStarting, METH_NOARGS, "Returns if the server is in starting state" },
! { "isrunning", (PyCFunction)wpIsRunning, METH_NOARGS, "Returns if the server is in running state" },
! { "isreloading", (PyCFunction)wpIsReloading, METH_NOARGS, "Returns if the server is in reload state" },
! { "isclosing", (PyCFunction)wpIsClosing, METH_NOARGS, "Returns if the server is in closing state" },
! { "tickcount", (PyCFunction)wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
{ NULL, NULL, 0, NULL } // Terminator
};
! static PyObject *wpSocketsFirst( PyObject* self )
{
Q_UNUSED(self);
return PyGetSocketObject( cNetwork::instance()->first() );
}
! static PyObject *wpSocketsNext( PyObject* self )
{
Q_UNUSED(self);
return PyGetSocketObject( cNetwork::instance()->next() );
}
--- 1082,1107 ----
{ "registerglobal", wpRegisterGlobal, METH_VARARGS, "Registers a global script hook." },
{ "registercommand", wpRegisterCommand, METH_VARARGS, "Registers a global command hook." },
! { "serveruptime", wpServerUptime, METH_NOARGS, "Returns uptime of server in seconds." },
! { "serverversion", wpServerVersion, METH_NOARGS, "Returns the server version string." },
! { "currentdatetime", wpCurrentdatetime, METH_NOARGS, "Returns the current real date/time" },
! { "isstarting", wpIsStarting, METH_NOARGS, "Returns if the server is in starting state" },
! { "isrunning", wpIsRunning, METH_NOARGS, "Returns if the server is in running state" },
! { "isreloading", wpIsReloading, METH_NOARGS, "Returns if the server is in reload state" },
! { "isclosing", wpIsClosing, METH_NOARGS, "Returns if the server is in closing state" },
! { "tickcount", wpTickcount, METH_NOARGS, "Returns the current Tickcount on Windows" },
{ NULL, NULL, 0, NULL } // Terminator
};
! static PyObject *wpSocketsFirst( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyGetSocketObject( cNetwork::instance()->first() );
}
! static PyObject *wpSocketsNext( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyGetSocketObject( cNetwork::instance()->next() );
}
***************
*** 1087,1093 ****
Retrieves the number of currently connected sockets
*/
! static PyObject *wpSocketsCount( PyObject* self )
{
Q_UNUSED(self);
return PyInt_FromLong( cNetwork::instance()->count() );
}
--- 1110,1117 ----
Retrieves the number of currently connected sockets
*/
! static PyObject *wpSocketsCount( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
return PyInt_FromLong( cNetwork::instance()->count() );
}
***************
*** 1099,1105 ****
static PyMethodDef wpSockets[] =
{
! { "first", (PyCFunction)wpSocketsFirst, METH_NOARGS, "Returns the first connected socket." },
! { "next", (PyCFunction)wpSocketsNext, METH_NOARGS, "Returns the next connected socket." },
! { "count", (PyCFunction)wpSocketsCount, METH_NOARGS, "Returns the number of connected sockets." },
{ NULL, NULL, 0, NULL } // Terminator
};
--- 1123,1129 ----
static PyMethodDef wpSockets[] =
{
! { "first", wpSocketsFirst, METH_NOARGS, "Returns the first connected socket." },
! { "next", wpSocketsNext, METH_NOARGS, "Returns the next connected socket." },
! { "count", wpSocketsCount, METH_NOARGS, "Returns the number of connected sockets." },
{ NULL, NULL, 0, NULL } // Terminator
};
***************
*** 1238,1244 ****
Gets a list of Account names.
*/
! static PyObject *wpAccountsList( PyObject* self )
{
Q_UNUSED(self);
PyObject *list = PyList_New( 0 );
--- 1262,1269 ----
Gets a list of Account names.
*/
! static PyObject *wpAccountsList( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
PyObject *list = PyList_New( 0 );
***************
*** 1258,1264 ****
Gets a list of ACL names.
*/
! static PyObject *wpAccountsAcls( PyObject* self )
{
Q_UNUSED(self);
PyObject *list = PyList_New( 0 );
--- 1283,1290 ----
Gets a list of ACL names.
*/
! static PyObject *wpAccountsAcls( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
PyObject *list = PyList_New( 0 );
***************
*** 1340,1346 ****
Reload accounts.
*/
! static PyObject *wpAccountsReload( PyObject* self )
{
Q_UNUSED(self);
Accounts::instance()->reload();
return PyTrue;
--- 1366,1373 ----
Reload accounts.
*/
! static PyObject *wpAccountsReload( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
Accounts::instance()->reload();
return PyTrue;
***************
*** 1350,1356 ****
Save accounts.
*/
! static PyObject *wpAccountsSave( PyObject* self )
{
Q_UNUSED(self);
Accounts::instance()->save();
return PyTrue;
--- 1377,1384 ----
Save accounts.
*/
! static PyObject *wpAccountsSave( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
Accounts::instance()->save();
return PyTrue;
***************
*** 1363,1373 ****
static PyMethodDef wpAccounts[] =
{
! { "find", wpAccountsFind, METH_VARARGS, "Finds an account object." },
! { "list", (PyCFunction)wpAccountsList, METH_NOARGS, "Gets a list of Account names." },
! { "acls", (PyCFunction)wpAccountsAcls, METH_NOARGS, "Gets a list of valid ACL names." },
! { "acl", wpAccountsAcl, METH_VARARGS, "Returns an acl as a double dictionary." },
! { "add", wpAccountsAdd, METH_VARARGS, "Creates an account." },
! { "save", (PyCFunction)wpAccountsSave, METH_NOARGS, "Save accounts." },
! { "reload", (PyCFunction)wpAccountsReload, METH_NOARGS, "Reload accounts." },
{ NULL, NULL, 0, NULL } // Terminator
};
--- 1391,1401 ----
static PyMethodDef wpAccounts[] =
{
! { "find", wpAccountsFind, METH_VARARGS, "Finds an account object." },
! { "list", wpAccountsList, METH_NOARGS, "Gets a list of Account names." },
! { "acls", wpAccountsAcls, METH_NOARGS, "Gets a list of valid ACL names." },
! { "acl", wpAccountsAcl, METH_VARARGS, "Returns an acl as a double dictionary." },
! { "add", wpAccountsAdd, METH_VARARGS, "Creates an account." },
! { "save", wpAccountsSave, METH_NOARGS, "Save accounts." },
! { "reload", wpAccountsReload, METH_NOARGS, "Reload accounts." },
{ NULL, NULL, 0, NULL } // Terminator
};
***************
*** 1464,1470 ****
Reloads wolfpack.xml
*/
! static PyObject* wpSettingsReload( PyObject* self )
{
Q_UNUSED(self);
SrvParams->reload();
return PyTrue;
--- 1492,1499 ----
Reloads wolfpack.xml
*/
! static PyObject* wpSettingsReload( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
SrvParams->reload();
return PyTrue;
***************
*** 1474,1480 ****
Saves wolfpack.xml
*/
! static PyObject* wpSettingsSave( PyObject* self )
{
Q_UNUSED(self);
SrvParams->flush();
return PyTrue;
--- 1503,1510 ----
Saves wolfpack.xml
*/
! static PyObject* wpSettingsSave( PyObject* self, PyObject* args )
{
Q_UNUSED(self);
+ Q_UNUSED(args);
SrvParams->flush();
return PyTrue;
***************
*** 1487,1498 ****
static PyMethodDef wpSettings[] =
{
! { "getBool", wpSettingsGetBool, METH_VARARGS, "Reads a boolean value from wolfpack.xml." },
! { "setBool", wpSettingsSetBool, METH_VARARGS, "Sets a boolean value to wolfpack.xml." },
! { "getNumber", wpSettingsGetNumber, METH_VARARGS, "Gets a numeric value from wolfpack.xml." },
! { "setNumber", wpSettingsSetNumber, METH_VARARGS, "Sets a numeric value to wolfpack.xml." },
! { "getString", w...
[truncated message content] |