Crossfire Server, Branches 1.12  R18729
cfpython_object.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Crossfire_Object
 
struct  Crossfire_Player
 

Macros

#define EXISTCHECK(ob)
 
#define EXISTCHECK_INT(ob)
 
#define TYPEEXISTCHECK(ob)
 

Variables

PyTypeObject Crossfire_ObjectType
 
PyTypeObject Crossfire_PlayerType
 

Macro Definition Documentation

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

Definition at line 48 of file cfpython_object.h.

Referenced by Crossfire_Object_ActivateRune(), Crossfire_Object_AddExp(), Crossfire_Object_Apply(), 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_Pay(), Crossfire_Object_PayAmount(), Crossfire_Object_QueryCost(), Crossfire_Object_QueryName(), Crossfire_Object_ReadKey(), Crossfire_Object_Remove(), 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_GetAbove(), Object_GetAC(), Object_GetAlive(), Object_GetAnim(), Object_GetAnimated(), Object_GetAnimSpeed(), Object_GetApplied(), Object_GetArchetype(), Object_GetArchName(), Object_GetAttackMovement(), Object_GetAttackType(), Object_GetBeenApplied(), Object_GetBelow(), Object_GetBlind(), Object_GetBlocksView(), Object_GetCanCastSpell(), Object_GetCanSeeInDark(), Object_GetCanSeeInvisible(), Object_GetCanUseArmour(), Object_GetCanUseBow(), Object_GetCanUseHorn(), Object_GetCanUseRing(), Object_GetCanUseRod(), Object_GetCanUseScroll(), Object_GetCanUseSkill(), Object_GetCanUseWand(), Object_GetCanUseWeapon(), Object_GetCha(), Object_GetCon(), Object_GetConfused(), Object_GetCount(), Object_GetCursed(), Object_GetDam(), Object_GetDamned(), Object_GetDex(), Object_GetDirection(), Object_GetDM(), Object_GetDuration(), Object_GetEnemy(), Object_GetEnv(), Object_GetExp(), Object_GetExpMul(), Object_GetFace(), Object_GetFacing(), Object_GetFloor(), Object_GetFood(), Object_GetFriendly(), Object_GetGenerator(), Object_GetGlowRadius(), Object_GetGod(), Object_GetGodGiven(), Object_GetGrace(), Object_GetHasXRays(), Object_GetHitBack(), Object_GetHP(), Object_GetIdentified(), Object_GetInt(), Object_GetInventory(), Object_GetInvisible(), Object_GetIsPet(), Object_GetKnownCursed(), Object_GetKnownMagical(), Object_GetLastEat(), Object_GetLastGrace(), Object_GetLastSP(), Object_GetLevel(), Object_GetLifesaver(), Object_GetLuck(), Object_GetMakeInvisible(), Object_GetMap(), Object_GetMaxGrace(), Object_GetMaxHP(), Object_GetMaxSP(), Object_GetMessage(), Object_GetMoney(), Object_GetMonster(), Object_GetMoveAllow(), Object_GetMoveBlock(), Object_GetMoveOff(), Object_GetMoveOn(), Object_GetMoveSlow(), Object_GetMoveSlowPenalty(), Object_GetMoveType(), Object_GetName(), Object_GetNamePl(), Object_GetNoDamage(), Object_GetNoSave(), Object_GetOnlyAttack(), Object_GetOwner(), Object_GetPermExp(), Object_GetPickable(), Object_GetPow(), Object_GetQuantity(), Object_GetRace(), Object_GetRandomMovement(), Object_GetReflectMissiles(), Object_GetReflectSpells(), Object_GetRollable(), Object_GetRunAway(), Object_GetScared(), Object_GetSkill(), Object_GetSlaying(), Object_GetSleeping(), Object_GetSP(), Object_GetSpeed(), Object_GetSpeedLeft(), Object_GetSplitting(), Object_GetStandStill(), Object_GetStealthy(), Object_GetStr(), Object_GetSubtype(), Object_GetThrown(), Object_GetTitle(), Object_GetTurnable(), Object_GetType(), Object_GetUnaggressive(), Object_GetUndead(), Object_GetUnique(), Object_GetUnpaid(), Object_GetUsedUp(), Object_GetValue(), Object_GetWasDM(), Object_GetWeight(), Object_GetWeightLimit(), Object_GetWis(), Object_GetX(), Object_GetY(), Player_GetBedMap(), Player_GetBedX(), Player_GetBedY(), Player_GetIP(), Player_GetMarkedItem(), Player_GetParty(), and Player_GetTitle().

