Atrinik Server  4.0
plugin_hooks.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #undef PLUGIN_HOOK_FUNCTION
31 #undef PLUGIN_HOOK_VARIABLE
32 #undef PLUGIN_HOOK_ARRAY
33 
34 #if defined(PLUGIN_HOOK_DEFINITIONS)
35 # define PLUGIN_HOOK_FUNCTION(ret, id, ...) id,
36 # define PLUGIN_HOOK_VARIABLE(ret, id) &id,
37 # define PLUGIN_HOOK_ARRAY(type, id) id,
38 #elif defined(PLUGIN_HOOK_DECLARATIONS)
39 # define PLUGIN_HOOK_FUNCTION(type, id, ...) type(*id)(__VA_ARGS__);
40 # define PLUGIN_HOOK_VARIABLE(type, id) type *id;
41 # define PLUGIN_HOOK_ARRAY(type, id) type *id;
42 #else
43 # define PLUGIN_HOOK_NONE
44 #endif
45 
46 #ifndef PLUGIN_HOOK_NONE
47 
48 #if defined(PLUGIN_HOOK_DEFINITIONS)
49 #include <player.h>
50 #include <object.h>
51 #include <exp.h>
52 #include <rune.h>
53 #include <beacon.h>
54 #include <toolkit/path.h>
55 
57 static struct plugin_hooklist hooklist =
58 #else
59 #include <decls.h>
60 
67 struct plugin_hooklist
68 #endif
69 {
70 
71 PLUGIN_HOOK_FUNCTION(StringBuffer *, object_get_name, const object *, const object *, StringBuffer *)
72 PLUGIN_HOOK_FUNCTION(const char *, re_cmp, const char *, const char *)
73 PLUGIN_HOOK_FUNCTION(int , players_on_map, mapstruct *)
74 PLUGIN_HOOK_FUNCTION(char *, create_pathname, const char *)
75 PLUGIN_HOOK_FUNCTION(void , free_string_shared, const char *)
76 PLUGIN_HOOK_FUNCTION(const char *, add_string, const char *)
77 PLUGIN_HOOK_FUNCTION(void , object_remove, object *, int)
78 PLUGIN_HOOK_FUNCTION(void , object_destroy, object *)
79 PLUGIN_HOOK_FUNCTION(int , living_update, object *)
80 PLUGIN_HOOK_FUNCTION(object *, object_insert_into, object *, object *, int)
81 PLUGIN_HOOK_FUNCTION(void , draw_info_map, uint8_t, const char *, const char *, mapstruct *, int, int, int, object *, object *, const char *)
82 PLUGIN_HOOK_FUNCTION(void , rune_spring, object *, object *)
83 PLUGIN_HOOK_FUNCTION(int , cast_spell, object *, object *, int, int, int, int, const char *)
84 PLUGIN_HOOK_FUNCTION(void , object_update_speed, object *)
85 PLUGIN_HOOK_FUNCTION(int , change_skill, object *, int)
86 PLUGIN_HOOK_FUNCTION(void , pick_up, object *, object *, int)
87 PLUGIN_HOOK_FUNCTION(mapstruct *, get_map_from_coord, mapstruct *, int *, int *)
88 PLUGIN_HOOK_FUNCTION(void , esrv_send_item, object *)
89 PLUGIN_HOOK_FUNCTION(player *, find_player, const char *)
90 PLUGIN_HOOK_FUNCTION(int , manual_apply, object *, object *, int)
91 PLUGIN_HOOK_FUNCTION(void , command_drop, object *, const char *, char *)
92 PLUGIN_HOOK_FUNCTION(int , transfer_ob, object *, int, int, int, object *, object *)
93 PLUGIN_HOOK_FUNCTION(bool , attack_kill, object *, object *)
94 PLUGIN_HOOK_FUNCTION(void , esrv_send_inventory, object *, object *)
95 PLUGIN_HOOK_FUNCTION(object *, arch_get, const char *)
96 PLUGIN_HOOK_FUNCTION(mapstruct *, ready_map_name, const char *, mapstruct *, int)
97 PLUGIN_HOOK_FUNCTION(int64_t, add_exp, object *, int64_t, int, int)
98 PLUGIN_HOOK_FUNCTION(const char *, determine_god, object *)
99 PLUGIN_HOOK_FUNCTION(object *, find_god, const char *)
100 PLUGIN_HOOK_FUNCTION(void , register_global_event, const char *, int)
101 PLUGIN_HOOK_FUNCTION(void , unregister_global_event, const char *, int)
102 PLUGIN_HOOK_FUNCTION(object *, object_load_str, const char *)
103 PLUGIN_HOOK_FUNCTION(int64_t, shop_get_cost, object *, int)
104 PLUGIN_HOOK_FUNCTION(int64_t, shop_get_money, object *)
105 PLUGIN_HOOK_FUNCTION(bool, shop_pay, object *, int64_t)
106 PLUGIN_HOOK_FUNCTION(object *, object_clone, const object *)
107 PLUGIN_HOOK_FUNCTION(object *, object_get, void)
108 PLUGIN_HOOK_FUNCTION(void , object_copy, object *, const object *, bool)
109 PLUGIN_HOOK_FUNCTION(bool , object_enter_map, object *, object *, mapstruct *, int, int, bool)
110 PLUGIN_HOOK_FUNCTION(void , play_sound_map, mapstruct *, int, const char *, int, int, int, int)
111 PLUGIN_HOOK_FUNCTION(object *, find_marked_object, object *)
112 PLUGIN_HOOK_FUNCTION(int , cast_identify, object *, int, object *, int)
113 PLUGIN_HOOK_FUNCTION(struct archetype *, arch_find, const char *)
114 PLUGIN_HOOK_FUNCTION(object *, arch_to_object, struct archetype *)
115 PLUGIN_HOOK_FUNCTION(object *, object_insert_map, object *, mapstruct *, object *, int)
116 PLUGIN_HOOK_FUNCTION(const char *, shop_get_cost_string, int64_t)
117 PLUGIN_HOOK_FUNCTION(int , bank_deposit, object *, const char *, int64_t *value)
118 PLUGIN_HOOK_FUNCTION(int , bank_withdraw, object *, const char *, int64_t *value)
119 PLUGIN_HOOK_FUNCTION(int64_t, bank_get_balance, object *)
120 PLUGIN_HOOK_FUNCTION(int , swap_apartments, const char *, const char *, int, int, object *)
121 PLUGIN_HOOK_FUNCTION(int , player_exists, const char *)
122 PLUGIN_HOOK_FUNCTION(void , get_tod, timeofday_t *)
123 PLUGIN_HOOK_FUNCTION(shstr *, object_get_value, const object *, const char *const)
124 PLUGIN_HOOK_FUNCTION(bool , object_set_value, object *, const char *, const char *, bool)
125 PLUGIN_HOOK_FUNCTION(void , drop, object *, object *, int)
126 PLUGIN_HOOK_FUNCTION(StringBuffer *, object_get_short_name, const object *, const object *, StringBuffer *)
127 PLUGIN_HOOK_FUNCTION(object *, beacon_locate, shstr *)
128 PLUGIN_HOOK_FUNCTION(void , player_cleanup_name, char *)
129 PLUGIN_HOOK_FUNCTION(party_struct *, find_party, const char *)
130 PLUGIN_HOOK_FUNCTION(void , add_party_member, party_struct *, object *)
131 PLUGIN_HOOK_FUNCTION(void , remove_party_member, party_struct *, object *)
132 PLUGIN_HOOK_FUNCTION(void , send_party_message, party_struct *, const char *, int, object *, object *)
133 PLUGIN_HOOK_FUNCTION(void , object_dump, const object *, StringBuffer *)
134 PLUGIN_HOOK_FUNCTION(StringBuffer *, stringbuffer_new, void)
135 PLUGIN_HOOK_FUNCTION(void , stringbuffer_append_string, StringBuffer *, const char *)
136 PLUGIN_HOOK_FUNCTION(void , stringbuffer_append_printf, StringBuffer *, const char *, ...)
137 PLUGIN_HOOK_FUNCTION(char *, stringbuffer_finish, StringBuffer *)
138 PLUGIN_HOOK_FUNCTION(int , find_face, const char *, int)
139 PLUGIN_HOOK_FUNCTION(int , find_animation, const char *)
140 PLUGIN_HOOK_FUNCTION(void , play_sound_player_only, player *, int, const char *, int, int, int, int)
141 PLUGIN_HOOK_FUNCTION(int , object_get_gender, const object *)
142 PLUGIN_HOOK_FUNCTION(object *, object_decrease, object *, uint32_t)
143 PLUGIN_HOOK_FUNCTION(int , wall, mapstruct *, int, int)
144 PLUGIN_HOOK_FUNCTION(int , blocked, object *, mapstruct *, int, int, int)
145 PLUGIN_HOOK_FUNCTION(int , get_rangevector, object *, object *, rv_vector *, int)
146 PLUGIN_HOOK_FUNCTION(int , get_rangevector_from_mapcoords, mapstruct *, int, int, mapstruct *, int, int, rv_vector *, int)
147 PLUGIN_HOOK_FUNCTION(int , player_can_carry, object *, uint32_t)
148 PLUGIN_HOOK_FUNCTION(cache_struct *, cache_find, shstr *)
149 PLUGIN_HOOK_FUNCTION(int , cache_add, const char *, void *, uint32_t)
150 PLUGIN_HOOK_FUNCTION(int , cache_remove, shstr *)
151 PLUGIN_HOOK_FUNCTION(void , cache_remove_by_flags, uint32_t)
152 PLUGIN_HOOK_FUNCTION(shstr *, find_string, const char *)
153 PLUGIN_HOOK_FUNCTION(void , command_take, object *, const char *, char *)
154 PLUGIN_HOOK_FUNCTION(void , esrv_update_item, int, object *)
155 PLUGIN_HOOK_FUNCTION(void , commands_handle, object *, char *)
156 PLUGIN_HOOK_FUNCTION(treasure_list_t *, treasure_list_find, const char *)
157 PLUGIN_HOOK_FUNCTION(void , treasure_generate, treasure_list_t *, object *, int, int)
158 PLUGIN_HOOK_FUNCTION(void , object_dump_rec, const object *, StringBuffer *)
159 PLUGIN_HOOK_FUNCTION(int , attack_hit, object *, object *, int)
160 PLUGIN_HOOK_FUNCTION(int , move_ob, object *, int, object *)
161 PLUGIN_HOOK_FUNCTION(mapstruct *, get_empty_map, int, int)
162 PLUGIN_HOOK_FUNCTION(void , set_map_darkness, mapstruct *, int)
163 PLUGIN_HOOK_FUNCTION(int , map_free_spot, mapstruct *, int, int, int, int, struct archetype *, object *)
164 PLUGIN_HOOK_FUNCTION(void , send_target_command, player *)
165 PLUGIN_HOOK_FUNCTION(void , examine, object *, object *, StringBuffer *sb_capture)
166 PLUGIN_HOOK_FUNCTION(void , draw_info, const char *, object *, const char *)
167 PLUGIN_HOOK_FUNCTION(void , draw_info_format, const char *, object *, const char *, ...)
168 PLUGIN_HOOK_FUNCTION(void , draw_info_type, uint8_t, const char *, const char *, object *, const char *)
169 PLUGIN_HOOK_FUNCTION(void , draw_info_type_format, uint8_t, const char *, const char *, object *, const char *, ...)
170 PLUGIN_HOOK_FUNCTION(struct artifact_list *, artifact_list_find, uint8_t)
171 PLUGIN_HOOK_FUNCTION(void , artifact_change_object, struct artifact *, object *)
172 PLUGIN_HOOK_FUNCTION(int , connection_object_get_value, const object *)
173 PLUGIN_HOOK_FUNCTION(void , connection_object_add, object *, mapstruct *, int)
174 PLUGIN_HOOK_FUNCTION(void , connection_trigger, object *, int)
175 PLUGIN_HOOK_FUNCTION(void , connection_trigger_button, object *, int)
176 PLUGIN_HOOK_FUNCTION(struct packet_struct *, packet_new, uint8_t, size_t, size_t)
177 PLUGIN_HOOK_FUNCTION(void , packet_free, struct packet_struct *)
178 PLUGIN_HOOK_FUNCTION(void , packet_compress, struct packet_struct *)
179 PLUGIN_HOOK_FUNCTION(void , packet_enable_ndelay, struct packet_struct *)
180 PLUGIN_HOOK_FUNCTION(void , packet_set_pos, struct packet_struct *, size_t)
181 PLUGIN_HOOK_FUNCTION(size_t, packet_get_pos, struct packet_struct *)
182 PLUGIN_HOOK_FUNCTION(void , packet_append_uint8, struct packet_struct *, uint8_t)
183 PLUGIN_HOOK_FUNCTION(void , packet_append_int8, struct packet_struct *, int8_t)
184 PLUGIN_HOOK_FUNCTION(void , packet_append_uint16, struct packet_struct *, uint16_t)
185 PLUGIN_HOOK_FUNCTION(void , packet_append_int16, struct packet_struct *, int16_t)
186 PLUGIN_HOOK_FUNCTION(void , packet_append_uint32, struct packet_struct *, uint32_t)
187 PLUGIN_HOOK_FUNCTION(void , packet_append_int32, struct packet_struct *, int32_t)
188 PLUGIN_HOOK_FUNCTION(void , packet_append_uint64, struct packet_struct *, uint64_t)
189 PLUGIN_HOOK_FUNCTION(void , packet_append_int64, struct packet_struct *, int64_t)
190 PLUGIN_HOOK_FUNCTION(void , packet_append_data_len, struct packet_struct *, const uint8_t *, size_t)
191 PLUGIN_HOOK_FUNCTION(void , packet_append_string, struct packet_struct *, const char *)
192 PLUGIN_HOOK_FUNCTION(void , packet_append_string_len_terminated, struct packet_struct *, const char *, size_t)
193 PLUGIN_HOOK_FUNCTION(void , packet_append_string_terminated, struct packet_struct *, const char *)
194 PLUGIN_HOOK_FUNCTION(void , packet_append_map_name, struct packet_struct *, object *, object *)
195 PLUGIN_HOOK_FUNCTION(void , packet_append_map_music, struct packet_struct *, object *, object *)
196 PLUGIN_HOOK_FUNCTION(void , packet_append_map_weather, struct packet_struct *, object *, object *)
197 PLUGIN_HOOK_FUNCTION(void , socket_send_packet, socket_struct *, struct packet_struct *)
198 PLUGIN_HOOK_FUNCTION(void , logger_print, logger_level, const char *, uint64_t, const char *, ...)
199 PLUGIN_HOOK_FUNCTION(logger_level, logger_get_level, const char *)
200 PLUGIN_HOOK_FUNCTION(void , commands_add, const char *, command_func, double, uint64_t)
201 PLUGIN_HOOK_FUNCTION(int , map_get_darkness, mapstruct *, int, int, object **)
202 PLUGIN_HOOK_FUNCTION(char *, map_get_path, mapstruct *, const char *, uint8_t, const char *)
203 PLUGIN_HOOK_FUNCTION(int , map_path_isabs, const char *)
204 PLUGIN_HOOK_FUNCTION(char *, path_dirname, const char *)
205 PLUGIN_HOOK_FUNCTION(char *, path_basename, const char *)
206 PLUGIN_HOOK_FUNCTION(char *, string_join, const char *delim, ...)
207 PLUGIN_HOOK_FUNCTION(object *, object_get_env, object *)
208 PLUGIN_HOOK_FUNCTION(int , set_variable, object *, const char *)
209 PLUGIN_HOOK_FUNCTION(uint64_t, level_exp, int, double)
210 PLUGIN_HOOK_FUNCTION(int , string_endswith, const char *, const char *)
211 PLUGIN_HOOK_FUNCTION(char *, string_sub, const char *, ssize_t, ssize_t MEMORY_DEBUG_PROTO)
212 PLUGIN_HOOK_FUNCTION(char *, path_join, const char *, const char *)
213 PLUGIN_HOOK_FUNCTION(void , monster_enemy_signal, object *, object *)
214 PLUGIN_HOOK_FUNCTION(void , map_redraw, mapstruct *, int, int, int, int)
215 #ifndef NDEBUG
216 PLUGIN_HOOK_FUNCTION(void *, memory_emalloc, size_t, const char *, uint32_t)
217 PLUGIN_HOOK_FUNCTION(void , memory_efree, void *, const char *, uint32_t)
218 PLUGIN_HOOK_FUNCTION(void *, memory_ecalloc, size_t, size_t, const char *, uint32_t)
219 PLUGIN_HOOK_FUNCTION(void *, memory_erealloc, void *, size_t, const char *, uint32_t)
220 PLUGIN_HOOK_FUNCTION(void *, memory_reallocz, void *, size_t, size_t, const char *, uint32_t)
221 PLUGIN_HOOK_FUNCTION(char *, string_estrdup, const char *, const char *, uint32_t)
222 PLUGIN_HOOK_FUNCTION(char *, string_estrndup, const char *, size_t , const char *, uint32_t)
223 #else
224 PLUGIN_HOOK_FUNCTION(void *, memory_emalloc, size_t)
225 PLUGIN_HOOK_FUNCTION(void , memory_efree, void *)
226 PLUGIN_HOOK_FUNCTION(void *, memory_ecalloc, size_t, size_t)
227 PLUGIN_HOOK_FUNCTION(void *, memory_erealloc, void *, size_t)
228 PLUGIN_HOOK_FUNCTION(void *, memory_reallocz, void *, size_t, size_t)
229 PLUGIN_HOOK_FUNCTION(char *, string_estrdup, const char *)
230 PLUGIN_HOOK_FUNCTION(char *, string_estrndup, const char *, size_t)
231 #endif
232 PLUGIN_HOOK_FUNCTION(player_faction_t *, player_faction_create, player *, shstr *)
233 PLUGIN_HOOK_FUNCTION(void , player_faction_free, player *, player_faction_t *)
234 PLUGIN_HOOK_FUNCTION(player_faction_t *, player_faction_find, player *, shstr *)
235 PLUGIN_HOOK_FUNCTION(struct faction *, faction_find, shstr *)
236 PLUGIN_HOOK_FUNCTION(double, faction_get_bounty, struct faction *, player *)
237 PLUGIN_HOOK_FUNCTION(void, faction_clear_bounty, struct faction *, player *)
238 PLUGIN_HOOK_FUNCTION(void, shop_insert_coins, object *, int64_t)
239 PLUGIN_HOOK_FUNCTION(void, add_object_to_packet, struct packet_struct *, object *, object *, uint8_t, uint32_t, int)
240 PLUGIN_HOOK_FUNCTION(void, player_save, object *)
241 PLUGIN_HOOK_FUNCTION(int, new_save_map, mapstruct *, int)
242 PLUGIN_HOOK_FUNCTION(void, main_process, void)
243 PLUGIN_HOOK_FUNCTION(char *, socket_get_addr, socket_t *)
244 PLUGIN_HOOK_FUNCTION(char *, socket_get_str, socket_t *)
245 PLUGIN_HOOK_FUNCTION(bool, faction_is_friend, struct faction *, object *)
246 
247 PLUGIN_HOOK_ARRAY(const char *, season_name)
248 PLUGIN_HOOK_ARRAY(const char *, weekdays)
249 PLUGIN_HOOK_ARRAY(const char *, month_name)
250 PLUGIN_HOOK_ARRAY(const char *, periodsofday)
251 PLUGIN_HOOK_ARRAY(const char *, gender_noun)
252 PLUGIN_HOOK_ARRAY(const char *, gender_subjective)
253 PLUGIN_HOOK_ARRAY(const char *, gender_subjective_upper)
254 PLUGIN_HOOK_ARRAY(const char *, gender_objective)
255 PLUGIN_HOOK_ARRAY(const char *, gender_possessive)
256 PLUGIN_HOOK_ARRAY(const char *, gender_reflexive)
257 PLUGIN_HOOK_ARRAY(const char *, object_flag_names)
258 PLUGIN_HOOK_ARRAY(int, freearr_x)
259 PLUGIN_HOOK_ARRAY(int, freearr_y)
260 PLUGIN_HOOK_ARRAY(spell_struct, spells)
261 PLUGIN_HOOK_ARRAY(skill_struct, skills)
262 
263 PLUGIN_HOOK_VARIABLE(struct shstr_constants, shstr_cons)
264 PLUGIN_HOOK_VARIABLE(player *, first_player)
265 PLUGIN_HOOK_VARIABLE(New_Face *, new_faces)
266 PLUGIN_HOOK_VARIABLE(int, nrofpixmaps)
267 PLUGIN_HOOK_VARIABLE(Animations *, animations)
268 PLUGIN_HOOK_VARIABLE(int, num_animations)
269 PLUGIN_HOOK_VARIABLE(mapstruct *, first_map)
270 PLUGIN_HOOK_VARIABLE(party_struct *, first_party)
271 PLUGIN_HOOK_VARIABLE(region_struct *, first_region)
272 PLUGIN_HOOK_VARIABLE(long, pticks)
273 PLUGIN_HOOK_VARIABLE(settings_struct, settings)
274 PLUGIN_HOOK_VARIABLE(long, max_time)
275 
276 };
277 
278 #endif
static void unregister_global_event(const char *plugin_name, int event_nr)
Definition: plugins.c:99
void command_drop(object *op, const char *command, char *params)
Definition: drop.c:38
int find_face(const char *name, int error)
Definition: image.c:172
StringBuffer * object_get_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:299
player_faction_t * player_faction_create(player *pl, shstr *name)
Definition: player.c:1202
int64_t shop_get_cost(object *op, int mode)
Definition: shop.c:43
const char * gender_subjective_upper[GENDER_MAX]
Definition: object.c:59
void object_destroy(object *ob)
Definition: object.c:1441
const char * periodsofday[PERIODS_PER_DAY]
Definition: time.c:88
const char * shop_get_cost_string(int64_t cost)
Definition: shop.c:178
party_struct * first_party
Definition: party.c:54
int get_rangevector(object *op1, object *op2, rv_vector *retval, int flags)
Definition: map.c:2238
void remove_party_member(party_struct *party, object *op)
Definition: party.c:114
object * object_get_env(object *op)
Definition: object.c:631
void add_object_to_packet(struct packet_struct *packet, object *op, object *pl, uint8_t apply_action, uint32_t flags, int level)
Definition: item.c:109
bool shop_pay(object *op, int64_t to_pay)
Definition: shop.c:428
bool object_set_value(object *op, const char *key, const char *value, bool add_key)
Definition: object.c:2635
uint64_t level_exp(int level, double expmul)
Definition: exp.c:284
void monster_enemy_signal(object *npc, object *enemy)
Definition: monster.c:270
int player_can_carry(object *pl, uint32_t weight)
Definition: player.c:1036
int object_get_gender(const object *op)
Definition: object.c:2877
int set_variable(object *op, const char *buf)
Definition: object.c:48663
object * object_get(void)
Definition: object.c:993
void treasure_generate(treasure_list_t *treasure_list, object *op, int difficulty, int flags)
Definition: treasure.c:1641
const char * gender_objective[GENDER_MAX]
Definition: object.c:65
mapstruct * get_map_from_coord(mapstruct *m, int *x, int *y)
Definition: map.c:1869
shstr * object_get_value(const object *op, const char *const key)
Definition: object.c:2515
player * find_player(const char *plname)
Definition: player.c:96
void object_copy(object *op, const object *src, bool no_speed)
Definition: object.c:886
bool attack_kill(object *op, object *hitter)
Definition: attack.c:981
int blocked(object *op, mapstruct *m, int x, int y, int terrain)
Definition: map.c:598
void connection_trigger_button(object *op, int state)
Definition: connection.c:272
int wall(mapstruct *m, int x, int y)
Definition: map.c:486
void object_dump_rec(const object *op, StringBuffer *sb)
Definition: object.c:711
object * arch_get(const char *name)
Definition: arch.c:430
void drop(object *op, object *tmp, int no_mevent)
Definition: player.c:2304
int bank_deposit(object *op, const char *text, int64_t *value)
Definition: bank.c:300
void send_party_message(party_struct *party, const char *msg, int flag, object *op, object *except)
Definition: party.c:470
region_struct * first_region
Definition: region.c:37
void command_take(object *op, const char *command, char *params)
Definition: take.c:38
int cache_remove(shstr *key)
Definition: cache.c:167
int swap_apartments(const char *mapold, const char *mapnew, int x, int y, object *op)
Definition: main.c:395
bool object_enter_map(object *op, object *exit, mapstruct *m, int x, int y, bool fixed_pos)
Definition: object.c:2956
double faction_get_bounty(faction_t faction, player *pl)
Definition: faction.c:734
int new_save_map(mapstruct *m, int flag)
Definition: map.c:1363
int map_free_spot(mapstruct *m, int x, int y, int start, int stop, archetype_t *at, object *op)
Definition: map.c:2942
const char * gender_subjective[GENDER_MAX]
Definition: object.c:53
void object_remove(object *op, int flags)
Definition: object.c:1623
int cast_spell(object *op, object *caster, int dir, int type, int ability, int item, const char *stringarg)
Definition: spell_util.c:192
int manual_apply(object *op, object *tmp, int aflag)
Definition: apply.c:52
object * object_load_str(const char *obstr)
Definition: object.c:2433
void get_tod(timeofday_t *tod)
Definition: time.c:279
StringBuffer * object_get_short_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:416
const char * gender_reflexive[GENDER_MAX]
Definition: object.c:77
void main_process(void)
Definition: main.c:561
const char * gender_possessive[GENDER_MAX]
Definition: object.c:71
int64_t add_exp(object *op, int64_t exp_gain, int skill_nr, int exact)
Definition: exp.c:304
object * object_clone(const object *op)
Definition: object.c:2385
const char * season_name[SEASONS_PER_YEAR]
Definition: time.c:53
void player_faction_free(player *pl, player_faction_t *faction)
Definition: player.c:1223
cache_struct * cache_find(shstr *key)
Definition: cache.c:95
void pick_up(object *op, object *alt, int no_mevent)
Definition: player.c:2019
int64_t shop_get_money(object *op)
Definition: shop.c:251
Definition: arch.h:40
int transfer_ob(object *op, int x, int y, int randomly, object *originator, object *trap)
Definition: move.c:237
artifact_list_t * artifact_list_find(uint8_t type)
Definition: artifact.c:397
int cache_add(const char *key, void *ptr, uint32_t flags)
Definition: cache.c:121
object * object_insert_into(object *op, object *where, int flag)
Definition: object.c:2158
bool faction_is_friend(faction_t faction, object *op)
Definition: faction.c:618
void play_sound_player_only(player *pl, int type, const char *filename, int x, int y, int loop, int volume)
Definition: sounds.c:66
object * object_decrease(object *op, uint32_t i)
Definition: object.c:2105
faction_t faction_find(shstr *name)
Definition: faction.c:382
object * arch_to_object(archetype_t *at)
Definition: arch.c:446
const char * determine_god(object *op)
Definition: gods.c:62
mapstruct * get_empty_map(int sizex, int sizey)
Definition: map.c:985
int find_animation(const char *name)
Definition: anim.c:176
const char * weekdays[DAYS_PER_WEEK]
Definition: time.c:61
void cache_remove_by_flags(uint32_t flags)
Definition: cache.c:222
int change_skill(object *who, int sk_index)
Definition: skill_util.c:340
static void register_global_event(const char *plugin_name, int event_nr)
Definition: plugins.c:80
void object_dump(const object *op, StringBuffer *sb)
Definition: object.c:680
int bank_withdraw(object *op, const char *text, int64_t *value)
Definition: bank.c:402
object * beacon_locate(shstr *name)
Definition: beacon.c:114
int connection_object_get_value(const object *op)
Definition: connection.c:125
void faction_clear_bounty(faction_t faction, player *pl)
Definition: faction.c:790
void esrv_send_item(object *op)
Definition: item.c:703
void connection_trigger(object *op, int state)
Definition: connection.c:258
void player_cleanup_name(char *str)
Definition: player.c:1330
object * find_god(const char *name)
Definition: gods.c:40
object * object_insert_map(object *op, mapstruct *m, object *originator, int flag)
Definition: object.c:1741
void send_target_command(player *pl)
Definition: request.c:2144
spell_struct spells[NROFREALSPELLS]
Definition: spellist.h:34
void play_sound_map(mapstruct *map, int type, const char *filename, int x, int y, int loop, int volume)
Definition: sounds.c:159
struct settings_struct settings
Definition: init.c:55
void shop_insert_coins(object *op, int64_t value)
Definition: shop.c:587
void map_redraw(mapstruct *m, int x, int y, int layer, int sub_layer)
Definition: map.c:2824
shstr_constants shstr_cons
Definition: init.c:58
int get_rangevector_from_mapcoords(mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, rv_vector *retval, int flags)
Definition: map.c:2297
void draw_info_map(uint8_t type, const char *name, const char *color, mapstruct *map, int x, int y, int dist, object *op, object *op2, const char *buf)
Definition: info.c:195
const char * month_name[MONTHS_PER_YEAR]
Definition: time.c:72
void esrv_update_item(int flags, object *op)
Definition: item.c:639
int attack_hit(object *op, object *hitter, int dam)
Definition: attack.c:669
int freearr_x[SIZEOFFREE]
Definition: object.c:84
Definition: tod.h:65
int players_on_map(mapstruct *m)
Definition: map.c:2455
void examine(object *op, object *tmp, StringBuffer *sb_capture)
Definition: player.c:1521
void set_map_darkness(mapstruct *m, int value)
Definition: map.c:933
int living_update(object *op)
Definition: living.c:1661
void(* command_func)(object *op, const char *command, char *params)
Definition: commands.h:44
void player_save(object *op)
Definition: player.c:2379
void rune_spring(object *op, object *victim)
Definition: rune.c:48
char * create_pathname(const char *name)
Definition: map.c:422
party_struct * find_party(const char *name)
Definition: party.c:208
const char * object_flag_names[NUM_FLAGS+1]
Definition: object.c:153
treasure_list_t * treasure_list_find(const char *name)
Definition: treasure.c:789
mapstruct * ready_map_name(const char *name, mapstruct *originator, int flags)
Definition: map.c:1584
int nrofpixmaps
Definition: image.c:67
player * first_player
Definition: main.c:57
int move_ob(object *op, int dir, object *originator)
Definition: move.c:155
void object_update_speed(object *op)
Definition: object.c:1043
Definition: map.h:536
skill_struct skills[NROFSKILLS]
Definition: skillist.h:62
player_faction_t * player_faction_find(player *pl, shstr *name)
Definition: player.c:1243
int freearr_y[SIZEOFFREE]
Definition: object.c:99
int cast_identify(object *op, int level, object *single_ob, int mode)
Definition: spell_effect.c:997
mapstruct * first_map
Definition: main.c:59
void esrv_send_inventory(object *pl, object *op)
Definition: item.c:557
void artifact_change_object(artifact_t *art, object *op)
Definition: artifact.c:446
void connection_object_add(object *op, mapstruct *map, int connected)
Definition: connection.c:44
archetype_t * arch_find(const char *name)
Definition: arch.c:407
const char * gender_noun[GENDER_MAX]
Definition: object.c:47
int64_t bank_get_balance(object *op)
Definition: bank.c:278
object * find_marked_object(object *op)
Definition: player.c:1393
void add_party_member(party_struct *party, object *op)
Definition: party.c:84
const char * re_cmp(const char *, const char *)
Definition: re-cmp.c:76