Crossfire Server, Trunk  R20513
Data Structures | Macros | Typedefs
plugin.h File Reference

Definitions for the plugin system. More...

#include <dlfcn.h>
#include <global.h>
#include <object.h>
#include <logger.h>
#include <time.h>
#include "random_maps/random_map.h"
#include "random_maps/rproto.h"
#include <dirent.h>
#include <stdarg.h>
Include dependency graph for plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _crossfire_plugin
 One loaded plugin. More...
 
struct  _hook_entry
 One function the server exposes to plugins. More...
 

Macros

#define CFAPI_ARCH_PROP_CLONE   4
 
#define CFAPI_ARCH_PROP_HEAD   2
 
#define CFAPI_ARCH_PROP_MORE   3
 
#define CFAPI_ARCH_PROP_NAME   0
 
#define CFAPI_ARCH_PROP_NEXT   1
 
#define CFAPI_CHAR   3
 
#define CFAPI_DOUBLE   8
 
#define CFAPI_FLOAT   7
 
#define CFAPI_FUNC   10
 
#define CFAPI_INT   1
 
#define CFAPI_INT16   14
 
#define CFAPI_LONG   2
 
#define CFAPI_MAP_PROP_DARKNESS   9
 
#define CFAPI_MAP_PROP_DIFFICULTY   1
 
#define CFAPI_MAP_PROP_ENTER_X   12
 
#define CFAPI_MAP_PROP_ENTER_Y   13
 
#define CFAPI_MAP_PROP_FLAGS   0
 
#define CFAPI_MAP_PROP_HEIGHT   11
 
#define CFAPI_MAP_PROP_LIGHT   8
 
#define CFAPI_MAP_PROP_MESSAGE   22
 
#define CFAPI_MAP_PROP_NAME   4
 
#define CFAPI_MAP_PROP_NEXT   23
 
#define CFAPI_MAP_PROP_PATH   2
 
#define CFAPI_MAP_PROP_PLAYERS   7
 
#define CFAPI_MAP_PROP_REGION   24
 
#define CFAPI_MAP_PROP_RESET_TIME   5
 
#define CFAPI_MAP_PROP_RESET_TIMEOUT   6
 
#define CFAPI_MAP_PROP_TMPNAME   3
 
#define CFAPI_MAP_PROP_UNIQUE   25
 
#define CFAPI_MAP_PROP_WIDTH   10
 
#define CFAPI_MOVETYPE   18 /* MoveType */
 
#define CFAPI_NONE   0
 
#define CFAPI_OBJECT_PROP_AC   87
 
#define CFAPI_OBJECT_PROP_ANIM_SPEED   66
 
#define CFAPI_OBJECT_PROP_ANIMATION   100
 
#define CFAPI_OBJECT_PROP_ARCH_NAME   97
 
#define CFAPI_OBJECT_PROP_ARCHETYPE   63
 
#define CFAPI_OBJECT_PROP_ATTACK_MOVEMENT   60
 
#define CFAPI_OBJECT_PROP_ATTACK_TYPE   31
 
#define CFAPI_OBJECT_PROP_ATTACKED_BY   55
 
#define CFAPI_OBJECT_PROP_BASE_NAME   69
 
#define CFAPI_OBJECT_PROP_CARRYING   50
 
#define CFAPI_OBJECT_PROP_CHA   85
 
#define CFAPI_OBJECT_PROP_CHEATER   75
 
#define CFAPI_OBJECT_PROP_CHOSEN_SKILL   57
 
#define CFAPI_OBJECT_PROP_CLIENT_TYPE   29
 
#define CFAPI_OBJECT_PROP_CON   81
 
#define CFAPI_OBJECT_PROP_CONTAINER   8
 
#define CFAPI_OBJECT_PROP_COUNT   10
 
#define CFAPI_OBJECT_PROP_CURRENT_WEAPON   53
 
#define CFAPI_OBJECT_PROP_CUSTOM_NAME   65
 
#define CFAPI_OBJECT_PROP_DAM   95
 
#define CFAPI_OBJECT_PROP_DEX   80
 
#define CFAPI_OBJECT_PROP_DIRECTION   25
 
#define CFAPI_OBJECT_PROP_DURATION   109
 
#define CFAPI_OBJECT_PROP_ENEMY   54
 
#define CFAPI_OBJECT_PROP_ENVIRONMENT   6
 
#define CFAPI_OBJECT_PROP_EXP   72
 
#define CFAPI_OBJECT_PROP_EXP_MULTIPLIER   62
 
#define CFAPI_OBJECT_PROP_FACE   99
 
#define CFAPI_OBJECT_PROP_FACING   26
 
#define CFAPI_OBJECT_PROP_FLAGS   78
 
#define CFAPI_OBJECT_PROP_FP   91
 
#define CFAPI_OBJECT_PROP_FRIENDLY   67
 
#define CFAPI_OBJECT_PROP_GEN_SP_ARMOUR   47
 
#define CFAPI_OBJECT_PROP_GLOW_RADIUS   51
 
#define CFAPI_OBJECT_PROP_GOD   96
 
#define CFAPI_OBJECT_PROP_GP   90
 
#define CFAPI_OBJECT_PROP_HEAD   7
 
#define CFAPI_OBJECT_PROP_HIDDEN   58
 
