CAST - data type conversion functions
External functions for data type conversion and pointer casting.
Cast_PointerToInstance
Cast_PointerToInstance
Converts memory address (pointer) to an instance
- address- object pointer
- return- instance of the object
Cast_InstanceToPointer
Cast_InstanceToPointer
Converts instance to a memory address (pointer)
- object- object instance
- return- memory address (pointer) of the object
Cast_PointerToNpc
Cast_PointerToNpc
Casts memory address (pointer) to an NPC
- address- npc pointer
- return- NPC instance
Cast_PointerToItem
Cast_PointerToItem
Casts memory address (pointer) to an Item
- address- item pointer
- return- Item instance
Cast_InstanceIsNpc
Cast_InstanceIsNpc
Checks whether object is an NPC
- object- object to check
- return-- TRUEor- FALSE
Cast_InstanceIsItem
Cast_InstanceIsItem
Checks whether object is an Item
- object- object to check
- return-- TRUEor- FALSE
Cast_InstanceIsMob
Cast_InstanceIsMob
Checks whether object is an MOB
- object- object to check
- return-- TRUEor- FALSE
Cast_GetInstanceIndex
Cast_GetInstanceIndex
Returns symbolID of the object, returns -1 when not found
- object- instance of an object
- return- symbol table index, -1 when not found
Cast_GetClassID
Cast_GetClassID
Returns the class identifier of a class by its name
- className- name of the class
- return- class identifier
Cast_GetVobClassID
Cast_GetVobClassID
Returns class identifier of the zCObject vob class
- object- object instance
- return- class zCObject identifier
Cast_CheckVobClassID
Cast_CheckVobClassID
Checks if the classId class is the parent class of the object
- classId- class identifier, from Cast_GetClassID function
- object- object instance
- return- class zCObject identifier