Crossfire Server, Trunk
R22047
|
Files | |
file | cfcitybell.c |
file | cfcitybell.h |
Functions | |
CF_PLUGIN int | cfcitybell_globalEventListener (int *type,...) |
CF_PLUGIN int | cfcitybell_runPluginCommand (object *op, char *params) |
CF_PLUGIN int | closePlugin (void) |
CF_PLUGIN int | eventListener (int *type,...) |
CF_PLUGIN void * | getPluginProperty (int *type,...) |
CF_PLUGIN int | initPlugin (const char *iversion, f_plug_api gethooksptr) |
CF_PLUGIN int | postInitPlugin (void) |
static void | ring_bell (void) |
static void | ring_darcap (object *pl) |
static void | ring_navar (object *pl) |
static void | ring_scorn (object *pl) |
Variables | |
static int | last_hr |
CF_PLUGIN char | SvnRevPlugin [] = SVN_REV |
Plugin to control the temple bells in the main cities. Ported out of python in an attempt to make it more efficient.
CF_PLUGIN int cfcitybell_globalEventListener | ( | int * | type, |
... | |||
) |
Global server event handling. Only uses EVENT_CLOCK.
type | The event type. |
Definition at line 189 of file cfcitybell.c.
References cf_get_time(), EVENT_CLOCK, _timeofday::hour, last_hr, and ring_bell().
Referenced by postInitPlugin().
CF_PLUGIN int cfcitybell_runPluginCommand | ( | object * | op, |
char * | params | ||
) |
CF_PLUGIN int closePlugin | ( | void | ) |
Unloading of plugin.
Definition at line 316 of file cfcitybell.c.
References cf_log(), llevDebug, and PLUGIN_VERSION.
CF_PLUGIN int eventListener | ( | int * | type, |
... | |||
) |
Unused.
type | unused. |
Definition at line 221 of file cfcitybell.c.
CF_PLUGIN void* getPluginProperty | ( | int * | type, |
... | |||
) |
Get the plugin identification or full name.
type | unused. |
Definition at line 249 of file cfcitybell.c.
References buf, PLUGIN_NAME, PLUGIN_VERSION, and snprintf.
CF_PLUGIN int initPlugin | ( | const char * | iversion, |
f_plug_api | gethooksptr | ||
) |
Plugin initialization.
iversion | server version. |
gethooksptr | function to get hooks. |
Definition at line 234 of file cfcitybell.c.
References cf_init_plugin(), cf_log(), llevDebug, and PLUGIN_VERSION.
CF_PLUGIN int postInitPlugin | ( | void | ) |
Plugin initialisation. Also sets the initial last_hr
Definition at line 295 of file cfcitybell.c.
References cf_get_time(), cf_log(), cf_system_register_global_event(), cfcitybell_globalEventListener(), EVENT_CLOCK, _timeofday::hour, last_hr, llevDebug, PLUGIN_NAME, and PLUGIN_VERSION.
|
static |
Ring the city bells for each player.
Definition at line 146 of file cfcitybell.c.
References cf_map_get_region_property(), cf_object_get_object_property(), cf_region_get_name(), CFAPI_MAP_PROP_REGION, CFAPI_PLAYER_PROP_NEXT, ring_darcap(), ring_navar(), and ring_scorn().
Referenced by cfcitybell_globalEventListener().
|
static |
Ring the bell in Darcap
pl | The object of the player hearing the bell. |
Definition at line 91 of file cfcitybell.c.
References cf_object_get_sstring_property(), cf_player_message(), CFAPI_OBJECT_PROP_GOD, NDI_ORANGE, and NDI_UNIQUE.
Referenced by ring_bell().
|
static |
Ring the bells in Navar
pl | Player object to hear the bells |
Definition at line 115 of file cfcitybell.c.
References buf, cf_object_get_sstring_property(), cf_player_message(), CFAPI_OBJECT_PROP_GOD, MAX_BUF, NDI_ORANGE, NDI_UNIQUE, and snprintf.
Referenced by ring_bell().
|
static |
Ring the temple bells for a player in Scorn.
pl | The object of the player for whom the bells toll. |
Definition at line 60 of file cfcitybell.c.
References buf, cf_object_get_sstring_property(), cf_player_message(), CFAPI_OBJECT_PROP_GOD, MAX_BUF, NDI_ORANGE, NDI_UNIQUE, and snprintf.
Referenced by ring_bell().
|
static |
Definition at line 50 of file cfcitybell.c.
Referenced by cfcitybell_globalEventListener(), and postInitPlugin().
CF_PLUGIN char SvnRevPlugin[] = SVN_REV |
Definition at line 49 of file cfcitybell.c.