#define EXISTCHECK_INT (   ob)
Value:
{ \
if (!ob || !ob->obj || (was_destroyed(ob->obj, ob->obj->count))) { \
PyErr_SetString(PyExc_ReferenceError, "Crossfire object no longer exists"); \
return -1; \
} }
#define was_destroyed(op, old_tag)
Definition: object.h:94

Definition at line 65 of file cfpython_object.h.

Referenced by Crossfire_Object_InternalCompare(), Object_SetAC(), Object_SetAnim(), Object_SetAnimated(), Object_SetAnimSpeed(), Object_SetApplied(), Object_SetAttackMovement(), Object_SetAttackType(), Object_SetBlind(), Object_SetBlocksView(), Object_SetCanPassThru(), Object_SetCanSeeInDark(), Object_SetCanSeeInvisible(), Object_SetCha(), Object_SetCon(), Object_SetConfused(), Object_SetCursed(), Object_SetDam(), Object_SetDamned(), Object_SetDex(), Object_SetDirection(), Object_SetDuration(), Object_SetEnemy(), Object_SetExp(), Object_SetFace(), Object_SetFacing(), Object_SetFood(), Object_SetFriendly(), Object_SetGlowRadius(), Object_SetGod(), Object_SetGodGiven(), Object_SetGrace(), Object_SetHasXRays(), Object_SetHitBack(), Object_SetHP(), Object_SetIdentified(), Object_SetInt(), Object_SetInvisible(), Object_SetIsPet(), Object_SetKnownCursed(), Object_SetKnownMagical(), Object_SetLastEat(), Object_SetLastGrace(), Object_SetLastSP(), Object_SetLifesaver(), Object_SetMakeInvisible(), Object_SetMap(), Object_SetMaxGrace(), Object_SetMaxHP(), Object_SetMaxSP(), Object_SetMessage(), Object_SetName(), Object_SetNamePl(), Object_SetNoDamage(), Object_SetNoSave(), Object_SetOnlyAttack(), Object_SetOwner(), Object_SetPickable(), Object_SetPow(), Object_SetQuantity(), Object_SetRace(), Object_SetRandomMovement(), Object_SetReflectMissiles(), Object_SetReflectSpells(), Object_SetRollable(), Object_SetRunAway(), Object_SetScared(), Object_SetSkill(), Object_SetSlaying(), Object_SetSleeping(), Object_SetSP(), Object_SetSpeed(), Object_SetSpeedLeft(), Object_SetStandStill(), Object_SetStealthy(), Object_SetStr(), Object_SetTitle(), Object_SetTurnable(), Object_SetUnaggressive(), Object_SetUndead(), Object_SetUnique(), Object_SetUnpaid(), Object_SetUsedUp(), Object_SetValue(), Object_SetWC(), Object_SetWeight(), Object_SetWeightLimit(), Object_SetWis(), Player_SetBedMap(), Player_SetBedX(), Player_SetBedY(), Player_SetMarkedItem(), Player_SetParty(), and Player_SetTitle().

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

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 59 of file cfpython_object.h.

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().

Variable Documentation

PyTypeObject Crossfire_PlayerType

Definition at line 624 of file cfpython_object_private.h.

Referenced by Crossfire_Object_wrap(), and initPlugin().