#define CFAPI_OBJECT_PROP_HP   88
 
#define CFAPI_OBJECT_PROP_INT   83
 
#define CFAPI_OBJECT_PROP_INVENTORY   5
 
#define CFAPI_OBJECT_PROP_INVISIBLE   98
 
#define CFAPI_OBJECT_PROP_INVISIBLE_TIME   44
 
#define CFAPI_OBJECT_PROP_ITEM_POWER   46
 
#define CFAPI_OBJECT_PROP_LAST_EAT   43
 
#define CFAPI_OBJECT_PROP_LAST_GRACE   42
 
#define CFAPI_OBJECT_PROP_LAST_HEAL   40
 
#define CFAPI_OBJECT_PROP_LAST_SP   41
 
#define CFAPI_OBJECT_PROP_LEVEL   39
 
#define CFAPI_OBJECT_PROP_LORE   19
 
#define CFAPI_OBJECT_PROP_LUCK   71
 
#define CFAPI_OBJECT_PROP_MAGIC   37
 
#define CFAPI_OBJECT_PROP_MAGICAL   70
 
#define CFAPI_OBJECT_PROP_MAP   9
 
#define CFAPI_OBJECT_PROP_MATERIAL   35
 
#define CFAPI_OBJECT_PROP_MATERIAL_NAME   36
 
#define CFAPI_OBJECT_PROP_MAXGP   94
 
#define CFAPI_OBJECT_PROP_MAXHP   92
 
#define CFAPI_OBJECT_PROP_MAXSP   93
 
#define CFAPI_OBJECT_PROP_MERGEABLE   76
 
#define CFAPI_OBJECT_PROP_MESSAGE   18
 
#define CFAPI_OBJECT_PROP_MOVE_ALLOW   104
 
#define CFAPI_OBJECT_PROP_MOVE_BLOCK   103
 
#define CFAPI_OBJECT_PROP_MOVE_OFF   106
 
#define CFAPI_OBJECT_PROP_MOVE_ON   105
 
#define CFAPI_OBJECT_PROP_MOVE_SLOW   107
 
#define CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY   108
 
#define CFAPI_OBJECT_PROP_MOVE_STATUS   59
 
#define CFAPI_OBJECT_PROP_MOVE_TYPE   102
 
#define CFAPI_OBJECT_PROP_NAME   12
 
#define CFAPI_OBJECT_PROP_NAME_PLURAL   13
 
#define CFAPI_OBJECT_PROP_NEXT_ACTIVE_OB   3
 
#define CFAPI_OBJECT_PROP_NROF   24
 
#define CFAPI_OBJECT_PROP_OB_ABOVE   1
 
#define CFAPI_OBJECT_PROP_OB_BELOW   2
 
#define CFAPI_OBJECT_PROP_OTHER_ARCH   64
 
#define CFAPI_OBJECT_PROP_OWNER   73
 
#define CFAPI_OBJECT_PROP_PATH_ATTUNED   32
 
#define CFAPI_OBJECT_PROP_PATH_DENIED   34
 
#define CFAPI_OBJECT_PROP_PATH_REPELLED   33
 
#define CFAPI_OBJECT_PROP_PERM_EXP   52
 
#define CFAPI_OBJECT_PROP_PICK_UP   45
 
#define CFAPI_OBJECT_PROP_PICKABLE   77
 
#define CFAPI_OBJECT_PROP_POW   84
 
#define CFAPI_OBJECT_PROP_PRESENT   74
 
#define CFAPI_OBJECT_PROP_PREV_ACTIVE_OB   4
 
#define CFAPI_OBJECT_PROP_RACE   15
 
#define CFAPI_OBJECT_PROP_RAW_NAME   110
 
#define CFAPI_OBJECT_PROP_RESIST   30
 
#define CFAPI_OBJECT_PROP_RUN_AWAY   56
 
#define CFAPI_OBJECT_PROP_SHORT_NAME   68
 
#define CFAPI_OBJECT_PROP_SKILL   17
 
#define CFAPI_OBJECT_PROP_SLAYING   16
 
#define CFAPI_OBJECT_PROP_SP   89
 
#define CFAPI_OBJECT_PROP_SPEED   22
 
#define CFAPI_OBJECT_PROP_SPEED_LEFT   23
 
#define CFAPI_OBJECT_PROP_SPELL_ITEM   61
 
#define CFAPI_OBJECT_PROP_STR   79
 
#define CFAPI_OBJECT_PROP_SUBTYPE   28
 
#define CFAPI_OBJECT_PROP_TITLE   14
 
#define CFAPI_OBJECT_PROP_TYPE   27
 
#define CFAPI_OBJECT_PROP_VALUE   38
 
#define CFAPI_OBJECT_PROP_WC   86
 
#define CFAPI_OBJECT_PROP_WEIGHT   48
 
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT   49
 
#define CFAPI_OBJECT_PROP_WIS   82
 
#define CFAPI_OBJECT_PROP_X   20
 
#define CFAPI_OBJECT_PROP_Y   21
 
#define CFAPI_PARCH   9
 
#define CFAPI_PARTY_PROP_NAME   0
 
#define CFAPI_PARTY_PROP_NEXT   1
 
#define CFAPI_PARTY_PROP_PASSWORD   2
 
#define CFAPI_PARTY_PROP_PLAYER   3
 
