Go to the documentation of this file.
43 #include "libloaderapi.h"
47 #define NR_OF_HOOKS (sizeof(plug_hooks)/sizeof(*plug_hooks))
263 if (!strcmp(
id, cp->
id)) {
273 static char buf[256];
277 err = GetLastError();
278 if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0,
buf,
sizeof (
buf), NULL) == 0)
279 snprintf(
buf,
sizeof (
buf),
"error %lu", err);
280 p = strchr(
buf,
'\0');
281 while (p >
buf && (p[-1] ==
'\r' || p[-1] ==
'\n'))
298 if (
op->env != NULL) {
315 tmp->contr->socket.update_look = 1;
329 request_type = va_arg(
args,
int);
330 if (request_type == 0) {
333 fid = va_arg(
args,
int);
386 if (svn_rev == NULL) {
387 LOG(
llevError,
"Unable to find SvnRevPlugin in %s\n", libfile);
398 if (initfunc == NULL) {
404 if (propfunc == NULL) {
410 if (eventfunc == NULL) {
416 if (postfunc == NULL) {
422 if (closefunc == NULL) {
434 propfunc(&i,
"Identification", cp->
id,
sizeof(cp->
id));
464 if (!strcmp(
id, cp->
id)) {
468 for (
int eventcode = 0; eventcode <
NR_EVENTS; eventcode++) {
510 "List of loaded plugins:\n-----------------------");
531 char *buffer, *
final;
532 int length, largest_coin;
537 largest_coin = va_arg(
args,
int);
538 buffer = va_arg(
args,
char*);
539 length = va_arg(
args,
int);
549 strncpy(buffer,
final, length - 1);
550 buffer[length - 1] =
'\0';
567 num = va_arg(
args,
int *);
588 face = va_arg(
args,
const char *);
589 error = va_arg(
args,
int);
590 num = va_arg(
args,
int *);
594 (*num) = f ? f->
number : 0;
609 txt = va_arg(
args,
const char *);
610 ret = va_arg(
args,
char **);
625 eventcode = va_arg(
args,
int);
626 pname = va_arg(
args,
char *);
645 eventcode = va_arg(
args,
int);
646 pname = va_arg(
args,
char *);
670 str = va_arg(
args,
const char *);
708 str = va_arg(
args,
const char *);
730 prepend_dir = va_arg(
args,
int);
731 ret = va_arg(
args,
int *);
753 regexp = va_arg(
args,
char *);
754 rv = va_arg(
args,
const char **);
769 dirtype = va_arg(
args,
int);
770 str = va_arg(
args,
const char **);
827 #define string_get_int(name) \
831 va_start(args, type); \
832 index = va_arg(args, int); \
833 str = va_arg(args, const char **); \
835 *str = name(index); \
836 *type = CFAPI_STRING; \
906 ob = va_arg(
args,
object *);
907 delay = va_arg(
args,
long);
908 mode = va_arg(
args,
int);
909 timer = va_arg(
args,
int *);
936 id = va_arg(
args,
int);
937 err = va_arg(
args,
int *);
984 ctype = va_arg(
args,
int);
988 x = va_arg(
args,
int);
989 y = va_arg(
args,
int);
996 x = va_arg(
args,
int);
1003 nx = va_arg(
args,
int);
1004 ny = va_arg(
args,
int);
1030 string = va_arg(
args,
char *);
1050 ctype = va_arg(
args,
int);
1051 str = va_arg(
args,
const char *);
1053 size = va_arg(
args,
int);
1091 property = va_arg(
args,
int);
1096 x = va_arg(
args,
int);
1097 y = va_arg(
args,
int);
1098 nx = va_arg(
args, int16_t *);
1099 ny = va_arg(
args, int16_t *);
1100 rint = va_arg(
args,
int *);
1106 rint = va_arg(
args,
int *);
1119 *rstr =
map->tmpname;
1130 rint = va_arg(
args,
int *);
1131 *rint =
map->reset_time;
1136 rint = va_arg(
args,
int *);
1137 *rint =
map->reset_timeout;
1142 rint = va_arg(
args,
int *);
1143 *rint =
map->players;
1148 rint = va_arg(
args,
int *);
1149 *rint =
map->darkness;
1154 rint = va_arg(
args,
int *);
1160 rint = va_arg(
args,
int *);
1161 *rint =
map->height;
1166 rint = va_arg(
args,
int *);
1167 *rint =
map->enter_x;
1172 rint = va_arg(
args,
int *);
1173 *rint =
map->enter_y;
1196 rint = va_arg(
args,
int *);
1197 *rint =
map->unique;
1217 property = va_arg(
args,
int);
1221 buf = va_arg(
args,
const char *);
1246 x = va_arg(
args,
int);
1247 y = va_arg(
args,
int);
1248 rint = va_arg(
args,
int *);
1268 x = va_arg(
args,
int);
1269 y = va_arg(
args,
int);
1297 string = va_arg(
args,
const char *);
1320 x = va_arg(
args,
int);
1321 y = va_arg(
args,
int);
1322 robj = va_arg(
args,
object **);
1351 x = va_arg(
args,
int);
1352 y = va_arg(
args,
int);
1353 robj = va_arg(
args,
object **);
1375 change = va_arg(
args,
int);
1376 rint = va_arg(
args,
int *);
1408 kind = va_arg(
args,
int);
1411 op = va_arg(
args,
object *);
1414 ret = va_arg(
args,
int *);
1422 ret = va_arg(
args,
int *);
1428 op = va_arg(
args,
object *);
1429 ret = va_arg(
args,
int *);
1450 const char *keyname;
1455 op = va_arg(
args,
object *);
1456 keyname = va_arg(
args,
const char *);
1472 const char *keyname;
1479 op = va_arg(
args,
object *);
1480 keyname = va_arg(
args,
char *);
1482 add_key = va_arg(
args,
int);
1483 ret = va_arg(
args,
int *);
1513 op = va_arg(
args,
object *);
1514 property = va_arg(
args,
int);
1517 robject = va_arg(
args,
object **);
1518 *robject =
op->above;
1523 robject = va_arg(
args,
object **);
1524 *robject =
op->below;
1529 robject = va_arg(
args,
object **);
1530 *robject =
op->active_next;
1535 robject = va_arg(
args,
object **);
1536 *robject =
op->active_prev;
1541 robject = va_arg(
args,
object **);
1547 robject = va_arg(
args,
object **);
1553 robject = va_arg(
args,
object **);
1554 *robject =
op->head;
1559 robject = va_arg(
args,
object **);
1560 *robject =
op->container;
1571 rint = va_arg(
args,
int *);
1577 rbuffer = va_arg(
args,
char *);
1578 rbufsize = va_arg(
args,
int);
1585 *rsstring =
op->name_pl;
1591 *rsstring =
op->title;
1597 *rsstring =
op->race;
1603 *rsstring =
op->slaying;
1609 *rsstring =
op->skill;
1615 *rsstring =
op->msg;
1621 *rsstring =
op->lore;
1626 rint = va_arg(
args,
int *);
1632 rint = va_arg(
args,
int *);
1638 rfloat = va_arg(
args,
float *);
1639 *rfloat =
op->speed;
1644 rfloat = va_arg(
args,
float *);
1645 *rfloat =
op->speed_left;
1650 rint = va_arg(
args,
int *);
1656 rint = va_arg(
args,
int *);
1657 *rint =
op->direction;
1662 rint = va_arg(
args,
int *);
1668 rint = va_arg(
args,
int *);
1674 rint = va_arg(
args,
int *);
1675 *rint =
op->subtype;
1680 rint = va_arg(
args,
int *);
1681 *rint =
op->client_type;
1689 idx = va_arg(
args,
int);
1690 resist = va_arg(
args, int16_t *);
1691 *resist =
op->resist[idx];
1697 rint = va_arg(
args,
int *);
1698 *rint =
op->attacktype;
1703 rint = va_arg(
args,
int *);
1704 *rint =
op->path_attuned;
1709 rint = va_arg(
args,
int *);
1710 *rint =
op->path_repelled;
1715 rint = va_arg(
args,
int *);
1716 *rint =
op->path_denied;
1721 rint = va_arg(
args,
int *);
1722 *rint =
op->material;
1728 *rsstring =
op->materialname;
1733 rint = va_arg(
args,
int *);
1739 rlong = va_arg(
args,
long *);
1745 rint = va_arg(
args,
int *);
1751 rint = va_arg(
args,
int *);
1752 *rint =
op->last_heal;
1757 rint = va_arg(
args,
int *);
1758 *rint =
op->last_sp;
1763 rint = va_arg(
args,
int *);
1764 *rint =
op->last_grace;
1769 rint = va_arg(
args,
int *);
1770 *rint =
op->last_eat;
1775 rint = va_arg(
args,
int *);
1776 *rint =
op->invisible;
1781 rint = va_arg(
args,
int *);
1782 *rint =
op->pick_up;
1787 rint = va_arg(
args,
int *);
1788 *rint =
op->item_power;
1793 rint = va_arg(
args,
int *);
1794 *rint =
op->gen_sp_armour;
1799 rint = va_arg(
args,
int *);
1805 rint = va_arg(
args,
int *);
1806 *rint =
op->weight_limit;
1811 rint = va_arg(
args,
int *);
1812 *rint =
op->carrying;
1817 rint = va_arg(
args,
int *);
1818 *rint =
op->glow_radius;
1823 rint64 = va_arg(
args, int64_t *);
1824 *rint64 =
op->total_exp;
1829 robject = va_arg(
args,
object **);
1830 *robject =
op->current_weapon;
1835 robject = va_arg(
args,
object **);
1836 *robject =
op->enemy;
1841 robject = va_arg(
args,
object **);
1842 *robject =
op->attacked_by;
1847 rint = va_arg(
args,
int *);
1848 *rint =
op->run_away;
1853 robject = va_arg(
args,
object **);
1854 *robject =
op->chosen_skill;
1859 rint = va_arg(
args,
int *);
1865 rint = va_arg(
args,
int *);
1866 *rint =
op->move_status;
1871 rint = va_arg(
args,
int *);
1872 *rint =
op->attack_movement;
1877 robject = va_arg(
args,
object **);
1878 *robject =
op->spellitem;
1883 rdouble = va_arg(
args,
double *);
1884 *rdouble =
op->expmul;
1896 *rarch =
op->other_arch;
1902 *rsstring =
op->custom_name;
1907 rint = va_arg(
args,
int *);
1908 *rint =
op->anim_speed;
1913 rint = va_arg(
args,
int *);
1919 rbuffer = va_arg(
args,
char *);
1920 rbufsize = va_arg(
args,
int);
1928 i = va_arg(
args,
int);
1929 rbuffer = va_arg(
args,
char *);
1930 rbufsize = va_arg(
args,
int);
1938 *rsstring =
op->name;
1943 rint = va_arg(
args,
int *);
1949 rint = va_arg(
args,
int *);
1950 *rint =
op->stats.luck;
1955 rint64 = va_arg(
args, int64_t *);
1956 *rint64 =
op->stats.exp;
1961 robject = va_arg(
args,
object **);
1969 stype = va_arg(
args,
int);
1971 unsigned char ptype;
1976 ptype = (
unsigned char)(va_arg(
args,
int));
1977 robject = va_arg(
args,
object **);
1982 ptype = (
unsigned char)(va_arg(
args,
int));
1984 robject = va_arg(
args,
object **);
1990 robject = va_arg(
args,
object **);
1999 rint = va_arg(
args,
int *);
2007 op2 = va_arg(
args,
object *);
2008 rint = va_arg(
args,
int *);
2017 op2 = va_arg(
args,
object *);
2018 rint = va_arg(
args,
int *);
2027 fl = va_arg(
args,
int);
2028 rint = va_arg(
args,
int *);
2035 rint = va_arg(
args,
int *);
2036 *rint =
op->stats.Str;
2041 rint = va_arg(
args,
int *);
2042 *rint =
op->stats.Dex;
2047 rint = va_arg(
args,
int *);
2048 *rint =
op->stats.Con;
2053 rint = va_arg(
args,
int *);
2054 *rint =
op->stats.Wis;
2059 rint = va_arg(
args,
int *);
2060 *rint =
op->stats.Int;
2065 rint = va_arg(
args,
int *);
2066 *rint =
op->stats.Pow;
2071 rint = va_arg(
args,
int *);
2072 *rint =
op->stats.Cha;
2077 rint = va_arg(
args,
int *);
2078 *rint =
op->stats.wc;
2083 rint = va_arg(
args,
int *);
2084 *rint =
op->stats.ac;
2089 rint = va_arg(
args,
int *);
2090 *rint =
op->stats.hp;
2095 rint = va_arg(
args,
int *);
2096 *rint =
op->stats.sp;
2101 rint = va_arg(
args,
int *);
2102 *rint =
op->stats.grace;
2107 rint = va_arg(
args,
int *);
2108 *rint =
op->stats.food;
2113 rint = va_arg(
args,
int *);
2114 *rint =
op->stats.maxhp;
2119 rint = va_arg(
args,
int *);
2120 *rint =
op->stats.maxsp;
2125 rint = va_arg(
args,
int *);
2126 *rint =
op->stats.maxgrace;
2131 rint = va_arg(
args,
int *);
2132 *rint =
op->stats.dam;
2144 *rsstring =
op->arch->name;
2149 rint = va_arg(
args,
int *);
2150 *rint =
op->invisible;
2156 if (
op->face != NULL) {
2157 (*rsstring) =
op->face->name;
2167 if (
op->animation != NULL) {
2168 (*rsstring) =
op->animation->name;
2178 *rsstring =
op->contr->socket.host;
2183 robject = va_arg(
args,
object **);
2190 *rparty = (
op->contr ?
op->contr->party : NULL);
2195 robject = va_arg(
args,
object **);
2197 *robject =
op->contr->next ?
op->contr->next->ob : NULL;
2205 rbuffer = va_arg(
args,
char *);
2206 rbufsize = va_arg(
args,
int);
2212 robject = va_arg(
args,
object **);
2213 *robject =
op->contr->transport;
2219 *rmove =
op->move_type;
2225 *rmove =
op->move_block;
2231 *rmove =
op->move_allow;
2237 *rmove =
op->move_on;
2243 *rmove =
op->move_off;
2249 *rmove =
op->move_type;
2254 rfloat = va_arg(
args,
float *);
2255 *rfloat =
op->move_slow_penalty;
2260 rbuffer = va_arg(
args,
char *);
2261 rbufsize = va_arg(
args,
int);
2262 strlcpy(rbuffer,
op->contr->savebed_map, rbufsize);
2267 rint = va_arg(
args,
int *);
2268 *rint =
op->contr->bed_x;
2273 rint = va_arg(
args,
int *);
2274 *rint =
op->contr->bed_y;
2279 rint = va_arg(
args,
int *);
2280 *rint =
op->duration;
2302 if (strlen(
msg) == 0) {
2331 op = va_arg(
args,
object *);
2332 property = va_arg(
args,
int);
2335 if (
op != NULL && (!
op->arch || (
op != &
op->arch->clone))) {
2338 sarg = va_arg(
args,
char *);
2345 sarg = va_arg(
args,
char *);
2352 sarg = va_arg(
args,
char *);
2358 sarg = va_arg(
args,
char *);
2364 sarg = va_arg(
args,
char *);
2370 sarg = va_arg(
args,
char *);
2376 sarg = va_arg(
args,
char *);
2382 sarg = va_arg(
args,
char *);
2388 farg = va_arg(
args,
double);
2390 if (farg !=
op->speed) {
2397 farg = va_arg(
args,
double);
2399 op->speed_left = farg;
2403 iarg = va_arg(
args,
int);
2407 if (
op->nrof > (uint32_t)iarg)
2409 else if (
op->nrof < (uint32_t)iarg) {
2414 if (
op->env != NULL) {
2433 tmp->contr->socket.update_look = 1;
2440 iarg = va_arg(
args,
int);
2442 op->direction = iarg;
2446 iarg = va_arg(
args,
int);
2452 int iargbis = va_arg(
args,
int);
2455 iarg = va_arg(
args,
int);
2456 op->resist[iargbis] = iarg;
2461 iarg = va_arg(
args,
int);
2463 op->attacktype = iarg;
2467 iarg = va_arg(
args,
int);
2469 op->path_attuned = iarg;
2473 iarg = va_arg(
args,
int);
2475 op->path_repelled = iarg;
2479 iarg = va_arg(
args,
int);
2481 op->path_denied = iarg;
2485 iarg = va_arg(
args,
int);
2487 op->material = iarg;
2494 iarg = va_arg(
args,
int);
2500 larg = va_arg(
args,
long);
2506 iarg = va_arg(
args,
int);
2513 iarg = va_arg(
args,
int);
2515 op->last_heal = iarg;
2519 iarg = va_arg(
args,
int);
2525 iarg = va_arg(
args,
int);
2527 op->last_grace = iarg;
2531 iarg = va_arg(
args,
int);
2533 op->last_eat = iarg;
2537 iarg = va_arg(
args,
int);
2539 op->invisible = iarg;
2543 iarg = va_arg(
args,
int);
2549 iarg = va_arg(
args,
int);
2551 op->item_power = iarg;
2555 iarg = va_arg(
args,
int);
2557 op->gen_sp_armour = iarg;
2561 iarg = va_arg(
args,
int);
2563 if (
op->weight != iarg) {
2568 if (
op->env != NULL) {
2594 iarg = va_arg(
args,
int);
2596 op->weight_limit = iarg;
2600 iarg = va_arg(
args,
int);
2602 if (
op->glow_radius != iarg) {
2605 op->glow_radius = iarg;
2607 if (
tmp->map != NULL) {
2616 s64arg = va_arg(
args, int64_t);
2618 op->total_exp = s64arg;
2622 oparg = va_arg(
args,
object *);
2628 iarg = va_arg(
args,
int);
2630 op->run_away = iarg;
2634 oparg = va_arg(
args,
object *);
2636 op->chosen_skill = oparg;
2640 iarg = va_arg(
args,
int);
2646 iarg = va_arg(
args,
int);
2648 op->move_status = iarg;
2652 iarg = va_arg(
args,
int);
2654 op->attack_movement = iarg;
2658 oparg = va_arg(
args,
object *);
2660 op->spellitem = oparg;
2664 darg = va_arg(
args,
double);
2670 sarg = va_arg(
args,
char *);
2677 iarg = va_arg(
args,
int);
2679 op->anim_speed = iarg;
2683 iarg = va_arg(
args,
int);
2692 iarg = va_arg(
args,
int);
2694 op->stats.luck = iarg;
2698 s64arg = va_arg(
args, int64_t);
2700 op->stats.exp = s64arg;
2704 oparg = va_arg(
args,
object *);
2717 iarg = va_arg(
args,
int);
2718 iargbis = va_arg(
args,
int);
2729 iarg = va_arg(
args,
int);
2731 op->stats.Str = iarg;
2735 iarg = va_arg(
args,
int);
2737 op->stats.Dex = iarg;
2741 iarg = va_arg(
args,
int);
2743 op->stats.Con = iarg;
2747 iarg = va_arg(
args,
int);
2749 op->stats.Wis = iarg;
2753 iarg = va_arg(
args,
int);
2755 op->stats.Int = iarg;
2759 iarg = va_arg(
args,
int);
2761 op->stats.Pow = iarg;
2765 iarg = va_arg(
args,
int);
2767 op->stats.Cha = iarg;
2771 iarg = va_arg(
args,
int);
2773 op->stats.wc = iarg;
2777 iarg = va_arg(
args,
int);
2779 op->stats.ac = iarg;
2783 iarg = va_arg(
args,
int);
2785 op->stats.hp = iarg;
2789 iarg = va_arg(
args,
int);
2791 op->stats.sp = iarg;
2795 iarg = va_arg(
args,
int);
2797 op->stats.grace = iarg;
2801 iarg = va_arg(
args,
int);
2803 op->stats.food = iarg;
2807 iarg = va_arg(
args,
int);
2809 op->stats.maxhp = iarg;
2813 iarg = va_arg(
args,
int);
2815 op->stats.maxsp = iarg;
2819 iarg = va_arg(
args,
int);
2821 op->stats.maxgrace = iarg;
2825 iarg = va_arg(
args,
int);
2827 op->stats.dam = iarg;
2832 sarg = va_arg(
args,
char *);
2833 ret = va_arg(
args,
int *);
2848 sarg = va_arg(
args,
char *);
2849 ret = va_arg(
args,
int *);
2864 iarg = va_arg(
args,
int);
2866 op->duration = iarg;
2871 oparg = va_arg(
args,
object *);
2873 op->contr->mark = oparg;
2875 op->contr->mark_count = oparg->
count;
2877 op->contr->mark_count = 0;
2891 sarg = va_arg(
args,
char *);
2897 iarg = va_arg(
args,
int);
2899 op->contr->bed_x = iarg;
2903 iarg = va_arg(
args,
int);
2905 op->contr->bed_y = iarg;
2909 sarg = va_arg(
args,
char *);
2975 applier = va_arg(
args,
object *);
2998 applier = va_arg(
args,
object *);
2999 applied = va_arg(
args,
object *);
3000 aflags = va_arg(
args,
int);
3001 ret = va_arg(
args,
int *);
3020 op = va_arg(
args,
object *);
3043 op = va_arg(
args,
object *);
3044 owner = va_arg(
args,
object *);
3045 desc = va_arg(
args,
char *);
3046 size = va_arg(
args,
int);
3051 strncpy(desc,
final, size);
3052 desc[size - 1] =
'\0';
3064 op = va_arg(
args,
object *);
3065 ds = va_arg(
args,
int);
3082 op = va_arg(
args,
object *);
3099 op = va_arg(
args,
object *);
3117 op = va_arg(
args,
object *);
3118 skillname = va_arg(
args,
char *);
3134 op = va_arg(
args,
object *);
3135 chg = va_arg(
args,
object *);
3149 op = va_arg(
args,
object *);
3152 LOG(
llevError,
"Plugin trying to remove removed object %s\n",
op->name);
3170 op = va_arg(
args,
object *);
3173 LOG(
llevError,
"Plugin trying to free freed/non removed object %s\n",
op->name);
3199 op = va_arg(
args,
object *);
3200 kind = va_arg(
args,
int);
3201 robj = va_arg(
args,
object **);
3228 ival = va_arg(
args,
int);
3233 robj = va_arg(
args,
object **);
3241 sval = va_arg(
args,
const char *);
3242 robj = va_arg(
args,
object **);
3273 op = va_arg(
args,
object *);
3275 LOG(
llevError,
"cfapi_object_insert: called with NULL object!\n");
3280 LOG(
llevError,
"cfapi_object_insert: called with FREED object!\n");
3285 LOG(
llevError,
"cfapi_object_insert: called with not removed object %s!\n",
op->name);
3288 itype = va_arg(
args,
int);
3293 orig = va_arg(
args,
object *);
3294 flag = va_arg(
args,
int);
3295 x = va_arg(
args,
int);
3296 y = va_arg(
args,
int);
3297 robj = va_arg(
args,
object **);
3299 LOG(
llevError,
"cfapi_object_insert (0): called with NULL map, object %s!\n",
op->name);
3309 orig = va_arg(
args,
object *);
3310 flag = va_arg(
args,
int);
3311 robj = va_arg(
args,
object **);
3313 LOG(
llevError,
"cfapi_object_insert (1): called with NULL map, object %s!\n",
op->name);
3323 orig = va_arg(
args,
object *);
3324 flag = va_arg(
args,
int);
3325 x = va_arg(
args,
int);
3326 y = va_arg(
args,
int);
3327 robj = va_arg(
args,
object **);
3329 LOG(
llevError,
"cfapi_object_insert (0): called with NULL map, object %s!\n",
op->name);
3345 orig = va_arg(
args,
object *);
3346 robj = va_arg(
args,
object **);
3348 LOG(
llevError,
"cfapi_object_insert (3): called with NULL orig, object %s!\n",
op->name);
3357 LOG(
llevError,
"cfapi_object_insert (1): called with itype %d which is not valid, object %s!\n", itype,
op->name);
3380 op = va_arg(
args,
object *);
3381 nr = va_arg(
args,
int);
3383 size = va_arg(
args,
int);
3411 op = va_arg(
args,
object *);
3412 op2 = va_arg(
args,
object *);
3413 merge = va_arg(
args,
object **);
3433 op = va_arg(
args,
object *);
3434 op2 = va_arg(
args,
object *);
3435 rint = va_arg(
args,
int *);
3453 op = va_arg(
args,
object *);
3472 op = va_arg(
args,
object *);
3491 op = va_arg(
args,
object *);
3504 op = va_arg(
args,
object *);
3517 op1 = va_arg(
args,
object *);
3518 op2 = va_arg(
args,
object *);
3519 rint = va_arg(
args,
int *);
3532 trap = va_arg(
args,
object *);
3552 op = va_arg(
args,
object *);
3553 cause = va_arg(
args,
object *);
3554 rint = va_arg(
args,
int *);
3580 cause = va_arg(
args,
object *);
3598 op = va_arg(
args,
object *);
3599 rint = va_arg(
args,
int *);
3621 op = va_arg(
args,
object *);
3622 caster = va_arg(
args,
object *);
3623 dir = va_arg(
args,
int);
3624 sp = va_arg(
args,
object *);
3626 rint = va_arg(
args,
int *);
3646 op = va_arg(
args,
object *);
3647 sp = va_arg(
args,
object *);
3648 prayer = va_arg(
args,
int);
3661 op = va_arg(
args,
object *);
3662 sp = va_arg(
args,
object *);
3681 op = va_arg(
args,
object *);
3682 spellname = va_arg(
args,
char *);
3683 robj = va_arg(
args,
object **);
3701 op = va_arg(
args,
object *);
3702 amount = va_arg(
args, uint64_t);
3703 rint = va_arg(
args,
int *);
3723 tobuy = va_arg(
args,
object *);
3724 op = va_arg(
args,
object *);
3725 rint = va_arg(
args,
int *);
3742 int x,
y, randompos, ttype, flag;
3749 op = va_arg(
args,
object *);
3750 ttype = va_arg(
args,
int);
3753 x = va_arg(
args,
int);
3754 y = va_arg(
args,
int);
3755 randompos = va_arg(
args,
int);
3756 originator = va_arg(
args,
object *);
3757 rint = va_arg(
args,
int *);
3767 originator = va_arg(
args,
object *);
3768 flag = va_arg(
args,
int);
3769 x = va_arg(
args,
int);
3770 y = va_arg(
args,
int);
3771 robj = va_arg(
args,
object **);
3773 if (
x < 0 ||
y < 0) {
3783 x = va_arg(
args,
int);
3784 y = va_arg(
args,
int);
3785 rint = va_arg(
args,
int *);
3811 op = va_arg(
args,
object *);
3814 robj = va_arg(
args,
object **);
3817 if (*robj == NULL) {
3826 if (!strncmp(
tmp->name,
str, strlen(
str)))
3829 if (
tmp->slaying && !strcmp(
tmp->slaying,
str))
3845 who = va_arg(
args,
const object *);
3861 who = va_arg(
args,
const object *);
3881 op = va_arg(
args,
object *);
3891 author->contr->count = 0;
3892 author->contr->socket.update_look = 1;
3905 op = va_arg(
args,
object *);
3907 rint = va_arg(
args,
int *);
3922 op = va_arg(
args,
object *);
3924 rint = va_arg(
args,
int *);
3949 sval = va_arg(
args,
char *);
3968 pri = va_arg(
args,
int);
3969 pl = va_arg(
args,
object *);
3990 op = va_arg(
args,
object *);
3991 rlong = va_arg(
args, int64_t *);
4011 ob = va_arg(
args,
object *);
4012 exp = va_arg(
args, int64_t);
4013 skill = va_arg(
args,
const char *);
4014 flag = va_arg(
args,
int);
4032 pl = va_arg(
args,
object *);
4033 rint = va_arg(
args,
int *);
4052 what = va_arg(
args,
int);
4057 pl = va_arg(
args,
object *);
4059 rint = va_arg(
args,
int *);
4063 if (
pl->contr == NULL) {
4064 LOG(
llevError,
"cfapi_player_knowledge: 'has' called for non player object %s",
pl->name);
4074 pl = va_arg(
args,
object *);
4077 if (
pl->contr != NULL)
4083 LOG(
llevError,
"cfapi_player_knowledge: invalid what %d", what);
4104 x = va_arg(
args,
int);
4105 y = va_arg(
args,
int);
4120 what = va_arg(
args,
object *);
4138 prop = va_arg(
args,
int);
4143 *rsstring =
arch->name;
4155 *rarch =
arch->head;
4161 *rarch =
arch->more;
4166 robject = va_arg(
args,
object **);
4167 *robject = &
arch->clone;
4194 prop = va_arg(
args,
int);
4216 obarg = va_arg(
args,
object *);
4219 for (; *rplayer != NULL; (*rplayer) = (*rplayer)->
next)
4220 if ((*rplayer)->ob->contr->party == party) {
4248 prop = va_arg(
args,
int);
4252 *rsstring = reg->
name;
4276 *rsstring = reg->
msg;
4282 rint = va_arg(
args,
int*);
4317 ob = va_arg(
args,
object *);
4318 robject = va_arg(
args,
object **);
4343 buf = va_arg(
args,
const char *);
4344 ret = va_arg(
args,
int *);
4368 use_layout = va_arg(
args,
char **);
4386 op = va_arg(
args,
object *);
4388 third = va_arg(
args,
object *);
4390 fix = va_arg(
args,
int);
4391 ret = va_arg(
args,
int *);
4411 if (
player->contr == NULL) {
4412 LOG(
llevError,
"cfapi_player_quest called with non player object %s!\n",
player->name);
4426 int *ret = va_arg(
args,
int *);
4438 int *ret = va_arg(
args,
int*);
4453 const char *
name = NULL, *extra = NULL;
4457 uint8_t register_type, command_type;
4461 register_type = va_arg(
args,
int);
4463 if (register_type == 1) {
4466 extra = va_arg(
args,
const char *);
4469 command_type = (uint8_t)va_arg(
args,
int);
4473 time = va_arg(
args,
double);
4477 if (register_type == 1) {
4507 struct dirent *currentfile;
4512 snprintf(
buf,
sizeof(
buf),
"%s/plugins/", LIBDIR);
4516 if (plugdir == NULL)
4519 while ((currentfile =
readdir(plugdir)) != NULL) {
4520 l = strlen(currentfile->d_name);
4521 if (
l > strlen(PLUGIN_SUFFIX)) {
4525 if (strcmp(currentfile->d_name+
l-strlen(PLUGIN_SUFFIX), PLUGIN_SUFFIX) != 0)
4529 if (strcmp(disable->
name,
"All") == 0) {
4530 LOG(
llevInfo,
"plugins: disabling (all) %s\n", currentfile->d_name);
4534 if (strncmp(disable->
name, currentfile->d_name, strlen(disable->
name)) == 0 && strlen(currentfile->d_name) == strlen(PLUGIN_SUFFIX) + strlen(disable->
name)) {
4535 LOG(
llevInfo,
"plugins: disabling %s\n", currentfile->d_name);
4539 disable = disable->
next;
4542 snprintf(
buf,
sizeof(
buf),
"%s/plugins/%s", LIBDIR, currentfile->d_name);
4543 LOG(
llevInfo,
"plugins: loading %s\n", currentfile->d_name);
const char * get_month_name(const int index)
static void cfapi_object_learn_spell(int *type,...)
#define GET_MAP_OB(M, X, Y)
static void cfapi_map_has_been_loaded(int *type,...)
mapstruct * ready_map_name(const char *name, int flags)
#define CFAPI_OBJECT_PROP_TITLE
static void cfapi_player_message(int *type,...)
int cftimer_find_free_id(void)
#define FREE_OBJ_NO_DESTROY_CALLBACK
#define CFAPI_OBJECT_PROP_X
void plugins_display_list(object *op)
void object_free(object *ob, int flags)
static void cfapi_player_quest(int *type,...)
sstring add_string(const char *str)
int(* f_plug_postinit)(void)
void object_remove(object *op)
void remove_friendly_object(object *op)
signed long object_sum_weight(object *op)
#define CFAPI_OBJECT_PROP_CHA
void object_set_enemy(object *op, object *enemy)
static void cfapi_object_create(int *type,...)
#define CFAPI_MAP_PROP_TMPNAME
#define CFAPI_OBJECT_PROP_ARCH_NAME
static void cfapi_get_hooks(int *type,...)
#define CFAPI_OBJECT_PROP_ATTACK_MOVEMENT
static void cfapi_object_remove(int *type,...)
static void cfapi_object_perm_exp(int *type,...)
void command_say(object *op, const char *params)
#define CFAPI_PARTY_PROP_NAME
void object_reset(object *op)
static void cfapi_object_cast(int *type,...)
void monster_npc_say(object *npc, const char *cp)
int check_path(const char *name, int prepend_dir)
object * object_create_clone(object *asrc)
#define CFAPI_MAP_PROP_RESET_TIME
f_plug_postinit closefunc
#define CFAPI_MAP_PROP_RESET_TIMEOUT
#define CFAPI_REGION_PROP_LONGNAME
static void cfapi_object_delete(int *type,...)
#define CFAPI_OBJECT_PROP_LEVEL
static void cfapi_object_query_money(int *type,...)
#define CFAPI_PLAYER_PROP_BED_X
void object_update(object *op, int action)
static void cfapi_object_insert(int *type,...)
#define QUERY_FLAG(xyz, p)
#define CFAPI_REGION_PROP_NEXT
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
archetype * get_next_archetype(archetype *current)
void clean_object(object *op)
#define CFAPI_MAP_PROP_NEXT
static void cfapi_system_strdup_local(int *type,...)
void do_learn_spell(object *op, object *spell, int special_prayer)
uint8_t ignore_plugin_compatibility
static void cfapi_map_out_of_map(int *type,...)
object * get_next_friend(object *current)
int out_of_map(mapstruct *m, int x, int y)
#define CFAPI_OBJECT_PROP_SLAYING
#define CFAPI_OBJECT_PROP_DEX
#define CFAPI_OBJECT_PROP_FRIENDLY
object * object_new(void)
#define CFAPI_OBJECT_PROP_ARCHETYPE
static void cfapi_object_change_abil(int *type,...)
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
int calculate_difficulty(mapstruct *m)
void events_unregister_object_handler(const char *id)
#define CFAPI_OBJECT_PROP_BASE_NAME
object * object_find_by_arch_name(const object *who, const char *name)
#define CFAPI_OBJECT_PROP_LAST_EAT
int object_distance(const object *ob1, const object *ob2)
#define CFAPI_OBJECT_PROP_MOVE_ON
void spring_trap(object *trap, object *victim)
const char * get_periodofday(const int index)
#define CFAPI_OBJECT_PROP_STR
int set_random_map_variable(RMParms *rp, const char *buf)
void quest_set_player_state(player *pl, sstring quest_code, int state)
object * arch_present_in_ob(const archetype *at, const object *op)
#define CFAPI_OBJECT_PROP_GOD
#define CFAPI_OBJECT_PROP_NEXT_ACTIVE_OB
static void cfapi_player_find(int *type,...)
#define CFAPI_PLAYER_PROP_MARKED_ITEM
#define SET_ANIMATION(ob, newanim)
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)
#define CFAPI_ARCH_PROP_NEXT
static void cfapi_get_time(int *type,...)
char * create_pathname(const char *name, char *buf, size_t size)
static void cfapi_object_say(int *type,...)
int object_can_merge(object *ob1, object *ob2)
#define CFAPI_OBJECT_PROP_Y
#define CFAPI_OBJECT_PROP_ENEMY
static void cfapi_object_drain(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_TYPE
static void cfapi_unregister_command(int *type,...)
#define CFAPI_OBJECT_PROP_FACE
#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_)
static void send_changed_object(object *op)
static const flag_definition flags[]
#define CFAPI_OBJECT_PROP_PRESENT
void player_set_own_title(struct pl *pl, const char *title)
#define CFAPI_REGION_PROP_JAIL_PATH
#define CFAPI_MAP_PROP_WIDTH
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
const char * re_cmp(const char *, const char *)
#define CFAPI_ARCH_PROP_NAME
#define CFAPI_OBJECT_PROP_ITEM_POWER
#define CFAPI_MAP_PROP_UNIQUE
static void cfapi_object_check_trigger(int *type,...)
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
static void cfapi_friendlylist_get_next(int *type,...)
int(* f_plug_init)(const char *iversion, f_plug_api gethooksptr)
static void cfapi_object_remove_depletion(int *type,...)
EXTERN mapstruct * first_map
int apply_manual(object *op, object *tmp, int aflag)
void apply_by_living_below(object *pl)
#define CFAPI_OBJECT_PROP_CURRENT_WEAPON
static void cfapi_object_spring_trap(int *type,...)
static void cfapi_register_command(int *type,...)
static void cfapi_object_clean_object(int *type,...)
static void cfapi_object_user_event(int *type,...)
static void cfapi_map_update_position(int *type,...)
static void cfapi_system_unregister_global_event(int *type,...)
#define CFAPI_MAP_PROP_ENTER_X
short freearr_x[SIZEOFFREE]
static void cfapi_object_forget_spell(int *type,...)
#define CFAPI_OBJECT_PROP_INVISIBLE
short freearr_y[SIZEOFFREE]
#define plugins_dlerror()
struct _crossfire_plugin * next
static void cfapi_object_give_skill(int *type,...)
static void cfapi_system_directory(int *type,...)
static void cfapi_player_can_pay(int *type,...)
#define CFAPI_OBJECT_PROP_SKILL
event_registration events_register_global_handler(int eventcode, f_plug_event hook)
#define CFAPI_OBJECT_PROP_CLIENT_TYPE
void party_join(object *op, partylist *party)
object * object_merge(object *op, object *top)
event_registration global_registration[NR_EVENTS]
const char * object_get_value(const object *op, const char *const key)
#define MSG_TYPE_COMMAND_DEBUG
#define CFAPI_OBJECT_PROP_PATH_DENIED
object * identify(object *op)
#define CFAPI_MAP_PROP_REGION
void free_string(sstring str)
static void cfapi_object_move(int *type,...)
static void cfapi_map_find_by_archetype_name(int *type,...)
int plugins_init_plugin(const char *libfile)
#define CFAPI_OBJECT_PROP_ANIM_SPEED
static event_registration m
#define CFAPI_OBJECT_PROP_AC
void events_register_object_handler(const char *id, f_plug_event handler)
static void cfapi_map_get_object_at(int *type,...)
partylist * party_get_first(void)
static void cfapi_system_re_cmp(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
int change_map_light(mapstruct *m, int change)
void command_unregister(command_registration command)
void get_tod(timeofday_t *tod)
const char * determine_god(object *op)
int is_friendly(const object *op)
#define CFAPI_OBJECT_PROP_CHOSEN_SKILL
#define CFAPI_OBJECT_PROP_HP
#define CFAPI_OBJECT_PROP_MAXHP
void drop(object *op, object *tmp)
static void cfapi_object_describe(int *type,...)
#define CFAPI_OBJECT_PROP_OB_BELOW
#define CFAPI_OBJECT_PROP_HIDDEN
#define CFAPI_OBJECT_PROP_CARRYING
#define CFAPI_OBJECT_PROP_TOTAL_EXP
void object_copy(const object *src_ob, object *dest_ob)
int move_ob(object *op, int dir, object *originator)
int cftimer_destroy(int id)
#define CFAPI_PLAYER_PROP_BED_Y
void query_name(const object *op, char *buf, size_t size)
int plugins_remove_plugin(const char *id)
#define CFAPI_OBJECT_PROP_GEN_SP_ARMOUR
#define CFAPI_REGION_PROP_JAIL_Y
#define CFAPI_OBJECT_PROP_CHEATER
static void cfapi_map_create_path(int *type,...)
#define FOR_ABOVE_FINISH()
void events_unregister_global_handler(int eventcode, event_registration id)
#define CFAPI_MAP_PROP_MESSAGE
static void cfapi_map_change_light(int *type,...)
#define CFAPI_OBJECT_PROP_RACE
void(* f_plug_api)(int *type,...)
int remove_depletion(object *op, int level)
static void cfapi_party_get_property(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_BLOCK
#define CFAPI_OBJECT_PROP_FACING
static void cfapi_object_pay_amount(int *type,...)
#define CFAPI_OBJECT_PROP_WEIGHT
static void cfapi_object_distance(int *type,...)
int object_can_pick(const object *who, const object *item)
#define CFAPI_OBJECT_PROP_RESIST
static void cfapi_system_find_string(int *type,...)
#define CFAPI_PLAYER_PROP_IP
void object_clear(object *op)
#define CFAPI_OBJECT_PROP_DAM
static void cfapi_object_fix(int *type,...)
static void cfapi_object_find_archetype_inside(int *type,...)
struct dirent * readdir(DIR *)
static void cfapi_map_message(int *type,...)
static void cfapi_object_get_property(int *type,...)
sstring find_string(const char *str)
void query_short_name(const object *op, char *buf, size_t size)
object * object_present_in_ob(uint8_t type, const object *op)
struct _crossfire_plugin * prev
void transmute_materialname(object *op, const object *change)
#define FREE_AND_COPY(sv, nv)
EXTERN player * first_player
#define CFAPI_OBJECT_PROP_PATH_ATTUNED
int events_execute_object_user(object *op, object *activator, object *third, const char *message, int fix)
static void cfapi_object_apply(int *type,...)
#define CFAPI_ARCH_PROP_CLONE
#define CFAPI_OBJECT_PROP_EXP
#define SET_MAP_FLAGS(M, X, Y, C)
#define CFAPI_OBJECT_PROP_SPEED
void fix_object(object *op)
#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
char * stringbuffer_finish(StringBuffer *sb)
static void cfapi_map_get_map(int *type,...)
static void cfapi_object_transfer(int *type,...)
int is_magical(const object *op)
struct linked_char * next
#define CFAPI_OBJECT_PROP_CUSTOM_NAME
#define CFAPI_OBJECT_PROP_PICKABLE
static void cfapi_system_register_global_event(int *type,...)
int object_set_value(object *op, const char *key, const char *value, int add_key)
const typedef char * sstring
#define CFAPI_PLAYER_QUEST_START
#define CFAPI_REGION_PROP_NAME
static void cfapi_object_clone(int *type,...)
#define CFAPI_OBJECT_PROP_INVISIBLE_TIME
#define CFAPI_OBJECT_PROP_ATTACK_TYPE
int move_to(object *op, int x, int y)
#define CFAPI_REGION_PROP_JAIL_X
void free_dialog_information(object *op)
static void cfapi_archetype_get_property(int *type,...)
static void cfapi_object_split(int *type,...)
static void cfapi_map_set_map_property(int *type,...)
const Face * get_face_by_id(uint16_t id)
static void cfapi_object_update(int *type,...)
static void cfapi_object_change_exp(int *type,...)
#define CFAPI_OBJECT_PROP_OWNER
void delete_map(mapstruct *m)
static void cfapi_timer_destroy(int *type,...)
void create_overlay_pathname(const char *name, char *buf, size_t size)
#define CFAPI_OBJECT_PROP_NAME_PLURAL
#define CFAPI_PARTY_PROP_NEXT
void object_set_owner(object *op, object *owner)
size_t strlcpy(char *dst, const char *src, size_t size)
static const hook_entry plug_hooks[]
#define CFAPI_MAP_PROP_NAME
#define COMMAND_TYPE_WIZARD
#define CFAPI_OBJECT_PROP_WIS
#define CFAPI_OBJECT_PROP_POW
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
static void cfapi_object_identify(int *type,...)
#define CFAPI_REGION_PROP_MESSAGE
static void cfapi_object_reset(int *type,...)
static void cfapi_cost_string_from_value(int *type,...)
Animations * try_find_animation(const char *name)
partylist * party_get_next(const partylist *party)
static void cfapi_object_check_spell(int *type,...)
static void cfapi_object_set_key(int *type,...)
static void cfapi_object_transmute(int *type,...)
#define CFAPI_OBJECT_PROP_CONTAINER
#define CFAPI_OBJECT_PROP_INVENTORY
#define CFAPI_OBJECT_PROP_MAP
#define CFAPI_MAP_PROP_FLAGS
void object_set_msg(object *op, const char *msg)
#define CFAPI_MAP_PROP_DARKNESS
#define CFAPI_MAP_PROP_PLAYERS
#define CFAPI_OBJECT_PROP_RUN_AWAY
#define PERM_EXP(exptotal)
linked_char * disabled_plugins
#define CFAPI_PLAYER_PROP_TRANSPORT
crossfire_plugin * plugins_list
#define CFAPI_PARTY_PROP_PLAYER
#define CFAPI_PLAYER_QUEST_GET_STATE
static void cfapi_log(int *type,...)
#define CFAPI_MAP_PROP_DIFFICULTY
archetype * find_archetype_by_object_name(const char *name)
struct regiondef * parent
static void cfapi_object_merge(int *type,...)
#define CFAPI_OBJECT_PROP_ANIMATION
#define CFAPI_OBJECT_PROP_INT
#define CFAPI_OBJECT_PROP_SP
const char * party_get_password(const partylist *party)
static void cfapi_system_find_face(int *type,...)
void add_friendly_object(object *op)
#define CFAPI_PLAYER_QUEST_SET_STATE
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
#define CFAPI_OBJECT_PROP_NAME
#define CFAPI_OBJECT_PROP_EXP_MULTIPLIER
static void cfapi_map_trigger_connected(int *type,...)
static void cfapi_get_weekday_name(int *type,...)
void LOG(LogLevel logLevel, const char *format,...)
#define CFAPI_OBJECT_PROP_PREV_ACTIVE_OB
static void cfapi_system_remove_string(int *type,...)
#define CFAPI_OBJECT_PROP_HEAD
object * check_spell_known(object *op, const char *name)
int(* f_plug_event)(int *type,...)
void object_set_cheat(object *op)
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
const char * get_season_name(const int index)
int pay_for_item(object *op, object *pl, uint64_t reduction)
#define CFAPI_PLAYER_PROP_BED_MAP
#define CFAPI_OBJECT_PROP_WC
#define plugins_dlsym(lib, name)
#define CFAPI_OBJECT_PROP_GLOW_RADIUS
uint64_t query_money(const object *op)
static void cfapi_object_get_key(int *type,...)
void esrv_update_item(int flags, object *pl, object *op)
#define CFAPI_OBJECT_PROP_PATH_REPELLED
void query_base_name(const object *op, int plural, char *buf, size_t size)
#define CFAPI_OBJECT_PROP_CON
static void copy_message(object *op, const char *msg)
#define CLEAR_FLAG(xyz, p)
#define CFAPI_OBJECT_PROP_GP
#define CFAPI_OBJECT_PROP_MAGICAL
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
#define CFAPI_OBJECT_PROP_LAST_SP
object * object_insert_in_ob(object *op, object *where)
int player_arrest(object *who)
static void cfapi_get_season_name(int *type,...)
void update_all_los(const mapstruct *map, int x, int y)
player * find_player_partial_name(const char *plname)
void object_update_speed(object *op)
#define CFAPI_OBJECT_PROP_MATERIAL
#define CFAPI_OBJECT_PROP_DURATION
static void cfapi_object_find_by_name(int *type,...)
#define CFAPI_OBJECT_PROP_MOVE_STATUS
object * object_get_env_recursive(object *op)
#define CFAPI_OBJECT_PROP_OTHER_ARCH
static void cfapi_system_find_animation(int *type,...)
#define CFAPI_OBJECT_PROP_OB_ABOVE
int knowledge_player_knows(const player *pl, const char *knowledge)
#define CFAPI_MAP_PROP_ENTER_Y
static void cfapi_object_teleport(int *type,...)
void quest_start(player *pl, sstring quest_code, int state)
#define CFAPI_OBJECT_PROP_LAST_HEAL
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
#define CFAPI_OBJECT_PROP_MOVE_ALLOW
void knowledge_give(player *pl, const char *marker, const object *book)
region * get_region_by_map(mapstruct *m)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
#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)
void object_free_drop_inventory(object *ob)
void update_position(mapstruct *m, int x, int y)
static void cfapi_object_on_same_map(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)
static void cfapi_object_clear(int *type,...)
archetype * try_find_archetype(const char *name)
static crossfire_plugin * plugins_find_plugin(const char *id)
#define CFAPI_OBJECT_PROP_MOVE_SLOW
#define CFAPI_OBJECT_PROP_MERGEABLE
void cleanupPlugins(void)
static void cfapi_get_month_name(int *type,...)
const Face * try_find_face(const char *name, const Face *error)
void do_forget_spell(object *op, const char *spell)
static void cfapi_object_apply_below(int *type,...)
uint64_t command_registration
static void cfapi_generate_random_map(int *type,...)
static void cfapi_object_pay_item(int *type,...)
static void cfapi_object_find_by_arch_name(int *type,...)
#define CFAPI_OBJECT_PROP_MAGIC
static void cfapi_player_knowledge(int *type,...)
object * object_decrease_nrof(object *op, uint32_t i)
#define CFAPI_OBJECT_PROP_FLAGS
#define CFAPI_OBJECT_PROP_LUCK
static void cfapi_object_drop(int *type,...)
const char * get_weekday(const int index)
#define CFAPI_MAP_PROP_HEIGHT
int object_teleport(object *op, mapstruct *map, int x, int y)
object * object_find_by_name(const object *who, const char *name)
static void cfapi_object_set_property(int *type,...)
command_registration command_register_extra(const char *name, const char *extra, uint8_t type, command_function_extra func, float time)
static std::vector< std::string > split(const std::string &field, const std::string &by)
#define CFAPI_OBJECT_PROP_VALUE
static void cfapi_set_random_map_variable(int *type,...)
#define CFAPI_OBJECT_PROP_MESSAGE
#define CFAPI_OBJECT_PROP_MOVE_SLOW_PENALTY
#define string_get_int(name)
#define CFAPI_OBJECT_PROP_MAXGP
#define CFAPI_OBJECT_PROP_COUNT
#define CFAPI_OBJECT_PROP_SUBTYPE
#define CFAPI_PLAYER_QUEST_WAS_COMPLETED
static void cfapi_region_get_property(int *type,...)
object * give_skill_by_name(object *op, const char *skill_name)
void(* command_function)(object *op, const char *params)
#define plugins_dlclose(lib)
static void cfapi_map_get_map_property(int *type,...)
void player_get_title(const struct pl *pl, char *buf, size_t bufsize)
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
object * object_get_player_container(object *op)
int change_abil(object *op, object *tmp)
void drain_specific_stat(object *op, int deplete_stats)
int pay_for_amount(uint64_t to_pay, object *pl)
EXTERN region * first_region
void pick_up(object *op, object *alt)
mapstruct * get_empty_map(int sizex, int sizey)
int on_same_map(const object *op1, const object *op2)
#define CFAPI_OBJECT_PROP_FP
static void cfapi_get_periodofday_name(int *type,...)
static void cfapi_object_pickup(int *type,...)
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
object * find_marked_object(object *op)
#define FOR_INV_PREPARE(op_, it_)
#define CFAPI_PARTY_PROP_PASSWORD
#define CFAPI_OBJECT_PROP_LAST_GRACE
void *(* f_plug_property)(int *type,...)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)
static void cfapi_system_add_string(int *type,...)
#define CFAPI_PLAYER_PROP_NEXT
static void cfapi_timer_create(int *type,...)
#define CFAPI_OBJECT_PROP_DIRECTION
#define CFAPI_OBJECT_PROP_SHORT_NAME
static void cfapi_system_check_path(int *type,...)
#define CFAPI_OBJECT_PROP_MATERIAL_NAME
#define plugins_dlopen(fname)
char * cost_string_from_value(uint64_t cost, int largest_coin)
#define CFAPI_OBJECT_PROP_WEIGHT_LIMIT
mapstruct * has_been_loaded(const char *name)
#define CFAPI_OBJECT_PROP_SPEED_LEFT
int quest_get_player_state(player *pl, sstring quest_code)
static void cfapi_map_delete_map(int *type,...)
int cftimer_create(int id, long delay, object *ob, int mode)
object * object_get_owner(object *op)