Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
int | cfpython_globalEventListener (int *type,...) |
void | cfpython_runPluginCommand (object *op, const char *params) |
int | closePlugin (void) |
PyObject * | Crossfire_Archetype_wrap (archetype *what) |
PyObject * | Crossfire_Map_wrap (mapstruct *what) |
PyObject * | Crossfire_Object_wrap (object *what) |
PyObject * | Crossfire_Party_wrap (partylist *what) |
PyObject * | Crossfire_Region_wrap (region *what) |
int | eventListener (int *type,...) |
void * | getPluginProperty (int *type,...) |
void | Handle_Map_Unload_Hook (Crossfire_Map *map) |
int | initPlugin (const char *iversion, f_plug_api gethooksptr) |
int | postInitPlugin (void) |
int cfpython_globalEventListener | ( | int * | type, |
... | |||
) |
Definition at line 1700 of file cfpython.cpp.
References CFPContext::activator, make_face_from_files::args, buf, cf_log(), Crossfire_Map_wrap(), Crossfire_Object_wrap(), do_script(), CFPContext::event, EVENT_BORN, EVENT_CLOCK, CFPContext::event_code, EVENT_CRASH, EVENT_GKILL, EVENT_KICK, EVENT_LOGIN, EVENT_LOGOUT, EVENT_MAPENTER, EVENT_MAPLEAVE, EVENT_MAPLOAD, EVENT_MAPRESET, EVENT_MAPUNLOAD, EVENT_MUZZLE, EVENT_PLAYER_DEATH, EVENT_REMOVE, EVENT_SHOUT, EVENT_TELL, mad_mage_user::file, freeContext(), freeEventFiles(), getEventFiles(), getGlobalEventPath(), Handle_Map_Unload_Hook(), death_message::hitter, llevDebug, CFPContext::message, give::op, CFPContext::options, altar_valkyrie::pl, popContext(), CFPContext::returnvalue, CFPContext::script, CFPContext::third, is_valid_types_gen::type, and CFPContext::who.
Referenced by postInitPlugin(), and registerGEvent().
void cfpython_runPluginCommand | ( | object * | op, |
const char * | params | ||
) |
int closePlugin | ( | void | ) |
Close the plugin.
Closes the sqlite database.
Definition at line 1324 of file cfanim.cpp.
References c, cf_free_string(), cf_log(), cf_system_unregister_command(), database, mad_mage_user::file, llevDebug, llevInfo, logger_database, MAX_COMMANDS, newspaper_database, PLUGIN_VERSION, pycode_cache, PYTHON_CACHE_SIZE, and registered_commands.
PyObject* Crossfire_Archetype_wrap | ( | archetype * | what | ) |
Definition at line 62 of file cfpython_archetype.cpp.
References Crossfire_Archetype::arch, and Crossfire_ArchetypeType.
Referenced by Crossfire_Archetype_GetHead(), Crossfire_Archetype_GetMore(), Crossfire_Archetype_GetNext(), getArchetypes(), Object_GetArchetype(), and Object_GetOtherArchetype().
PyObject* Crossfire_Map_wrap | ( | mapstruct * | what | ) |
Definition at line 435 of file cfpython_map.cpp.
References add_map_assoc(), Crossfire_MapType, find_assoc_pymap(), Crossfire_Map::map, and Crossfire_Map::valid.
Referenced by cfpython_globalEventListener(), createMap(), getMapHasBeenLoaded(), getMaps(), Map_Next(), Object_GetMap(), and readyMap().
PyObject* Crossfire_Object_wrap | ( | object * | what | ) |
Python initialized.
Definition at line 1606 of file cfpython_object.cpp.
References add_object_assoc(), disinfect::count, Crossfire_Object::count, Crossfire_Player::count, object::count, Crossfire_ObjectType, Crossfire_PlayerType, find_assoc_pyobject(), altar_valkyrie::obj, Crossfire_Object::obj, Crossfire_Player::obj, object_was_destroyed, PLAYER, and object::type.
Referenced by cfpython_globalEventListener(), createCFObject(), createCFObjectByName(), Crossfire_Archetype_GetClone(), Crossfire_Archetype_GetNewObject(), Crossfire_Object_CheckArchInventory(), Crossfire_Object_CheckInventory(), Crossfire_Object_Clone(), Crossfire_Object_CreateInside(), Crossfire_Object_InsertInto(), Crossfire_Object_KnowSpell(), Crossfire_Object_Split(), Crossfire_Party_GetPlayers(), eventListener(), findPlayer(), getFriendlyList(), getPlayers(), Map_Check(), Map_CreateObject(), Map_GetFirstObjectAt(), Map_Insert(), Map_InsertAround(), Object_GetObjectProperty(), Player_GetMarkedItem(), Player_GetObjectProperty(), and python_command_function().
PyObject* Crossfire_Party_wrap | ( | partylist * | what | ) |
Definition at line 61 of file cfpython_party.cpp.
References Crossfire_PartyType, and Crossfire_Party::party.
Referenced by Crossfire_Party_GetNext(), getParties(), and Player_GetParty().
PyObject* Crossfire_Region_wrap | ( | region * | what | ) |
Definition at line 72 of file cfpython_region.cpp.
int eventListener | ( | int * | type, |
... | |||
) |
Handles an object-related event. Doesn't do anything.
type | ignored. |
Definition at line 1277 of file cfanim.cpp.
References diamondslots::activator, CFPContext::activator, make_face_from_files::args, buf, cf_create_object_by_name(), cf_get_maps_directory(), cf_log(), cf_map_get_region_property(), cf_object_insert_object(), cf_object_set_string_property(), CFAPI_MAP_PROP_REGION, CFAPI_OBJECT_PROP_NAME, CFAPI_OBJECT_PROP_NAME_PLURAL, Crossfire_Object_wrap(), do_script(), animate::event, CFPContext::event, EVENT_APPLY, CFPContext::event_code, CFPContext::fix, freeContext(), get_newspaper(), get_newspaper_content(), is_animated_object(), llevDebug, MAX_BUF, diamondslots::message, CFPContext::message, paper_properties::name, CFPContext::options, popContext(), pushContext(), CFPContext::returnvalue, CFPContext::script, start_animation(), CFPContext::talk, CFPContext::third, is_valid_types_gen::type, autojail::who, and CFPContext::who.
void* getPluginProperty | ( | int * | type, |
... | |||
) |
Gets a plugin property.
type | ignored. |
Check if plugin handles custom command
Definition at line 1218 of file cfanim.cpp.
References make_face_from_files::args, buf, PLUGIN_NAME, PLUGIN_VERSION, and is_valid_types_gen::type.
void Handle_Map_Unload_Hook | ( | Crossfire_Map * | map | ) |
Definition at line 430 of file cfpython_map.cpp.
References free_map_assoc(), and disinfect::map.
Referenced by cfpython_globalEventListener().
int initPlugin | ( | const char * | iversion, |
f_plug_api | gethooksptr | ||
) |
Plugin initialisation function.
iversion | server version. |
gethooksptr | function to get the hooks. |
Main plugin entry point.
iversion | server version. |
gethooksptr | function to get hooks from. |
Plugin initialisation function.
iversion | server version. |
gethooksptr | function to get the hooks. |
Main plugin entry point.
iversion | server version. |
gethooksptr | function to get hooks from. |
Definition at line 1208 of file cfanim.cpp.
References c, catcher, cf_init_plugin(), cf_log(), cfpython_init_types(), initConstants(), llevDebug, llevInfo, m, MAX_COMMANDS, PLUGIN_VERSION, private_data, PyInit_cjson(), PyInit_Crossfire(), registered_commands, shared_data, and nlohmann::detail::void().
int postInitPlugin | ( | void | ) |
Plugin was initialized, now to finish.
Registers events, initializes the database.
Definition at line 1252 of file cfanim.cpp.
References pycode_cache_entry::cached_time, cf_get_directory(), cf_get_maps_directory(), cf_log(), cf_system_register_global_event(), cfanim_globalEventListener(), cflogger_globalEventListener(), cfpython_globalEventListener(), cfpython_openpyfile(), cfpython_pyfile_asfile(), check_tables(), pycode_cache_entry::code, database, EVENT_BORN, EVENT_CLOCK, EVENT_GKILL, EVENT_KICK, EVENT_LOGIN, EVENT_LOGOUT, EVENT_MAPENTER, EVENT_MAPLEAVE, EVENT_MAPLOAD, EVENT_MAPRESET, EVENT_MAPUNLOAD, EVENT_MUZZLE, EVENT_PLAYER_DEATH, EVENT_REMOVE, pycode_cache_entry::file, GECodes, initContextStack(), llevDebug, llevError, llevInfo, logger_database, newspaper_database, python_init::path, PLUGIN_NAME, PLUGIN_VERSION, pycode_cache, PYTHON_CACHE_SIZE, read_parameters(), store_time(), and pycode_cache_entry::used_time.