Crossfire Server  1.75.0
cfpython_object.cpp File Reference
#include <cfpython.h>
#include <map>

Go to the source code of this file.

Macros

#define EXISTCHECK(ob)
 
#define EXISTCHECK_INT(ob)
 
#define TYPEEXISTCHECK(ob)
 This is meant to be used for parameters where you don't know if the type of the object is correct. More...
 

Functions

static void add_object_assoc (object *key, PyObject *value)
 
 CF_PYTHON_NUMBER_METHODS (Object, Crossfire_Object_Long)
 
 CF_PYTHON_OBJECT (Object, Crossfire_Object_dealloc, &ObjectConvert, PyObject_HashNotImplemented, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, "Crossfire objects",(richcmpfunc) Crossfire_Object_RichCompare, ObjectMethods, Object_getseters, NULL, Crossfire_Object_new)
 
 CF_PYTHON_OBJECT (Player, Crossfire_Player_dealloc, NULL, NULL, Py_TPFLAGS_DEFAULT, "Crossfire player", NULL, PlayerMethods, Player_getseters, &Crossfire_ObjectType, Crossfire_Player_new)
 
static PyObject * Crossfire_Object_ActivateRune (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_AddExp (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Apply (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Arrest (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Cast (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CastAbility (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_ChangeAbil (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CheckArchInventory (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CheckInventory (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CheckTrigger (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Clone (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CreateInside (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_CreateTimer (Crossfire_Object *who, PyObject *args)
 
static void Crossfire_Object_dealloc (PyObject *obj)
 
static PyObject * Crossfire_Object_Drop (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Event (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Fix (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_ForgetSpell (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_GetOutOfMap (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_GetResist (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_InsertInto (Crossfire_Object *who, PyObject *args)
 
static int Crossfire_Object_InternalCompare (Crossfire_Object *left, Crossfire_Object *right)
 
static PyObject * Crossfire_Object_KnowSpell (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_LearnSpell (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Long (PyObject *obj)
 
static PyObject * Crossfire_Object_Move (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_MoveTo (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
static PyObject * Crossfire_Object_Pay (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_PayAmount (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_PermExp (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_QueryName (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_ReadKey (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Remove (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_RemoveDepletion (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Reposition (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_RichCompare (Crossfire_Object *left, Crossfire_Object *right, int op)
 
static PyObject * Crossfire_Object_Say (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_SetResist (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Split (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Take (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Object_Teleport (Crossfire_Object *who, PyObject *args)
 
PyObject * Crossfire_Object_wrap (object *what)
 Python initialized. More...
 
static PyObject * Crossfire_Object_WriteKey (Crossfire_Object *who, PyObject *args)
 
static PyObject * Crossfire_Player_CanPay (Crossfire_Player *who, PyObject *args)
 
static void Crossfire_Player_dealloc (PyObject *obj)
 
static PyObject * Crossfire_Player_Message (Crossfire_Player *who, PyObject *args)
 
static PyObject * Crossfire_Player_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
 
static PyObject * find_assoc_pyobject (object *key)
 
static void free_object_assoc (object *key)
 
static PyObject * Object_GetArchetype (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetExists (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetExp (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetExpMul (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetFlagProperty (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetFloatProperty (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetIntProperty (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMap (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMaterial (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoney (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveAllow (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveBlock (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveOff (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveOn (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveSlow (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetMoveType (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetName (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetNamePl (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetObjectProperty (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetOtherArchetype (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetPickable (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetSStringProperty (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetTotalExp (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Object_GetValue (Crossfire_Object *whoptr, void *closure)
 
static int Object_SetAnim (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetEnemy (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetExp (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetFace (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetFlagProperty (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetFloatProperty (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetIntProperty (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMap (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveAllow (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveBlock (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveOff (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveOn (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveSlow (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetMoveType (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetName (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetNamePl (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetOwner (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetPickable (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetQuantity (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static int Object_SetStringProperty (Crossfire_Object *whoptr, PyObject *value, void *closure)
 Setters. More...
 
static int Object_SetValue (Crossfire_Object *whoptr, PyObject *value, void *closure)
 
static PyObject * Player_GetBedMap (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetBedX (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetBedY (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetIntProperty (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetIP (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetMarkedItem (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetObjectProperty (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetParty (Crossfire_Player *whoptr, void *closure)
 
static PyObject * Player_GetTitle (Crossfire_Object *whoptr, void *closure)
 
static PyObject * Player_GiveKnowledge (Crossfire_Player *who, PyObject *args)
 
static PyObject * Player_KnowledgeKnown (Crossfire_Player *who, PyObject *args)
 
static PyObject * Player_QuestGetState (Crossfire_Player *whoptr, PyObject *args)
 
static PyObject * Player_QuestSetState (Crossfire_Player *whoptr, PyObject *args)
 
static PyObject * Player_QuestStart (Crossfire_Player *whoptr, PyObject *args)
 
static PyObject * Player_QuestWasCompleted (Crossfire_Player *whoptr, PyObject *args)
 
static int Player_SetBedMap (Crossfire_Player *whoptr, PyObject *value, void *closure)
 
static int Player_SetBedX (Crossfire_Player *whoptr, PyObject *value, void *closure)
 
static int Player_SetBedY (Crossfire_Player *whoptr, PyObject *value, void *closure)
 
static int Player_SetMarkedItem (Crossfire_Player *whoptr, PyObject *value, void *closure)
 
static int Player_SetParty (Crossfire_Player *whoptr, PyObject *value, void *closure)
 
static int Player_SetTitle (Crossfire_Object *whoptr, PyObject *value, void *closure)
 

Variables

static std::map< object *, PyObject * > object_assoc_table
 
static PyGetSetDef Object_getseters []
 
static PyMethodDef ObjectMethods []
 
static PyGetSetDef Player_getseters []
 
static PyMethodDef PlayerMethods []
 

Macro Definition Documentation

◆ EXISTCHECK

#define EXISTCHECK (   ob)
Value:
{ \
if (!ob || !ob->obj || (object_was_destroyed(ob->obj, ob->obj->count))) { \
PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
return NULL; \
} }
#define object_was_destroyed(op, old_tag)
Checks if an object still exists.
Definition: object.h:70

Definition at line 33 of file cfpython_object.cpp.

Referenced by Crossfire_Object_ActivateRune(), Crossfire_Object_AddExp(), Crossfire_Object_Apply(), Crossfire_Object_Arrest(), Crossfire_Object_Cast(), Crossfire_Object_CastAbility(), Crossfire_Object_ChangeAbil(), Crossfire_Object_CheckArchInventory(), Crossfire_Object_CheckInventory(), Crossfire_Object_CheckTrigger(), Crossfire_Object_CreateInside(), Crossfire_Object_CreateTimer(), Crossfire_Object_Drop(), Crossfire_Object_Event(), Crossfire_Object_ForgetSpell(), Crossfire_Object_GetOutOfMap(), Crossfire_Object_GetResist(), Crossfire_Object_InsertInto(), Crossfire_Object_KnowSpell(), Crossfire_Object_LearnSpell(), Crossfire_Object_Move(), Crossfire_Object_MoveTo(), Crossfire_Object_Pay(), Crossfire_Object_PayAmount(), Crossfire_Object_PermExp(), Crossfire_Object_QueryName(), Crossfire_Object_ReadKey(), Crossfire_Object_Remove(), Crossfire_Object_RemoveDepletion(), Crossfire_Object_Reposition(), Crossfire_Object_Say(), Crossfire_Object_SetResist(), Crossfire_Object_Take(), Crossfire_Object_Teleport(), Crossfire_Object_WriteKey(), Crossfire_Player_CanPay(), Crossfire_Player_Message(), Object_GetArchetype(), Object_GetExp(), Object_GetExpMul(), Object_GetFlagProperty(), Object_GetFloatProperty(), Object_GetIntProperty(), Object_GetMap(), Object_GetMaterial(), Object_GetMoney(), Object_GetMoveAllow(), Object_GetMoveBlock(), Object_GetMoveOff(), Object_GetMoveOn(), Object_GetMoveSlow(), Object_GetMoveType(), Object_GetName(), Object_GetNamePl(), Object_GetObjectProperty(), Object_GetOtherArchetype(), Object_GetPickable(), Object_GetSStringProperty(), Object_GetTotalExp(), Object_GetValue(), Player_GetBedMap(), Player_GetBedX(), Player_GetBedY(), Player_GetIntProperty(), Player_GetIP(), Player_GetMarkedItem(), Player_GetObjectProperty(), Player_GetParty(), Player_GetTitle(), Player_GiveKnowledge(), Player_KnowledgeKnown(), Player_QuestGetState(), Player_QuestSetState(), Player_QuestStart(), and Player_QuestWasCompleted().

◆ EXISTCHECK_INT

◆ TYPEEXISTCHECK

#define TYPEEXISTCHECK (   ob)
Value:
{ \
if (!ob || !PyObject_TypeCheck((PyObject*)ob, &Crossfire_ObjectType) || !ob->obj || (object_was_destroyed(ob->obj, ob->obj->count))) { \
PyErr_SetString(PyExc_ReferenceError, "Not a Crossfire object or Crossfire object no longer exists"); \
return NULL; \
} }
#define object_was_destroyed(op, old_tag)
Checks if an object still exists.
Definition: object.h:70
PyTypeObject Crossfire_ObjectType

This is meant to be used for parameters where you don't know if the type of the object is correct.

It should NOT be used for the self pointer, since that will always be a compatible type.

Definition at line 44 of file cfpython_object.cpp.

Referenced by Crossfire_Object_ActivateRune(), Crossfire_Object_ChangeAbil(), Crossfire_Object_CheckTrigger(), Crossfire_Object_Drop(), Crossfire_Object_ForgetSpell(), Crossfire_Object_InsertInto(), Crossfire_Object_LearnSpell(), Crossfire_Object_Pay(), and Crossfire_Object_Take().

Function Documentation

◆ add_object_assoc()

static void add_object_assoc ( object key,
PyObject *  value 
)
static

Definition at line 59 of file cfpython_object.cpp.

References object_assoc_table.

Referenced by Crossfire_Object_wrap().

◆ CF_PYTHON_NUMBER_METHODS()

CF_PYTHON_NUMBER_METHODS ( Object  ,
Crossfire_Object_Long   
)

◆ CF_PYTHON_OBJECT() [1/2]

CF_PYTHON_OBJECT ( Object  ,
Crossfire_Object_dealloc  ,
ObjectConvert,
PyObject_HashNotImplemented  ,
Py_TPFLAGS_DEFAULT|  Py_TPFLAGS_BASETYPE,
"Crossfire objects ,
(richcmpfunc)  Crossfire_Object_RichCompare,
ObjectMethods  ,
Object_getseters  ,
NULL  ,
Crossfire_Object_new   
)

◆ CF_PYTHON_OBJECT() [2/2]

CF_PYTHON_OBJECT ( Player  ,
Crossfire_Player_dealloc  ,
NULL  ,
NULL  ,
Py_TPFLAGS_DEFAULT  ,
"Crossfire player ,
NULL  ,
PlayerMethods  ,
Player_getseters  ,
Crossfire_ObjectType,
Crossfire_Player_new   
)

◆ Crossfire_Object_ActivateRune()

static PyObject* Crossfire_Object_ActivateRune ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_AddExp()

static PyObject* Crossfire_Object_AddExp ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1189 of file cfpython_object.cpp.

References cf_object_change_exp(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_Apply()

static PyObject* Crossfire_Object_Apply ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Arrest()

static PyObject* Crossfire_Object_Arrest ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1256 of file cfpython_object.cpp.

References cf_player_arrest(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_Cast()

static PyObject* Crossfire_Object_Cast ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CastAbility()

static PyObject* Crossfire_Object_CastAbility ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_ChangeAbil()

static PyObject* Crossfire_Object_ChangeAbil ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CheckArchInventory()

static PyObject* Crossfire_Object_CheckArchInventory ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CheckInventory()

static PyObject* Crossfire_Object_CheckInventory ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CheckTrigger()

static PyObject* Crossfire_Object_CheckTrigger ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Clone()

static PyObject* Crossfire_Object_Clone ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CreateInside()

static PyObject* Crossfire_Object_CreateInside ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_CreateTimer()

static PyObject* Crossfire_Object_CreateTimer ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1089 of file cfpython_object.cpp.

References cf_timer_create(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_dealloc()

static void Crossfire_Object_dealloc ( PyObject *  obj)
static

Definition at line 1507 of file cfpython_object.cpp.

References free_object_assoc().

Referenced by Player_GetObjectProperty().

◆ Crossfire_Object_Drop()

static PyObject* Crossfire_Object_Drop ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Event()

static PyObject* Crossfire_Object_Event ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Fix()

static PyObject* Crossfire_Object_Fix ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 826 of file cfpython_object.cpp.

References cf_fix_object(), and Crossfire_Object::obj.

◆ Crossfire_Object_ForgetSpell()

static PyObject* Crossfire_Object_ForgetSpell ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_GetOutOfMap()

static PyObject* Crossfire_Object_GetOutOfMap ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1135 of file cfpython_object.cpp.

References cf_object_out_of_map(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_GetResist()

static PyObject* Crossfire_Object_GetResist ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_InsertInto()

static PyObject* Crossfire_Object_InsertInto ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_InternalCompare()

static int Crossfire_Object_InternalCompare ( Crossfire_Object left,
Crossfire_Object right 
)
static

Definition at line 1262 of file cfpython_object.cpp.

References EXISTCHECK_INT, and Crossfire_Object::obj.

Referenced by Crossfire_Object_RichCompare().

◆ Crossfire_Object_KnowSpell()

static PyObject* Crossfire_Object_KnowSpell ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_LearnSpell()

static PyObject* Crossfire_Object_LearnSpell ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Long()

static PyObject* Crossfire_Object_Long ( PyObject *  obj)
static

Definition at line 1306 of file cfpython_object.cpp.

◆ Crossfire_Object_Move()

static PyObject* Crossfire_Object_Move ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1208 of file cfpython_object.cpp.

References cf_object_move(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_MoveTo()

static PyObject* Crossfire_Object_MoveTo ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1217 of file cfpython_object.cpp.

References cf_object_move_to(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_new()

static PyObject* Crossfire_Object_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 1493 of file cfpython_object.cpp.

References object::count, and Crossfire_Object::obj.

Referenced by Player_GetObjectProperty().

◆ Crossfire_Object_Pay()

static PyObject* Crossfire_Object_Pay ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_PayAmount()

static PyObject* Crossfire_Object_PayAmount ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1038 of file cfpython_object.cpp.

References cf_object_pay_amount(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_PermExp()

static PyObject* Crossfire_Object_PermExp ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1202 of file cfpython_object.cpp.

References cf_object_perm_exp(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_QueryName()

static PyObject* Crossfire_Object_QueryName ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 935 of file cfpython_object.cpp.

References cf_query_name(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_ReadKey()

static PyObject* Crossfire_Object_ReadKey ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1064 of file cfpython_object.cpp.

References cf_object_get_key(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_Remove()

static PyObject* Crossfire_Object_Remove ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_RemoveDepletion()

static PyObject* Crossfire_Object_RemoveDepletion ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Reposition()

static PyObject* Crossfire_Object_Reposition ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 923 of file cfpython_object.cpp.

References cf_object_transfer(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Object_RichCompare()

static PyObject* Crossfire_Object_RichCompare ( Crossfire_Object left,
Crossfire_Object right,
int  op 
)
static

◆ Crossfire_Object_Say()

static PyObject* Crossfire_Object_Say ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_SetResist()

static PyObject* Crossfire_Object_SetResist ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Split()

static PyObject* Crossfire_Object_Split ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Take()

static PyObject* Crossfire_Object_Take ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_Teleport()

static PyObject* Crossfire_Object_Teleport ( Crossfire_Object who,
PyObject *  args 
)
static

◆ Crossfire_Object_wrap()

◆ Crossfire_Object_WriteKey()

static PyObject* Crossfire_Object_WriteKey ( Crossfire_Object who,
PyObject *  args 
)
static

Definition at line 1077 of file cfpython_object.cpp.

References cf_object_set_key(), EXISTCHECK, and Crossfire_Object::obj.

◆ Crossfire_Player_CanPay()

static PyObject* Crossfire_Player_CanPay ( Crossfire_Player who,
PyObject *  args 
)
static

Definition at line 178 of file cfpython_object.cpp.

References cf_player_can_pay(), EXISTCHECK, and Crossfire_Player::obj.

◆ Crossfire_Player_dealloc()

static void Crossfire_Player_dealloc ( PyObject *  obj)
static

Definition at line 1533 of file cfpython_object.cpp.

References free_object_assoc().

◆ Crossfire_Player_Message()

static PyObject* Crossfire_Player_Message ( Crossfire_Player who,
PyObject *  args 
)
static

◆ Crossfire_Player_new()

static PyObject* Crossfire_Player_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 1519 of file cfpython_object.cpp.

References object::count, and Crossfire_Player::obj.

◆ find_assoc_pyobject()

static PyObject* find_assoc_pyobject ( object key)
static

Definition at line 63 of file cfpython_object.cpp.

References object_assoc_table.

Referenced by Crossfire_Object_wrap().

◆ free_object_assoc()

static void free_object_assoc ( object key)
static

Definition at line 68 of file cfpython_object.cpp.

References object_assoc_table.

Referenced by Crossfire_Object_dealloc(), and Crossfire_Player_dealloc().

◆ Object_GetArchetype()

static PyObject* Object_GetArchetype ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetExists()

static PyObject* Object_GetExists ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 408 of file cfpython_object.cpp.

References object::count, Crossfire_Object::obj, and object_was_destroyed.

◆ Object_GetExp()

static PyObject* Object_GetExp ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetExpMul()

static PyObject* Object_GetExpMul ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetFlagProperty()

static PyObject* Object_GetFlagProperty ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 322 of file cfpython_object.cpp.

References cf_object_get_flag(), EXISTCHECK, and Crossfire_Object::obj.

◆ Object_GetFloatProperty()

static PyObject* Object_GetFloatProperty ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetIntProperty()

static PyObject* Object_GetIntProperty ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMap()

static PyObject* Object_GetMap ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMaterial()

static PyObject* Object_GetMaterial ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoney()

static PyObject* Object_GetMoney ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 384 of file cfpython_object.cpp.

References cf_object_query_money(), EXISTCHECK, and Crossfire_Object::obj.

◆ Object_GetMoveAllow()

static PyObject* Object_GetMoveAllow ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoveBlock()

static PyObject* Object_GetMoveBlock ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoveOff()

static PyObject* Object_GetMoveOff ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoveOn()

static PyObject* Object_GetMoveOn ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoveSlow()

static PyObject* Object_GetMoveSlow ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetMoveType()

static PyObject* Object_GetMoveType ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetName()

static PyObject* Object_GetName ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 337 of file cfpython_object.cpp.

References cf_query_name(), EXISTCHECK, and Crossfire_Object::obj.

◆ Object_GetNamePl()

static PyObject* Object_GetNamePl ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 345 of file cfpython_object.cpp.

References cf_query_name_pl(), EXISTCHECK, and Crossfire_Object::obj.

◆ Object_GetObjectProperty()

static PyObject* Object_GetObjectProperty ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetOtherArchetype()

static PyObject* Object_GetOtherArchetype ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetPickable()

static PyObject* Object_GetPickable ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetSStringProperty()

static PyObject* Object_GetSStringProperty ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetTotalExp()

static PyObject* Object_GetTotalExp ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_GetValue()

static PyObject* Object_GetValue ( Crossfire_Object whoptr,
void *  closure 
)
static

◆ Object_SetAnim()

static int Object_SetAnim ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetEnemy()

static int Object_SetEnemy ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetExp()

static int Object_SetExp ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetFace()

static int Object_SetFace ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

Definition at line 596 of file cfpython_object.cpp.

References cf_object_set_face(), EXISTCHECK_INT, and Crossfire_Object::obj.

◆ Object_SetFlagProperty()

static int Object_SetFlagProperty ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

Definition at line 503 of file cfpython_object.cpp.

References cf_object_set_flag(), EXISTCHECK_INT, and Crossfire_Object::obj.

◆ Object_SetFloatProperty()

static int Object_SetFloatProperty ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetIntProperty()

static int Object_SetIntProperty ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMap()

static int Object_SetMap ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveAllow()

static int Object_SetMoveAllow ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveBlock()

static int Object_SetMoveBlock ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveOff()

static int Object_SetMoveOff ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveOn()

static int Object_SetMoveOn ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveSlow()

static int Object_SetMoveSlow ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetMoveType()

static int Object_SetMoveType ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetName()

static int Object_SetName ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetNamePl()

static int Object_SetNamePl ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetOwner()

static int Object_SetOwner ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetPickable()

static int Object_SetPickable ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetQuantity()

static int Object_SetQuantity ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

Definition at line 579 of file cfpython_object.cpp.

References cf_object_set_nrof(), EXISTCHECK_INT, and Crossfire_Object::obj.

◆ Object_SetStringProperty()

static int Object_SetStringProperty ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Object_SetValue()

static int Object_SetValue ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_GetBedMap()

static PyObject* Player_GetBedMap ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetBedX()

static PyObject* Player_GetBedX ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetBedY()

static PyObject* Player_GetBedY ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetIntProperty()

static PyObject* Player_GetIntProperty ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetIP()

static PyObject* Player_GetIP ( Crossfire_Player whoptr,
void *  closure 
)
static

Definition at line 99 of file cfpython_object.cpp.

References cf_player_get_ip(), EXISTCHECK, and Crossfire_Player::obj.

◆ Player_GetMarkedItem()

static PyObject* Player_GetMarkedItem ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetObjectProperty()

◆ Player_GetParty()

static PyObject* Player_GetParty ( Crossfire_Player whoptr,
void *  closure 
)
static

◆ Player_GetTitle()

static PyObject* Player_GetTitle ( Crossfire_Object whoptr,
void *  closure 
)
static

Definition at line 72 of file cfpython_object.cpp.

References cf_player_get_title(), EXISTCHECK, MAX_NAME, and Crossfire_Object::obj.

◆ Player_GiveKnowledge()

static PyObject* Player_GiveKnowledge ( Crossfire_Player who,
PyObject *  args 
)
static

◆ Player_KnowledgeKnown()

static PyObject* Player_KnowledgeKnown ( Crossfire_Player who,
PyObject *  args 
)
static

Definition at line 138 of file cfpython_object.cpp.

References cf_player_knowledge_has(), EXISTCHECK, and Crossfire_Player::obj.

◆ Player_QuestGetState()

static PyObject* Player_QuestGetState ( Crossfire_Player whoptr,
PyObject *  args 
)
static

◆ Player_QuestSetState()

static PyObject* Player_QuestSetState ( Crossfire_Player whoptr,
PyObject *  args 
)
static

◆ Player_QuestStart()

static PyObject* Player_QuestStart ( Crossfire_Player whoptr,
PyObject *  args 
)
static

◆ Player_QuestWasCompleted()

static PyObject* Player_QuestWasCompleted ( Crossfire_Player whoptr,
PyObject *  args 
)
static

◆ Player_SetBedMap()

static int Player_SetBedMap ( Crossfire_Player whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_SetBedX()

static int Player_SetBedX ( Crossfire_Player whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_SetBedY()

static int Player_SetBedY ( Crossfire_Player whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_SetMarkedItem()

static int Player_SetMarkedItem ( Crossfire_Player whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_SetParty()

static int Player_SetParty ( Crossfire_Player whoptr,
PyObject *  value,
void *  closure 
)
static

◆ Player_SetTitle()

static int Player_SetTitle ( Crossfire_Object whoptr,
PyObject *  value,
void *  closure 
)
static

Variable Documentation

◆ object_assoc_table

std::map<object *, PyObject *> object_assoc_table
static

Definition at line 57 of file cfpython_object.cpp.

Referenced by add_object_assoc(), find_assoc_pyobject(), and free_object_assoc().

◆ Object_getseters

PyGetSetDef Object_getseters[]
static

Definition at line 1311 of file cfpython_object.cpp.

Referenced by Player_GetObjectProperty().

◆ ObjectMethods

PyMethodDef ObjectMethods[]
static

Definition at line 1448 of file cfpython_object.cpp.

Referenced by Player_GetObjectProperty().

◆ Player_getseters

PyGetSetDef Player_getseters[]
static
Initial value:
= {
{ "CmdCount", (getter)Player_GetIntProperty,NULL, NULL, (void*)CFAPI_PLAYER_PROP_COUNT},
{ "Title", (getter)Player_GetTitle, (setter)Player_SetTitle, NULL, NULL },
{ "IP", (getter)Player_GetIP, NULL, NULL, NULL },
{ "MarkedItem", (getter)Player_GetMarkedItem, (setter)Player_SetMarkedItem, NULL, NULL },
{ "Party", (getter)Player_GetParty, (setter)Player_SetParty, NULL, NULL },
{ "BedMap", (getter)Player_GetBedMap, (setter)Player_SetBedMap, NULL, NULL },
{ "BedX", (getter)Player_GetBedX, (setter)Player_SetBedX, NULL, NULL },
{ "BedY", (getter)Player_GetBedY, (setter)Player_SetBedY, NULL, NULL },
{ "Transport", (getter)Player_GetObjectProperty,NULL, NULL, (void*)CFAPI_PLAYER_PROP_TRANSPORT},
{ NULL, NULL, NULL, NULL, NULL }
}
#define CFAPI_PLAYER_PROP_TRANSPORT
Definition: plugin.h:238
static PyObject * Player_GetTitle(Crossfire_Object *whoptr, void *closure)
static int Player_SetBedX(Crossfire_Player *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetParty(Crossfire_Player *whoptr, void *closure)
static int Player_SetParty(Crossfire_Player *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetObjectProperty(Crossfire_Player *whoptr, void *closure)
static PyObject * Player_GetIntProperty(Crossfire_Player *whoptr, void *closure)
static PyObject * Player_GetBedX(Crossfire_Player *whoptr, void *closure)
#define CFAPI_PLAYER_PROP_COUNT
Definition: plugin.h:239
static int Player_SetBedY(Crossfire_Player *whoptr, PyObject *value, void *closure)
static int Player_SetBedMap(Crossfire_Player *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetMarkedItem(Crossfire_Player *whoptr, void *closure)
static int Player_SetMarkedItem(Crossfire_Player *whoptr, PyObject *value, void *closure)
static int Player_SetTitle(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetBedMap(Crossfire_Player *whoptr, void *closure)
static PyObject * Player_GetBedY(Crossfire_Player *whoptr, void *closure)
static PyObject * Player_GetIP(Crossfire_Player *whoptr, void *closure)

Definition at line 1571 of file cfpython_object.cpp.

◆ PlayerMethods

PyMethodDef PlayerMethods[]
static
Initial value:
= {
{ "Message", (PyCFunction)Crossfire_Player_Message, METH_VARARGS, NULL },
{ "Write", (PyCFunction)Crossfire_Player_Message, METH_VARARGS, NULL },
{ "CanPay", (PyCFunction)Crossfire_Player_CanPay, METH_NOARGS, NULL },
{ "QuestStart", (PyCFunction)Player_QuestStart, METH_VARARGS, NULL },
{ "QuestGetState", (PyCFunction)Player_QuestGetState, METH_VARARGS, NULL },
{ "QuestSetState", (PyCFunction)Player_QuestSetState, METH_VARARGS, NULL },
{ "QuestWasCompleted", (PyCFunction)Player_QuestWasCompleted, METH_VARARGS, NULL },
{ "KnowledgeKnown", (PyCFunction)Player_KnowledgeKnown, METH_VARARGS, NULL },
{ "GiveKnowledge", (PyCFunction)Player_GiveKnowledge, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
}
static PyObject * Player_QuestSetState(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Player_QuestWasCompleted(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Player_KnowledgeKnown(Crossfire_Player *who, PyObject *args)
static PyObject * Player_QuestGetState(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Player_GiveKnowledge(Crossfire_Player *who, PyObject *args)
static PyObject * Player_QuestStart(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Crossfire_Player_CanPay(Crossfire_Player *who, PyObject *args)
static PyObject * Crossfire_Player_Message(Crossfire_Player *who, PyObject *args)

Definition at line 1584 of file cfpython_object.cpp.