Go to the documentation of this file.
45 #include "libloaderapi.h"
49 #define NR_OF_HOOKS (sizeof(plug_hooks)/sizeof(*plug_hooks))
270 if (!strcmp(
id, plugin->id)) {
280 static char buf[256];
284 err = GetLastError();
285 if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0,
buf,
sizeof (
buf), NULL) == 0)
286 snprintf(
buf,
sizeof (
buf),
"error %lu", err);
287 p = strchr(
buf,
'\0');
288 while (p >
buf && (p[-1] ==
'\r' || p[-1] ==
'\n'))
305 if (
op->env != NULL) {
309 if (
pl->ob->container ==
op->env)
322 tmp->contr->socket->update_look = 1;
336 request_type = va_arg(
args,
int);
337 if (request_type == 0) {
340 fid = va_arg(
args,
int);
392 if (svn_rev == NULL) {
393 LOG(
llevError,
"Unable to find SvnRevPlugin in %s\n", libfile);
404 if (initfunc == NULL) {
410 if (propfunc == NULL) {
416 if (eventfunc == NULL) {
422 if (postfunc == NULL) {
428 if (closefunc == NULL) {
440 propfunc(&i,
"Identification", cp->
id,
sizeof(cp->
id));
455 auto plugin = std::find_if(
plugins_list.begin(),
plugins_list.end(), [&
id] (
const auto cp) { return strcmp(id, cp->id) == 0; });
459 for (
int eventcode = 0; eventcode <
NR_EVENTS; eventcode++) {
481 "List of loaded plugins:\n-----------------------");
486 cp->id, cp->fullname);
499 char *buffer, *
final;
500 int length, largest_coin;
505 largest_coin = va_arg(
args,
int);
506 buffer = va_arg(
args,
char*);
507 length = va_arg(
args,
int);
517 strncpy(buffer,
final, length - 1);
518 buffer[length - 1] =
'\0';
535 num = va_arg(
args,
int *);
556 face = va_arg(
args,
const char *);
558 num = va_arg(
args,
int *);
562 (*num) = f ? f->
number : 0;
577 txt = va_arg(
args,
const char *);
578 ret = va_arg(
args,
char **);
593 eventcode = va_arg(
args,
int);
594 pname = va_arg(
args,
char *);
613 eventcode = va_arg(
args,
int);
614 pname = va_arg(
args,
char *);
629 int property = va_arg(
args,
int);
630 std::vector<object *> *
list = va_arg(
args, std::vector<object *> *);
657 int property = va_arg(
args,
int);
658 std::vector<mapstruct *> *
list = va_arg(
args, std::vector<mapstruct *> *);
673 int property = va_arg(
args,
int);
674 std::vector<archetype *> *
list = va_arg(
args, std::vector<archetype *> *);
687 int property = va_arg(
args,
int);
688 std::vector<region *> *
list = va_arg(
args, std::vector<region *> *);
701 int property = va_arg(
args,
int);
702 std::vector<partylist *> *
list = va_arg(
args, std::vector<partylist *> *);
708 list->push_back(party);
728 str = va_arg(
args,
const char *);
766 str = va_arg(
args,
const char *);
788 prepend_dir = va_arg(
args,
int);
789 ret = va_arg(
args,
int *);
811 regexp = va_arg(
args,
char *);
812 rv = va_arg(
args,
const char **);
827 dirtype = va_arg(
args,
int);
828 str = va_arg(
args,
const char **);
885 #define string_get_int(name) \
889 va_start(args, type); \
890 index = va_arg(args, int); \
891 str = va_arg(args, const char **); \
893 *str = name(index); \
894 *type = CFAPI_STRING; \
964 ob = va_arg(
args,
object *);
965 delay = va_arg(
args,
long);
966 mode = va_arg(
args,
int);
967 timer = va_arg(
args,
int *);
994 id = va_arg(
args,
int);
995 err = va_arg(
args,
int *);
1042 ctype = va_arg(
args,
int);
1046 x = va_arg(
args,
int);
1047 y = va_arg(
args,
int);
1054 x = va_arg(
args,
int);
1061 nx = va_arg(
args,
int);
1062 ny = va_arg(
args,
int);
1088 string = va_arg(
args,
char *);
1108 ctype = va_arg(
args,
int);
1109 str = va_arg(
args,
const char *);
1111 size = va_arg(
args,
int);
1149 property = va_arg(
args,
int);
1154 x = va_arg(
args,
int);
1155 y = va_arg(
args,
int);
1156 nx = va_arg(
args, int16_t *);
1157 ny = va_arg(
args, int16_t *);
1158 rint = va_arg(
args,
int *);
1164 rint = va_arg(
args,
int *);
1177 *rstr =
map->tmpname;
1188 rint = va_arg(
args,
int *);
1189 *rint =
map->reset_time;
1194 rint = va_arg(
args,
int *);
1195 *rint =
map->reset_timeout;
1200 rint = va_arg(
args,
int *);
1201 *rint =
map->players;
1206 rint = va_arg(
args,
int *);
1207 *rint =
map->darkness;
1212 rint = va_arg(
args,
int *);
1218 rint = va_arg(
args,
int *);
1219 *rint =
map->height;
1224 rint = va_arg(
args,
int *);
1225 *rint =
map->enter_x;
1230 rint = va_arg(
args,
int *);
1231 *rint =
map->enter_y;
1254 rint = va_arg(
args,
int *);
1255 *rint =
map->unique;
1275 property = va_arg(
args,
int);
1279 buf = va_arg(
args,
const char *);
1304 x = va_arg(
args,
int);
1305 y = va_arg(
args,
int);
1306 rint = va_arg(
args,
int *);
1326 x = va_arg(
args,
int);
1327 y = va_arg(
args,
int);
1355 string = va_arg(
args,
const char *);
1378 x = va_arg(
args,
int);
1379 y = va_arg(
args,
int);
1380 robj = va_arg(
args,
object **);
1409 x = va_arg(
args,
int);
1410 y = va_arg(
args,
int);
1411 robj = va_arg(
args,
object **);
1433 change = va_arg(
args,
int);
1434 rint = va_arg(
args,
int *);
1466 kind = va_arg(
args,
int);
1469 op = va_arg(
args,
object *);
1472 ret = va_arg(
args,
int *);
1480 ret = va_arg(
args,
int *);
1486 op = va_arg(
args,
object *);
1487 ret = va_arg(
args,
int *);
1508 const char *keyname;
1513 op = va_arg(
args,
object *);
1514 keyname = va_arg(
args,
const char *);
1530 const char *keyname;
1537 op = va_arg(
args,
object *);
1538 keyname = va_arg(
args,
char *);
1540 add_key = va_arg(
args,
int);
1541 ret = va_arg(
args,
int *);
1571 op = va_arg(
args,
object *);
1572 property = va_arg(
args,
int);
1575 robject = va_arg(
args,
object **);
1576 *robject =
op->above;
1581 robject = va_arg(
args,
object **);
1582 *robject =
op->below;
1587 robject = va_arg(
args,
object **);
1588 *robject =
op->active_next;
1593 robject = va_arg(
args,
object **);
1594 *robject =
op->active_prev;
1599 robject = va_arg(
args,
object **);
1605 robject = va_arg(
args,
object **);
1611 robject = va_arg(
args,
object **);
1612 *robject =
op->head;
1617 robject = va_arg(
args,
object **);
1618 *robject =
op->container;
1629 rint = va_arg(
args,
int *);
1635 rbuffer = va_arg(
args,
char *);
1636 rbufsize = va_arg(
args,
int);
1643 *rsstring =
op->name_pl;
1649 *rsstring =
op->title;
1655 *rsstring =
op->race;
1661 *rsstring =
op->slaying;
1667 *rsstring =
op->skill;
1673 *rsstring =
op->msg;
1679 *rsstring =
op->lore;
1684 rint = va_arg(
args,
int *);
1690 rint = va_arg(
args,
int *);
1696 rfloat = va_arg(
args,
float *);
1697 *rfloat =
op->speed;
1702 rfloat = va_arg(
args,
float *);
1703 *rfloat =
op->speed_left;
1708 rint = va_arg(
args,
int *);
1714 rint = va_arg(
args,
int *);
1715 *rint =
op->direction;
1720 rint = va_arg(
args,
int *);
1726 rint = va_arg(
args,
int *);
1732 rint = va_arg(
args,
int *);
1733 *rint =
op->subtype;
1738 rint = va_arg(
args,
int *);
1739 *rint =
op->client_type;
1747 idx = va_arg(
args,
int);
1748 resist = va_arg(
args, int16_t *);
1749 *resist =
op->resist[idx];
1755 rint = va_arg(
args,
int *);
1756 *rint =
op->attacktype;
1761 rint = va_arg(
args,
int *);
1762 *rint =
op->path_attuned;
1767 rint = va_arg(
args,
int *);
1768 *rint =
op->path_repelled;
1773 rint = va_arg(
args,
int *);
1774 *rint =
op->path_denied;
1779 rint = va_arg(
args,
int *);
1780 *rint =
op->material;
1786 *rsstring =
op->materialname;
1791 rint = va_arg(
args,
int *);
1797 rlong = va_arg(
args,
long *);
1803 rint = va_arg(
args,
int *);
1809 rint = va_arg(
args,
int *);
1810 *rint =
op->last_heal;
1815 rint = va_arg(
args,
int *);
1816 *rint =
op->last_sp;
1821 rint = va_arg(
args,
int *);
1822 *rint =
op->last_grace;
1827 rint = va_arg(
args,
int *);
1828 *rint =
op->last_eat;
1833 rint = va_arg(
args,
int *);
1834 *rint =
op->invisible;
1839 rint = va_arg(
args,
int *);
1840 *rint =
op->pick_up;
1845 rint = va_arg(
args,
int *);
1846 *rint =
op->item_power;
1851 rint = va_arg(
args,
int *);
1852 *rint =
op->gen_sp_armour;
1857 rint = va_arg(
args,
int *);
1863 rint = va_arg(
args,
int *);
1864 *rint =
op->weight_limit;
1869 rint = va_arg(
args,
int *);
1870 *rint =
op->carrying;
1875 rint = va_arg(
args,
int *);
1876 *rint =
op->glow_radius;
1881 rint64 = va_arg(
args, int64_t *);
1882 *rint64 =
op->total_exp;
1887 robject = va_arg(
args,
object **);
1888 *robject =
op->current_weapon;
1893 robject = va_arg(
args,
object **);
1894 *robject =
op->enemy;
1899 robject = va_arg(
args,
object **);
1900 *robject =
op->attacked_by;
1905 rint = va_arg(
args,
int *);
1906 *rint =
op->run_away;
1911 robject = va_arg(
args,
object **);
1912 *robject =
op->chosen_skill;
1917 rint = va_arg(
args,
int *);
1923 rint = va_arg(
args,
int *);
1924 *rint =
op->move_status;
1929 rint = va_arg(
args,
int *);
1930 *rint =
op->attack_movement;
1935 robject = va_arg(
args,
object **);
1936 *robject =
op->spellitem;
1941 rdouble = va_arg(
args,
double *);
1942 *rdouble =
op->expmul;
1954 *rarch =
op->other_arch;
1965 rint = va_arg(
args,
int *);
1966 *rint =
op->anim_speed;
1971 rint = va_arg(
args,
int *);
1977 rbuffer = va_arg(
args,
char *);
1978 rbufsize = va_arg(
args,
int);
1986 i = va_arg(
args,
int);
1987 rbuffer = va_arg(
args,
char *);
1988 rbufsize = va_arg(
args,
int);
1996 *rsstring =
op->name;
2001 rint = va_arg(
args,
int *);
2007 rint = va_arg(
args,
int *);
2008 *rint =
op->stats.luck;
2013 rint64 = va_arg(
args, int64_t *);
2014 *rint64 =
op->stats.exp;
2019 robject = va_arg(
args,
object **);
2027 stype = va_arg(
args,
int);
2029 unsigned char ptype;
2034 ptype = (
unsigned char)(va_arg(
args,
int));
2035 robject = va_arg(
args,
object **);
2040 ptype = (
unsigned char)(va_arg(
args,
int));
2042 robject = va_arg(
args,
object **);
2048 robject = va_arg(
args,
object **);
2057 rint = va_arg(
args,
int *);
2065 op2 = va_arg(
args,
object *);
2066 rint = va_arg(
args,
int *);
2075 op2 = va_arg(
args,
object *);
2076 rint = va_arg(
args,
int *);
2085 fl = va_arg(
args,
int);
2086 rint = va_arg(
args,
int *);
2093 rint = va_arg(
args,
int *);
2094 *rint =
op->stats.Str;
2099 rint = va_arg(
args,
int *);
2100 *rint =
op->stats.Dex;
2105 rint = va_arg(
args,
int *);
2106 *rint =
op->stats.Con;
2111 rint = va_arg(
args,
int *);
2112 *rint =
op->stats.Wis;
2117 rint = va_arg(
args,
int *);
2118 *rint =
op->stats.Int;
2123 rint = va_arg(
args,
int *);
2124 *rint =
op->stats.Pow;
2129 rint = va_arg(
args,
int *);
2130 *rint =
op->stats.Cha;
2135 rint = va_arg(
args,
int *);
2136 *rint =
op->stats.wc;
2141 rint = va_arg(
args,
int *);
2142 *rint =
op->stats.ac;
2147 rint = va_arg(
args,
int *);
2148 *rint =
op->stats.hp;
2153 rint = va_arg(
args,
int *);
2154 *rint =
op->stats.sp;
2159 rint = va_arg(
args,
int *);
2160 *rint =
op->stats.grace;
2165 rint = va_arg(
args,
int *);
2166 *rint =
op->stats.food;
2171 rint = va_arg(
args,
int *);
2172 *rint =
op->stats.maxhp;
2177 rint = va_arg(
args,
int *);
2178 *rint =
op->stats.maxsp;
2183 rint = va_arg(
args,
int *);
2184 *rint =
op->stats.maxgrace;
2189 rint = va_arg(
args,
int *);
2190 *rint =
op->stats.dam;
2202 *rsstring =
op->arch->name;
2207 rint = va_arg(
args,
int *);
2208 *rint =
op->invisible;
2214 if (
op->face != NULL) {
2215 (*rsstring) =
op->face->name;
2225 if (
op->animation != NULL) {
2226 (*rsstring) =
op->animation->name;
2235 rint = va_arg(
args,
int *);
2236 *rint =
op->contr->count;
2242 *rsstring =
op->contr->socket->host;
2247 robject = va_arg(
args,
object **);
2254 *rparty = (
op->contr ?
op->contr->party : NULL);
2259 robject = va_arg(
args,
object **);
2261 *robject =
op->contr->next ?
op->contr->next->ob : NULL;
2269 rbuffer = va_arg(
args,
char *);
2270 rbufsize = va_arg(
args,
int);
2276 robject = va_arg(
args,
object **);
2277 *robject =
op->contr->transport;
2283 *rmove =
op->move_type;
2289 *rmove =
op->move_block;
2295 *rmove =
op->move_allow;
2301 *rmove =
op->move_on;
2307 *rmove =
op->move_off;
2313 *rmove =
op->move_type;
2318 rfloat = va_arg(
args,
float *);
2319 *rfloat =
op->move_slow_penalty;
2324 rbuffer = va_arg(
args,
char *);
2325 rbufsize = va_arg(
args,
int);
2326 strlcpy(rbuffer,
op->contr->savebed_map, rbufsize);
2331 rint = va_arg(
args,
int *);
2332 *rint =
op->contr->bed_x;
2337 rint = va_arg(
args,
int *);
2338 *rint =
op->contr->bed_y;
2343 rint = va_arg(
args,
int *);
2344 *rint =
op->duration;
2366 if (strlen(
msg) == 0) {
2395 op = va_arg(
args,
object *);
2396 property = va_arg(
args,
int);
2399 if (
op != NULL && (!
op->arch || (
op != &
op->arch->clone))) {
2402 sarg = va_arg(
args,
char *);
2409 sarg = va_arg(
args,
char *);
2416 sarg = va_arg(
args,
char *);
2422 sarg = va_arg(
args,
char *);
2428 sarg = va_arg(
args,
char *);
2434 sarg = va_arg(
args,
char *);
2440 sarg = va_arg(
args,
char *);
2446 sarg = va_arg(
args,
char *);
2452 farg = va_arg(
args,
double);
2454 if (farg !=
op->speed) {
2461 farg = va_arg(
args,
double);
2463 op->speed_left = farg;
2467 iarg = va_arg(
args,
int);
2471 if (
op->nrof > (uint32_t)iarg)
2473 else if (
op->nrof < (uint32_t)iarg) {
2478 if (
op->env != NULL) {
2482 if (
pl->ob->container ==
op->env)
2497 tmp->contr->socket->update_look = 1;
2504 iarg = va_arg(
args,
int);
2506 op->direction = iarg;
2510 iarg = va_arg(
args,
int);
2516 int iargbis = va_arg(
args,
int);
2519 iarg = va_arg(
args,
int);
2520 op->resist[iargbis] = iarg;
2525 iarg = va_arg(
args,
int);
2527 op->attacktype = iarg;
2531 iarg = va_arg(
args,
int);
2533 op->path_attuned = iarg;
2537 iarg = va_arg(
args,
int);
2539 op->path_repelled = iarg;
2543 iarg = va_arg(
args,
int);
2545 op->path_denied = iarg;
2549 iarg = va_arg(
args,
int);
2551 op->material = iarg;
2558 iarg = va_arg(
args,
int);
2564 larg = va_arg(
args,
long);
2570 iarg = va_arg(
args,
int);
2577 iarg = va_arg(
args,
int);
2579 op->last_heal = iarg;
2583 iarg = va_arg(
args,
int);
2589 iarg = va_arg(
args,
int);
2591 op->last_grace = iarg;
2595 iarg = va_arg(
args,
int);
2597 op->last_eat = iarg;
2601 iarg = va_arg(
args,
int);
2603 op->invisible = iarg;
2607 iarg = va_arg(
args,
int);
2613 iarg = va_arg(
args,
int);
2615 op->item_power = iarg;
2619 iarg = va_arg(
args,
int);
2621 op->gen_sp_armour = iarg;
2625 iarg = va_arg(
args,
int);
2627 if (
op->weight != iarg) {
2632 if (
op->env != NULL) {
2636 if (
pl->ob->container ==
op->env)
2658 iarg = va_arg(
args,
int);
2660 op->weight_limit = iarg;
2664 iarg = va_arg(
args,
int);
2666 if (
op->glow_radius != iarg) {
2669 op->glow_radius = iarg;
2671 if (
tmp->map != NULL) {
2680 s64arg = va_arg(
args, int64_t);
2682 op->total_exp = s64arg;
2686 oparg = va_arg(
args,
object *);
2692 iarg = va_arg(
args,
int);
2694 op->run_away = iarg;
2698 oparg = va_arg(
args,
object *);
2700 op->chosen_skill = oparg;
2704 iarg = va_arg(
args,
int);
2710 iarg = va_arg(
args,
int);
2712 op->move_status = iarg;
2716 iarg = va_arg(
args,
int);
2718 op->attack_movement = iarg;
2722 oparg = va_arg(
args,
object *);
2724 op->spellitem = oparg;
2728 darg = va_arg(
args,
double);
2734 sarg = va_arg(
args,
char *);
2741 iarg = va_arg(
args,
int);
2743 op->anim_speed = iarg;
2747 iarg = va_arg(
args,
int);
2756 iarg = va_arg(
args,
int);
2758 op->stats.luck = iarg;
2762 s64arg = va_arg(
args, int64_t);
2764 op->stats.exp = s64arg;
2768 oparg = va_arg(
args,
object *);
2781 iarg = va_arg(
args,
int);
2782 iargbis = va_arg(
args,
int);
2793 iarg = va_arg(
args,
int);
2795 op->stats.Str = iarg;
2799 iarg = va_arg(
args,
int);
2801 op->stats.Dex = iarg;
2805 iarg = va_arg(
args,
int);
2807 op->stats.Con = iarg;
2811 iarg = va_arg(
args,
int);
2813 op->stats.Wis = iarg;
2817 iarg = va_arg(
args,
int);
2819 op->stats.Int = iarg;
2823 iarg = va_arg(
args,
int);
2825 op->stats.Pow = iarg;
2829 iarg = va_arg(
args,
int);
2831 op->stats.Cha = iarg;
2835 iarg = va_arg(
args,
int);
2837 op->stats.wc = iarg;
2841 iarg = va_arg(
args,
int);
2843 op->stats.ac = iarg;
2847 iarg = va_arg(
args,
int);
2849 op->stats.hp = iarg;
2853 iarg = va_arg(
args,
int);
2855 op->stats.sp = iarg;
2859 iarg = va_arg(
args,
int);
2861 op->stats.grace = iarg;
2865 iarg = va_arg(
args,
int);
2867 op->stats.food = iarg;
2871 iarg = va_arg(
args,
int);
2873 op->stats.maxhp = iarg;
2877 iarg = va_arg(
args,
int);
2879 op->stats.maxsp = iarg;
2883 iarg = va_arg(
args,
int);
2885 op->stats.maxgrace = iarg;
2889 iarg = va_arg(
args,
int);
2891 op->stats.dam = iarg;
2896 sarg = va_arg(
args,
char *);
2897 ret = va_arg(
args,
int *);
2912 sarg = va_arg(
args,
char *);
2913 ret = va_arg(
args,
int *);
2928 iarg = va_arg(
args,
int);
2930 op->duration = iarg;
2935 oparg = va_arg(
args,
object *);
2937 op->contr->mark = oparg;
2939 op->contr->mark_count = oparg->
count;
2941 op->contr->mark_count = 0;
2955 sarg = va_arg(
args,
char *);
2961 iarg = va_arg(
args,
int);
2963 op->contr->bed_x = iarg;
2967 iarg = va_arg(
args,
int);
2969 op->contr->bed_y = iarg;
2973 sarg = va_arg(
args,
char *);
3039 applier = va_arg(
args,
object *);
3062 applier = va_arg(
args,
object *);
3063 applied = va_arg(
args,
object *);
3064 aflags = va_arg(
args,
int);
3065 ret = va_arg(
args,
int *);
3084 op = va_arg(
args,
object *);
3107 op = va_arg(
args,
object *);
3108 owner = va_arg(
args,
object *);
3109 desc = va_arg(
args,
char *);
3110 size = va_arg(
args,
int);
3115 strncpy(desc,
final, size);
3116 desc[size - 1] =
'\0';
3128 op = va_arg(
args,
object *);
3129 ds = va_arg(
args,
int);
3146 op = va_arg(
args,
object *);
3163 op = va_arg(
args,
object *);
3181 op = va_arg(
args,
object *);
3182 skillname = va_arg(
args,
char *);
3198 op = va_arg(
args,
object *);
3199 chg = va_arg(
args,
object *);
3213 op = va_arg(
args,
object *);
3216 LOG(
llevError,
"Plugin trying to remove removed object %s\n",
op->name);
3234 op = va_arg(
args,
object *);
3237 LOG(
llevError,
"Plugin trying to free freed/non removed object %s\n",
op->name);
3263 op = va_arg(
args,
object *);
3264 kind = va_arg(
args,
int);
3265 robj = va_arg(
args,
object **);
3292 ival = va_arg(
args,
int);
3297 robj = va_arg(
args,
object **);
3305 sval = va_arg(
args,
const char *);
3306 robj = va_arg(
args,
object **);
3337 op = va_arg(
args,
object *);
3339 LOG(
llevError,
"cfapi_object_insert: called with NULL object!\n");
3344 LOG(
llevError,
"cfapi_object_insert: called with FREED object!\n");
3349 LOG(
llevError,
"cfapi_object_insert: called with not removed object %s!\n",
op->name);
3352 itype = va_arg(
args,
int);
3357 orig = va_arg(
args,
object *);
3358 flag = va_arg(
args,
int);
3359 x = va_arg(
args,
int);
3360 y = va_arg(
args,
int);
3361 robj = va_arg(
args,
object **);
3363 LOG(
llevError,
"cfapi_object_insert (0): called with NULL map, object %s!\n",
op->name);
3373 orig = va_arg(
args,
object *);
3374 flag = va_arg(
args,
int);
3375 robj = va_arg(
args,
object **);
3377 LOG(
llevError,
"cfapi_object_insert (1): called with NULL map, object %s!\n",
op->name);
3387 orig = va_arg(
args,
object *);
3388 flag = va_arg(
args,
int);
3389 x = va_arg(
args,
int);
3390 y = va_arg(
args,
int);
3391 robj = va_arg(
args,
object **);
3393 LOG(
llevError,
"cfapi_object_insert (0): called with NULL map, object %s!\n",
op->name);
3409 orig = va_arg(
args,
object *);
3410 robj = va_arg(
args,
object **);
3412 LOG(
llevError,
"cfapi_object_insert (3): called with NULL orig, object %s!\n",
op->name);
3421 LOG(
llevError,
"cfapi_object_insert (1): called with itype %d which is not valid, object %s!\n", itype,
op->name);
3444 op = va_arg(
args,
object *);
3445 nr = va_arg(
args,
int);
3447 size = va_arg(
args,
int);
3475 op = va_arg(
args,
object *);
3476 op2 = va_arg(
args,
object *);
3477 merge = va_arg(
args,
object **);
3497 op = va_arg(
args,
object *);
3498 op2 = va_arg(
args,
object *);
3499 rint = va_arg(
args,
int *);
3517 op = va_arg(
args,
object *);
3536 op = va_arg(
args,
object *);
3555 op = va_arg(
args,
object *);
3568 op = va_arg(
args,
object *);
3581 op1 = va_arg(
args,
object *);
3582 op2 = va_arg(
args,
object *);
3583 rint = va_arg(
args,
int *);
3596 trap = va_arg(
args,
object *);
3616 op = va_arg(
args,
object *);
3617 cause = va_arg(
args,
object *);
3618 rint = va_arg(
args,
int *);
3644 cause = va_arg(
args,
object *);
3662 op = va_arg(
args,
object *);
3663 rint = va_arg(
args,
int *);
3685 op = va_arg(
args,
object *);
3686 caster = va_arg(
args,
object *);
3687 dir = va_arg(
args,
int);
3688 sp = va_arg(
args,
object *);
3690 rint = va_arg(
args,
int *);
3710 op = va_arg(
args,
object *);
3711 sp = va_arg(
args,
object *);
3712 prayer = va_arg(
args,
int);
3725 op = va_arg(
args,
object *);
3726 sp = va_arg(
args,
object *);
3745 op = va_arg(
args,
object *);
3746 spellname = va_arg(
args,
char *);
3747 robj = va_arg(
args,
object **);
3765 op = va_arg(
args,
object *);
3766 amount = va_arg(
args, uint64_t);
3767 rint = va_arg(
args,
int *);
3787 tobuy = va_arg(
args,
object *);
3788 op = va_arg(
args,
object *);
3789 rint = va_arg(
args,
int *);
3806 int x,
y, randompos, ttype, flag;
3813 op = va_arg(
args,
object *);
3814 ttype = va_arg(
args,
int);
3817 x = va_arg(
args,
int);
3818 y = va_arg(
args,
int);
3819 randompos = va_arg(
args,
int);
3820 originator = va_arg(
args,
object *);
3821 rint = va_arg(
args,
int *);
3831 originator = va_arg(
args,
object *);
3832 flag = va_arg(
args,
int);
3833 x = va_arg(
args,
int);
3834 y = va_arg(
args,
int);
3835 robj = va_arg(
args,
object **);
3837 if (
x < 0 ||
y < 0) {
3847 x = va_arg(
args,
int);
3848 y = va_arg(
args,
int);
3849 rint = va_arg(
args,
int *);
3875 op = va_arg(
args,
object *);
3878 robj = va_arg(
args,
object **);
3881 if (*robj == NULL) {
3890 if (!strncmp(
tmp->name,
str, strlen(
str)))
3893 if (
tmp->slaying && !strcmp(
tmp->slaying,
str))
3909 who = va_arg(
args,
const object *);
3925 who = va_arg(
args,
const object *);
3945 op = va_arg(
args,
object *);
3955 author->contr->count = 0;
3956 author->contr->socket->update_look = 1;
3969 op = va_arg(
args,
object *);
3971 rint = va_arg(
args,
int *);
3986 op = va_arg(
args,
object *);
3988 rint = va_arg(
args,
int *);
4013 sval = va_arg(
args,
char *);
4032 pri = va_arg(
args,
int);
4033 pl = va_arg(
args,
object *);
4034 buf = va_arg(
args,
const char *);
4054 op = va_arg(
args,
object *);
4055 rlong = va_arg(
args, int64_t *);
4075 ob = va_arg(
args,
object *);
4076 exp = va_arg(
args, int64_t);
4077 skill = va_arg(
args,
const char *);
4078 flag = va_arg(
args,
int);
4096 pl = va_arg(
args,
object *);
4097 rint = va_arg(
args,
int *);
4116 what = va_arg(
args,
int);
4121 pl = va_arg(
args,
object *);
4123 rint = va_arg(
args,
int *);
4127 if (
pl->contr == NULL) {
4128 LOG(
llevError,
"cfapi_player_knowledge: 'has' called for non player object %s",
pl->name);
4138 pl = va_arg(
args,
object *);
4141 if (
pl->contr != NULL)
4147 LOG(
llevError,
"cfapi_player_knowledge: invalid what %d", what);
4168 x = va_arg(
args,
int);
4169 y = va_arg(
args,
int);
4184 what = va_arg(
args,
object *);
4202 prop = va_arg(
args,
int);
4207 *rsstring =
arch->name;
4219 *rarch =
arch->head;
4225 *rarch =
arch->more;
4230 robject = va_arg(
args,
object **);
4231 *robject = &
arch->clone;
4258 prop = va_arg(
args,
int);
4280 obarg = va_arg(
args,
object *);
4283 for (; *rplayer != NULL; (*rplayer) = (*rplayer)->
next)
4284 if ((*rplayer)->ob->contr->party == party) {
4312 prop = va_arg(
args,
int);
4316 *rsstring = reg->
name;
4340 *rsstring = reg->
msg;
4346 rint = va_arg(
args,
int*);
4381 ob = va_arg(
args,
object *);
4382 robject = va_arg(
args,
object **);
4407 buf = va_arg(
args,
const char *);
4408 ret = va_arg(
args,
int *);
4432 use_layout = va_arg(
args,
char **);
4450 op = va_arg(
args,
object *);
4452 third = va_arg(
args,
object *);
4454 fix = va_arg(
args,
int);
4455 ret = va_arg(
args,
int *);
4475 if (
player->contr == NULL) {
4476 LOG(
llevError,
"cfapi_player_quest called with non player object %s!\n",
player->name);
4490 int *ret = va_arg(
args,
int *);
4502 int *ret = va_arg(
args,
int*);
4517 const char *
name = NULL, *extra = NULL;
4521 uint8_t register_type, command_type;
4525 register_type = va_arg(
args,
int);
4527 if (register_type == 1) {
4530 extra = va_arg(
args,
const char *);
4533 command_type = (uint8_t)va_arg(
args,
int);
4537 time = va_arg(
args,
double);
4541 if (register_type == 1) {
4571 struct dirent *currentfile;
4574 char buf[
sizeof(LIBDIR) + 9 +
sizeof(dirent::d_name)];
4576 snprintf(
buf,
sizeof(
buf),
"%s/plugins/", LIBDIR);
4580 if (plugdir == NULL)
4583 while ((currentfile =
readdir(plugdir)) != NULL) {
4584 l = strlen(currentfile->d_name);
4585 if (
l > strlen(PLUGIN_SUFFIX)) {
4588 if (strcmp(currentfile->d_name+
l-strlen(PLUGIN_SUFFIX), PLUGIN_SUFFIX) != 0)
4592 if (strcmp(*disable,
"All") == 0) {
4593 LOG(
llevInfo,
"plugins: disabling (all) %s\n", currentfile->d_name);
4597 if (strncmp(*disable, currentfile->d_name, strlen(*disable)) == 0 && strlen(currentfile->d_name) == strlen(PLUGIN_SUFFIX) + strlen(*disable)) {
4598 LOG(
llevInfo,
"plugins: disabling %s\n", currentfile->d_name);
4604 snprintf(
buf,
sizeof(
buf),
"%s/plugins/%s", LIBDIR, currentfile->d_name);
4605 LOG(
llevInfo,
"plugins: loading %s\n", currentfile->d_name);
static crossfire_plugin * plugins_find_plugin(const char *id)
#define GET_MAP_OB(M, X, Y)
static void cfapi_object_transfer(int *type,...)
static void cfapi_object_clean_object(int *type,...)
static void cfapi_object_forget_spell(int *type,...)
static void cfapi_map_change_light(int *type,...)
#define CFAPI_OBJECT_PROP_TITLE
static void cfapi_object_split(int *type,...)
object * object_get_owner(object *op)
int cftimer_find_free_id(void)
#define FREE_OBJ_NO_DESTROY_CALLBACK
#define CFAPI_OBJECT_PROP_X
static void cfapi_object_move(int *type,...)
static void cfapi_timer_destroy(int *type,...)
object * object_get_env_recursive(object *op)
#define CFAPI_PARTY_VECTOR
int(* f_plug_postinit)(void)
void remove_friendly_object(object *op)
#define CFAPI_OBJECT_VECTOR
#define CFAPI_OBJECT_PROP_CHA
#define CFAPI_MAP_PROP_TMPNAME
#define CFAPI_OBJECT_PROP_ARCH_NAME
#define CFAPI_OBJECT_PROP_ATTACK_MOVEMENT
static void cfapi_object_distance(int *type,...)
static void cfapi_object_delete(int *type,...)
static void cfapi_player_quest(int *type,...)
static void cfapi_timer_create(int *type,...)
void command_say(object *op, const char *params)
#define CFAPI_PARTY_PROP_NAME
static void cfapi_archetype_get_property(int *type,...)
void LOG(LogLevel logLevel, const char *format,...)
mapstruct * get_empty_map(int sizex, int sizey)
void monster_npc_say(object *npc, const char *cp)
#define CFAPI_MAP_PROP_RESET_TIME
void drain_specific_stat(object *op, int deplete_stats)
#define CFAPI_MAP_PROP_RESET_TIMEOUT
static void cfapi_system_register_global_event(int *type,...)
#define CFAPI_REGION_PROP_LONGNAME
static void cfapi_system_get_party_vector(int *type,...)
#define CFAPI_OBJECT_PROP_LEVEL
std::vector< crossfire_plugin * > plugins_list
#define CFAPI_PLAYER_PROP_BED_X
static void cfapi_object_drop(int *type,...)
mapstruct * ready_map_name(const char *name, int flags)
#define QUERY_FLAG(xyz, p)
static void cfapi_system_get_map_vector(int *type,...)
#define CFAPI_REGION_PROP_NEXT
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
archetype * get_next_archetype(archetype *current)
#define CFAPI_MAP_PROP_NEXT
void do_learn_spell(object *op, object *spell, int special_prayer)
uint8_t ignore_plugin_compatibility
mapstruct * has_been_loaded(const char *name)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
object * object_merge(object *op, object *top)
object * get_next_friend(object *current)
#define CFAPI_OBJECT_PROP_SLAYING
static void cfapi_get_weekday_name(int *type,...)
void update_position(mapstruct *m, int x, int y)
#define CFAPI_OBJECT_PROP_DEX
#define CFAPI_OBJECT_PROP_FRIENDLY
#define CFAPI_OBJECT_PROP_ARCHETYPE
static void cfapi_map_out_of_map(int *type,...)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
void events_unregister_object_handler(const char *id)
#define CFAPI_PLAYER_PROP_COUNT
#define CFAPI_OBJECT_PROP_BASE_NAME
void object_set_enemy(object *op, object *enemy)
#define CFAPI_OBJECT_PROP_LAST_EAT
#define CFAPI_OBJECT_PROP_MOVE_ON
void spring_trap(object *trap, object *victim)
static void cfapi_object_get_property(int *type,...)
#define CFAPI_OBJECT_PROP_STR
static void cfapi_object_create(int *type,...)
static void cfapi_object_drain(int *type,...)
object * give_skill_by_name(object *op, const char *skill_name)
int set_random_map_variable(RMParms *rp, const char *buf)
void quest_set_player_state(player *pl, sstring quest_code, int state)
#define CFAPI_OBJECT_PROP_GOD
object * arch_present_in_ob(const archetype *at, const object *op)
void object_set_owner(object *op, object *owner)
#define CFAPI_OBJECT_PROP_NEXT_ACTIVE_OB
void player_set_own_title(struct player *pl, const char *title)
#define CFAPI_PLAYER_PROP_MARKED_ITEM
#define SET_ANIMATION(ob, newanim)
static void cfapi_object_find_archetype_inside(int *type,...)
#define CFAPI_SYSTEM_ARCHETYPES
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
knowledge
DIALOGCHECK MINARGS 1 MAXARGS 1
#define CFAPI_OBJECT_PROP_MAXSP
#define CFAPI_OBJECT_PROP_RAW_NAME
#define CFAPI_OBJECT_PROP_SPELL_ITEM
int move_player(object *op, int dir)
void object_reset(object *op)
#define CFAPI_ARCH_PROP_NEXT
#define CFAPI_OBJECT_PROP_Y
static const flag_definition flags[]
#define CFAPI_OBJECT_PROP_ENEMY
void object_copy(const object *src_ob, object *dest_ob)
void clean_object(object *op)
#define CFAPI_OBJECT_PROP_MOVE_TYPE
void fix_object(object *op)
void get_tod(timeofday_t *tod)
#define CFAPI_OBJECT_PROP_FACE
static void cfapi_object_say(int *type,...)
#define CFAPI_REGION_PROP_PARENT
#define CFAPI_OBJECT_PROP_ENVIRONMENT
#define COMMAND_TYPE_NORMAL
#define CFAPI_OBJECT_PROP_ATTACKED_BY
mapstruct * generate_random_map(const char *OutFileName, RMParms *RP, char **use_layout, sstring reset_group)
#define FOR_ABOVE_PREPARE(op_, it_)
#define CFAPI_SYSTEM_PLAYERS
#define CFAPI_OBJECT_PROP_PRESENT
#define CFAPI_REGION_PROP_JAIL_PATH
#define CFAPI_MAP_PROP_WIDTH
static void cfapi_get_hooks(int *type,...)
#define CFAPI_ARCH_PROP_NAME
#define CFAPI_OBJECT_PROP_ITEM_POWER
#define CFAPI_MAP_PROP_UNIQUE
int(* f_plug_init)(const char *iversion, f_plug_api gethooksptr)
int apply_manual(object *op, object *tmp, int aflag)
const char * object_get_value(const object *op, const char *const key)
void apply_by_living_below(object *pl)
#define CFAPI_OBJECT_PROP_CURRENT_WEAPON
static void cfapi_friendlylist_get_next(int *type,...)
AssetsManager * getManager()
static void cfapi_object_identify(int *type,...)
static void cfapi_map_set_map_property(int *type,...)
object * object_insert_in_ob(object *op, object *where)
static void cfapi_object_user_event(int *type,...)
#define CFAPI_MAP_PROP_ENTER_X
static void cfapi_object_update(int *type,...)
#define CFAPI_OBJECT_PROP_INVISIBLE
static void cfapi_system_directory(int *type,...)
#define plugins_dlerror()
static void cfapi_object_change_abil(int *type,...)
const char * get_season_name(const int index)
#define CFAPI_OBJECT_PROP_SKILL
event_registration events_register_global_handler(int eventcode, f_plug_event hook)
#define CFAPI_OBJECT_PROP_CLIENT_TYPE
void object_clear(object *op)
void party_join(object *op, partylist *party)
static void cfapi_object_get_key(int *type,...)
#define MSG_TYPE_COMMAND_DEBUG
int plugins_remove_plugin(const char *id)
#define CFAPI_OBJECT_PROP_PATH_DENIED
#define CFAPI_MAP_PROP_REGION
#define CFAPI_OBJECT_PROP_ANIM_SPEED
static event_registration m
static void cfapi_system_unregister_global_event(int *type,...)
#define CFAPI_OBJECT_PROP_AC
void events_register_object_handler(const char *id, f_plug_event handler)
static void cfapi_register_command(int *type,...)
char * stringbuffer_finish(StringBuffer *sb)
partylist * party_get_first(void)
void object_free_drop_inventory(object *ob)
void object_update(object *op, int action)
object * object_find_by_name(const object *who, const char *name)
static void cfapi_player_find(int *type,...)
DIR * opendir(const char *)
#define CFAPI_OBJECT_PROP_LORE
#define CFAPI_ARCH_PROP_HEAD
#define CFAPI_OBJECT_PROP_PICK_UP
#define CFAPI_OBJECT_PROP_MOVE_OFF
#define CFAPI_PLAYER_PROP_PARTY
void command_unregister(command_registration command)
static void cfapi_player_can_pay(int *type,...)
const char * determine_god(object *op)
int is_friendly(const object *op)
#define CFAPI_OBJECT_PROP_CHOSEN_SKILL
#define CFAPI_OBJECT_PROP_HP
short freearr_y[SIZEOFFREE]
#define CFAPI_OBJECT_PROP_MAXHP
void drop(object *op, object *tmp)
static void cfapi_map_message(int *type,...)
const char * get_weekday(const int index)
static void cfapi_map_create_path(int *type,...)
#define CFAPI_OBJECT_PROP_OB_BELOW
static void cfapi_object_apply_below(int *type,...)
#define CFAPI_OBJECT_PROP_HIDDEN
#define CFAPI_OBJECT_PROP_CARRYING
#define CFAPI_OBJECT_PROP_TOTAL_EXP
int move_ob(object *op, int dir, object *originator)
int cftimer_destroy(int id)
static void cfapi_set_random_map_variable(int *type,...)
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
#define CFAPI_PLAYER_PROP_BED_Y
void query_name(const object *op, char *buf, size_t size)
static void cfapi_object_remove_depletion(int *type,...)
#define CFAPI_OBJECT_PROP_GEN_SP_ARMOUR
#define CFAPI_REGION_PROP_JAIL_Y
#define CFAPI_OBJECT_PROP_CHEATER
#define FOR_ABOVE_FINISH()
void events_unregister_global_handler(int eventcode, event_registration id)
#define CFAPI_MAP_PROP_MESSAGE
static void cfapi_system_re_cmp(int *type,...)
#define CFAPI_OBJECT_PROP_RACE
void(* f_plug_api)(int *type,...)
static void cfapi_system_get_object_vector(int *type,...)
static void cfapi_party_get_property(int *type,...)
sstring add_string(const char *str)
static void cfapi_object_check_spell(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_BLOCK
#define CFAPI_OBJECT_PROP_FACING
static void copy_message(object *op, const char *msg)
static void cfapi_system_find_face(int *type,...)
#define CFAPI_OBJECT_PROP_WEIGHT
static void cfapi_system_get_archetype_vector(int *type,...)
static void cfapi_object_reset(int *type,...)
#define CFAPI_OBJECT_PROP_RESIST
#define CFAPI_PLAYER_PROP_IP
#define CFAPI_OBJECT_PROP_DAM
int change_map_light(mapstruct *m, int change)
const char * get_periodofday(const int index)
struct dirent * readdir(DIR *)
void query_short_name(const object *op, char *buf, size_t size)
void void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
static void cfapi_map_has_been_loaded(int *type,...)
int out_of_map(mapstruct *m, int x, int y)
sstring find_string(const char *str)
f_plug_postinit closefunc
static void cfapi_object_remove(int *type,...)
void object_update_speed(object *op)
static void cfapi_system_strdup_local(int *type,...)
#define FREE_AND_COPY(sv, nv)
#define CFAPI_OBJECT_PROP_PATH_ATTUNED
int events_execute_object_user(object *op, object *activator, object *third, const char *message, int fix)
#define CFAPI_ARCH_PROP_CLONE
#define CFAPI_OBJECT_PROP_EXP
#define SET_MAP_FLAGS(M, X, Y, C)
#define CFAPI_OBJECT_PROP_SPEED
#define CFAPI_OBJECT_PROP_TYPE
int quest_was_completed(player *pl, sstring quest_code)
#define CFAPI_OBJECT_PROP_NROF
object * object_create_arch(archetype *at)
#define CFAPI_PLAYER_PROP_TITLE
#define CFAPI_MAP_PROP_PATH
std::vector< char * > disabled_plugins
static void cfapi_object_transmute(int *type,...)
void object_free(object *ob, int flags)
#define CFAPI_OBJECT_PROP_CUSTOM_NAME
static void cfapi_region_get_property(int *type,...)
static void cfapi_unregister_command(int *type,...)
#define CFAPI_OBJECT_PROP_PICKABLE
#define CFAPI_REGION_VECTOR
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
static void cfapi_object_teleport(int *type,...)
#define CFAPI_PLAYER_QUEST_START
#define CFAPI_REGION_PROP_NAME
static void cfapi_object_spring_trap(int *type,...)
#define CFAPI_OBJECT_PROP_INVISIBLE_TIME
#define CFAPI_OBJECT_PROP_ATTACK_TYPE
#define CFAPI_SYSTEM_MAPS
int move_to(object *op, int x, int y)
#define CFAPI_REGION_PROP_JAIL_X
static void cfapi_get_time(int *type,...)
static void cfapi_object_pay_item(int *type,...)
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
void each(std::function< void(T *)> op)
const Face * get_face_by_id(uint16_t id)
event_registration global_registration[NR_EVENTS]
void delete_map(mapstruct *m)
#define CFAPI_OBJECT_PROP_OWNER
static void cfapi_object_pickup(int *type,...)
#define CFAPI_SYSTEM_REGIONS
static void cfapi_object_on_same_map(int *type,...)
#define CFAPI_OBJECT_PROP_NAME_PLURAL
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
object * object_create_clone(object *asrc)
#define CFAPI_PARTY_PROP_NEXT
Archetypes * archetypes()
static void cfapi_get_month_name(int *type,...)
static void cfapi_system_check_path(int *type,...)
size_t strlcpy(char *dst, const char *src, size_t size)
#define CFAPI_MAP_PROP_NAME
void object_set_cheat(object *op)
object * object_new(void)
void create_overlay_pathname(const char *name, char *buf, size_t size)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
#define COMMAND_TYPE_WIZARD
#define CFAPI_OBJECT_PROP_WIS
object * object_present_in_ob(uint8_t type, const object *op)
#define CFAPI_OBJECT_PROP_POW
void free_string(sstring str)
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
static void cfapi_map_get_map(int *type,...)
#define CFAPI_REGION_PROP_MESSAGE
Animations * try_find_animation(const char *name)
partylist * party_get_next(const partylist *party)
#define CFAPI_OBJECT_PROP_CONTAINER
int change_abil(object *op, object *tmp)
static void send_changed_object(object *op)
#define CFAPI_OBJECT_PROP_INVENTORY
#define CFAPI_OBJECT_PROP_MAP
#define CFAPI_MAP_PROP_FLAGS
static void cfapi_system_find_string(int *type,...)
static void cfapi_system_remove_string(int *type,...)
#define CFAPI_MAP_PROP_DARKNESS
#define CFAPI_MAP_PROP_PLAYERS
#define CFAPI_OBJECT_PROP_RUN_AWAY
object * object_decrease_nrof(object *op, uint32_t i)
#define PERM_EXP(exptotal)
static void cfapi_map_delete_map(int *type,...)
void plugins_display_list(object *op)
#define CFAPI_PLAYER_PROP_TRANSPORT
static void cfapi_map_get_map_property(int *type,...)
#define CFAPI_PARTY_PROP_PLAYER
std::vector< region * > all_regions
#define CFAPI_PLAYER_QUEST_GET_STATE
#define CFAPI_MAP_PROP_DIFFICULTY
archetype * find_archetype_by_object_name(const char *name)
void transmute_materialname(object *op, const object *change)
static void cfapi_system_get_region_vector(int *type,...)
static void cfapi_object_describe(int *type,...)
static void cfapi_object_give_skill(int *type,...)
static void cfapi_generate_random_map(int *type,...)
#define CFAPI_OBJECT_PROP_ANIMATION
object * object_find_by_arch_name(const object *who, const char *name)
#define CFAPI_OBJECT_PROP_INT
#define CFAPI_OBJECT_PROP_SP
static void cfapi_object_fix(int *type,...)
const char * party_get_password(const partylist *party)
#define CFAPI_SYSTEM_FRIENDLY_LIST
void cleanupPlugins(void)
int object_can_pick(const object *who, const object *item)
void add_friendly_object(object *op)
#define CFAPI_PLAYER_QUEST_SET_STATE
#define CFAPI_OBJECT_PROP_NAME
#define CFAPI_OBJECT_PROP_EXP_MULTIPLIER
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
int is_magical(const object *op)
#define CFAPI_OBJECT_PROP_PREV_ACTIVE_OB
#define CFAPI_OBJECT_PROP_HEAD
char * create_pathname(const char *name, char *buf, size_t size)
object * check_spell_known(object *op, const char *name)
static void cfapi_object_change_exp(int *type,...)
int(* f_plug_event)(int *type,...)
const typedef char * sstring
int pay_for_item(object *op, object *pl, uint64_t reduction)
#define CFAPI_PLAYER_PROP_BED_MAP
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
#define CFAPI_OBJECT_PROP_WC
#define plugins_dlsym(lib, name)
#define CFAPI_OBJECT_PROP_GLOW_RADIUS
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
uint64_t query_money(const object *op)
static void cfapi_object_find_by_arch_name(int *type,...)
void object_set_msg(object *op, const char *msg)
void esrv_update_item(int flags, object *pl, object *op)
#define CFAPI_OBJECT_PROP_PATH_REPELLED
#define CFAPI_OBJECT_PROP_CON
#define CFAPI_ARCHETYPE_VECTOR
static const hook_entry plug_hooks[]
int on_same_map(const object *op1, const object *op2)
#define CLEAR_FLAG(xyz, p)
#define CFAPI_OBJECT_PROP_GP
#define CFAPI_OBJECT_PROP_MAGICAL
#define CFAPI_OBJECT_PROP_LAST_SP
static void cfapi_cost_string_from_value(int *type,...)
int player_arrest(object *who)
player * find_player_partial_name(const char *plname)
#define CFAPI_OBJECT_PROP_MATERIAL
static void cfapi_object_insert(int *type,...)
#define CFAPI_OBJECT_PROP_DURATION
#define CFAPI_OBJECT_PROP_MOVE_STATUS
static void cfapi_map_update_position(int *type,...)
#define CFAPI_OBJECT_PROP_OTHER_ARCH
static void cfapi_get_periodofday_name(int *type,...)
#define CFAPI_OBJECT_PROP_OB_ABOVE
int knowledge_player_knows(const player *pl, const char *knowledge)
int object_distance(const object *ob1, const object *ob2)
#define CFAPI_MAP_PROP_ENTER_Y
#define string_get_int(name)
void quest_start(player *pl, sstring quest_code, int state)
#define CFAPI_OBJECT_PROP_LAST_HEAL
static void cfapi_player_message(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_ALLOW
void knowledge_give(player *pl, const char *marker, const object *book)
region * get_region_by_map(mapstruct *m)
#define CFAPI_ARCH_PROP_MORE
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
static void cfapi_system_add_string(int *type,...)
void(* command_function_extra)(object *op, const char *params, const char *extra)
command_registration command_register(const char *name, uint8_t type, command_function func, float time)
#define CFAPI_SYSTEM_PARTIES
static void cfapi_log(int *type,...)
void object_remove(object *op)
archetype * try_find_archetype(const char *name)
#define CFAPI_OBJECT_PROP_MOVE_SLOW
#define CFAPI_OBJECT_PROP_MERGEABLE
signed long object_sum_weight(object *op)
const Face * try_find_face(const char *name, const Face *error)
void do_forget_spell(object *op, const char *spell)
uint64_t command_registration
static void cfapi_object_set_key(int *type,...)
int remove_depletion(object *op, int level)
static void cfapi_object_pay_amount(int *type,...)
const char * get_month_name(const int index)
#define CFAPI_OBJECT_PROP_MAGIC
#define CFAPI_OBJECT_PROP_FLAGS
#define CFAPI_OBJECT_PROP_LUCK
#define CFAPI_MAP_PROP_HEIGHT
int object_teleport(object *op, mapstruct *map, int x, int y)
static void cfapi_system_find_animation(int *type,...)
void update_all_los(const mapstruct *map, int x, int y)
command_registration command_register_extra(const char *name, const char *extra, uint8_t type, command_function_extra func, float time)
int calculate_difficulty(mapstruct *m)
static std::vector< std::string > split(const std::string &field, const std::string &by)
static void cfapi_object_apply(int *type,...)
#define CFAPI_OBJECT_PROP_VALUE
void query_base_name(const object *op, int plural, char *buf, size_t size)
#define CFAPI_OBJECT_PROP_MESSAGE
static void cfapi_object_perm_exp(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY
int object_set_value(object *op, const char *key, const char *value, int add_key)
#define CFAPI_OBJECT_PROP_MAXGP
#define CFAPI_OBJECT_PROP_COUNT
#define CFAPI_OBJECT_PROP_SUBTYPE
static void cfapi_player_knowledge(int *type,...)
short freearr_x[SIZEOFFREE]
#define CFAPI_PLAYER_QUEST_WAS_COMPLETED
void(* command_function)(object *op, const char *params)
#define plugins_dlclose(lib)
static void cfapi_map_get_object_at(int *type,...)
int plugins_init_plugin(const char *libfile)
static void cfapi_object_cast(int *type,...)
int pay_for_amount(uint64_t to_pay, object *pl)
void pick_up(object *op, object *alt)
object * object_get_player_container(object *op)
const char * re_cmp(const char *, const char *)
#define CFAPI_OBJECT_PROP_FP
static void cfapi_object_query_money(int *type,...)
#define CUSTOM_NAME_FIELD
object * find_marked_object(object *op)
void free_dialog_information(object *op)
#define FOR_INV_PREPARE(op_, it_)
int check_path(const char *name, int prepend_dir)
#define CFAPI_PARTY_PROP_PASSWORD
#define CFAPI_OBJECT_PROP_LAST_GRACE
static void cfapi_get_season_name(int *type,...)
void *(* f_plug_property)(int *type,...)
static void cfapi_object_merge(int *type,...)
#define CFAPI_PLAYER_PROP_NEXT
#define CFAPI_OBJECT_PROP_DIRECTION
static void cfapi_object_clone(int *type,...)
#define CFAPI_OBJECT_PROP_SHORT_NAME
static void cfapi_object_learn_spell(int *type,...)
int object_can_merge(object *ob1, object *ob2)
#define CFAPI_OBJECT_PROP_MATERIAL_NAME
static void cfapi_map_trigger_connected(int *type,...)
static void cfapi_object_find_by_name(int *type,...)
static void cfapi_object_set_property(int *type,...)
#define plugins_dlopen(fname)
char * cost_string_from_value(uint64_t cost, int largest_coin)
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
#define CFAPI_OBJECT_PROP_SPEED_LEFT
int quest_get_player_state(player *pl, sstring quest_code)
static void cfapi_map_find_by_archetype_name(int *type,...)
int cftimer_create(int id, long delay, object *ob, int mode)
void player_get_title(const player *pl, char *buf, size_t bufsize)
static void cfapi_object_check_trigger(int *type,...)
static void cfapi_object_clear(int *type,...)
object * identify(object *op)