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 pointerreturn
- instance of the object
Cast_InstanceToPointer
Cast_InstanceToPointer
Converts instance to a memory address (pointer)
object
- object instancereturn
- memory address (pointer) of the object
Cast_PointerToNpc
Cast_PointerToNpc
Casts memory address (pointer) to an NPC
address
- npc pointerreturn
- NPC instance
Cast_PointerToItem
Cast_PointerToItem
Casts memory address (pointer) to an Item
address
- item pointerreturn
- Item instance
Cast_InstanceIsNpc
Cast_InstanceIsNpc
Checks whether object is an NPC
object
- object to checkreturn
-TRUE
orFALSE
Cast_InstanceIsItem
Cast_InstanceIsItem
Checks whether object is an Item
object
- object to checkreturn
-TRUE
orFALSE
Cast_InstanceIsMob
Cast_InstanceIsMob
Checks whether object is an MOB
object
- object to checkreturn
-TRUE
orFALSE
Cast_GetInstanceIndex
Cast_GetInstanceIndex
Returns symbolID of the object, returns -1 when not found
object
- instance of an objectreturn
- 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 classreturn
- class identifier
Cast_GetVobClassID
Cast_GetVobClassID
Returns class identifier of the zCObject vob class
object
- object instancereturn
- 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 functionobject
- object instancereturn
- class zCObject identifier