Go to the documentation of this file.
33 #define EXISTCHECK(ob) { \
34 if (!ob || !ob->obj || (object_was_destroyed(ob->obj, ob->obj->count))) { \
35 PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
44 #define TYPEEXISTCHECK(ob) { \
45 if (!ob || !PyObject_TypeCheck((PyObject*)ob, &Crossfire_ObjectType) || !ob->obj || (object_was_destroyed(ob->obj, ob->obj->count))) { \
46 PyErr_SetString(PyExc_ReferenceError, "Not a Crossfire object or Crossfire object no longer exists"); \
50 #define EXISTCHECK_INT(ob) { \
51 if (!ob || !ob->obj || (object_was_destroyed(ob->obj, ob->obj->count))) { \
52 PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
89 PyErr_SetString(PyExc_TypeError,
"Cannot delete the Title attribute");
93 PyErr_SetString(PyExc_TypeError,
"The Title attribute must be a string");
96 if (!PyArg_Parse(
value,
"s", &val))
120 if (
value == Py_None)
218 if (!PyArg_Parse(
value,
"i", &
x))
235 if (!PyArg_Parse(
value,
"i", &
y))
247 if (!PyArg_ParseTuple(
args,
"si", &code, &
state))
264 if (!PyArg_ParseTuple(
args,
"s", &code))
271 return Py_BuildValue(
"i",
state);
280 if (!PyArg_ParseTuple(
args,
"si", &code, &
state))
297 if (!PyArg_ParseTuple(
args,
"s", &code))
304 return Py_BuildValue(
"i", completed);
471 PyErr_SetString(PyExc_TypeError,
"Cannot delete the attribute");
475 PyErr_SetString(PyExc_TypeError,
"The attribute must be a string");
478 if (!PyArg_Parse(
value,
"s", &val))
489 if (!PyArg_Parse(
value,
"i", &val))
500 if (!PyArg_Parse(
value,
"f", &val))
511 if (!PyArg_Parse(
value,
"i", &val))
524 PyErr_SetString(PyExc_TypeError,
"Cannot delete the Name attribute");
528 PyErr_SetString(PyExc_TypeError,
"The Name attribute must be a string");
531 if (!PyArg_Parse(
value,
"s", &val))
545 PyErr_SetString(PyExc_TypeError,
"Cannot delete the NamePl attribute");
549 PyErr_SetString(PyExc_TypeError,
"The NamePl attribute must be a string");
552 if (!PyArg_Parse(
value,
"s", &val))
564 if (!PyArg_Parse(
value,
"i", &val))
588 if (!PyArg_Parse(
value,
"i", &val))
592 PyErr_SetString(PyExc_TypeError,
"Invalid quantity");
605 if (!PyArg_Parse(
value,
"s", &face))
609 PyErr_SetString(PyExc_TypeError,
"Unknown face.");
624 PyErr_SetString(PyExc_TypeError,
"Unknown animation.");
636 if (!PyArg_Parse(
value,
"l", &val))
670 if (!PyArg_Parse(
value,
"L", &val))
682 if (!PyArg_Parse(
value,
"B", &move))
693 if (!PyArg_Parse(
value,
"B", &move))
704 if (!PyArg_Parse(
value,
"B", &move))
715 if (!PyArg_Parse(
value,
"B", &move))
726 if (!PyArg_Parse(
value,
"B", &move))
737 if (!PyArg_Parse(
value,
"B", &move))
789 if (!PyArg_ParseTuple(
args,
"i", &clone_type))
792 if (clone_type != 0 && clone_type != 1)
794 PyErr_SetString(PyExc_ValueError,
"Clone type must be 0 (object_create_clone) or 1 (object_copy).");
802 PyErr_SetString(PyExc_RuntimeError,
"Clone failed.");
816 if (!PyArg_ParseTuple(
args,
"i", &
count))
823 PyErr_SetString(PyExc_ValueError, err);
860 return Py_BuildValue(
"i", val);
891 return Py_BuildValue(
"i",
result);
909 PyErr_SetString(PyExc_ValueError,
"too many NPCs");
914 cf_log(
llevError,
"warning, too long message in npcSay, will be truncated");
930 if (!PyArg_ParseTuple(
args,
"ii", &
x, &
y))
950 if (!PyArg_ParseTuple(
args,
"i", &resist))
953 return Py_BuildValue(
"l", 0);
962 if (!PyArg_ParseTuple(
args,
"ii", &resist, &
value))
1016 if (!PyArg_ParseTuple(
args,
"s", &spellname))
1046 if (!PyArg_ParseTuple(
args,
"L", &to_pay))
1051 return Py_BuildValue(
"i", val);
1064 return Py_BuildValue(
"i", val);
1072 if (!PyArg_ParseTuple(
args,
"s", &keyname))
1077 return Py_BuildValue(
"s", val ? val :
"");
1086 if (!PyArg_ParseTuple(
args,
"sz|i", &keyname, &
value, &add_key))
1097 if (!PyArg_ParseTuple(
args,
"li", &delay, &mode))
1108 if (!PyArg_ParseTuple(
args,
"s", &whatstr))
1131 if (!PyArg_ParseTuple(
args,
"s", &whatstr))
1142 if (!PyArg_ParseTuple(
args,
"ii", &
x, &
y))
1153 if (!PyArg_ParseTuple(
args,
"s", &txt))
1194 const char *skill = NULL;
1197 if (!PyArg_ParseTuple(
args,
"L|si", &exp, &skill, &arg))
1214 if (!PyArg_ParseTuple(
args,
"i", &dir))
1223 if (!PyArg_ParseTuple(
args,
"ii", &
x, &
y))
1252 if (!PyArg_ParseTuple(
args,
"i", &
level))
1268 return (left->
obj < right->
obj ? -1 : (left->
obj == right->
obj ? 0 : 1));
1277 Py_INCREF(Py_NotImplemented);
1278 return Py_NotImplemented;
1282 if (
result == -1 && PyErr_Occurred())
1305 return PyBool_FromLong(
result);
1447 { NULL, NULL, NULL, NULL, NULL }
1490 { NULL, NULL, 0, NULL }
1506 return (PyObject *)
self;
1517 Py_TYPE(
self)->tp_free(
obj);
1532 return (PyObject *)
self;
1543 Py_TYPE(
self)->tp_free(
obj);
1557 PyObject_HashNotImplemented,
1558 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1559 "Crossfire objects",
1576 { NULL, NULL, NULL, NULL, NULL }
1589 { NULL, NULL, 0, NULL }
1624 if (plwrap != NULL) {
1628 pyobj = (PyObject *)plwrap;
1631 if (wrapper != NULL) {
1632 wrapper->
obj = what;
1635 pyobj = (PyObject *)wrapper;
#define object_was_destroyed(op, old_tag)
static PyObject * Crossfire_Object_CastAbility(Crossfire_Object *who, PyObject *args)
static PyObject * find_assoc_pyobject(object *key)
static PyObject * Object_GetMoveOn(Crossfire_Object *whoptr, void *closure)
static void add_object_assoc(object *key, PyObject *value)
#define CFAPI_OBJECT_PROP_TITLE
void cf_log(LogLevel logLevel, const char *format,...)
sstring cf_query_name_pl(object *ob)
static int Player_SetParty(Crossfire_Player *whoptr, PyObject *value, void *closure)
#define CFAPI_OBJECT_PROP_X
static PyObject * Crossfire_Object_ReadKey(Crossfire_Object *who, PyObject *args)
object * cf_object_check_for_spell(object *op, const char *name)
PyObject_HEAD object * obj
sstring cf_add_string(const char *str)
static PyGetSetDef Object_getseters[]
#define CFAPI_OBJECT_PROP_CHA
PyObject * Crossfire_Map_wrap(mapstruct *what)
static PyObject * Crossfire_Object_KnowSpell(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_ARCH_NAME
static void free_object_assoc(object *key)
static int Object_SetMoveOn(Crossfire_Object *whoptr, PyObject *value, void *closure)
#define CFAPI_OBJECT_PROP_ATTACK_MOVEMENT
static PyObject * Player_GetBedMap(Crossfire_Player *whoptr, void *closure)
void cf_player_set_marked_item(object *op, object *ob)
static int Object_SetMap(Crossfire_Object *whoptr, PyObject *value, void *closure)
int cf_object_teleport(object *ob, mapstruct *map, int x, int y)
int cf_object_out_of_map(object *op, int x, int y)
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
long cf_object_get_long_property(object *op, long propcode)
#define CFAPI_OBJECT_PROP_LEVEL
#define CFAPI_PLAYER_PROP_BED_X
static PyObject * Crossfire_Object_Cast(Crossfire_Object *who, PyObject *args)
sstring cf_object_get_sstring_property(object *op, int propcode)
int cf_player_knowledge_has(object *op, const char *knowledge)
#define FLAG_REFL_MISSILE
object * cf_object_get_object_property(object *op, int propcode)
static int Object_SetQuantity(Crossfire_Object *whoptr, PyObject *value, void *closure)
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
void cf_fix_object(object *op)
static PyObject * Crossfire_Player_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
#define CFAPI_OBJECT_PROP_SLAYING
static PyObject * Object_GetMoveOff(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_FRIENDLY
#define CFAPI_OBJECT_PROP_DEX
void cf_player_knowledge_give(object *op, const char *knowledge)
void free_ptr_assoc(ptr_assoc **hash_table, void *key)
#define CFAPI_OBJECT_PROP_ARCHETYPE
object * cf_create_object_by_name(const char *name)
#define CFAPI_OBJECT_PROP_LAST_EAT
static int Player_SetTitle(Crossfire_Object *whoptr, PyObject *value, void *closure)
#define CFAPI_OBJECT_PROP_MOVE_ON
static ptr_assoc_table object_assoc_table
static int Player_SetBedX(Crossfire_Player *whoptr, PyObject *value, void *closure)
#define CFAPI_OBJECT_PROP_STR
static PyObject * Crossfire_Object_Split(Crossfire_Object *who, PyObject *args)
static void Crossfire_Player_dealloc(PyObject *obj)
static PyObject * Player_QuestSetState(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Object_GetTotalExp(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_GOD
PyObject * Crossfire_Object_wrap(object *what)
char * cf_query_name(object *ob, char *name, int size)
void cf_object_set_float_property(object *op, int propcode, float value)
static PyObject * Crossfire_Object_CreateTimer(Crossfire_Object *who, PyObject *args)
static int Object_SetStringProperty(Crossfire_Object *whoptr, PyObject *value, void *closure)
static int Object_SetMoveType(Crossfire_Object *whoptr, PyObject *value, void *closure)
#define FLAG_SEE_INVISIBLE
int cf_object_apply(object *op, object *author, int flags)
CFPContext * current_context
knowledge
DIALOGCHECK MINARGS 1 MAXARGS 1
#define CFAPI_OBJECT_PROP_MAXSP
static PyObject * Player_GetParty(Crossfire_Player *whoptr, void *closure)
static int Object_SetFloatProperty(Crossfire_Object *whoptr, PyObject *value, void *closure)
int64_t cf_object_get_int64_property(object *op, int propcode)
int cf_object_move_to(object *op, int x, int y)
static PyObject * Object_GetExists(Crossfire_Object *whoptr, void *closure)
void cf_object_free_drop_inventory(object *ob)
#define CFAPI_OBJECT_PROP_Y
#define CFAPI_OBJECT_PROP_ENEMY
int cf_player_can_pay(object *op)
static PyObject * Crossfire_Object_Remove(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_MOVE_TYPE
void cf_object_set_string_property(object *op, int propcode, const char *value)
static PyObject * Crossfire_Player_Message(Crossfire_Player *who, PyObject *args)
int64_t cf_object_perm_exp(object *op)
#define CFAPI_OBJECT_PROP_FACE
#define CFAPI_OBJECT_PROP_ENVIRONMENT
void cf_quest_set_player_state(object *pl, sstring quest_code, int state)
static PyObject * Crossfire_Object_Long(PyObject *obj)
static PyObject * Crossfire_Player_CanPay(Crossfire_Player *who, PyObject *args)
static int Object_SetIntProperty(Crossfire_Object *whoptr, PyObject *value, void *closure)
int cf_player_arrest(object *who)
static const flag_definition flags[]
static PyObject * Crossfire_Object_SetResist(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_ITEM_POWER
static PyObject * Player_QuestGetState(Crossfire_Player *whoptr, PyObject *args)
#define CFAPI_OBJECT_PROP_CURRENT_WEAPON
static int Crossfire_Object_InternalCompare(Crossfire_Object *left, Crossfire_Object *right)
static PyObject * Crossfire_Object_InsertInto(Crossfire_Object *who, PyObject *args)
static PyMethodDef ObjectMethods[]
void cf_player_set_title(object *op, const char *title)
static PyObject * Object_GetArchetype(Crossfire_Object *whoptr, void *closure)
void cf_spring_trap(object *trap, object *victim)
static PyObject * Crossfire_Object_Pay(Crossfire_Object *who, PyObject *args)
static PyObject * Object_GetOtherArchetype(Crossfire_Object *whoptr, void *closure)
int cf_object_pay_amount(object *pl, uint64_t to_pay)
static PyObject * Crossfire_Object_ActivateRune(Crossfire_Object *who, PyObject *args)
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)
#define CFAPI_OBJECT_PROP_INVISIBLE
static PyObject * Crossfire_Object_CheckArchInventory(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_Drop(Crossfire_Object *who, PyObject *args)
static PyObject * Player_GetTitle(Crossfire_Object *whoptr, void *closure)
int cf_object_change_abil(object *op, object *tmp)
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
static PyGetSetDef Player_getseters[]
#define CFAPI_OBJECT_PROP_SKILL
#define EXISTCHECK_INT(ob)
PyObject_HEAD object * obj
void cf_quest_start(object *pl, sstring quest_code, int state)
PyTypeObject Crossfire_PlayerType
static PyObject * Crossfire_Object_ChangeAbil(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_GetResist(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_ANIM_SPEED
static event_registration m
#define CFAPI_OBJECT_PROP_AC
static PyMethodDef PlayerMethods[]
void add_ptr_assoc(ptr_assoc **hash_table, void *key, void *value)
void init_ptr_assoc_table(ptr_assoc **hash_table)
int cf_object_set_animation(object *op, const char *animation)
#define CFAPI_OBJECT_PROP_MOVE_OFF
void cf_log_plain(LogLevel logLevel, const char *message)
PyObject_HEAD mapstruct * map
static PyObject * Crossfire_Object_RemoveDepletion(Crossfire_Object *who, PyObject *args)
#define CF_IS_PYSTR(cfpy_obj)
#define CFAPI_OBJECT_PROP_HP
#define CFAPI_OBJECT_PROP_MAXHP
partylist * cf_player_get_party(object *op)
#define CFAPI_OBJECT_PROP_OB_BELOW
static PyObject * Object_GetMoveType(Crossfire_Object *whoptr, void *closure)
int cf_timer_create(object *ob, long delay, int mode)
static PyObject * Object_GetName(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_TOTAL_EXP
#define CFAPI_PLAYER_PROP_BED_Y
void cf_object_set_int64_property(object *op, int propcode, int64_t value)
static int Object_SetMoveAllow(Crossfire_Object *whoptr, PyObject *value, void *closure)
#define FLAG_KNOWN_CURSED
static PyObject * Object_GetNamePl(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_CreateInside(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_RACE
#define CFAPI_OBJECT_PROP_MOVE_BLOCK
#define CFAPI_OBJECT_PROP_FACING
#define CFAPI_OBJECT_PROP_WEIGHT
static int Object_SetMoveBlock(Crossfire_Object *whoptr, PyObject *value, void *closure)
MoveType cf_object_get_movetype_property(object *op, int propcode)
object * cf_object_find_by_arch_name(const object *who, const char *name)
mapstruct * cf_object_get_map_property(object *op, int propcode)
#define CFAPI_OBJECT_PROP_DAM
int cf_object_query_money(const object *op)
static PyObject * Object_GetMaterial(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_Take(Crossfire_Object *who, PyObject *args)
static PyObject * Player_GetObjectProperty(Crossfire_Player *whoptr, void *closure)
static PyObject * Crossfire_Object_WriteKey(Crossfire_Object *who, PyObject *args)
object * cf_object_clone(object *op, int clonetype)
#define CFAPI_OBJECT_PROP_EXP
#define CFAPI_OBJECT_PROP_SPEED
#define CFAPI_OBJECT_PROP_TYPE
#define CFAPI_OBJECT_PROP_NROF
static int Object_SetEnemy(Crossfire_Object *whoptr, PyObject *value, void *closure)
double cf_object_get_double_property(object *op, int propcode)
static PyObject * Object_GetMap(Crossfire_Object *whoptr, void *closure)
static PyObject * Object_GetMoveSlow(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_Reposition(Crossfire_Object *who, PyObject *args)
static PyObject * Object_GetExp(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_CheckInventory(Crossfire_Object *who, PyObject *args)
const typedef char * sstring
#define FLAG_UNAGGRESSIVE
static PyObject * Crossfire_Object_LearnSpell(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_ATTACK_TYPE
static PyObject * Player_GiveKnowledge(Crossfire_Player *who, PyObject *args)
#define FLAG_CAN_USE_SKILL
int cf_object_get_flag(object *ob, int flag)
static PyObject * Crossfire_Object_RichCompare(Crossfire_Object *left, Crossfire_Object *right, int op)
#define CFAPI_OBJECT_PROP_OWNER
static int Object_SetMoveSlow(Crossfire_Object *whoptr, PyObject *value, void *closure)
void cf_object_drop(object *op, object *author)
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
#define CFAPI_OBJECT_PROP_NAME_PLURAL
static PyObject * Player_GetMarkedItem(Crossfire_Player *whoptr, void *closure)
static PyObject * Object_GetExpMul(Crossfire_Object *whoptr, void *closure)
void cf_free_string(sstring str)
static PyObject * Object_GetValue(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_CheckTrigger(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_Move(Crossfire_Object *who, PyObject *args)
static PyObject * Object_GetMoveBlock(Crossfire_Object *whoptr, void *closure)
object * cf_object_present_archname_inside(object *op, char *whatstr)
#define CFAPI_OBJECT_PROP_WIS
void cf_object_pickup(object *op, object *what)
#define CFAPI_OBJECT_PROP_POW
static PyObject * Crossfire_Object_ForgetSpell(Crossfire_Object *who, PyObject *args)
archetype * cf_object_get_archetype_property(object *op, int propcode)
static void Crossfire_Object_dealloc(PyObject *obj)
object * cf_player_get_marked_item(object *op)
#define CFAPI_OBJECT_PROP_CONTAINER
#define FLAG_KNOWN_MAGICAL
static int Player_SetMarkedItem(Crossfire_Player *whoptr, PyObject *value, void *closure)
object * cf_object_insert_in_ob(object *op, object *where)
#define CFAPI_OBJECT_PROP_INVENTORY
#define CFAPI_OBJECT_PROP_MAP
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
int cf_object_move(object *op, int dir, object *originator)
object * cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
static int Object_SetFace(Crossfire_Object *whoptr, PyObject *value, void *closure)
void cf_player_set_party(object *op, partylist *party)
#define CFAPI_PLAYER_PROP_TRANSPORT
static PyObject * Player_QuestWasCompleted(Crossfire_Player *whoptr, PyObject *args)
static PyObject * Object_GetMoney(Crossfire_Object *whoptr, void *closure)
static int Object_SetMoveOff(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetBedY(Crossfire_Player *whoptr, void *closure)
PyTypeObject Crossfire_PartyType
ptr_assoc * ptr_assoc_table[PTR_ASSOC_TABLESIZE]
#define CFAPI_OBJECT_PROP_ANIMATION
#define CFAPI_OBJECT_PROP_INT
#define CFAPI_OBJECT_PROP_SP
static PyObject * Object_GetFloatProperty(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_NAME
#define CFAPI_OBJECT_PROP_EXP_MULTIPLIER
PyObject * Crossfire_Archetype_wrap(archetype *what)
void cf_object_set_flag(object *ob, int flag, int value)
static int Player_SetBedMap(Crossfire_Player *whoptr, PyObject *value, void *closure)
#define CFAPI_PLAYER_PROP_BED_MAP
static PyObject * Object_GetObjectProperty(Crossfire_Object *whoptr, void *closure)
int cf_object_set_nrof(object *, int nrof)
#define CFAPI_OBJECT_PROP_WC
#define CFAPI_OBJECT_PROP_GLOW_RADIUS
CF_PYTHON_NUMBER_METHODS(Object, Crossfire_Object_Long)
int cf_object_check_trigger(object *op, object *cause)
PyObject * Crossfire_Party_wrap(partylist *what)
#define CFAPI_OBJECT_PROP_CON
int cf_quest_get_player_state(object *pl, sstring quest_code)
static PyObject * Crossfire_Object_PermExp(Crossfire_Object *who, PyObject *args)
void cf_object_set_long_property(object *op, int propcode, long value)
#define FLAG_BEEN_APPLIED
const char * cf_object_get_key(object *op, const char *keyname)
#define CFAPI_OBJECT_PROP_GP
#define CFAPI_OBJECT_PROP_LAST_SP
static int Player_SetBedY(Crossfire_Player *whoptr, PyObject *value, void *closure)
static PyObject * Crossfire_Object_Teleport(Crossfire_Object *who, PyObject *args)
static PyObject * Object_GetMoveAllow(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_MATERIAL
#define CFAPI_OBJECT_PROP_DURATION
#define CFAPI_OBJECT_PROP_OTHER_ARCH
#define CFAPI_OBJECT_PROP_OB_ABOVE
sstring npc_msgs[MAX_NPC]
static PyObject * Object_GetSStringProperty(Crossfire_Object *whoptr, void *closure)
static PyObject * Crossfire_Object_Fix(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_MOVE_ALLOW
static int Object_SetAnim(Crossfire_Object *whoptr, PyObject *value, void *closure)
char * cf_player_get_title(object *op, char *title, int size)
static int Object_SetName(Crossfire_Object *whoptr, PyObject *value, void *closure)
int cf_object_set_face(object *op, const char *face)
#define CFAPI_OBJECT_PROP_MOVE_SLOW
#define TYPEEXISTCHECK(ob)
static int Object_SetFlagProperty(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Crossfire_Object_QueryName(Crossfire_Object *who, PyObject *args)
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
#define CFAPI_OBJECT_PROP_LUCK
void cf_object_forget_spell(object *op, object *sp)
int cf_object_pay_item(object *op, object *pl)
object * cf_object_insert_object(object *op, object *container)
static PyObject * Crossfire_Object_Event(Crossfire_Object *who, PyObject *args)
static PyObject * Object_GetPickable(Crossfire_Object *whoptr, void *closure)
int16_t cf_object_get_resistance(object *op, int rtype)
void cf_object_set_int_property(object *op, int propcode, int value)
static int Object_SetPickable(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Crossfire_Object_AddExp(Crossfire_Object *who, PyObject *args)
static std::vector< std::string > split(const std::string &field, const std::string &by)
#define CFAPI_OBJECT_PROP_VALUE
#define CFAPI_OBJECT_PROP_MESSAGE
static PyObject * Crossfire_Object_GetOutOfMap(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY
static int Object_SetValue(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Object_GetFlagProperty(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_MAXGP
#define CFAPI_OBJECT_PROP_COUNT
#define CFAPI_OBJECT_PROP_SUBTYPE
static PyObject * Player_GetBedX(Crossfire_Player *whoptr, void *closure)
void * find_assoc_value(ptr_assoc **hash_table, void *key)
void cf_object_remove(object *op)
void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag)
void cf_object_say(object *op, char *msg)
static PyObject * Crossfire_Object_Say(Crossfire_Object *who, PyObject *args)
static int Object_SetOwner(Crossfire_Object *whoptr, PyObject *value, void *closure)
static PyObject * Player_GetIP(Crossfire_Player *whoptr, void *closure)
sstring cf_player_get_ip(object *op)
static PyObject * Crossfire_Object_Apply(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_PayAmount(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_FP
void cf_player_message(object *op, char *txt, int flags)
void cf_object_set_object_property(object *op, int propcode, object *value)
static int Object_SetExp(Crossfire_Object *whoptr, PyObject *value, void *closure)
PyTypeObject Crossfire_ObjectType
void init_object_assoc_table(void)
static PyObject * Player_KnowledgeKnown(Crossfire_Player *who, PyObject *args)
static PyObject * Object_GetIntProperty(Crossfire_Object *whoptr, void *closure)
#define CFAPI_OBJECT_PROP_LAST_GRACE
static PyObject * Crossfire_Object_MoveTo(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
int cf_object_get_int_property(object *op, int propcode)
int cf_quest_was_completed(object *pl, sstring quest_code)
float cf_object_get_float_property(object *op, int propcode)
#define CFAPI_OBJECT_PROP_DIRECTION
static PyObject * Player_QuestStart(Crossfire_Player *whoptr, PyObject *args)
void cf_object_set_resistance(object *op, int rtype, int16_t value)
int cf_object_remove_depletion(object *op, int level)
#define CFAPI_OBJECT_PROP_MATERIAL_NAME
static PyObject * Crossfire_Object_Arrest(Crossfire_Object *who, PyObject *args)
static PyObject * Crossfire_Object_Clone(Crossfire_Object *who, PyObject *args)
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
#define CFAPI_OBJECT_PROP_SPEED_LEFT
static int Object_SetNamePl(Crossfire_Object *whoptr, PyObject *value, void *closure)
PyTypeObject Crossfire_MapType