#define CFAPI_PLAYER_PROP_BED_MAP   153
 
#define CFAPI_PLAYER_PROP_BED_X   154
 
#define CFAPI_PLAYER_PROP_BED_Y   155
 
#define CFAPI_PLAYER_PROP_IP   150
 
#define CFAPI_PLAYER_PROP_MARKED_ITEM   151
 
#define CFAPI_PLAYER_PROP_NEXT   156
 
#define CFAPI_PLAYER_PROP_PARTY   152
 
#define CFAPI_PLAYER_PROP_TITLE   157
 
#define CFAPI_PLAYER_QUEST_GET_STATE   1
 
#define CFAPI_PLAYER_QUEST_SET_STATE   2
 
#define CFAPI_PLAYER_QUEST_START   0
 
#define CFAPI_PLAYER_QUEST_WAS_COMPLETED   3
 
#define CFAPI_PMAP   6
 
#define CFAPI_POBJECT   5
 
#define CFAPI_PPARTY   12
 
#define CFAPI_PPLAYER   11
 
#define CFAPI_PREGION   13
 
#define CFAPI_REGION_PROP_JAIL_PATH   7
 
#define CFAPI_REGION_PROP_JAIL_X   5
 
#define CFAPI_REGION_PROP_JAIL_Y   6
 
#define CFAPI_REGION_PROP_LONGNAME   3
 
#define CFAPI_REGION_PROP_MESSAGE   4
 
#define CFAPI_REGION_PROP_NAME   0
 
#define CFAPI_REGION_PROP_NEXT   1
 
#define CFAPI_REGION_PROP_PARENT   2
 
#define CFAPI_SINT64   16
 
#define CFAPI_SSTRING   17 /* Shared string that shouldn't be changed, or const char* */
 
#define CFAPI_STRING   4 /* String with a length that must be given too. */
 
#define CFAPI_TIME   15
 
#define EVENT_APPLY   1
 Object applied-unapplied. More...
 
#define EVENT_ATTACKED   2
 Object attacked, with weapon or spell. More...
 
#define EVENT_ATTACKS   33
 Weapon or arrow hitting something. More...
 
#define EVENT_BORN   14
 A new character has been created. More...
 
#define EVENT_CLOCK   15
 Global time event. More...
 
#define EVENT_CLOSE   11
 Container closed. More...
 
#define EVENT_CRASH   16
 Triggered when the server crashes. More...
 
#define EVENT_DEATH   3
 Player or monster dead. More...
 
#define EVENT_DESTROY   13
 Object destroyed (includes map reset/swapout) More...
 
#define EVENT_DROP   4
 Object dropped on the floor. More...
 
#define EVENT_GKILL   18
 Triggered when anything got killed by anyone. More...
 
#define EVENT_KICK   28
 A player was Kicked by a DM. More...
 
#define EVENT_LOGIN   19
 Player login. More...
 
#define EVENT_LOGOUT   20
 Player logout. More...
 
#define EVENT_MAPENTER   21
 A player entered a map. More...
 
#define EVENT_MAPLEAVE   22
 A player left a map. More...
 
#define EVENT_MAPLOAD   30
 A map is loaded. More...
 
#define EVENT_MAPRESET   23
 A map is resetting. More...
 
#define EVENT_MAPUNLOAD   29
 A map is freed (includes swapping out) More...
 
#define EVENT_MUZZLE   27
 A player was Muzzled (no_shout set). More...
 
#define EVENT_NONE   0
 No event. More...
 
#define EVENT_PICKUP   5
 Object picked up. More...
 
#define EVENT_PLAYER_DEATH   17
 Global Death event. More...
 
#define EVENT_REMOVE   24
 A Player character has been removed. More...
 
#define EVENT_SAY   6
 Someone speaks. More...
 
#define EVENT_SELLING   32
 Object is being sold by another one. More...
 
#define EVENT_SHOUT   25
 A player 'shout' something. More...
 
#define EVENT_STOP   7
 Thrown object stopped. More...
 
#define EVENT_TELL   26
 A player 'tell' something. More...
 
#define EVENT_THROW   9
 Object is thrown. More...
 
#define EVENT_TIME   8
 Triggered each time the object can react/move. More...
 
#define EVENT_TIMER   12
 Timer connected triggered it. More...
 
#define EVENT_TRIGGER   10
 Button pushed, lever pulled, etc. More...
 
#define EVENT_USER   31
 User-defined event. More...
 
#define LIBPTRTYPE   void *
 
#define MODULEAPI
 
#define NR_EVENTS   34
 
#define plugins_dlclose(lib)   dlclose(lib)
 Unload a shared library. More...
 
#define plugins_dlerror()   dlerror()
 Library error. More...
 
#define plugins_dlopen(fname)   dlopen(fname, RTLD_NOW|RTLD_GLOBAL)
 Load a shared library. More...
 
#define plugins_dlsym(lib, name)   dlsym(lib, name)
 Get a function from a shared library. More...
 

Typedefs

typedef struct _crossfire_plugin crossfire_plugin
 One loaded plugin. More...
 
typedef void(* f_plug_api) (int *type,...)
 General API function. More...
 
typedef int(* f_plug_event) (int *type,...)
 Function to call to handle global or object-related events. More...
 
