Update of /cvsroot/wpdev/wolfpack/python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1643/python
Modified Files:
char.cpp engine.cpp global.cpp pyaccount.cpp
Log Message:
config.h and config.cpp moved to serverconfig.h and serverconfig.cpp
This is to prevent a conflict with Automake.
Index: global.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** global.cpp 27 Jul 2004 06:35:23 -0000 1.143
--- global.cpp 4 Aug 2004 23:17:39 -0000 1.144
***************
*** 49,53 ****
#include "../items.h"
! #include "../config.h"
#include "../basechar.h"
#include "../player.h"
--- 49,53 ----
#include "../items.h"
! #include "../serverconfig.h"
#include "../basechar.h"
#include "../player.h"
***************
*** 355,359 ****
\param definition The id of the item definition to create the item from.
\return An <object id="item">item</object> object or None.
! \description Creates a new item from a given definition id and assigns a new serial to it.
*/
static PyObject* wpAdditem( PyObject* self, PyObject* args )
--- 355,359 ----
\param definition The id of the item definition to create the item from.
\return An <object id="item">item</object> object or None.
! \description Creates a new item from a given definition id and assigns a new serial to it.
*/
static PyObject* wpAdditem( PyObject* self, PyObject* args )
***************
*** 431,435 ****
\param id The guild id to look for, an integer value.
\return A <object id="guild">guild</object> object or None.
! \description Tries to find a guild with the given id and returns a guild object for it.
Returns None if no guild could be found.
*/
--- 431,435 ----
\param id The guild id to look for, an integer value.
\return A <object id="guild">guild</object> object or None.
! \description Tries to find a guild with the given id and returns a guild object for it.
Returns None if no guild could be found.
*/
***************
*** 504,510 ****
\param function The name of the function that should be called when this timer is triggered.
Please note that this is a string containing the full name of the function including the full
! module name (i.e. <code>"mymodule.mytimer"</code> if the <code>mytimer</code> function is in the
! <code>mymodule.py</code> file).
!
The function should have the following prototype:
<code>def expire(object, args):
--- 504,510 ----
\param function The name of the function that should be called when this timer is triggered.
Please note that this is a string containing the full name of the function including the full
! module name (i.e. <code>"mymodule.mytimer"</code> if the <code>mytimer</code> function is in the
! <code>mymodule.py</code> file).
!
The function should have the following prototype:
<code>def expire(object, args):
***************
*** 514,518 ****
\param args This should be a list of custom arguments that will be passed on to the timer expire function.
If you don't want the timer to be saved you can pass on any type of obejcts. However. You should not pass
! character, item or guild objects directly but their serials instead. Use finditem, findguild and findchar to
get a new object in the expirefunction afterwards.
\param serializable Defaults to false. If this boolean parameter is true, the timer will be saved on worldsaves
--- 514,518 ----
\param args This should be a list of custom arguments that will be passed on to the timer expire function.
If you don't want the timer to be saved you can pass on any type of obejcts. However. You should not pass
! character, item or guild objects directly but their serials instead. Use finditem, findguild and findchar to
get a new object in the expirefunction afterwards.
\param serializable Defaults to false. If this boolean parameter is true, the timer will be saved on worldsaves
***************
*** 590,602 ****
\param y The y component of the coordinate.
\param map The map of the coordinate.
! \param exact Defaults to false. If this boolean parameter is true,
! not the entire 8x8 static block matching the coordinate is returned,
but only the tiles that are exactly at the given coordinate.
! \return A list of dictionaries. Each dictionary included in the list has the
following keys:
- <code>id</code> The art tile id of the static item as an integer value.
- <code>x</code> The absolute x component of the coordinate of the static tile. (Not relative to the
upper left block corner).
! - <code>y</code> The absolute y component of the coordinate of the static tile. (Not relative to the
upper left block corner).
- <code>z</code> The z position of the static tile.
--- 590,602 ----
\param y The y component of the coordinate.
\param map The map of the coordinate.
! \param exact Defaults to false. If this boolean parameter is true,
! not the entire 8x8 static block matching the coordinate is returned,
but only the tiles that are exactly at the given coordinate.
! \return A list of dictionaries. Each dictionary included in the list has the
following keys:
- <code>id</code> The art tile id of the static item as an integer value.
- <code>x</code> The absolute x component of the coordinate of the static tile. (Not relative to the
upper left block corner).
! - <code>y</code> The absolute y component of the coordinate of the static tile. (Not relative to the
upper left block corner).
- <code>z</code> The z position of the static tile.
***************
*** 666,674 ****
\param y The y component of the coordinate.
\param map The map to look on.
! \param range Defaults to 1.
! This is the range in which the server should search for items. Please remember that this is not
a circle.
\return A list of <object id="item">item</object> objects.
! \description This function searches for dynamic items (no static items) at the given
coordinate and in the given range and returns a list of found item objects.
*/
--- 666,674 ----
\param y The y component of the coordinate.
\param map The map to look on.
! \param range Defaults to 1.
! This is the range in which the server should search for items. Please remember that this is not
a circle.
\return A list of <object id="item">item</object> objects.
! \description This function searches for dynamic items (no static items) at the given
coordinate and in the given range and returns a list of found item objects.
*/
***************
*** 704,712 ****
\param y The y component of the coordinate.
\param map The map to look on.
! \param range Defaults to 1.
! This is the range in which the server should search for characters. Please remember that this is not
a circle.
\return A list of <object id="char">char</object> objects.
! \description This function searches for characters at the given
coordinate and in the given range and returns a list of found objects.
*/
--- 704,712 ----
\param y The y component of the coordinate.
\param map The map to look on.
! \param range Defaults to 1.
! This is the range in which the server should search for characters. Please remember that this is not
a circle.
\return A list of <object id="char">char</object> objects.
! \description This function searches for characters at the given
coordinate and in the given range and returns a list of found objects.
*/
***************
*** 744,748 ****
\param speed This integer value indicates the animation speed that should be used.
\description This function shows a graphical effect at a given position to all players in range.
! The exact scale of the duration and speed parameters are unknown and passed on directly to the client.
You'll have to experiment to find suitable values.
*/
--- 744,748 ----
\param speed This integer value indicates the animation speed that should be used.
\description This function shows a graphical effect at a given position to all players in range.
! The exact scale of the duration and speed parameters are unknown and passed on directly to the client.
You'll have to experiment to find suitable values.
*/
***************
*** 785,789 ****
- <code>id</code> The landtile art id for the maptile.
- <code>z</code> The height of the map at the given position. Please note that this
! is the height stored in the datafile and not the real height which is also influenced by
the surrounding maptiles.
\description This function returns a dictionary with information about a tile of the map
--- 785,789 ----
- <code>id</code> The landtile art id for the maptile.
- <code>z</code> The height of the map at the given position. Please note that this
! is the height stored in the datafile and not the real height which is also influenced by
the surrounding maptiles.
\description This function returns a dictionary with information about a tile of the map
***************
*** 883,887 ****
- <code>name</code> The name of the tile.
- <code>height</code> The height of the tile.
! - <code>weight</code> The weight of the tile. This value is not used internally but can be used to check if the item is movable by the client.
Items with a weight of 255 are not movable by default.
- <code>layer</code> The layer this item will be equipped on if equippable.
--- 883,887 ----
- <code>name</code> The name of the tile.
- <code>height</code> The height of the tile.
! - <code>weight</code> The weight of the tile. This value is not used internally but can be used to check if the item is movable by the client.
Items with a weight of 255 are not movable by default.
- <code>layer</code> The layer this item will be equipped on if equippable.
***************
*** 987,991 ****
\param script The name of a script that should be notified about the given event.
\description This function registers a script as a global hook for one given event type. Whenever the
! event is triggered, the given script will be called first. Please note that there can only be one
hook per event at a time, but a script can hook more than one event to itself.
*/
--- 987,991 ----
\param script The name of a script that should be notified about the given event.
\description This function registers a script as a global hook for one given event type. Whenever the
! event is triggered, the given script will be called first. Please note that there can only be one
hook per event at a time, but a script can hook more than one event to itself.
*/
***************
*** 1021,1025 ****
\param command The name of the command as a string.
\param function The function that should handle the command. This is not a string but a callable
! python function object. The function should have the following prototype:
<code>
def mycommand(socket, command, arguments):
--- 1021,1025 ----
\param command The name of the command as a string.
\param function The function that should handle the command. This is not a string but a callable
! python function object. The function should have the following prototype:
<code>
def mycommand(socket, command, arguments):
***************
*** 1029,1033 ****
command is the name of the command that has been issued if you want to use a single function
for multiple commands and arguments is a string containing the full list of arguments passed
! to the command.
\description This function registers a python handler for the given command name. Using this function
you can implement custom ingame commands.
--- 1029,1033 ----
command is the name of the command that has been issued if you want to use a single function
for multiple commands and arguments is a string containing the full list of arguments passed
! to the command.
\description This function registers a python handler for the given command name. Using this function
you can implement custom ingame commands.
***************
*** 1049,1053 ****
Py_INCREF( function );
ScriptManager::instance()->setCommandHook( command, function );
!
Py_RETURN_NONE;
}
--- 1049,1053 ----
Py_INCREF( function );
ScriptManager::instance()->setCommandHook( command, function );
!
Py_RETURN_NONE;
}
***************
*** 1060,1064 ****
<code>
def mycommand(socket, packet):
! pass
</code>
Where socket is the <object id="socket">socket</object> object the packet was sent from,
--- 1060,1064 ----
<code>
def mycommand(socket, packet):
! pass
</code>
Where socket is the <object id="socket">socket</object> object the packet was sent from,
***************
*** 1118,1122 ****
\param definition The id of the multi definition.
\return An <object id="item">item</object> object or None.
! \description Creates a new multi from a given definition id and assigns a new serial to it.
Please note that multis are represented by the item object.
*/
--- 1118,1122 ----
\param definition The id of the multi definition.
\return An <object id="item">item</object> object or None.
! \description Creates a new multi from a given definition id and assigns a new serial to it.
Please note that multis are represented by the item object.
*/
***************
*** 1350,1354 ****
It is often faster to use the currenttime function instead, but if you need
an accurate value for timing or similar tasks, use this function instead.
! */
static PyObject* wpTickcount( PyObject* self, PyObject* args )
{
--- 1350,1354 ----
It is often faster to use the currenttime function instead, but if you need
an accurate value for timing or similar tasks, use this function instead.
! */
static PyObject* wpTickcount( PyObject* self, PyObject* args )
{
***************
*** 1362,1366 ****
\return An integer value.
\description This function returns the number of registered characters in the world.
! */
static PyObject* wpCharCount( PyObject* self, PyObject* args )
{
--- 1362,1366 ----
\return An integer value.
\description This function returns the number of registered characters in the world.
! */
static PyObject* wpCharCount( PyObject* self, PyObject* args )
{
***************
*** 1374,1378 ****
\return An integer value.
\description This function returns the number of registered NPCs in the world.
! */
static PyObject* wpNpcCount( PyObject* self, PyObject* args )
{
--- 1374,1378 ----
\return An integer value.
\description This function returns the number of registered NPCs in the world.
! */
static PyObject* wpNpcCount( PyObject* self, PyObject* args )
{
***************
*** 1386,1390 ****
\return An integer value.
\description This function returns the number of registered player characters in the world.
! */
static PyObject* wpPlayerCount( PyObject* self, PyObject* args )
{
--- 1386,1390 ----
\return An integer value.
\description This function returns the number of registered player characters in the world.
! */
static PyObject* wpPlayerCount( PyObject* self, PyObject* args )
{
***************
*** 1398,1402 ****
\return An integer value.
\description This function returns the number of registered items in the world.
! */
static PyObject* wpItemCount( PyObject* self, PyObject* args )
{
--- 1398,1402 ----
\return An integer value.
\description This function returns the number of registered items in the world.
! */
static PyObject* wpItemCount( PyObject* self, PyObject* args )
{
***************
*** 1412,1416 ****
\return A <object id="packet">packet</object> object.
\description This function creates a new packet object with the given size and sets the first byte of the packet to the given packet id.
! */
static PyObject* wpPacket( PyObject* self, PyObject* args )
{
--- 1412,1416 ----
\return A <object id="packet">packet</object> object.
\description This function creates a new packet object with the given size and sets the first byte of the packet to the given packet id.
! */
static PyObject* wpPacket( PyObject* self, PyObject* args )
{
***************
*** 1430,1434 ****
Take a look at the "Action Constants" in the <module id="wolfpack.consts">wolfpack.consts</module> module.
\description This function queues an action to be executed in the next iteration of the mainloop.
! */
static PyObject* wpQueueAction( PyObject* self, PyObject* args )
{
--- 1430,1434 ----
Take a look at the "Action Constants" in the <module id="wolfpack.consts">wolfpack.consts</module> module.
\description This function queues an action to be executed in the next iteration of the mainloop.
! */
static PyObject* wpQueueAction( PyObject* self, PyObject* args )
{
***************
*** 1447,1451 ****
/*
\function wolfpack.getdefinition
! \param type The definition type.
Use one of the "Definition Constants" from <module id="wolfpack.consts">wolfpack.consts</module>.
\param id A string representing the id of the desired definition section.
--- 1447,1451 ----
/*
\function wolfpack.getdefinition
! \param type The definition type.
Use one of the "Definition Constants" from <module id="wolfpack.consts">wolfpack.consts</module>.
\param id A string representing the id of the desired definition section.
***************
*** 1480,1484 ****
/*
\function wolfpack.getdefinitions
! \param type The definition type.
Use one of the "Definition Constants" from <module id="wolfpack.consts">wolfpack.consts</module>.
\return A tuple of strings.
--- 1480,1484 ----
/*
\function wolfpack.getdefinitions
! \param type The definition type.
Use one of the "Definition Constants" from <module id="wolfpack.consts">wolfpack.consts</module>.
\return A tuple of strings.
***************
*** 1728,1732 ****
}
! cCharBaseDef *basedef = CharBaseDefs::instance()->get(baseid);
if (!basedef) {
--- 1728,1732 ----
}
! cCharBaseDef *basedef = CharBaseDefs::instance()->get(baseid);
if (!basedef) {
***************
*** 1872,1876 ****
\function wolfpack.accounts.find
\param name A string containing the account name.
! \return An <object id="account">account</object> object if an account was found.
None otherwise.
\description This function tries to find an account with the given name and returns it.
--- 1872,1876 ----
\function wolfpack.accounts.find
\param name A string containing the account name.
! \return An <object id="account">account</object> object if an account was found.
None otherwise.
\description This function tries to find an account with the given name and returns it.
***************
*** 2307,2311 ****
\function wolfpack.database.driver
\param database The id of the database you want to query. See the "Database Constants" in this module.
! \return A string.
\description This function returns the name of the database driver in use for the given database.
*/
--- 2307,2311 ----
\function wolfpack.database.driver
\param database The id of the database you want to query. See the "Database Constants" in this module.
! \return A string.
\description This function returns the name of the database driver in use for the given database.
*/
Index: engine.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/engine.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** engine.cpp 15 Jul 2004 02:23:19 -0000 1.32
--- engine.cpp 4 Aug 2004 23:17:39 -0000 1.33
***************
*** 28,32 ****
#include "engine.h"
! #include "../config.h"
#include "../console.h"
--- 28,32 ----
#include "engine.h"
! #include "../serverconfig.h"
#include "../console.h"
Index: pyaccount.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/pyaccount.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** pyaccount.cpp 20 Jul 2004 11:35:38 -0000 1.34
--- pyaccount.cpp 4 Aug 2004 23:17:39 -0000 1.35
***************
*** 35,39 ****
#include "../basechar.h"
#include "../md5.h"
! #include "../config.h"
#include "../player.h"
--- 35,39 ----
#include "../basechar.h"
#include "../md5.h"
! #include "../serverconfig.h"
#include "../player.h"
***************
*** 309,313 ****
}
/*
! \rproperty account.rank Returns the integer rank of this account. This is inherited by the ACL of
this account.
*/
--- 309,313 ----
}
/*
! \rproperty account.rank Returns the integer rank of this account. This is inherited by the ACL of
this account.
*/
***************
*** 331,335 ****
/*
\property account.multigems Indicates whether Multis should be sent as Worldgems to this account.
! */
else if ( !strcmp( name, "multigems" ) )
{
--- 331,335 ----
/*
\property account.multigems Indicates whether Multis should be sent as Worldgems to this account.
! */
else if ( !strcmp( name, "multigems" ) )
{
***************
*** 345,351 ****
/*
\property account.password The password of this account. Please note that if MD5 hashing is activated,
! this property will only return the hashed password. But when setting this property you don't need to
specify the MD5 hashed password as it will be automatically converted.
! */
else if ( !strcmp( name, "password" ) && PyString_Check( value ) )
self->account->setPassword( PyString_AsString( value ) );
--- 345,351 ----
/*
\property account.password The password of this account. Please note that if MD5 hashing is activated,
! this property will only return the hashed password. But when setting this property you don't need to
specify the MD5 hashed password as it will be automatically converted.
! */
else if ( !strcmp( name, "password" ) && PyString_Check( value ) )
self->account->setPassword( PyString_AsString( value ) );
Index: char.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v
retrieving revision 1.175
retrieving revision 1.176
diff -C2 -d -r1.175 -r1.176
*** char.cpp 20 Jul 2004 11:35:38 -0000 1.175
--- char.cpp 4 Aug 2004 23:17:39 -0000 1.176
***************
*** 32,36 ****
#include "../party.h"
#include "../combat.h"
! #include "../config.h"
#include "../walking.h"
#include "../commands.h"
--- 32,36 ----
#include "../party.h"
#include "../combat.h"
! #include "../serverconfig.h"
#include "../walking.h"
#include "../commands.h"
***************
*** 400,404 ****
\description Play an animation for the character.
The animation id is automatically translated if the character is on a horse or
! if the current body id of the character doesn't support the animation.
\param id The id of the animation that should be played.
See the "Animation Constants" in <module id="wolfpack.consts">wolfpack.consts</module> for a list.
--- 400,404 ----
\description Play an animation for the character.
The animation id is automatically translated if the character is on a horse or
! if the current body id of the character doesn't support the animation.
\param id The id of the animation that should be played.
See the "Animation Constants" in <module id="wolfpack.consts">wolfpack.consts</module> for a list.
***************
*** 2088,2092 ****
/*
! \method char.aiengine
\description Get the ai engine associated with this NPC.
This only works for NPCs and returns None otherwise
--- 2088,2092 ----
/*
! \method char.aiengine
\description Get the ai engine associated with this NPC.
This only works for NPCs and returns None otherwise
***************
*** 2204,2208 ****
/*
\method char.showname
! \description Show the name of this character over the characters head for a given socket.
This looks like the "Show Incoming Names" option in the client.
\param socket The <object id="SOCKET">socket</object> object of the receiving socket.
--- 2204,2208 ----
/*
\method char.showname
! \description Show the name of this character over the characters head for a given socket.
This looks like the "Show Incoming Names" option in the client.
\param socket The <object id="SOCKET">socket</object> object of the receiving socket.
|