Crossfire Server, Trunk  R20513
plugin_common.h
Go to the documentation of this file.
1 /*****************************************************************************/
2 /* Crossfire Plugin Interface Common Parts */
3 /* Version: 2.0beta8 (also known as "Alexander") */
4 /* Contact: yann.chachkoff@myrealbox.com */
5 /*****************************************************************************/
6 /* That code is placed under the GNU General Public Licence (GPL) */
7 /* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
8 /*****************************************************************************/
9 /* CrossFire, A Multiplayer game for X-windows */
10 /* */
11 /* Copyright (C) 2000 Mark Wedel */
12 /* Copyright (C) 1992 Frank Tore Johansen */
13 /* */
14 /* This program is free software; you can redistribute it and/or modify */
15 /* it under the terms of the GNU General Public License as published by */
16 /* the Free Software Foundation; either version 2 of the License, or */
17 /* (at your option) any later version. */
18 /* */
19 /* This program is distributed in the hope that it will be useful, */
20 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
21 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
22 /* GNU General Public License for more details. */
23 /* */
24 /* You should have received a copy of the GNU General Public License */
25 /* along with this program; if not, write to the Free Software */
26 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
27 /* */
28 /*****************************************************************************/
29 #ifndef PLUGIN_COMMON_H
30 #define PLUGIN_COMMON_H
31 
32 #ifdef WIN32
33 #define CF_PLUGIN __declspec(dllexport)
34 #else
35 #ifdef HAVE_VISIBILITY
36 #define CF_PLUGIN __attribute__((visibility("default")))
37 #else
38 #define CF_PLUGIN
39 #endif
40 #endif
41 
42 #include <plugin.h>
43 
44 #define PLUGIN_ERROR_INT 0x0FFFFF
45 
46 extern int cf_init_plugin(f_plug_api getHooks);
47 extern void cf_system_register_global_event(int event, const char *name, f_plug_event hook);
48 extern void cf_system_unregister_global_event(int event, const char *name);
49 
50 /* General functions */
51 extern sstring cf_add_string(const char *str);
52 extern void cf_free_string(sstring str);
53 extern sstring cf_find_string(const char *str);
54 extern char *cf_strdup_local(const char *str);
55 extern char *cf_get_maps_directory(const char *name, char *buf, int size);
56 extern int cf_find_animation(const char *txt);
57 extern int cf_find_face(const char *name, int error);
58 extern void cf_log(LogLevel logLevel, const char *format, ...);
59 extern void cf_log_plain(LogLevel logLevel, const char *message);
60 extern void cf_get_time(timeofday_t *tod);
61 extern int cf_timer_create(object *ob, long delay, int mode);
62 extern int cf_timer_destroy(int id);
63 extern const char *cf_get_directory(int id);
64 extern const char *cf_re_cmp(const char *str, const char *regexp);
65 extern const char *cf_get_season_name(int index);
66 extern const char *cf_get_month_name(int index);
67 extern const char *cf_get_weekday_name(int index);
68 extern const char *cf_get_periodofday_name(int index);
69 extern void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length);
70 
71 /* Objects */
72 extern void cf_object_set_int_property(object *op, int propcode, int value);
73 extern int cf_object_get_int_property(object *op, int propcode);
74 extern long cf_object_get_long_property(object *op, long propcode);
75 extern void cf_object_set_movetype_property(object *op, int propcode, MoveType value);
76 extern MoveType cf_object_get_movetype_property(object *op, int propcode);
77 extern object *cf_object_get_object_property(object *op, int propcode);
78 extern void cf_object_set_object_property(object *op, int propcode, object *value);
79 extern float cf_object_get_float_property(object *op, int propcode);
80 extern void cf_object_set_float_property(object *op, int propcode, float value);
81 extern mapstruct *cf_object_get_map_property(object *op, int propcode);
82 extern archetype *cf_object_get_archetype_property(object *op, int propcode);
83 extern partylist *cf_object_get_partylist_property(object *op, int propcode);
84 extern int64_t cf_object_get_int64_property(object *op, int propcode);
85 extern void cf_object_set_int64_property(object *op, int propcode, int64_t value);
86 extern double cf_object_get_double_property(object *op, int propcode);
87 extern sstring cf_object_get_sstring_property(object *op, int propcode);
88 extern char *cf_object_get_string_property(object *op, int propcode, char *buf, int size);
89 extern void cf_fix_object(object *op);
90 extern char *cf_query_name(object *ob, char *name, int size);
91 extern sstring cf_query_name_pl(object *ob);
92 extern char *cf_query_base_name(object *ob, int plural, char *name, int size);
93 extern const char *cf_object_get_msg(object *);
94 extern void cf_object_set_weight(object *ob, int weight);
95 extern int cf_object_get_weight(object *ob);
96 extern void cf_object_set_weight_limit(object *ob, int weight);
97 extern int cf_object_get_weight_limit(object *ob);
98 extern int cf_object_set_nrof(object *, int nrof);
99 extern int cf_object_get_nrof(object *);
100 extern int cf_object_get_flag(object *ob, int flag);
101 extern void cf_object_set_flag(object *ob, int flag, int value);
102 extern object *cf_object_insert_in_ob(object *op, object *where);
103 extern void cf_object_set_string_property(object *op, int propcode, const char *value);
104 extern void cf_spring_trap(object *trap, object *victim);
105 extern int cf_object_check_trigger(object *op, object *cause);
106 extern int cf_object_query_money(const object *op);
107 extern int cf_object_query_cost(const object *tmp, object *who, int flag);
108 extern void cf_object_query_cost_string(const object *tmp, object *who, int flag, char *buffer, int length);
109 extern int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg);
110 extern void cf_object_learn_spell(object *op, object *spell, int special_prayer);
111 extern void cf_object_forget_spell(object *op, object *sp);
112 extern object *cf_object_check_for_spell(object *op, const char *name);
113 extern int cf_object_cast_ability(object *caster, object *ctoo, int dir, object *sp, char *flags);
114 extern int cf_object_pay_amount(object *pl, uint64_t to_pay);
115 extern int cf_object_pay_item(object *op, object *pl);
116 extern void cf_object_set_long_property(object *op, int propcode, long value);
117 extern int cf_object_transfer(object *op, int x, int y, int randomly, object *originator);
118 extern int cf_object_move_to(object *op, int x, int y);
119 extern int cf_object_out_of_map(object *op, int x, int y);
120 extern void cf_object_drop(object *op, object *author);
121 extern void cf_object_say(object *op, char *msg);
122 extern object *cf_object_insert_object(object *op, object *container);
123 extern object *cf_object_present_archname_inside(object *op, char *whatstr);
124 extern int cf_object_apply(object *op, object *author, int flags);
125 extern void cf_object_remove(object *op);
126 extern void cf_object_free_drop_inventory(object *ob);
127 extern object *cf_create_object(void);
128 extern object *cf_create_object_by_name(const char *name);
129 extern object *cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y);
130 extern int cf_object_teleport(object *ob, mapstruct *map, int x, int y);
131 extern void cf_object_update(object *op, int flags);
132 extern void cf_object_pickup(object *op, object *what);
133 extern const char *cf_object_get_key(object *op, const char *keyname);
134 extern int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key);
135 extern int16_t cf_object_get_resistance(object *op, int rtype);
136 extern void cf_object_set_resistance(object *op, int rtype, int16_t value);
137 extern int cf_object_move(object *op, int dir, object*originator);
138 extern void cf_object_apply_below(object *pl);
139 extern object *cf_object_clone(object *op, int clonetype);
140 extern void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag);
141 extern int cf_object_change_abil(object *op, object *tmp);
142 extern int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix);
143 extern int cf_object_remove_depletion(object *op, int level);
144 extern object *cf_object_find_by_arch_name(const object *who, const char *name);
145 extern object *cf_object_find_by_name(const object *who, const char *name);
146 extern object *cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
147 extern object *cf_object_clone(object *op, int clonetype);
148 extern int cf_object_set_face(object *op, const char *face);
149 extern int cf_object_set_animation(object *op, const char *animation);
150 extern object *cf_identify(object *op);
151 /* Maps */
152 /*extern void *cf_map_get_property(mapstruct *map, int propcode);*/
153 extern sstring cf_map_get_sstring_property(mapstruct *map, int propcode);
154 extern mapstruct *cf_map_get_map_property(mapstruct *map, int propcode);
155 extern region *cf_map_get_region_property(mapstruct *map, int propcode);
156 extern int cf_map_get_int_property(mapstruct *map, int property);
157 
158 extern void cf_map_set_int_property(mapstruct *map, int propcode, int value);
159 extern void cf_map_set_string_property(mapstruct *map, int propcode, const char *value);
160 extern mapstruct *cf_map_get_map(const char *name, int flags);
161 extern mapstruct *cf_get_empty_map(int sizex, int sizey);
162 extern mapstruct *cf_map_get_first(void);
163 extern mapstruct *cf_map_has_been_loaded(const char *name);
164 extern void cf_map_message(mapstruct *m, const char *msg, int color);
165 extern object *cf_map_get_object_at(mapstruct *m, int x, int y);
166 extern object *cf_map_insert_object(mapstruct *where, object *op, int x, int y);
167 extern object *cf_map_insert_object_around(mapstruct *where, object *op, int x, int y);
168 extern object *cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny);
169 extern int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
170 extern object *cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag);
171 extern int cf_map_get_difficulty(mapstruct *map);
172 extern int cf_map_get_reset_time(mapstruct *map);
173 extern int cf_map_get_reset_timeout(mapstruct *map);
174 extern int cf_map_get_players(mapstruct *map);
175 extern int cf_map_get_darkness(mapstruct *map);
176 extern int cf_map_get_light(mapstruct *map);
177 extern int cf_map_get_width(mapstruct *map);
178 extern int cf_map_get_height(mapstruct *map);
179 extern int cf_map_get_enter_x(mapstruct *map);
180 extern int cf_map_get_enter_y(mapstruct *map);
181 extern int cf_map_change_light(mapstruct *m, int change);
182 extern void cf_map_trigger_connected(objectlink *ol, object *cause, int state);
183 
184 /* Random maps */
185 extern int cf_random_map_set_variable(RMParms *rp, const char *buf);
186 extern mapstruct *cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout);
187 
188 /* Players */
189 extern char *cf_player_get_title(object *op, char *title, int size);
190 extern void cf_player_set_title(object *op, const char *title);
191 extern sstring cf_player_get_ip(object *op);
192 extern object *cf_player_get_marked_item(object *op);
193 extern void cf_player_set_marked_item(object *op, object *ob);
194 extern player *cf_player_find(const char *plname);
195 extern void cf_player_message(object *op, char *txt, int flags);
196 extern int cf_player_move(player *pl, int dir);
197 extern partylist *cf_player_get_party(object *op);
198 extern void cf_player_set_party(object *op, partylist *party);
199 extern int cf_player_can_pay(object *op);
200 extern int cf_player_knowledge_has(object *op, const char *knowledge);
201 extern void cf_player_knowledge_give(object *op, const char *knowledge);
202 extern int cf_player_arrest(object *who);
203 
204 /* Archetypes */
205 extern archetype *cf_archetype_get_first(void);
210 extern object *cf_archetype_get_clone(archetype *arch);
211 
212 /* Parties */
213 extern partylist *cf_party_get_first(void);
214 extern const char *cf_party_get_name(partylist *party);
215 extern partylist *cf_party_get_next(partylist *party);
216 extern const char *cf_party_get_password(partylist *party);
218 extern player *cf_party_get_next_player(partylist *party, player *op);
219 
220 /* Regions */
221 extern region *cf_region_get_first(void);
222 extern const char *cf_region_get_name(region *reg);
223 extern region *cf_region_get_next(region *reg);
224 extern region *cf_region_get_parent(region *reg);
225 extern const char *cf_region_get_longname(region *reg);
226 extern const char *cf_region_get_message(region *reg);
227 extern int cf_region_get_jail_x(region *reg);
228 extern int cf_region_get_jail_y(region *reg);
229 extern const char *cf_region_get_jail_path(region *reg);
230 
231 /* Friendly list */
232 extern object *cf_friendlylist_get_first(void);
233 extern object *cf_friendlylist_get_next(object *ob);
234 
235 /* Quest-related functions */
236 extern int cf_quest_get_player_state(object *pl, sstring quest_code);
237 extern void cf_quest_start(object *pl, sstring quest_code, int state);
238 extern void cf_quest_set_player_state(object *pl, sstring quest_code, int state);
239 extern int cf_quest_was_completed(object *pl, sstring quest_code);
240 
241 #endif /* PLUGIN_COMMON_H */
int cf_object_set_nrof(object *, int nrof)
One player.
Definition: player.h:92
long cf_object_get_long_property(object *op, long propcode)
int cf_map_get_light(mapstruct *map)
Random map parameters.
Definition: random_map.h:14
void cf_object_free_drop_inventory(object *ob)
Wrapper for object_free_drop_inventory().
void cf_map_message(mapstruct *m, const char *msg, int color)
Partial wrapper for ext_info_map().
object * cf_archetype_get_clone(archetype *arch)
Get clone of archetype.
int cf_player_knowledge_has(object *op, const char *knowledge)
Wrapper for knowledge_player_has().
object * cf_object_change_map(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Wrapper for object_insert_in_map_at().
object * cf_create_object(void)
Wrapper for object_new().
void cf_get_time(timeofday_t *tod)
void cf_spring_trap(object *trap, object *victim)
Wrapper for spring_trap().
Used to link together several objects.
Definition: object.h:442
void cf_free_string(sstring str)
Wrapper for free_string().
void cf_object_query_cost_string(const object *tmp, object *who, int flag, char *buffer, int length)
int cf_object_cast_ability(object *caster, object *ctoo, int dir, object *sp, char *flags)
Should there be a difference nowadays between that and cast_spell ?
const char * cf_get_month_name(int index)
const char * cf_object_get_key(object *op, const char *keyname)
Gets value for specified key, equivalent of object_get_value().
const char * cf_object_get_msg(object *)
object * cf_identify(object *op)
Wrapper for identify().
void cf_object_set_flag(object *ob, int flag, int value)
mapstruct * cf_get_empty_map(int sizex, int sizey)
Wrapper for get_empty_map().
int cf_object_set_animation(object *op, const char *animation)
Set the object&#39;s animation.
One party.
Definition: party.h:10
Information on one title.
Definition: readable.c:106
object * cf_object_insert_in_ob(object *op, object *where)
Wrapper for object_insert_in_ob().
partylist * cf_player_get_party(object *op)
unsigned char MoveType
Typdef here to define type large enough to hold bitmask of all movement types.
Definition: define.h:432
void cf_object_set_resistance(object *op, int rtype, int16_t value)
partylist * cf_party_get_first(void)
Get first party.
void cf_object_set_weight(object *ob, int weight)
int16_t cf_object_get_resistance(object *op, int rtype)
int cf_map_change_light(mapstruct *m, int change)
Wrapper for change_map_light().
region * cf_map_get_region_property(mapstruct *map, int propcode)
region * cf_region_get_first(void)
Get first region in region list.
const char * cf_party_get_name(partylist *party)
Definitions for the plugin system.
int cf_object_pay_item(object *op, object *pl)
Wrapper for pay_for_item().
int cf_map_get_height(mapstruct *map)
int cf_map_get_difficulty(mapstruct *map)
void cf_object_apply_below(object *pl)
Wrapper for apply_by_living_below().
const char * cf_region_get_jail_path(region *reg)
Get jail path of region.
mapstruct * cf_map_get_map_property(mapstruct *map, int propcode)
void cf_object_update(object *op, int flags)
region * cf_region_get_parent(region *reg)
Get parent of region.
int cf_player_move(player *pl, int dir)
void cf_fix_object(object *op)
Wrapper for fix_object().
archetype * cf_archetype_get_next(archetype *arch)
Get next archetype in linked list.
int cf_timer_destroy(int id)
Destroys specified timer, equivalent of calling cftimer_destroy().
int cf_object_remove_depletion(object *op, int level)
Wrapper for remove_depletion().
region * cf_region_get_next(region *reg)
Get next region in region list.
int cf_player_arrest(object *who)
Wrapper for player_arrest().
int cf_object_set_face(object *op, const char *face)
Set the object&#39;s face.
object * cf_player_get_marked_item(object *op)
char * cf_object_get_string_property(object *op, int propcode, char *buf, int size)
player * cf_player_find(const char *plname)
Wrapper for find_player_partial_name().
void cf_player_knowledge_give(object *op, const char *knowledge)
Wrapper for knowledge_give();.
sstring cf_add_string(const char *str)
Wrapper for add_string().
int cf_object_get_int_property(object *op, int propcode)
archetype * cf_archetype_get_head(archetype *arch)
Get head of archetype.
int cf_map_get_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
Wrapper for get_map_flags().
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:465
char * cf_query_base_name(object *ob, int plural, char *name, int size)
int cf_object_transfer(object *op, int x, int y, int randomly, object *originator)
Wrapper for transfer_ob().
void cf_object_forget_spell(object *op, object *sp)
Wrapper for do_forget_spell(), except takes an object, not a string.
const char * cf_get_weekday_name(int index)
int cf_find_animation(const char *txt)
Wrapper for find_animation().
partylist * cf_party_get_next(partylist *party)
Get next party in party list.
const char * cf_region_get_message(region *reg)
Get message of region.
void cf_log(LogLevel logLevel, const char *format,...)
Wrapper for LOG().
float cf_object_get_float_property(object *op, int propcode)
void cf_object_learn_spell(object *op, object *spell, int special_prayer)
Wrapper for do_learn_spell().
int cf_object_check_trigger(object *op, object *cause)
Wrapper for check_trigger().
void cf_quest_start(object *pl, sstring quest_code, int state)
Wrapper for quest_start().
sstring cf_object_get_sstring_property(object *op, int propcode)
void cf_log_plain(LogLevel logLevel, const char *message)
Wrapper for LOG() that uses directly a buffer, without format.
const char * cf_get_season_name(int index)
char * cf_strdup_local(const char *str)
Wrapper for strdup_local().
object * cf_friendlylist_get_first(void)
Get first object on friendly list.
void cf_quest_set_player_state(object *pl, sstring quest_code, int state)
Wrapper for quest_set_player_state();.
MoveType cf_object_get_movetype_property(object *op, int propcode)
void cf_player_set_marked_item(object *op, object *ob)
int cf_player_can_pay(object *op)
Wrapper for can_pay().
int cf_timer_create(object *ob, long delay, int mode)
Creates a timer, equivalent of calling cftimer_create().
int cf_object_get_weight(object *ob)
int cf_map_get_players(mapstruct *map)
int cf_init_plugin(f_plug_api getHooks)
object * cf_object_find_by_name(const object *who, const char *name)
Wrapper for object_find_by_name().
object * cf_map_insert_object_around(mapstruct *where, object *op, int x, int y)
Will insert op in the map where around the spot x, y.
void cf_object_set_int_property(object *op, int propcode, int value)
signed short int16_t
Definition: win32.h:160
int cf_object_query_cost(const object *tmp, object *who, int flag)
object * cf_object_clone(object *op, int clonetype)
Clone an object.
void cf_object_set_float_property(object *op, int propcode, float value)
const char * cf_party_get_password(partylist *party)
Get party&#39;s password.
This is a game region.
Definition: map.h:276
int cf_object_user_event(object *op, object *activator, object *third, const char *message, int fix)
void cf_cost_string_from_value(uint64_t cost, int largest_coin, char *buffer, int length)
Wrapper for cost_string_from_value modified to take a char* and length instead of a StringBuffer...
mapstruct * cf_map_get_map(const char *name, int flags)
Wrapper for ready_map_name().
double cf_object_get_double_property(object *op, int propcode)
sstring cf_find_string(const char *str)
sstring cf_query_name_pl(object *ob)
const char * cf_region_get_name(region *reg)
Get name of region.
void cf_system_register_global_event(int event, const char *name, f_plug_event hook)
object * cf_map_insert_object(mapstruct *where, object *op, int x, int y)
Wrapper for object_insert_in_map_at().
int cf_object_get_nrof(object *)
int cf_map_get_reset_time(mapstruct *map)
object * cf_object_insert_object(object *op, object *container)
void cf_object_say(object *op, char *msg)
void cf_system_unregister_global_event(int event, const char *name)
void * value
Definition: hashtable.h:12
void cf_map_set_string_property(mapstruct *map, int propcode, const char *value)
int cf_object_query_money(const object *op)
Wrapper for query_money().
char * cf_get_maps_directory(const char *name, char *buf, int size)
Wrapper for create_pathname().
int64_t cf_object_get_int64_property(object *op, int propcode)
int cf_random_map_set_variable(RMParms *rp, const char *buf)
Wrapper for set_random_map_variable().
unsigned __int64 uint64_t
Definition: win32.h:167
object * cf_map_find_by_archetype_name(const char *str, mapstruct *map, int nx, int ny)
Kinda wrapper for map_find_by_archetype_name().
void cf_map_set_int_property(mapstruct *map, int propcode, int value)
object * cf_friendlylist_get_next(object *ob)
Get next object on friendly list.
object * cf_object_present_archname_inside(object *op, char *whatstr)
Kinda wrapper for arch_present_in_ob().
object * cf_object_find_by_arch_name(const object *who, const char *name)
Wrapper for object_find_by_arch_name().
int cf_map_get_reset_timeout(mapstruct *map)
LogLevel
Log levels for the LOG() function.
Definition: logger.h:10
int cf_map_get_darkness(mapstruct *map)
void cf_object_set_movetype_property(object *op, int propcode, MoveType value)
int cf_find_face(const char *name, int error)
Wrapper for find_face().
mapstruct * cf_object_get_map_property(object *op, int propcode)
void cf_object_remove(object *op)
Wrapper for object_remove().
void cf_map_trigger_connected(objectlink *ol, object *cause, int state)
Wrapper for trigger_connected().
int(* f_plug_event)(int *type,...)
Function to call to handle global or object-related events.
Definition: plugin.h:131
signed __int64 int64_t
Definition: win32.h:168
object * cf_map_get_object_at(mapstruct *m, int x, int y)
Wrapper for GET_MAP_OB().
static const flag_definition flags[]
Flag mapping.
int cf_object_apply(object *op, object *author, int flags)
Wrapper for apply_manual().
int cf_quest_was_completed(object *pl, sstring quest_code)
Wrapper for quest_was_completed().
void cf_player_set_party(object *op, partylist *party)
const char * cf_re_cmp(const char *str, const char *regexp)
Wrapper for re_cmp().
object * cf_object_get_object_property(object *op, int propcode)
const char * sstring
Strings that should be manipulated through add_string() and free_string().
Definition: global.h:40
void cf_object_set_weight_limit(object *ob, int weight)
unsigned int uint32_t
Definition: win32.h:162
archetype * cf_archetype_get_first(void)
Get first archetype.
void cf_player_message(object *op, char *txt, int flags)
player * cf_party_get_next_player(partylist *party, player *op)
Get next player in party.
int cf_object_pay_amount(object *pl, uint64_t to_pay)
Wrapper for pay_for_amount().
player * cf_party_get_first_player(partylist *party)
Get first player in party.
char * cf_player_get_title(object *op, char *title, int size)
int cf_object_get_flag(object *ob, int flag)
void cf_object_set_int64_property(object *op, int propcode, int64_t value)
int cf_object_move(object *op, int dir, object *originator)
sstring cf_player_get_ip(object *op)
Represents the ingame time.
Definition: tod.h:32
archetype * cf_archetype_get_more(archetype *arch)
Get next part of archetype.
int cf_region_get_jail_x(region *reg)
Get region&#39;s jail x coordinate.
void cf_object_change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Wrapper for change_exp().
void cf_object_pickup(object *op, object *what)
int cf_region_get_jail_y(region *reg)
Get region&#39;s jail y coordinate.
void cf_object_drop(object *op, object *author)
mapstruct * cf_map_has_been_loaded(const char *name)
Wrapper for has_been_loaded().
int cf_map_get_enter_y(mapstruct *map)
sstring cf_map_get_sstring_property(mapstruct *map, int propcode)
const char * cf_get_directory(int id)
Gets a directory Crossfire uses.
mapstruct * cf_map_get_first(void)
Gives access to first_map.
void cf_player_set_title(object *op, const char *title)
int cf_quest_get_player_state(object *pl, sstring quest_code)
Wrapper for quest_get_player_state().
const char * cf_region_get_longname(region *reg)
Get longname of region.
object * cf_object_check_for_spell(object *op, const char *name)
Wrapper for check_spell_known().
int cf_object_teleport(object *ob, mapstruct *map, int x, int y)
partylist * cf_object_get_partylist_property(object *op, int propcode)
archetype * cf_object_get_archetype_property(object *op, int propcode)
void cf_object_set_string_property(object *op, int propcode, const char *value)
void cf_object_set_long_property(object *op, int propcode, long value)
sstring cf_archetype_get_name(archetype *arch)
Get archetype&#39;s name.
This is a game-map.
Definition: map.h:325
const char * cf_get_periodofday_name(int index)
int cf_object_out_of_map(object *op, int x, int y)
int cf_object_change_abil(object *op, object *tmp)
Wrapper for change_abil().
int cf_object_get_weight_limit(object *ob)
mapstruct * cf_random_map_generate(const char *OutFileName, RMParms *RP, char **use_layout)
Wrapper for generate_random_map().
object * cf_map_insert_object_there(object *op, mapstruct *m, object *originator, int flag)
Wrapper for object_insert_in_map().
int cf_map_get_int_property(mapstruct *map, int property)
object * cf_create_object_by_name(const char *name)
Wrapper for create_archetype() and create_archetype_by_object_name().
char * cf_query_name(object *ob, char *name, int size)
int cf_map_get_width(mapstruct *map)
int cf_object_move_to(object *op, int x, int y)
Wrapper for move_to().
int cf_object_cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Wrapper for cast_spell().
void(* f_plug_api)(int *type,...)
General API function.
Definition: plugin.h:125
int cf_map_get_enter_x(mapstruct *map)
void cf_object_set_object_property(object *op, int propcode, object *value)
object * cf_object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
Wrapper for object_split().
int cf_object_set_key(object *op, const char *keyname, const char *value, int add_key)
Sets a value for specified key, equivalent to object_set_value().