typedef int(* f_plug_init) (const char *iversion, f_plug_api gethooksptr)
 First function called in a plugin. More...
 
typedef int(* f_plug_postinit) (void)
 Function called after the plugin was initialized. More...
 
typedef void *(* f_plug_property) (int *type,...)
 Get various plugin properties. More...
 
typedef struct _hook_entry hook_entry
 One function the server exposes to plugins. More...
 

Detailed Description

Definitions for the plugin system.

Todo:
link to plugin stuff when the documentation exists in doxygen form :) remove commented things line 329+.

Definition in file plugin.h.

Macro Definition Documentation

#define CFAPI_ARCH_PROP_CLONE   4

Definition at line 318 of file plugin.h.

Referenced by cf_archetype_get_clone(), and cfapi_archetype_get_property().

#define CFAPI_ARCH_PROP_HEAD   2

Definition at line 316 of file plugin.h.

Referenced by cf_archetype_get_head(), and cfapi_archetype_get_property().

#define CFAPI_ARCH_PROP_MORE   3

Definition at line 317 of file plugin.h.

Referenced by cf_archetype_get_more(), and cfapi_archetype_get_property().

#define CFAPI_ARCH_PROP_NAME   0

Definition at line 314 of file plugin.h.

Referenced by cf_archetype_get_name(), and cfapi_archetype_get_property().

#define CFAPI_ARCH_PROP_NEXT   1
#define CFAPI_CHAR   3

Definition at line 107 of file plugin.h.

#define CFAPI_DOUBLE   8
#define CFAPI_FLOAT   7
#define CFAPI_FUNC   10

Definition at line 114 of file plugin.h.

Referenced by cfapi_get_hooks().

#define CFAPI_INT   1

Definition at line 105 of file plugin.h.

Referenced by cf_find_animation(), cf_find_face(), cf_map_change_light(), cf_map_get_flags(), cf_map_get_int_property(), cf_map_set_int_property(), cf_object_cast_ability(), cf_object_cast_spell(), cf_object_change_abil(), cf_object_check_trigger(), cf_object_get_int_property(), cf_object_get_weight(), cf_object_get_weight_limit(), cf_object_move(), cf_object_move_to(), cf_object_out_of_map(), cf_object_pay_amount(), cf_object_pay_item(), cf_object_query_money(), cf_object_remove_depletion(), cf_object_say(), cf_object_set_animation(), cf_object_set_face(), cf_object_set_int_property(), cf_object_set_key(), cf_object_set_weight(), cf_object_set_weight_limit(), cf_object_teleport(), cf_object_transfer(), cf_object_user_event(), cf_player_arrest(), cf_player_can_pay(), cf_player_knowledge_has(), cf_player_move(), cf_quest_get_player_state(), cf_quest_was_completed(), cf_random_map_set_variable(), cf_region_get_jail_x(), cf_region_get_jail_y(), cf_timer_create(), cf_timer_destroy(), cfapi_map_change_light(), cfapi_map_get_map_property(), cfapi_map_out_of_map(), cfapi_object_apply(), cfapi_object_cast(), cfapi_object_change_abil(), cfapi_object_check_trigger(), cfapi_object_distance(), cfapi_object_get_property(), cfapi_object_move(), cfapi_object_on_same_map(), cfapi_object_pay_amount(), cfapi_object_pay_item(), cfapi_object_query_money(), cfapi_object_remove_depletion(), cfapi_object_say(), cfapi_object_set_key(), cfapi_object_set_property(), cfapi_object_teleport(), cfapi_object_transfer(), cfapi_object_user_event(), cfapi_player_can_pay(), cfapi_player_knowledge(), cfapi_player_quest(), cfapi_region_get_property(), cfapi_set_random_map_variable(), cfapi_system_check_path(), cfapi_system_find_animation(), cfapi_system_find_face(), cfapi_timer_create(), and cfapi_timer_destroy().

#define CFAPI_INT16   14
#define CFAPI_LONG   2
#define CFAPI_MAP_PROP_DARKNESS   9

Definition at line 304 of file plugin.h.

Referenced by cf_map_get_darkness(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_DIFFICULTY   1

Definition at line 296 of file plugin.h.

Referenced by cf_map_get_difficulty(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_ENTER_X   12

Definition at line 307 of file plugin.h.

Referenced by cf_map_get_enter_x(), cfapi_map_get_map_property(), and Map_GetEnterX().

#define CFAPI_MAP_PROP_ENTER_Y   13

Definition at line 308 of file plugin.h.

Referenced by cf_map_get_enter_y(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_FLAGS   0

Definition at line 295 of file plugin.h.

Referenced by cf_map_get_flags(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_HEIGHT   11

Definition at line 306 of file plugin.h.

Referenced by cf_map_get_height(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_LIGHT   8

Definition at line 303 of file plugin.h.

#define CFAPI_MAP_PROP_MESSAGE   22

Definition at line 309 of file plugin.h.

Referenced by cfapi_map_get_map_property(), and Map_GetMessage().

#define CFAPI_MAP_PROP_NAME   4

Definition at line 299 of file plugin.h.

Referenced by cfapi_map_get_map_property(), and Map_GetName().

#define CFAPI_MAP_PROP_NEXT   23

Definition at line 310 of file plugin.h.

Referenced by cf_map_get_first(), cfapi_map_get_map_property(), getMaps(), and Map_Next().

#define CFAPI_MAP_PROP_PATH   2
#define CFAPI_MAP_PROP_PLAYERS   7

Definition at line 302 of file plugin.h.

Referenced by cf_map_get_players(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_REGION   24

Definition at line 311 of file plugin.h.

Referenced by cfapi_map_get_map_property(), eventListener(), and Map_GetRegion().

#define CFAPI_MAP_PROP_RESET_TIME   5

Definition at line 300 of file plugin.h.

Referenced by cf_map_get_reset_time(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_RESET_TIMEOUT   6

Definition at line 301 of file plugin.h.

Referenced by cf_map_get_reset_timeout(), and cfapi_map_get_map_property().

#define CFAPI_MAP_PROP_TMPNAME   3

Definition at line 298 of file plugin.h.

Referenced by cfapi_map_get_map_property(), and Map_GetTempName().

#define CFAPI_MAP_PROP_UNIQUE   25

Definition at line 312 of file plugin.h.

Referenced by cfapi_map_get_map_property(), ensure_map_in_memory(), and Map_GetUnique().

#define CFAPI_MAP_PROP_WIDTH   10

Definition at line 305 of file plugin.h.

Referenced by cf_map_get_width(), and cfapi_map_get_map_property().

#define CFAPI_MOVETYPE   18 /* MoveType */
#define CFAPI_NONE   0

Definition at line 104 of file plugin.h.

Referenced by cf_cost_string_from_value(), cf_get_time(), cf_log(), cf_log_plain(), cf_map_trigger_connected(), cf_object_change_exp(), cf_object_learn_spell(), cf_object_pickup(), cf_object_split(), cf_player_knowledge_give(), cf_player_message(), cf_quest_set_player_state(), cf_quest_start(), cf_system_register_global_event(), cf_system_unregister_global_event(), cfapi_archetype_get_property(), cfapi_cost_string_from_value(), cfapi_get_hooks(), cfapi_get_time(), cfapi_log(), cfapi_map_create_path(), cfapi_map_delete_map(), cfapi_map_get_map(), cfapi_map_get_map_property(), cfapi_map_message(), cfapi_map_set_map_property(), cfapi_map_trigger_connected(), cfapi_map_update_position(), cfapi_object_apply_below(), cfapi_object_change_exp(), cfapi_object_clean_object(), cfapi_object_clear(), cfapi_object_create(), cfapi_object_delete(), cfapi_object_drain(), cfapi_object_drop(), cfapi_object_fix(), cfapi_object_forget_spell(), cfapi_object_get_property(), cfapi_object_insert(), cfapi_object_learn_spell(), cfapi_object_pickup(), cfapi_object_remove(), cfapi_object_reset(), cfapi_object_set_property(), cfapi_object_split(), cfapi_object_spring_trap(), cfapi_object_transfer(), cfapi_object_transmute(), cfapi_object_update(), cfapi_party_get_property(), cfapi_player_knowledge(), cfapi_player_message(), cfapi_player_quest(), cfapi_region_get_property(), cfapi_system_register_global_event(), cfapi_system_remove_string(), and cfapi_system_unregister_global_event().

#define CFAPI_OBJECT_PROP_AC   87
#define CFAPI_OBJECT_PROP_ANIM_SPEED   66
#define CFAPI_OBJECT_PROP_ANIMATION   100
#define CFAPI_OBJECT_PROP_ARCH_NAME   97

Definition at line 266 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetArchName().

#define CFAPI_OBJECT_PROP_ARCHETYPE   63

Definition at line 232 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetArchetype().

#define CFAPI_OBJECT_PROP_ATTACK_MOVEMENT   60
#define CFAPI_OBJECT_PROP_ATTACK_TYPE   31
#define CFAPI_OBJECT_PROP_ATTACKED_BY   55

Definition at line 224 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_BASE_NAME   69

Definition at line 238 of file plugin.h.

Referenced by cf_query_base_name(), and cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_CARRYING   50

Definition at line 219 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_CHA   85
#define CFAPI_OBJECT_PROP_CHEATER   75

Definition at line 244 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_CHOSEN_SKILL   57

Definition at line 226 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_CLIENT_TYPE   29

Definition at line 198 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_CON   81
#define CFAPI_OBJECT_PROP_CONTAINER   8

Definition at line 178 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetContainer().

#define CFAPI_OBJECT_PROP_COUNT   10

Definition at line 180 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetCount().

#define CFAPI_OBJECT_PROP_CURRENT_WEAPON   53

Definition at line 222 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_CUSTOM_NAME   65

Definition at line 234 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_DAM   95
#define CFAPI_OBJECT_PROP_DEX   80
#define CFAPI_OBJECT_PROP_DIRECTION   25
#define CFAPI_OBJECT_PROP_DURATION   109
#define CFAPI_OBJECT_PROP_ENEMY   54
#define CFAPI_OBJECT_PROP_ENVIRONMENT   6

Definition at line 176 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetEnv().

#define CFAPI_OBJECT_PROP_EXP   72
#define CFAPI_OBJECT_PROP_EXP_MULTIPLIER   62
#define CFAPI_OBJECT_PROP_FACE   99
#define CFAPI_OBJECT_PROP_FACING   26
#define CFAPI_OBJECT_PROP_FLAGS   78
#define CFAPI_OBJECT_PROP_FP   91
#define CFAPI_OBJECT_PROP_FRIENDLY   67
#define CFAPI_OBJECT_PROP_GEN_SP_ARMOUR   47

Definition at line 216 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_GLOW_RADIUS   51
#define CFAPI_OBJECT_PROP_GOD   96

Definition at line 265 of file plugin.h.

Referenced by cfapi_object_get_property(), Object_GetGod(), and Object_SetGod().

#define CFAPI_OBJECT_PROP_GP   90
#define CFAPI_OBJECT_PROP_HEAD   7

Definition at line 177 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_HIDDEN   58

Definition at line 227 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_HP   88
#define CFAPI_OBJECT_PROP_INT   83
#define CFAPI_OBJECT_PROP_INVENTORY   5

Definition at line 175 of file plugin.h.

Referenced by cfapi_object_get_property(), eventListener(), and Object_GetInventory().

#define CFAPI_OBJECT_PROP_INVISIBLE   98

Definition at line 267 of file plugin.h.

Referenced by cfapi_object_get_property(), Object_GetInvisible(), and Object_SetInvisible().

#define CFAPI_OBJECT_PROP_INVISIBLE_TIME   44

Definition at line 213 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_ITEM_POWER   46

Definition at line 215 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_LAST_EAT   43
#define CFAPI_OBJECT_PROP_LAST_GRACE   42
#define CFAPI_OBJECT_PROP_LAST_HEAL   40

Definition at line 209 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_LAST_SP   41
#define CFAPI_OBJECT_PROP_LEVEL   39

Definition at line 208 of file plugin.h.

Referenced by cfapi_object_get_property(), cfapi_object_set_property(), and Object_GetLevel().

#define CFAPI_OBJECT_PROP_LORE   19

Definition at line 188 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_LUCK   71

Definition at line 240 of file plugin.h.

Referenced by cfapi_object_get_property(), cfapi_object_set_property(), and Object_GetLuck().

#define CFAPI_OBJECT_PROP_MAGIC   37

Definition at line 206 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_MAGICAL   70

Definition at line 239 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_MAP   9

Definition at line 179 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetMap().

#define CFAPI_OBJECT_PROP_MATERIAL   35
#define CFAPI_OBJECT_PROP_MATERIAL_NAME   36
#define CFAPI_OBJECT_PROP_MAXGP   94
#define CFAPI_OBJECT_PROP_MAXHP   92
#define CFAPI_OBJECT_PROP_MAXSP   93
#define CFAPI_OBJECT_PROP_MERGEABLE   76

Definition at line 245 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_MESSAGE   18
#define CFAPI_OBJECT_PROP_MOVE_ALLOW   104
#define CFAPI_OBJECT_PROP_MOVE_BLOCK   103
#define CFAPI_OBJECT_PROP_MOVE_OFF   106
#define CFAPI_OBJECT_PROP_MOVE_ON   105
#define CFAPI_OBJECT_PROP_MOVE_SLOW   107
#define CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY   108

Definition at line 277 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetMoveSlowPenalty().

#define CFAPI_OBJECT_PROP_MOVE_STATUS   59

Definition at line 228 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_MOVE_TYPE   102
#define CFAPI_OBJECT_PROP_NAME   12
#define CFAPI_OBJECT_PROP_NAME_PLURAL   13
#define CFAPI_OBJECT_PROP_NEXT_ACTIVE_OB   3

Definition at line 173 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_NROF   24
#define CFAPI_OBJECT_PROP_OB_ABOVE   1

Definition at line 171 of file plugin.h.

Referenced by cfapi_object_get_property(), eventListener(), and Object_GetAbove().

#define CFAPI_OBJECT_PROP_OB_BELOW   2

Definition at line 172 of file plugin.h.

Referenced by cfapi_object_get_property(), eventListener(), and Object_GetBelow().

#define CFAPI_OBJECT_PROP_OTHER_ARCH   64

Definition at line 233 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetOtherArchetype().

#define CFAPI_OBJECT_PROP_OWNER   73
#define CFAPI_OBJECT_PROP_PATH_ATTUNED   32

Definition at line 201 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_PATH_DENIED   34

Definition at line 203 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_PATH_REPELLED   33

Definition at line 202 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_PERM_EXP   52
#define CFAPI_OBJECT_PROP_PICK_UP   45

Definition at line 214 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_PICKABLE   77

Definition at line 246 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_POW   84
#define CFAPI_OBJECT_PROP_PRESENT   74

Definition at line 243 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_PREV_ACTIVE_OB   4

Definition at line 174 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_RACE   15
#define CFAPI_OBJECT_PROP_RAW_NAME   110

Definition at line 279 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_RESIST   30
#define CFAPI_OBJECT_PROP_RUN_AWAY   56

Definition at line 225 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_SHORT_NAME   68

Definition at line 237 of file plugin.h.

Referenced by cfapi_object_get_property().

#define CFAPI_OBJECT_PROP_SKILL   17
#define CFAPI_OBJECT_PROP_SLAYING   16
#define CFAPI_OBJECT_PROP_SP   89
#define CFAPI_OBJECT_PROP_SPEED   22
#define CFAPI_OBJECT_PROP_SPEED_LEFT   23
#define CFAPI_OBJECT_PROP_SPELL_ITEM   61

Definition at line 230 of file plugin.h.

Referenced by cfapi_object_get_property(), and cfapi_object_set_property().

#define CFAPI_OBJECT_PROP_STR   79
#define CFAPI_OBJECT_PROP_SUBTYPE   28

Definition at line 197 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetSubtype().

#define CFAPI_OBJECT_PROP_TITLE   14
#define CFAPI_OBJECT_PROP_TYPE   27

Definition at line 196 of file plugin.h.

Referenced by cfapi_object_get_property(), is_suitable_exit(), and Object_GetType().

#define CFAPI_OBJECT_PROP_VALUE   38
#define CFAPI_OBJECT_PROP_WC   86
#define CFAPI_OBJECT_PROP_WEIGHT   48
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT   49
#define CFAPI_OBJECT_PROP_WIS   82
#define CFAPI_OBJECT_PROP_X   20

Definition at line 189 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetX().

#define CFAPI_OBJECT_PROP_Y   21

Definition at line 190 of file plugin.h.

Referenced by cfapi_object_get_property(), and Object_GetY().

#define CFAPI_PARCH   9
#define CFAPI_PARTY_PROP_NAME   0

Definition at line 320 of file plugin.h.

Referenced by cf_party_get_name(), and cfapi_party_get_property().

#define CFAPI_PARTY_PROP_NEXT   1

Definition at line 321 of file plugin.h.

Referenced by cf_party_get_first(), cf_party_get_next(), and cfapi_party_get_property().

#define CFAPI_PARTY_PROP_PASSWORD   2

Definition at line 322 of file plugin.h.

Referenced by cf_party_get_password(), and cfapi_party_get_property().

#define CFAPI_PARTY_PROP_PLAYER   3
#define CFAPI_PLAYER_PROP_BED_MAP   153
#define CFAPI_PLAYER_PROP_BED_X   154
#define CFAPI_PLAYER_PROP_BED_Y   155
#define CFAPI_PLAYER_PROP_IP   150

Definition at line 281 of file plugin.h.

Referenced by cf_player_get_ip(), and cfapi_object_get_property().

#define CFAPI_PLAYER_PROP_MARKED_ITEM   151
#define CFAPI_PLAYER_PROP_NEXT   156

Definition at line 287 of file plugin.h.

Referenced by cfapi_object_get_property(), and getPlayers().

#define CFAPI_PLAYER_PROP_PARTY   152
#define CFAPI_PLAYER_PROP_TITLE   157
#define CFAPI_PLAYER_QUEST_GET_STATE   1

Definition at line 291 of file plugin.h.

Referenced by cf_quest_get_player_state(), and cfapi_player_quest().

#define CFAPI_PLAYER_QUEST_SET_STATE   2

Definition at line 292 of file plugin.h.

Referenced by cf_quest_set_player_state(), and cfapi_player_quest().

#define CFAPI_PLAYER_QUEST_START   0

Definition at line 290 of file plugin.h.

Referenced by cf_quest_start(), and cfapi_player_quest().

#define CFAPI_PLAYER_QUEST_WAS_COMPLETED   3

Definition at line 293 of file plugin.h.

Referenced by cf_quest_was_completed(), and cfapi_player_quest().

#define CFAPI_PMAP   6
#define CFAPI_POBJECT   5
#define CFAPI_PPARTY   12
#define CFAPI_PPLAYER   11
#define CFAPI_PREGION   13
#define CFAPI_REGION_PROP_JAIL_PATH   7

Definition at line 332 of file plugin.h.

Referenced by cf_region_get_jail_path(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_JAIL_X   5

Definition at line 330 of file plugin.h.

Referenced by cf_region_get_jail_x(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_JAIL_Y   6

Definition at line 331 of file plugin.h.

Referenced by cf_region_get_jail_y(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_LONGNAME   3

Definition at line 328 of file plugin.h.

Referenced by cf_region_get_longname(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_MESSAGE   4

Definition at line 329 of file plugin.h.

Referenced by cf_region_get_message(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_NAME   0

Definition at line 325 of file plugin.h.

Referenced by cf_region_get_name(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_NEXT   1

Definition at line 326 of file plugin.h.

Referenced by cf_region_get_first(), cf_region_get_next(), and cfapi_region_get_property().

#define CFAPI_REGION_PROP_PARENT   2

Definition at line 327 of file plugin.h.

Referenced by cf_region_get_parent(), and cfapi_region_get_property().

#define CFAPI_SINT64   16
#define CFAPI_SSTRING   17 /* Shared string that shouldn't be changed, or const char* */
#define CFAPI_STRING   4 /* String with a length that must be given too. */
#define CFAPI_TIME   15

Definition at line 119 of file plugin.h.

#define EVENT_APPLY   1

Object applied-unapplied.

Definition at line 64 of file plugin.h.

Referenced by apply_manual(), eventListener(), initConstants(), and pray_at_altar().

#define EVENT_ATTACKED   2

Object attacked, with weapon or spell.

Definition at line 65 of file plugin.h.

Referenced by hit_player(), and initConstants().

#define EVENT_ATTACKS   33

Weapon or arrow hitting something.

Definition at line 66 of file plugin.h.

Referenced by attack_ob_simple(), hit_with_arrow(), and initConstants().

#define EVENT_BORN   14
#define EVENT_CLOCK   15
#define EVENT_CLOSE   11

Container closed.

Definition at line 75 of file plugin.h.

Referenced by apply_container(), and initConstants().

#define EVENT_CRASH   16

Triggered when the server crashes.

Not recursive

Definition at line 85 of file plugin.h.

Referenced by cfpython_globalEventListener(), execute_global_event(), globalEventListener(), and initConstants().

#define EVENT_DEATH   3

Player or monster dead.

Definition at line 67 of file plugin.h.

Referenced by initConstants(), kill_object(), and kill_player().

#define EVENT_DESTROY   13

Object destroyed (includes map reset/swapout)

Definition at line 77 of file plugin.h.

Referenced by initConstants(), and object_free2().

#define EVENT_DROP   4

Object dropped on the floor.

Definition at line 68 of file plugin.h.

Referenced by drop_object(), and initConstants().

#define EVENT_GKILL   18

Triggered when anything got killed by anyone.

Definition at line 87 of file plugin.h.

Referenced by cflogger_globalEventListener(), cfpython_globalEventListener(), execute_global_event(), globalEventListener(), initConstants(), kill_object(), and postInitPlugin().

#define EVENT_KICK   28
#define EVENT_LOGIN   19
#define EVENT_LOGOUT   20
#define EVENT_MAPENTER   21
#define EVENT_MAPLEAVE   22
#define EVENT_MAPLOAD   30
#define EVENT_MAPRESET   23
#define EVENT_MAPUNLOAD   29

A map is freed (includes swapping out)

Definition at line 98 of file plugin.h.

Referenced by cflogger_globalEventListener(), cfpython_globalEventListener(), execute_global_event(), free_map(), initConstants(), and postInitPlugin().

#define EVENT_MUZZLE   27
#define EVENT_NONE   0

No event.

This exists only to reserve the "0".

Definition at line 63 of file plugin.h.

#define EVENT_PICKUP   5

Object picked up.

Definition at line 69 of file plugin.h.

Referenced by initConstants(), and pick_up_object().

#define EVENT_PLAYER_DEATH   17
#define EVENT_REMOVE   24
#define EVENT_SAY   6

Someone speaks.

Definition at line 70 of file plugin.h.

Referenced by CREMapInformationManager::checkEvent(), initConstants(), and plugin_event_say().

#define EVENT_SELLING   32

Object is being sold by another one.

Definition at line 79 of file plugin.h.

Referenced by sell_item().

#define EVENT_SHOUT   25

A player 'shout' something.

Definition at line 94 of file plugin.h.

Referenced by cfpython_globalEventListener(), command_tell_all(), execute_global_event(), globalEventListener(), initConstants(), and postInitPlugin().

#define EVENT_STOP   7

Thrown object stopped.

Definition at line 71 of file plugin.h.

Referenced by initConstants(), and stop_projectile().

#define EVENT_TELL   26
#define EVENT_THROW   9

Object is thrown.

Definition at line 73 of file plugin.h.

Referenced by do_throw(), and initConstants().

#define EVENT_TIME   8

Triggered each time the object can react/move.

Definition at line 72 of file plugin.h.

Referenced by initConstants(), and process_object().

#define EVENT_TIMER   12

Timer connected triggered it.

Definition at line 76 of file plugin.h.

Referenced by cftimer_create(), cftimer_process_event(), and initConstants().

#define EVENT_TRIGGER   10
#define EVENT_USER   31

User-defined event.

Definition at line 78 of file plugin.h.

Referenced by initConstants(), and user_event().

#define LIBPTRTYPE   void *

Definition at line 136 of file plugin.h.

Referenced by plugins_init_plugin().

#define MODULEAPI

Definition at line 37 of file plugin.h.

#define NR_EVENTS   34
#define plugins_dlclose (   lib)    dlclose(lib)

Unload a shared library.

Definition at line 164 of file plugin.h.

Referenced by plugins_init_plugin(), and plugins_remove_plugin().

#define plugins_dlerror ( )    dlerror()

Library error.

Definition at line 166 of file plugin.h.

Referenced by plugins_find_plugin(), and plugins_init_plugin().

#define plugins_dlopen (   fname)    dlopen(fname, RTLD_NOW|RTLD_GLOBAL)

Load a shared library.

Definition at line 163 of file plugin.h.

Referenced by plugins_init_plugin().

#define plugins_dlsym (   lib,
  name 
)    dlsym(lib, name)

Get a function from a shared library.

Definition at line 165 of file plugin.h.

Referenced by plugins_init_plugin().

Typedef Documentation

One loaded plugin.

typedef void(* f_plug_api) (int *type,...)

General API function.

Definition at line 125 of file plugin.h.

typedef int(* f_plug_event) (int *type,...)

Function to call to handle global or object-related events.

Definition at line 131 of file plugin.h.

typedef int(* f_plug_init) (const char *iversion, f_plug_api gethooksptr)

First function called in a plugin.

Definition at line 129 of file plugin.h.

typedef int(* f_plug_postinit) (void)

Function called after the plugin was initialized.

Definition at line 127 of file plugin.h.

typedef void*(* f_plug_property) (int *type,...)

Get various plugin properties.

Definition at line 133 of file plugin.h.

typedef struct _hook_entry hook_entry

One function the server exposes to plugins.