Crossfire Server  1.75.0
sproto.h
Go to the documentation of this file.
1 /* account.c */
2 void accounts_clear(void);
3 void accounts_load(void);
4 void accounts_save(void);
5 const char *account_exists(const char *account_name);
6 int account_login(const char *account_name, const char *account_password);
7 void account_logout(const char *account_name);
8 int account_check_string(const char *str);
9 int account_new(const char *account_name, const char *account_password);
10 int account_link(const char *account_name, const char *player_name);
11 int account_remove_player(const char *account_name, const char *player_name);
12 char **account_get_players_for_account(const char *account_name);
13 linked_char *account_get_additional_chars(const char *account_name, const Account_Chars *chars, int *count);
14 const char *account_get_account_for_char(const char *charname);
15 int account_is_logged_in(const char *name);
16 int account_change_password(const char *account_name, const char *current_password, const char *new_password);
17 /* account_char.c */
18 Account_Chars *account_char_load(const char *account_name);
19 void account_char_save(Account_Chars *chars);
20 void account_char_add(Account_Chars *chars, player *pl);
21 void account_char_remove(Account_Chars *chars, const char *pl_name);
22 void account_char_free(Account_Chars *chars);
23 /* alchemy.c */
24 int use_alchemy(object *op);
25 /* apply.c */
26 int transport_can_hold(const object *transport, const object *op, int nrof);
27 int should_director_abort(const object *op, const object *victim);
28 void apply_handle_yield(object *tmp);
29 void do_learn_spell(object *op, object *spell, int special_prayer);
30 void do_forget_spell(object *op, const char *spell);
31 int apply_manual(object *op, object *tmp, int aflag);
32 int apply_by_living(object *pl, object *op, int aflag, int quiet);
33 void apply_by_living_below(object *pl);
34 int apply_can_apply_object(const object *who, const object *op);
35 int apply_check_weapon_power(const object *who, int improves);
36 int apply_special(object *who, object *op, int aflags);
37 int apply_auto(object *op);
39 void scroll_failure(object *op, int failure, int power);
40 void apply_changes_to_player(object *pl, object *change, int limit_stats);
41 bool csv_contains(std::string list, std::string item, std::string delim=",");
42 /* attack.c */
43 void save_throw_object(object *op, uint32_t type, object *originator);
44 int slow_living_by(object *op, const int speed_penalty);
45 int hit_map(object *op, int dir, uint32_t type, int full_hit);
46 void get_attack_message_for_attack_type(int dam, uint8_t atm_type, const char *victim_name, char *buf1, char *buf2);
47 int attack_ob(object *op, object *hitter);
48 object *hit_with_arrow(object *op, object *victim);
49 int friendly_fire(object *op, object *hitter);
50 int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit);
51 void confuse_living(object *op, object *hitter, int dam);
52 void blind_living(object *op, object *hitter, int dam);
53 void paralyze_living(object *op, int dam);
54 /* ban.c */
55 int checkbanned(const char *login, const char *host);
56 /* build_map.c */
57 void apply_builder_remove(object *pl, int dir);
58 void apply_map_builder(object *pl, int dir);
59 /* c_chat.c */
60 void command_say(object *op, const char *params);
61 void command_me(object *op, const char *params);
62 void command_cointoss(object *op, const char *params);
63 void command_orcknuckle(object *op, const char *params);
64 void command_shout(object *op, const char *params);
65 void command_chat(object *op, const char *params);
66 void command_tell(object *op, const char *params);
67 void command_dmtell(object *op, const char *params);
68 void command_reply(object *op, const char *params);
69 void command_nod(object *op, const char *params);
70 void command_dance(object *op, const char *params);
71 void command_kiss(object *op, const char *params);
72 void command_bounce(object *op, const char *params);
73 void command_smile(object *op, const char *params);
74 void command_cackle(object *op, const char *params);
75 void command_laugh(object *op, const char *params);
76 void command_giggle(object *op, const char *params);
77 void command_shake(object *op, const char *params);
78 void command_puke(object *op, const char *params);
79 void command_growl(object *op, const char *params);
80 void command_scream(object *op, const char *params);
81 void command_sigh(object *op, const char *params);
82 void command_sulk(object *op, const char *params);
83 void command_hug(object *op, const char *params);
84 void command_cry(object *op, const char *params);
85 void command_poke(object *op, const char *params);
86 void command_accuse(object *op, const char *params);
87 void command_grin(object *op, const char *params);
88 void command_bow(object *op, const char *params);
89 void command_clap(object *op, const char *params);
90 void command_blush(object *op, const char *params);
91 void command_burp(object *op, const char *params);
92 void command_chuckle(object *op, const char *params);
93 void command_cough(object *op, const char *params);
94 void command_flip(object *op, const char *params);
95 void command_frown(object *op, const char *params);
96 void command_gasp(object *op, const char *params);
97 void command_glare(object *op, const char *params);
98 void command_groan(object *op, const char *params);
99 void command_hiccup(object *op, const char *params);
100 void command_lick(object *op, const char *params);
101 void command_pout(object *op, const char *params);
102 void command_shiver(object *op, const char *params);
103 void command_shrug(object *op, const char *params);
104 void command_slap(object *op, const char *params);
105 void command_smirk(object *op, const char *params);
106 void command_snap(object *op, const char *params);
107 void command_sneeze(object *op, const char *params);
108 void command_snicker(object *op, const char *params);
109 void command_sniff(object *op, const char *params);
110 void command_snore(object *op, const char *params);
111 void command_spit(object *op, const char *params);
112 void command_strut(object *op, const char *params);
113 void command_thank(object *op, const char *params);
114 void command_twiddle(object *op, const char *params);
115 void command_wave(object *op, const char *params);
116 void command_whistle(object *op, const char *params);
117 void command_wink(object *op, const char *params);
118 void command_yawn(object *op, const char *params);
119 void command_beg(object *op, const char *params);
120 void command_bleed(object *op, const char *params);
121 void command_cringe(object *op, const char *params);
122 void command_think(object *op, const char *params);
123 /* c_misc.c */
124 void command_language(object *op, const char *params);
125 void command_body(object *op, const char *params);
126 void command_motd(object *op, const char *params);
127 void command_rules(object *op, const char *params);
128 void command_news(object *op, const char *params);
129 void command_whereabouts(object *op, const char *params);
130 void list_players(object *op, region *reg, partylist *party);
131 void command_who(object *op, const char *params);
132 void command_afk(object *op, const char *params);
133 void command_malloc(object *op, const char *params);
134 void command_mapinfo(object *op, const char *params);
135 void command_whereami(object *op, const char *params);
136 void command_maps(object *op, const char *params);
137 void command_strings(object *op, const char *params);
138 void command_time(object *op, const char *params);
139 void command_archs(object *op, const char *params);
140 void command_hiscore(object *op, const char *params);
141 void command_debug(object *op, const char *params);
142 void command_wizpass(object *op, const char *params);
143 void command_wizcast(object *op, const char *params);
144 void command_dumpallobjects(object *op, const char *params);
145 void command_dumpfriendlyobjects(object *op, const char *params);
146 void command_dumpallarchetypes(object *op, const char *params);
147 void command_ssdumptable(object *op, const char *params);
148 void command_dumpmap(object *op, const char *params);
149 void command_dumpallmaps(object *op, const char *params);
150 void command_printlos(object *op, const char *params);
151 void command_version(object *op, const char *params);
152 void command_listen(object *op, const char *params);
153 void command_statistics(object *pl, const char *params);
154 void command_fix_me(object *op, const char *params);
155 void command_players(object *op, const char *params);
156 void command_applymode(object *op, const char *params);
157 void command_bowmode(object *op, const char *params);
158 void command_unarmed_skill(object *op, const char *params);
159 void command_petmode(object *op, const char *params);
160 void command_showpets(object *op, const char *params);
161 void command_usekeys(object *op, const char *params);
162 void command_resistances(object *op, const char *params);
163 void command_help(object *op, const char *params);
164 void command_delete(object *op, const char *params);
165 void command_quit(object *op, const char *params);
166 void command_sound(object *op, const char *params);
167 void receive_player_name(object *op, const char *name);
168 void receive_player_password(object *op, const char *password);
169 void command_title(object *op, const char *params);
170 void command_save(object *op, const char *params);
171 void command_peaceful(object *op, const char *params);
172 void command_wimpy(object *op, const char *params);
173 void command_brace(object *op, const char *params);
174 void command_kill_pets(object *op, const char *params);
175 void command_passwd(object *pl, const char *params);
176 void do_harvest(object *pl, int dir, object *skill);
177 /* c_move.c */
178 void command_east(object *op, const char *params);
179 void command_north(object *op, const char *params);
180 void command_northeast(object *op, const char *params);
181 void command_northwest(object *op, const char *params);
182 void command_south(object *op, const char *params);
183 void command_southeast(object *op, const char *params);
184 void command_southwest(object *op, const char *params);
185 void command_west(object *op, const char *params);
186 void command_stay(object *op, const char *params);
187 void do_goto(object *op, const char *name, int x, int y);
188 /* c_new.c */
189 void command_run(object *op, const char *params);
190 void command_run_stop(object *op, const char *params);
191 void command_fire(object *op, const char *params);
192 void command_fire_stop(object *op, const char *params);
193 void command_face(object *op, const char *params);
194 /* c_object.c */
195 void command_uskill(object *pl, const char *params);
196 void command_rskill(object *pl, const char *params);
197 void command_search(object *op, const char *params);
198 void command_disarm(object *op, const char *params);
199 void command_throw(object *op, const char *params);
200 void command_apply(object *op, const char *params);
201 bool pick_up(object *op, object *alt);
202 void command_take(object *op, const char *params);
203 void put_object_in_sack(object *op, object *sack, object *tmp, uint32_t nrof);
204 object *drop_object(object *op, object *tmp, uint32_t nrof);
205 void drop(object *op, object *tmp);
206 void command_dropall(object *op, const char *params);
207 void command_drop(object *op, const char *params);
208 void command_empty(object *op, const char *params);
209 void command_examine(object *op, const char *params);
210 object *find_marked_object(object *op);
211 void command_mark(object *op, const char *params);
212 void examine_monster(object *op, object *tmp, int level);
213 void examine(object *op, object *tmp);
214 void inventory(object *op, object *inv);
215 void command_pickup(object *op, const char *params);
216 void command_search_items(object *op, const char *params);
217 void command_rename_item(object *op, const char *params);
218 void command_lock_item(object *op, const char *params);
219 void command_use(object *op, const char *params);
220 /* c_party.c */
221 void receive_party_password(object *op, const char *password);
222 void command_gsay(object *op, const char *params);
223 void command_party(object *op, const char *params);
224 void command_party_rejoin(object *op, const char *params);
225 /* c_range.c */
226 void command_invoke(object *op, const char *params);
227 void command_cast(object *op, const char *params);
228 void command_cast_spell(object *op, const char *params, int cast_now);
229 int legal_range(object *op, int r);
230 void command_rotateshoottype(object *op, const char *params);
231 void command_shoottype(object *op, const char *params);
232 /* c_wiz.c */
233 void command_loadtest(object *op, const char *params);
234 void command_hide(object *op, const char *params);
235 void command_setgod(object *op, const char *params);
236 void command_banish(object *op, const char *params);
237 void command_kick(object *op, const char *params);
238 void command_overlay_save(object *op, const char *params);
239 void command_overlay_reset(object *op, const char *params);
240 void command_toggle_shout(object *op, const char *params);
241 void command_shutdown(object *op, const char *params);
242 void command_goto(object *op, const char *params);
243 void command_freeze(object *op, const char *params);
244 int player_arrest(object *who);
245 void command_arrest(object *op, const char *params);
246 void command_summon(object *op, const char *params);
247 void command_swap(object *op, const char *params);
248 void command_teleport(object *op, const char *params);
249 void command_create(object *op, const char *params);
250 void command_inventory(object *op, const char *params);
251 void command_skills(object *op, const char *params);
252 void command_dump(object *op, const char *params);
253 void command_mon_aggr(object *op, const char *params);
254 void command_possess(object *op, const char *params);
255 void command_patch(object *op, const char *params);
256 void command_recollect(object *op, const char *params);
257 void command_remove(object *op, const char *params);
258 void command_free(object *op, const char *params);
259 void command_accountpasswd(object *op, const char *params);
260 void command_addexp(object *op, const char *params);
261 void command_speed(object *op, const char *params);
262 void command_stats(object *op, const char *params);
263 void command_abil(object *op, const char *params);
264 void command_reset(object *op, const char *params);
265 void command_nowiz(object *op, const char *params);
266 void command_dm(object *op, const char *params);
267 void command_invisible(object *op, const char *params);
268 void command_learn_spell(object *op, const char *params);
269 void command_learn_special_prayer(object *op, const char *params);
270 void command_forget_spell(object *op, const char *params);
271 void command_listplugins(object *op, const char *params);
272 void command_loadplugin(object *op, const char *params);
273 void command_unloadplugin(object *op, const char *params);
274 void command_dmhide(object *op, const char *params);
275 void command_stack_pop(object *op, const char *params);
276 void command_stack_push(object *op, const char *params);
277 void command_stack_list(object *op, const char *params);
278 void command_stack_clear(object *op, const char *params);
279 void command_diff(object *op, const char *params);
280 void command_insert_into(object *op, const char *params);
281 void command_style_map_info(object *op, const char *params);
282 void command_follow(object *op, const char *params);
283 void command_purge_quest(object *op, const char *param);
284 void command_purge_quest_definitions(object *op, const char *param);
285 void command_dumpabove(object *op, const char *params);
286 void command_dumpbelow(object *op, const char *params);
287 void command_settings(object *op, const char *ignored);
288 void do_dump(object *who, object *what);
289 bool can_follow(object* op, player* other);
290 /* commands.c */
291 void commands_init(void);
292 void command_list(object *pl, bool is_dm);
293 void command_execute(object *pl, char *command);
294 command_registration command_register(const char *name, uint8_t type, command_function func, float time);
295 command_registration command_register_extra(const char *name, const char *extra, uint8_t type, command_function_extra func, float time);
297 void commands_clear();
298 /* disease.c */
299 int move_disease(object *disease);
300 int infect_object(object *victim, object *disease, int force);
301 void move_symptom(object *symptom);
302 void check_physically_infect(object *victim, object *hitter);
303 int cure_disease(object *sufferer, object *caster, sstring skill);
304 /* hiscore.c */
305 void hiscore_init(void);
306 void hiscore_check(object *op, int quiet);
307 void hiscore_display(object *op, int max, const char *match);
308 /* gods.c */
309 const char *determine_god(object *op);
310 void pray_at_altar(object *pl, object *altar, object *skill);
311 int become_follower(object *op, const object *new_god);
312 archetype *determine_holy_arch(const object *god, const char *type);
313 int tailor_god_spell(object *spellop, object *caster);
314 /* init.c */
315 void init(int argc, char **argv);
316 void free_server(void);
318 void close_modules();
319 void init_signals();
320 /* knowledge.c */
321 void knowledge_give(player *pl, const char *marker, const object *book);
322 void knowledge_read(player *pl, object *book);
323 void command_knowledge(object *pl, const char *params);
324 void free_knowledge(void);
325 int knowledge_player_knows(const player *pl, const char *knowledge);
326 void knowledge_item_can_be_used_alchemy(object *op, const object *item);
328 void knowledge_send_known(player *pl);
331 void knowledge_add_probe_monster(object *op, object *mon);
332 /* login.c */
333 void emergency_save(int flag);
334 void delete_character(const char *name);
335 int verify_player(const char *name, char *password);
336 int check_name(player *me, const char *name);
337 void destroy_object(object *op);
338 int save_player(object *op, int flag);
339 void check_login(object *op, const char *password);
340 /* monster.c */
341 object *monster_check_enemy(object *npc, rv_vector *rv);
342 object *monster_find_nearest_enemy(object *npc, object *owner);
343 int monster_compute_path(object *source, object *target, int default_dir);
344 void monster_do_living(object *op);
345 int monster_move(object *op);
346 void monster_check_apply_all(object *monster);
347 void monster_npc_call_help(object *op);
348 void monster_check_earthwalls(object *op, mapstruct *m, int x, int y);
349 void monster_check_doors(object *op, mapstruct *m, int x, int y);
350 void monster_do_say(const mapstruct *map, const char *message);
351 void monster_communicate(object *op, const char *txt);
352 void monster_npc_say(object *npc, const char *cp);
353 object *monster_find_throw_ob(object *op);
354 int monster_can_detect_enemy(object *op, object *enemy, rv_vector *rv);
355 int monster_stand_in_light(object *op);
356 int monster_can_see_enemy(object *op, object *enemy);
357 const char *get_reply_text_own(reply_type rt);
358 /* move.c */
359 int move_object(object *op, int dir);
360 int move_ob(object *op, int dir, object *originator);
361 int transfer_ob(object *op, int x, int y, int randomly, object *originator);
362 int teleport(object *teleporter, uint8_t tele_type, object *user);
363 void recursive_roll(object *op, int dir, object *pusher);
364 int push_ob(object *who, int dir, object *pusher);
365 int move_to(object *op, int x, int y);
366 int object_teleport(object *op, mapstruct *map, int x, int y);
367 /* ob_methods.c */
368 void init_ob_methods(void);
369 /* ob_types.c */
370 void register_all_ob_types(void);
371 /* party.c */
372 partylist *party_form(object *op, const char *partyname);
373 void party_join(object *op, partylist *party);
374 void party_leave(object *op);
375 partylist *party_find(const char *partyname);
376 void party_remove(partylist *party);
378 partylist *party_get_next(const partylist *party);
379 void party_obsolete_parties(void);
380 const char *party_get_password(const partylist *party);
381 void party_set_password(partylist *party, const char *password);
382 int party_confirm_password(const partylist *party, const char *password);
383 void party_send_message(object *op, const char *message);
384 const char *party_get_leader(const partylist *party);
385 /* pets.c */
386 object *pets_get_enemy(object *pet, rv_vector *rv);
387 void pets_terminate(object *pet);
388 void pets_terminate_all(object *owner);
389 void pets_attempt_follow(object *for_owner, int force);
390 void pets_follow_owner(object *ob, object *owner);
391 void pets_move(object *ob);
392 void pets_move_golem(object *op);
393 void pets_control_golem(object *op, int dir);
394 int pets_summon_golem(object *op, object *caster, int dir, object *spob);
395 int pets_summon_object(object *op, object *caster, object *spell_ob, int dir, const char *stringarg);
396 int pets_should_arena_attack(object *pet, object *owner, object *target);
397 /* player.c */
398 player *find_player(const char *plname);
399 player *find_player_options(const char *plname, int options, const mapstruct *map);
400 player *find_player_partial_name(const char *plname);
402 void display_motd(const object *op);
403 void send_rules(const object *op);
404 void send_news(const object *op);
405 int playername_ok(const char *cp);
407 void set_first_map(object *op);
410 object *get_nearest_criminal(object *mon);
411 object *get_nearest_player(object *mon);
412 int path_to_player(object *mon, object *pl, unsigned mindiff);
413 void give_initial_items(object *pl, treasurelist *items);
414 void get_name(object *op);
415 void get_password(object *op);
416 void play_again(object *op);
417 void receive_play_again(object *op, char key);
418 void confirm_password(object *op);
419 int get_party_password(object *op, partylist *party);
420 int roll_stat(void);
421 void roll_stats(object *op);
422 void roll_again(object *op);
423 void key_roll_stat(object *op, char key);
424 void key_change_class(object *op, char key);
425 int check_race_and_class(living *stats, archetype *race, archetype *opclass);
426 int apply_race_and_class(object *op, archetype *race, archetype *opclass, living *stats);
427 void key_confirm_quit(object *op, char key);
428 int check_pick(object *op);
429 int fire_bow(object *op, object *arrow, int dir, int wc_mod, int16_t sx, int16_t sy);
430 void fire(object *op, int dir);
431 object *find_key(object *pl, object *container, object *door);
432 void move_player_attack(object *op, int dir);
433 int move_player(object *op, int dir);
434 int face_player(object *op, int dir);
435 int handle_newcs_player(object *op);
436 void remove_unpaid_objects(object *op, object *env, int free_items);
437 void do_some_living(object *op);
438 void kill_player(object *op, const object *killer);
439 void fix_weight(void);
440 void fix_luck(void);
441 void cast_dust(object *op, object *throw_ob, int dir);
442 void make_visible(object *op);
443 int is_true_undead(object *op);
444 int hideability(object *ob);
445 void do_hidden_move(object *op);
446 int stand_near_hostile(object *who);
447 int player_can_view(object *pl, object *op);
448 int op_on_battleground(object *op, int *x, int *y, archetype **trophy);
449 void dragon_ability_gain(object *who, int atnr, int level);
450 void player_unready_range_ob(player *pl, object *ob);
451 void player_set_state(player *pl, uint8_t state);
453 void send_delayed_buffers(player *pl);
455 /* plugins.c */
456 int plugins_init_plugin(const char *libfile);
457 int plugins_remove_plugin(const char *id);
458 void plugins_display_list(object *op);
459 void initPlugins(void);
460 void cleanupPlugins(void);
461 /* quest.c */
462 int quest_get_player_state(player *pl, sstring quest_code);
463 void quest_load_definitions(void);
464 void quest_start(player *pl, sstring quest_code, int state);
465 void quest_set_player_state(player *pl, sstring quest_code, int state);
466 int quest_was_completed(player *pl, sstring quest_code);
467 void command_quest(object *op, const char *params);
468 void dump_quests(void);
469 void free_quest(void);
470 void free_quest_definitions(void);
473 /* resurrection.c */
474 int cast_raise_dead_spell(object *op, object *caster, object *spell, int dir, const char *arg);
475 void dead_player(object *op);
476 /* rune.c */
477 int write_rune(object *op, object *caster, object *spell, int dir, const char *runename);
478 void spring_trap(object *trap, object *victim);
479 int dispel_rune(object *op, object *skill, int dir);
480 int trap_see(object *op, object *trap);
481 int trap_show(object *trap, object *where);
482 int trap_disarm(object *disarmer, object *trap, int risk, object *skill);
483 /* skills.c */
484 int steal(object *op, int dir, object *skill);
485 int pick_lock(object *pl, int dir, object *skill);
486 int hide(object *op, object *skill);
487 int jump(object *pl, int dir, object *skill);
488 int detect_curse_on_item(object *pl, object *tmp, object *skill);
489 int detect_magic_on_item(object *pl, object *tmp, object *skill);
490 int identify_object_with_skill(object *tmp, object *pl, object *skill, int print_on_success);
491 int skill_ident(object *pl, object *skill);
492 int use_oratory(object *pl, int dir, object *skill);
493 int singing(object *pl, int dir, object *skill);
494 int find_traps(object *pl, object *skill);
495 int remove_trap(object *op, object *skill);
496 int pray(object *pl, object *skill);
497 void meditate(object *pl, object *skill);
498 int write_on_item(object *pl, const char *params, object *skill);
499 int skill_throw(object *op, object *part, int dir, object *skill);
500 /* skill_util.c */
501 void init_skills(void);
502 object *find_skill_by_name(object *who, const char *name);
503 object *find_applied_skill_by_name(const object* op, const char* name);
504 object *find_skill_by_number(object *who, int skillno);
505 int change_skill(object *who, object *new_skill, int flag);
506 void clear_skill(object *who);
507 int do_skill(object *op, object *part, object *skill, int dir, const char *string);
508 int64_t calc_skill_exp(const object *who, const object *op, const object *skill);
509 int learn_skill(object *pl, object *scroll);
510 void show_skills(object *op, const char *search);
511 int use_skill(object *op, const char *string);
512 void skill_attack(object *tmp, object *pl, int dir, const char *string, object *skill);
513 /* spell_attack.c */
514 int fire_bolt(object *op, object *caster, int dir, object *spob);
515 void explode_bullet(object *op);
516 void check_bullet(object *op);
517 void cone_drop(object *op);
518 int cast_cone(object *op, object *caster, int dir, object *spell);
519 int create_bomb(object *op, object *caster, int dir, object *spell);
520 int cast_smite_spell(object *op, object *caster, int dir, object *spell);
521 int cast_destruction(object *op, object *caster, object *spell_ob);
522 int cast_curse(object *op, object *caster, object *spell_ob, int dir);
523 int mood_change(object *op, object *caster, object *spell);
524 int fire_swarm(object *op, object *caster, object *spell, int dir);
525 int cast_light(object *op, object *caster, object *spell, int dir);
526 int cast_cause_disease(object *op, object *caster, object *spell, int dir);
527 /* spell_effect.c */
528 void cast_magic_storm(object *op, object *tmp, int lvl);
529 int recharge(object *op, object *caster, object *spell_ob);
530 void polymorph(object *op, object *who, int level);
531 int cast_polymorph(object *op, object *caster, object *spell_ob, int dir);
532 int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg);
533 int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg);
534 int probe(object *op, object *caster, object *spell_ob, int dir, int level);
535 int makes_invisible_to(object *pl, object *mon);
536 int cast_invisible(object *op, object *caster, object *spell_ob);
537 int cast_earth_to_dust(object *op, object *caster, object *spell_ob);
538 int cast_word_of_recall(object *op, object *caster, object *spell_ob);
539 int cast_wonder(object *op, object *caster, int dir, object *spell_ob);
540 int perceive_self(object *op);
541 int cast_create_town_portal(object *op, object *caster, object *spell);
542 int magic_wall(object *op, object *caster, int dir, object *spell_ob);
543 int dimension_door(object *op, object *caster, object *spob, int dir);
544 int cast_heal(object *op, object *caster, object *spell, int dir);
545 int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent);
546 int cast_bless(object *op, object *caster, object *spell_ob, int dir);
547 int alchemy(object *op, object *caster, object *spell_ob);
548 int remove_curse(object *op, object *caster, object *spell);
549 int cast_item_curse_or_bless(object *op, object *spell_ob);
550 int cast_identify(object *op, object *caster, object *spell);
551 int cast_detection(object *op, object *caster, object *spell);
552 int cast_transfer(object *op, object *caster, object *spell, int dir);
553 void counterspell(object *op, int dir);
554 int cast_consecrate(object *op, object *caster, object *spell);
555 int animate_weapon(object *op, object *caster, object *spell, int dir);
556 int cast_change_map_lightlevel(object *op, object *spell);
557 int create_aura(object *op, object *caster, object *spell);
558 int write_mark(object *op, object *spell, const char *msg);
559 /* spell_util.c */
560 object *find_random_spell_in_ob(object *ob, const char *skill);
561 void set_spell_skill(object *op, object *caster, object *spob, object *dest);
562 void dump_spells(void);
563 void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator);
564 int min_casting_level(const object *caster, const object *spell);
565 int caster_level(const object *caster, const object *spell);
566 int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags);
567 int SP_level_dam_adjust(const object *caster, const object *spob);
568 int SP_level_duration_adjust(const object *caster, const object *spob);
569 int SP_level_range_adjust(const object *caster, const object *spob);
570 int SP_level_wc_adjust(const object *caster, const object *spob);
571 object *check_spell_known(object *op, const char *name);
572 object *lookup_spell_by_name(object *op, const char *spname);
573 int reflwall(mapstruct *m, int x, int y, object *sp_op);
574 int cast_create_obj(object *op, object *new_op, int dir);
575 int ok_to_put_more(mapstruct *m, int16_t x, int16_t y, object *op, uint32_t immune_stop);
576 int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, object *spell);
577 void regenerate_rod(object *rod);
578 void drain_rod_charge(object *rod);
579 void drain_wand_charge(object *wand);
580 object *find_target_for_friendly_spell(object *op, int dir);
581 int spell_find_dir(mapstruct *m, int x, int y, object *exclude);
582 int summon_hostile_monsters(object *op, int n, const char *monstername);
583 void shuffle_attack(object *op);
584 void spell_failure(object *op, int failure, int power, object *skill);
585 int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg);
586 void store_spell_expiry(object *spell);
587 void check_spell_expiry(object *spell);
588 void rod_adjust(object *rod);
589 /* swap.c */
590 void read_map_log(void);
591 int swap_map(mapstruct *map);
592 void check_active_maps(void);
593 int players_on_map(mapstruct *m, int show_all);
594 bool map_can_reset(const mapstruct *map, long current_time);
595 void flush_old_maps(void);
596 /* time.c */
597 void remove_door(object *op);
598 void remove_locked_door(object *op);
599 object *stop_item(object *op);
600 void fix_stopped_item(object *op, mapstruct *map, object *originator);
601 object *fix_stopped_arrow(object *op);
602 int free_no_drop(object *op);
603 void change_object(object *op);
604 void move_firewall(object *op);
605 void move_player_mover(object *op);
606 void process_object(object *op);
607 void legacy_remove_force(object *op);
608 void legacy_animate_trigger(object *op);
609 void legacy_move_hole(object *op);
610 /* timers.c */
611 void cftimer_process_timers(void);
612 int cftimer_create(int id, long delay, object *ob, int mode);
613 int cftimer_destroy(int id);
614 int cftimer_find_free_id(void);
615 void cftimer_init(void);
616 /* weather.c */
618 void tick_the_clock(void);
619 /* server.c */
620 char const* newhash(char const *password);
621 bool check_password(const char *typed, const char *crypted);
622 void enter_player_savebed(object *op);
623 void set_map_timeout(mapstruct *oldmap);
624 void enter_exit(object *op, object *exit_ob);
625 void process_events(void);
626 void clean_tmp_files(void);
627 void cleanup(void);
628 void leave(player *pl, int draw_exit);
629 int forbid_play(void);
630 void server_main(int argc, char *argv[]);
631 /* race.cpp */
632 void load_races(BufferReader *reader, const char *filename);
633 void finish_races();
634 void dump_races(void);
635 void free_races(void);
636 object *races_get_random_monster(const char *race, int level);
637 /* item.c */
638 bool player_can_find(object *op, object *ob);
639 
640 
646 void enter_player_maplevel(object *op);
void command_speed(object *op, const char *params)
Changes the server speed.
Definition: c_wiz.cpp:1732
void command_smile(object *op, const char *params)
'smile' command.
Definition: c_chat.cpp:766
void spring_trap(object *trap, object *victim)
This function generalizes attacks by runes/traps.
Definition: rune.cpp:214
void regenerate_rod(object *rod)
Regenerates a rod's charges.
Definition: spell_util.cpp:761
int slow_living_by(object *op, const int speed_penalty)
Definition: attack.cpp:2231
void init_signals()
Setup our signal handlers.
Definition: init.cpp:1331
void apply_by_living_below(object *pl)
Attempt to apply the object 'below' the player.
Definition: apply.cpp:357
void clean_tmp_files(void)
Save unique maps and clean up temporary map files unless recycling temporary maps.
Definition: main.cpp:351
void set_map_timeout(mapstruct *oldmap)
Enable swapping for the given map.
Definition: main.cpp:304
void do_dump(object *who, object *what)
Definition: c_wiz.cpp:2865
object * lookup_spell_by_name(object *op, const char *spname)
Look at object 'op' and see if they know the spell spname.
Definition: spell_util.cpp:410
int dispel_rune(object *op, object *skill, int dir)
Someone is trying to disarm a rune.
Definition: rune.cpp:304
void command_bounce(object *op, const char *params)
'bounce' command.
Definition: c_chat.cpp:755
int apply_special(object *who, object *op, int aflags)
Apply an object.
Definition: apply.cpp:818
const char * get_reply_text_own(reply_type rt)
Return the verb for the player's dialog type.
Definition: monster.cpp:2427
int apply_manual(object *op, object *tmp, int aflag)
Main apply handler.
Definition: apply.cpp:259
const char * determine_god(object *op)
Determines if op worships a god.
Definition: gods.cpp:55
void polymorph(object *op, object *who, int level)
Handles polymorphing an object, living or not.
void command_arrest(object *op, const char *params)
Wizard jails player.
Definition: c_wiz.cpp:821
void show_skills(object *op, const char *search)
Displays a player's skill list, and some other non skill related info (god, max weapon improvements...
Definition: skill_util.cpp:884
void command_hiscore(object *op, const char *params)
Player is asking for the hiscore.
Definition: c_misc.cpp:879
void legacy_remove_force(object *op)
Definition: time.cpp:867
void command_east(object *op, const char *params)
'east' command.
Definition: c_move.cpp:57
int change_skill(object *who, object *new_skill, int flag)
This changes the object's skill to new_skill.
Definition: skill_util.cpp:357
void commands_clear()
Clear all registered commands.
Definition: commands.cpp:346
int friendly_fire(object *op, object *hitter)
Find out if this is friendly fire (PVP and attacker is peaceful) or not.
Definition: attack.cpp:1858
void monster_do_say(const mapstruct *map, const char *message)
Output a NPC message on a map.
Definition: monster.cpp:2401
int move_player(object *op, int dir)
Move player in the given direction.
Definition: player.cpp:2962
int skill_ident(object *pl, object *skill)
Main identification skill handling.
Definition: skills.cpp:936
void command_yawn(object *op, const char *params)
'yawn' command.
Definition: c_chat.cpp:1261
int64_t calc_skill_exp(const object *who, const object *op, const object *skill)
Calculates amount of experience can be gained for successful use of a skill.
Definition: skill_util.cpp:691
void enter_exit(object *op, object *exit_ob)
Tries to move 'op' to exit_ob.
Definition: server.cpp:727
This is used by get_rangevector to determine where the other creature is.
Definition: map.h:375
void roll_again(object *op)
Ask the player what to do with the statistics.
Definition: player.cpp:1146
void quest_start(player *pl, sstring quest_code, int state)
Start a quest for a player.
Definition: quest.cpp:686
int cast_raise_dead_spell(object *op, object *caster, object *spell, int dir, const char *arg)
This handles the raise dead / resurrection spells.
void leave(player *pl, int draw_exit)
Player logs out, or was disconnected.
Definition: server.cpp:1308
int account_login(const char *account_name, const char *account_password)
Check if the given account exists, and whether the password is correct.
Definition: account.cpp:318
void command_diff(object *op, const char *params)
Get a diff of specified items.
Definition: c_wiz.cpp:2622
object * check_spell_known(object *op, const char *name)
Checks to see if player knows the spell.
Definition: spell_util.cpp:394
int check_name(player *me, const char *name)
Ensure player's name is valid.
Definition: login.cpp:181
void free_quest_definitions(void)
void command_quit(object *op, const char *params)
Tell players to use the 'delete' command.
Definition: c_misc.cpp:1871
void command_bow(object *op, const char *params)
'bow' command.
Definition: c_chat.cpp:931
bool player_can_find(object *op, object *ob)
Return true if player 'op' can see object 'op' for purpose of locating items for partial item matchin...
Definition: item.cpp:590
void command_skills(object *op, const char *params)
Player is asking for her skills.
Definition: c_wiz.cpp:1365
void remove_door(object *op)
Remove non locked doors.
Definition: time.cpp:38
int account_remove_player(const char *account_name, const char *player_name)
Removes a player name from an account.
Definition: account.cpp:474
void monster_communicate(object *op, const char *txt)
This function looks for an object or creature that is listening to said text.
Definition: monster.cpp:2483
void command_pout(object *op, const char *params)
'pout' command.
Definition: c_chat.cpp:1074
int caster_level(const object *caster, const object *spell)
This function returns the effective level the spell is being cast at.
Definition: spell_util.cpp:194
void command_motd(object *op, const char *params)
Display the message of the day.
Definition: c_misc.cpp:215
object * get_nearest_criminal(object *mon)
Definition: player.cpp:591
void command_strut(object *op, const char *params)
'strut' command.
Definition: c_chat.cpp:1195
void register_all_ob_types(void)
Calls the intialization functions for all individual types.
Definition: ob_types.cpp:31
void command_flip(object *op, const char *params)
'flip' command.
Definition: c_chat.cpp:997
void do_forget_spell(object *op, const char *spell)
Erases spell from player's inventory.
Definition: apply.cpp:187
void command_cast(object *op, const char *params)
'cast' command, prepares a spell for laster casting.
Definition: c_range.cpp:50
int makes_invisible_to(object *pl, object *mon)
This checks to see if 'pl' is invisible to 'mon'.
bool check_password(const char *typed, const char *crypted)
Hash a password and compare it to the stored version.
Definition: server.cpp:114
int cure_disease(object *sufferer, object *caster, sstring skill)
Do the cure disease stuff, from the spell "cure disease".
Definition: disease.cpp:685
void command_overlay_save(object *op, const char *params)
Saves the op's map as an overlay - objects are persisted.
Definition: c_wiz.cpp:568
int monster_can_see_enemy(object *op, object *enemy)
Assuming no walls/barriers, lets check to see if its possible to see an enemy.
Definition: monster.cpp:2867
void command_title(object *op, const char *params)
Player wishes to change her title.
Definition: c_misc.cpp:2045
int cast_change_ability(object *op, object *caster, object *spell_ob, int dir, int silent)
Cast some stat-improving spell.
int apply_auto(object *op)
Map was just loaded, handle op's initialization.
Definition: main.cpp:211
void pets_follow_owner(object *ob, object *owner)
A pet is trying to follow its owner.
Definition: pets.cpp:297
void apply_handle_yield(object *tmp)
This checks whether the object has a "on_use_yield" field, and if so generated and drops matching ite...
Definition: apply.cpp:122
void command_face(object *op, const char *params)
Player wants to face a given direction.
Definition: c_new.cpp:111
void do_some_living(object *op)
Regenerate hp/sp/gr, decreases food.
Definition: player.cpp:3298
void command_unregister(command_registration command)
Unregister a previously registered command.
Definition: commands.cpp:535
void command_dm(object *op, const char *params)
Actual command to perhaps become dm.
Definition: c_wiz.cpp:2214
void command_dump(object *op, const char *params)
Dumps the difference between an object and its archetype.
Definition: c_wiz.cpp:1377
void drain_wand_charge(object *wand)
Drains a charge from a wand.
Definition: spell_util.cpp:786
void command_snicker(object *op, const char *params)
'snicker' command.
Definition: c_chat.cpp:1151
player * add_player(socket_struct *ns, int flags)
Tries to add player on the connection passwd in ns.
Definition: player.cpp:468
void command_stay(object *op, const char *params)
'stay' command.
Definition: c_move.cpp:145
int player_arrest(object *who)
Put a player into jail, taking into account cursed exits and player's region.
Definition: c_wiz.cpp:789
void cast_dust(object *op, object *throw_ob, int dir)
Handles op throwing objects of type 'DUST'.
Definition: player.cpp:3953
void command_smirk(object *op, const char *params)
'smirk' command.
Definition: c_chat.cpp:1118
void command_grin(object *op, const char *params)
'grin' command.
Definition: c_chat.cpp:920
void command_invisible(object *op, const char *params)
Wizard wants to become invisible.
Definition: c_wiz.cpp:2226
int attack_ob(object *op, object *hitter)
Simple wrapper for attack_ob_simple(), will use hitter's values.
Definition: attack.cpp:937
int push_ob(object *who, int dir, object *pusher)
Something is pushing some other object.
Definition: move.cpp:434
void command_nod(object *op, const char *params)
'nod' command.
Definition: c_chat.cpp:722
int account_change_password(const char *account_name, const char *current_password, const char *new_password)
Change an account password.
Definition: account.cpp:627
int forbid_play(void)
Checks if server should be started.
Definition: server.cpp:1369
int monster_compute_path(object *source, object *target, int default_dir)
Computes a path from source to target.
Definition: monster.cpp:471
void command_freeze(object *op, const char *params)
Freezes a player for a specified tick count, 100 by default.
Definition: c_wiz.cpp:745
void command_body(object *op, const char *params)
This command dumps the body information for object *op.
Definition: c_misc.cpp:173
int cast_bless(object *op, object *caster, object *spell_ob, int dir)
Improve statistics of some living object.
const char * account_get_account_for_char(const char *charname)
This looks at all the accounts and sees if charname is associated with any of them.
Definition: account.cpp:579
int identify_object_with_skill(object *tmp, object *pl, object *skill, int print_on_success)
Helper function for do_skill_ident, so that we can loop over inventory AND objects on the ground conv...
Definition: skills.cpp:819
void party_set_password(partylist *party, const char *password)
Sets a party's password.
Definition: party.cpp:244
void command_examine(object *op, const char *params)
'examine' command.
Definition: c_object.cpp:1441
int move_disease(object *disease)
Ticks the clock for disease: infect, aggravate symptoms, ...
Definition: disease.cpp:180
int account_new(const char *account_name, const char *account_password)
Adds an account.
Definition: account.cpp:399
void move_player_mover(object *op)
This function takes a PLAYERMOVER as an argument, and performs the function of a player mover...
Definition: time.cpp:707
void pets_move(object *ob)
Handles a pet's movement.
Definition: pets.cpp:330
void command_stack_pop(object *op, const char *params)
Pop the stack top.
Definition: c_wiz.cpp:2534
void knowledge_give(player *pl, const char *marker, const object *book)
Give a knowledge item from its code.
Definition: knowledge.cpp:996
int save_player(object *op, int flag)
Saves a player to disk.
Definition: login.cpp:239
int level
Definition: readable.cpp:1561
void command_sniff(object *op, const char *params)
'sniff' command.
Definition: c_chat.cpp:1162
partylist * party_get_next(const partylist *party)
Returns the next party from the list of all parties.
Definition: party.cpp:208
void command_loadplugin(object *op, const char *params)
Loads the given plugin.
Definition: c_wiz.cpp:2458
void command_dumpallarchetypes(object *op, const char *params)
Various archetypes-related statistics.
Definition: c_misc.cpp:1003
void move_symptom(object *symptom)
Make the symptom do the nasty things it does.
Definition: disease.cpp:592
void fix_stopped_item(object *op, mapstruct *map, object *originator)
Put stopped item where stop_item() had found it.
Definition: time.cpp:495
void command_use(object *op, const char *params)
Try to use an item on another.
Definition: c_object.cpp:2703
void enter_player_maplevel(object *op)
Move a player to its stored map level.
Definition: server.cpp:682
void examine_monster(object *op, object *tmp, int level)
Player examine a monster.
Definition: c_object.cpp:1566
void key_roll_stat(object *op, char key)
Player is currently swapping stats.
Definition: player.cpp:1218
int cast_smite_spell(object *op, object *caster, int dir, object *spell)
The priest points to a creature and causes a 'godly curse' to descend.
void command_style_map_info(object *op, const char *params)
Displays information about styles loaded for random maps.
Definition: c_wiz.cpp:2763
void(* command_function)(object *op, const char *params)
One command function.
Definition: commands.h:17
void command_malloc(object *op, const char *params)
Display memory information.
Definition: c_misc.cpp:794
void receive_player_password(object *op, const char *password)
A player just entered her password, including for changing it.
Definition: c_misc.cpp:1953
void command_scream(object *op, const char *params)
'scream' command.
Definition: c_chat.cpp:843
bool can_follow(object *op, player *other)
Definition: c_wiz.cpp:2796
Socket structure, represents a client-server connection.
Definition: newserver.h:93
void spell_failure(object *op, int failure, int power, object *skill)
Handles the various effects for differing degrees of failure badness.
int check_pick(object *op)
Sees if there is stuff to be picked up/picks up stuff, for players only.
Definition: player.cpp:1731
const char * party_get_leader(const partylist *party)
Returns the name of the party's leader.
Definition: party.cpp:292
object * monster_check_enemy(object *npc, rv_vector *rv)
Checks npc->enemy and returns that enemy if still valid, NULL otherwise.
Definition: monster.cpp:80
int pick_lock(object *pl, int dir, object *skill)
Lock pick handling.
Definition: skills.cpp:400
void command_learn_special_prayer(object *op, const char *params)
Wizard wants to learn a god-given spell.
Definition: c_wiz.cpp:2402
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
Scales the spellpoint cost of a spell by it's increased effectiveness.
Definition: spell_util.cpp:236
void command_whereabouts(object *op, const char *params)
'whereabouts' command.
Definition: c_misc.cpp:482
int object_teleport(object *op, mapstruct *map, int x, int y)
Move the specified object in a free spot around the map's x & y.
Definition: move.cpp:597
void command_chuckle(object *op, const char *params)
'chuckle' command.
Definition: c_chat.cpp:975
void command_reset(object *op, const char *params)
Resets a map.
Definition: c_wiz.cpp:1885
int free_no_drop(object *op)
Check whether the given object is FLAG_NO_DROP.
Definition: time.cpp:565
void command_glare(object *op, const char *params)
'glare' command.
Definition: c_chat.cpp:1030
int cast_word_of_recall(object *op, object *caster, object *spell_ob)
Word of recall causes the player to return 'home'.
void command_summon(object *op, const char *params)
Summons player near DM.
Definition: c_wiz.cpp:866
void command_create(object *op, const char *params)
Wizard wants to create an object.
Definition: c_wiz.cpp:999
const char * party_get_password(const partylist *party)
Returns the party's password.
Definition: party.cpp:232
void play_again(object *op)
Ask the player whether to play again or disconnect.
Definition: player.cpp:908
void command_version(object *op, const char *params)
Server version.
Definition: c_misc.cpp:1074
void legacy_move_hole(object *op)
Definition: time.cpp:875
void check_spell_expiry(object *spell)
Checks if player should be warned of soon expiring spell.
int checkbanned(const char *login, const char *host)
Check if a player and/or host is banned.
Definition: ban.cpp:32
int SP_level_dam_adjust(const object *caster, const object *spob)
Returns adjusted damage based on the caster.
Definition: spell_util.cpp:287
void command_cringe(object *op, const char *params)
'cringe' command.
Definition: c_chat.cpp:1294
void blind_living(object *op, object *hitter, int dam)
Blind a living thing.
Definition: attack.cpp:2358
const char * account_exists(const char *account_name)
Checks the existing accounts, and see if this account exists.
Definition: account.cpp:296
int stand_near_hostile(object *who)
Determine if who is standing near a hostile creature.
Definition: player.cpp:4100
void accounts_load(void)
This loads all the account entries into memory.
Definition: account.cpp:161
void command_gasp(object *op, const char *params)
'gasp' command.
Definition: c_chat.cpp:1019
void command_passwd(object *pl, const char *params)
Player is asking to change password.
Definition: c_misc.cpp:2234
void command_settings(object *op, const char *ignored)
Wizard wants to know some server settings, so display.
Definition: c_wiz.cpp:2914
int roll_stat(void)
This rolls four 1-6 rolls and sums the best 3 of the 4.
Definition: player.cpp:1043
player * find_player_options(const char *plname, int options, const mapstruct *map)
Find a player.
Definition: player.cpp:70
int trap_disarm(object *disarmer, object *trap, int risk, object *skill)
Try to disarm a trap/rune.
Definition: rune.cpp:442
player * find_player(const char *plname)
Find a player by her full name.
Definition: player.cpp:59
int apply_can_apply_object(const object *who, const object *op)
Checks to see if 'who' can apply object 'op'.
Definition: apply.cpp:678
void party_leave(object *op)
Makes a player leave his party.
Definition: party.cpp:123
int verify_player(const char *name, char *password)
This verify that a character of name exits, and that it matches password.
Definition: login.cpp:111
int jump(object *pl, int dir, object *skill)
Jump skill handling.
Definition: skills.cpp:675
int monster_move(object *op)
Main monster processing routine.
Definition: monster.cpp:867
object * stop_item(object *op)
An item (ARROW or such) stops moving.
Definition: time.cpp:455
void command_insert_into(object *op, const char *params)
Puts an object into another.
Definition: c_wiz.cpp:2686
void command_wimpy(object *op, const char *params)
Player wants to change how soon she'll flee.
Definition: c_misc.cpp:2140
int remove_trap(object *op, object *skill)
This skill will disarm any previously discovered trap.
Definition: skills.cpp:1320
void command_wave(object *op, const char *params)
'wave' command.
Definition: c_chat.cpp:1228
void party_remove(partylist *party)
Removes and frees a party.
Definition: party.cpp:164
void command_abil(object *op, const char *params)
Changes an object's statistics.
Definition: c_wiz.cpp:1819
command_registration command_register(const char *name, uint8_t type, command_function func, float time)
Register a player-issued command.
Definition: commands.cpp:101
void fix_weight(void)
Check recursively the weight of all players, and fix what needs to be fixed.
Definition: player.cpp:3916
void command_fire_stop(object *op, const char *params)
Player wants to stop firing.
Definition: c_new.cpp:98
int create_bomb(object *op, object *caster, int dir, object *spell)
Create a bomb.
void pets_attempt_follow(object *for_owner, int force)
Check pets so they try to follow their master around the world.
Definition: pets.cpp:262
void dead_player(object *op)
Kill a player on a permanent death server with resurrection.
int cast_item_curse_or_bless(object *op, object *spell_ob)
This alters player's marked item's cursed or blessed status, based on the spell_ob's fields...
void command_spit(object *op, const char *params)
'spit' command.
Definition: c_chat.cpp:1184
void process_object(object *op)
Main object move function.
Definition: time.cpp:796
void cone_drop(object *op)
Drops an object based on what is in the cone's "other_arch".
int apply_race_and_class(object *op, archetype *race, archetype *opclass, living *stats)
This is somewhat like key_change_class() above, except we know the race to change to...
Definition: player.cpp:1485
int legal_range(object *op, int r)
Check for the validity of a player range.
Definition: c_range.cpp:247
void command_search(object *op, const char *params)
'search' command.
Definition: c_object.cpp:212
void command_dumpabove(object *op, const char *params)
Player wants to dump object above her.
Definition: c_wiz.cpp:2902
int player_can_view(object *pl, object *op)
Check the player los field for viewability of the object op.
Definition: player.cpp:4168
int path_to_player(object *mon, object *pl, unsigned mindiff)
Returns the direction to the player, if valid.
Definition: player.cpp:659
void command_dance(object *op, const char *params)
'dance' command.
Definition: c_chat.cpp:733
void free_quest(void)
Free all quest status structures.
Definition: quest.cpp:911
void command_language(object *op, const char *params)
This is the 'language' command.
Definition: c_misc.cpp:130
int reflwall(mapstruct *m, int x, int y, object *sp_op)
Decides weither the (spell-)object sp_op will be reflected from the given mapsquare.
Definition: spell_util.cpp:470
void pets_terminate_all(object *owner)
Removes all pets someone owns.
Definition: pets.cpp:242
int recharge(object *op, object *caster, object *spell_ob)
Recharge wands.
void command_quest(object *op, const char *params)
Command handler for 'quest'.
Definition: quest.cpp:744
void command_swap(object *op, const char *params)
Mark a map as ready for swapping.
Definition: c_wiz.cpp:907
int swap_map(mapstruct *map)
Swaps a map to disk.
Definition: swap.cpp:136
static struct Command_Line_Options options[]
Actual valid command line options.
Definition: init.cpp:386
void command_party(object *op, const char *params)
'party' command, subdivided in different sub commands.
Definition: c_party.cpp:97
void command_stats(object *op, const char *params)
Displays the statistics of a player.
Definition: c_wiz.cpp:1762
void command_players(object *op, const char *params)
Display all known players.
Definition: c_misc.cpp:1225
void command_think(object *op, const char *params)
'think' command.
Definition: c_chat.cpp:1305
void command_stack_list(object *op, const char *params)
Displays stack contents.
Definition: c_wiz.cpp:2565
int cast_cone(object *op, object *caster, int dir, object *spell)
Casts a cone spell.
void check_active_maps(void)
Finds maps in memory to swap.
Definition: swap.cpp:201
void command_fire(object *op, const char *params)
Player wants to start firing.
Definition: c_new.cpp:77
void command_remove(object *op, const char *params)
Remove an object from its position.
Definition: c_wiz.cpp:1565
void cleanup(void)
Clean up everything and exit.
Definition: server.cpp:1262
void command_slap(object *op, const char *params)
'slap' command.
Definition: c_chat.cpp:1107
int cast_create_food(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
Create food.
void commands_init(void)
Init standard commands.
Definition: commands.cpp:108
void dump_quests(void)
Dump all of the quests, then calls exit() - useful in terms of debugging to make sure that quests are...
Definition: quest.cpp:900
void command_reply(object *op, const char *params)
Reply to last person who told you something [mids 01/14/2002].
Definition: c_chat.cpp:336
void command_gsay(object *op, const char *params)
'gsay' command, talks to party.
Definition: c_party.cpp:75
static std::shared_ptr< inja::Environment > env
Rendering environment.
Definition: mapper.cpp:2222
void hiscore_display(object *op, int max, const char *match)
Displays the high score file.
Definition: hiscore.cpp:451
void command_unarmed_skill(object *op, const char *params)
Player wants to change prefered unarmed skill.
Definition: c_misc.cpp:1379
void check_bullet(object *op)
Checks to see what op should do, given the space it is on (eg, explode, damage player, etc).
void get_name(object *op)
Waiting for the player&#39;s name.
Definition: player.cpp:886
void command_peaceful(object *op, const char *params)
Player toggles her peaceful status.
Definition: c_misc.cpp:2122
void command_clap(object *op, const char *params)
&#39;clap&#39; command.
Definition: c_chat.cpp:942
void command_say(object *op, const char *params)
&#39;say&#39; command.
Definition: c_chat.cpp:34
void command_strings(object *op, const char *params)
Various string-related statistics.
Definition: c_misc.cpp:845
void command_brace(object *op, const char *params)
Player toggles her braced status.
Definition: c_misc.cpp:2170
void pets_control_golem(object *op, int dir)
Makes the golem go in specified direction.
Definition: pets.cpp:643
int use_alchemy(object *op)
Handle use_skill for alchemy-like items.
Definition: alchemy.cpp:1062
int apply_check_weapon_power(const object *who, int improves)
This checks to see of the player (who) is sufficient level to use a weapon with improves improvements...
Definition: apply.cpp:793
void command_whistle(object *op, const char *params)
&#39;whistle&#39; command.
Definition: c_chat.cpp:1239
void command_cough(object *op, const char *params)
&#39;cough&#39; command.
Definition: c_chat.cpp:986
int probe(object *op, object *caster, object *spell_ob, int dir, int level)
Try to get information about a living thing.
int trap_show(object *trap, object *where)
Handles showing a trap/rune detonation.
Definition: rune.cpp:412
void apply_changes_to_player(object *pl, object *change, int limit_stats)
Applies (race) changes to a player.
Definition: apply.cpp:1325
void knowledge_item_can_be_used_alchemy(object *op, const object *item)
Displays known alchemy recipes an item can be used in.
Definition: knowledge.cpp:1334
object * races_get_random_monster(const char *race, int level)
Get a random monster of specified race and level at most the specified one.
Definition: races.cpp:22
void command_invoke(object *op, const char *params)
&#39;invoke&#39; command, fires a spell immediately.
Definition: c_range.cpp:38
int move_to(object *op, int x, int y)
Move an object one square toward a specified destination on the same map.
Definition: move.cpp:563
void flush_old_maps(void)
Reset maps that need to, remove their swap file.
Definition: swap.cpp:291
int cast_curse(object *op, object *caster, object *spell_ob, int dir)
Curse an object, reducing its statistics.
int skill_throw(object *op, object *part, int dir, object *skill)
Throwing skill handling.
Definition: skills.cpp:2286
void command_fix_me(object *op, const char *params)
Wrapper to fix a player.
Definition: c_misc.cpp:1211
void command_dmtell(object *op, const char *params)
Private communication, by a DM (can&#39;t be ignored by player).
Definition: c_chat.cpp:320
int fire_swarm(object *op, object *caster, object *spell, int dir)
The following routine creates a swarm of objects.
reply_type
Various kind of messages a player or NPC can say.
Definition: dialog.h:7
void command_twiddle(object *op, const char *params)
&#39;twiddle&#39; command.
Definition: c_chat.cpp:1217
One party.
Definition: party.h:10
void command_shiver(object *op, const char *params)
&#39;shiver&#39; command.
Definition: c_chat.cpp:1085
int apply_by_living(object *pl, object *op, int aflag, int quiet)
Living thing is applying an object.
Definition: apply.cpp:299
void command_bowmode(object *op, const char *params)
Player wants to change the bowmode, how arrows are fired.
Definition: c_misc.cpp:1316
void do_hidden_move(object *op)
For hidden creatures - a chance of becoming &#39;unhidden&#39; every time they move - as we subtract off &#39;inv...
Definition: player.cpp:4059
void confuse_living(object *op, object *hitter, int dam)
Confuse a living thing.
Definition: attack.cpp:2315
void kill_player(object *op, const object *killer)
Handle a player&#39;s death.
Definition: player.cpp:3514
void command_goto(object *op, const char *params)
Wizard teleports to a map.
Definition: c_wiz.cpp:724
int account_is_logged_in(const char *name)
This checkes if an account is logged in.
Definition: account.cpp:604
void command_addexp(object *op, const char *params)
This adds exp to a player.
Definition: c_wiz.cpp:1676
void finish_races()
Definition: races.cpp:98
void receive_party_password(object *op, const char *password)
Player entered a party password.
Definition: c_party.cpp:53
void accounts_save(void)
Save all the account information.
Definition: account.cpp:255
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:483
void send_delayed_buffers(player *pl)
Send all delayed buffers for a player.
Definition: player.cpp:4535
int detect_curse_on_item(object *pl, object *tmp, object *skill)
Runs a &#39;detect curse&#39; check on a given item.
Definition: skills.cpp:712
void command_wizpass(object *op, const char *params)
Wizard toggling wall-crossing.
Definition: c_misc.cpp:915
void command_tell(object *op, const char *params)
Private communication.
Definition: c_chat.cpp:308
void set_player_socket(player *p, socket_struct *ns)
This copies the data from the socket into the player structure.
Definition: player.cpp:421
command_registration command_register_extra(const char *name, const char *extra, uint8_t type, command_function_extra func, float time)
Register a player-issued command with an extra parameter.
Definition: commands.cpp:526
void key_change_class(object *op, char key)
This function takes the key that is passed, and does the appropriate action with it (change race...
Definition: player.cpp:1294
int knowledge_player_knows(const player *pl, const char *knowledge)
Determines whether a player knows a specific knowledge or not.
Definition: knowledge.cpp:1298
void account_char_remove(Account_Chars *chars, const char *pl_name)
This removes a character on this account.
void command_search_items(object *op, const char *params)
&#39;search-items&#39; command.
Definition: c_object.cpp:2429
void account_logout(const char *account_name)
Remove &#39;account_name&#39; from the list of logged in accounts.
Definition: account.cpp:337
void monster_npc_say(object *npc, const char *cp)
Simple function to have some NPC say something.
Definition: monster.cpp:2606
int SP_level_wc_adjust(const object *caster, const object *spob)
Returns adjusted wc based on the caster and the spell.
Definition: spell_util.cpp:362
void command_sneeze(object *op, const char *params)
&#39;sneeze&#39; command.
Definition: c_chat.cpp:1140
object * find_target_for_friendly_spell(object *op, int dir)
This function is commonly used to find a friendly target for spells such as heal or protection or arm...
Definition: spell_util.cpp:813
void close_modules()
Clean up all modules which are not disabled.
Definition: init.cpp:82
void drain_rod_charge(object *rod)
Drain charges from a rod.
Definition: spell_util.cpp:776
int hide(object *op, object *skill)
Main hide handling.
Definition: skills.cpp:505
void command_setgod(object *op, const char *params)
Sets the god for some objects.
Definition: c_wiz.cpp:418
void command_laugh(object *op, const char *params)
&#39;laugh&#39; command.
Definition: c_chat.cpp:788
void command_hug(object *op, const char *params)
&#39;hug&#39; command.
Definition: c_chat.cpp:876
int monster_stand_in_light(object *op)
Cache monster_stand_in_light_internal().
Definition: monster.cpp:2845
void key_confirm_quit(object *op, char key)
We receive the reply to the &#39;quit confirmation&#39; message.
Definition: player.cpp:1599
void monster_npc_call_help(object *op)
A monster calls for help against its enemy.
Definition: monster.cpp:2014
void command_run(object *op, const char *params)
Player wants to start running.
Definition: c_new.cpp:41
void command_archs(object *op, const char *params)
void get_password(object *op)
Waiting for the player&#39;s password.
Definition: player.cpp:897
void monster_check_apply_all(object *monster)
Calls monster_check_apply() for all inventory objects.
Definition: monster.cpp:2001
object * hit_with_arrow(object *op, object *victim)
hit_with_arrow() disassembles the missile, attacks the victim and reassembles the missile...
Definition: attack.cpp:979
int plugins_init_plugin(const char *libfile)
Try to load the specified plugin.
Definition: plugins.cpp:374
void load_races(BufferReader *reader, const char *filename)
Reads the races file in the lib/ directory, then overwrites old &#39;race&#39; entries.
Definition: races.cpp:47
void command_shake(object *op, const char *params)
&#39;shake&#39; command.
Definition: c_chat.cpp:810
uint64_t command_registration
Identifier when registering a command.
Definition: commands.h:32
void player_set_state(player *pl, uint8_t state)
Set the player&#39;s state to the specified one.
Definition: player.cpp:4493
object * get_nearest_player(object *mon)
Finds the nearest visible player or player-friendly for some object.
Definition: player.cpp:548
void account_char_save(Account_Chars *chars)
Saves the character information for the given account.
int pets_should_arena_attack(object *pet, object *owner, object *target)
Determines if checks so pets don&#39;t attack players or other pets should be overruled by the arena petm...
Definition: pets.cpp:1099
void account_password(char *buf, int len, socket_struct *ns)
Handles the account password change.
Definition: request.cpp:3097
int cast_create_obj(object *op, object *new_op, int dir)
Creates object new_op in direction dir or if that is blocked, beneath the player (op).
Definition: spell_util.cpp:494
void party_send_message(object *op, const char *message)
Send a message to all party members except the speaker.
Definition: party.cpp:274
int summon_hostile_monsters(object *op, int n, const char *monstername)
Summons hostile monsters and places them in nearby squares.
int perceive_self(object *op)
Living thing wants to know information.
void command_rotateshoottype(object *op, const char *params)
&#39;rotateshoottype&#39; command, switch range attack.
Definition: c_range.cpp:343
void(* command_function_extra)(object *op, const char *params, const char *extra)
One command function, with a custom parameter specified at registration time.
Definition: commands.h:29
int SP_level_duration_adjust(const object *caster, const object *spob)
Adjust the duration of the spell based on level.
Definition: spell_util.cpp:312
void command_rskill(object *pl, const char *params)
&#39;ready_skill&#39; command.
Definition: c_object.cpp:161
void command_throw(object *op, const char *params)
&#39;throw&#39; command.
Definition: c_object.cpp:239
void command_applymode(object *op, const char *params)
Players wants to change the apply mode, ie how to handle applying an item when no body slot available...
Definition: c_misc.cpp:1275
int pets_summon_golem(object *op, object *caster, int dir, object *spob)
Summons a monster.
Definition: pets.cpp:664
void knowledge_read(player *pl, object *book)
Player is reading a book, give knowledge if needed, warn player, and such.
Definition: knowledge.cpp:1056
void set_first_map(object *op)
This loads the first map an puts the player on it.
Definition: player.cpp:402
void command_chat(object *op, const char *params)
&#39;chat&#39; command.
Definition: c_chat.cpp:221
void read_map_log(void)
Reads temporary maps information from disk.
Definition: swap.cpp:71
int cast_light(object *op, object *caster, object *spell, int dir)
Illuminates something on a map, or try to blind a living thing.
void command_northeast(object *op, const char *params)
&#39;northeast&#39; command.
Definition: c_move.cpp:79
SockList * player_get_delayed_buffer(player *pl)
Get a delayed socket buffer, that will be sent after the player&#39;s tick is complete.
Definition: player.cpp:4506
void command_stack_push(object *op, const char *params)
Push specified item on stack.
Definition: c_wiz.cpp:2547
void command_apply(object *op, const char *params)
&#39;apply&#39; command.
Definition: c_object.cpp:251
This is a game-map.
Definition: map.h:320
void command_cointoss(object *op, const char *params)
&#39;cointoss&#39; command.
Definition: c_chat.cpp:64
void command_dumpallmaps(object *op, const char *params)
Various map-related statistics.
Definition: c_misc.cpp:1045
void command_shout(object *op, const char *params)
&#39;shout&#39; command.
Definition: c_chat.cpp:210
int write_mark(object *op, object *spell, const char *msg)
This writes a rune that contains the appropriate message.
void command_knowledge(object *pl, const char *params)
Handle the &#39;knowledge&#39; for a player.
Definition: knowledge.cpp:1213
void command_wizcast(object *op, const char *params)
Wizard toggling "cast everywhere" ability.
Definition: c_misc.cpp:945
void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator)
Inserts into map a spell effect based on other_arch.
Definition: spell_util.cpp:144
void command_showpets(object *op, const char *params)
Players wants to know her pets.
Definition: c_misc.cpp:1479
int hit_map(object *op, int dir, uint32_t type, int full_hit)
Attack a spot on the map.
Definition: attack.cpp:355
void command_learn_spell(object *op, const char *params)
Wizard wants to learn a regular spell.
Definition: c_wiz.cpp:2390
int is_true_undead(object *op)
Is the object a true undead?
Definition: player.cpp:4001
void legacy_animate_trigger(object *op)
Definition: time.cpp:871
void command_blush(object *op, const char *params)
&#39;blush&#39; command.
Definition: c_chat.cpp:953
void command_inventory(object *op, const char *params)
Shows the inventory or some item.
Definition: c_wiz.cpp:1335
int steal(object *op, int dir, object *skill)
Main stealing function.
Definition: skills.cpp:288
int teleport(object *teleporter, uint8_t tele_type, object *user)
Teleport an item around a nearby random teleporter of specified type.
Definition: move.cpp:204
int infect_object(object *victim, object *disease, int force)
Try to infect something with a disease.
Definition: disease.cpp:317
int monster_can_detect_enemy(object *op, object *enemy, rv_vector *rv)
Determine if we can &#39;detect&#39; the enemy.
Definition: monster.cpp:2690
void command_party_rejoin(object *op, const char *params)
Handles the &#39;party_rejoin&#39; command.
Definition: c_party.cpp:307
void confirm_password(object *op)
Ask the player to confirm her password during creation.
Definition: player.cpp:1011
void command_lock_item(object *op, const char *params)
Alternate way to lock/unlock items (command line).
Definition: c_object.cpp:2660
void command_teleport(object *op, const char *params)
Teleport next to target player.
Definition: c_wiz.cpp:933
void hiscore_check(object *op, int quiet)
Checks if player should enter the hiscore, and if so writes her into the list.
Definition: hiscore.cpp:348
void remove_locked_door(object *op)
Same as remove_door() but for locked doors.
Definition: time.cpp:64
void paralyze_living(object *op, int dam)
Paralyze a living thing.
Definition: attack.cpp:2402
int do_skill(object *op, object *part, object *skill, int dir, const char *string)
Main skills use function-similar in scope to cast_spell().
Definition: skill_util.cpp:443
int cftimer_destroy(int id)
Destroys an existing timer.
Definition: timers.cpp:128
int move_ob(object *op, int dir, object *originator)
Op is trying to move in direction dir.
Definition: move.cpp:58
player * get_player(player *p)
Create a player&#39;s object, initialize a player&#39;s structure.
Definition: player.cpp:285
void do_learn_spell(object *op, object *spell, int special_prayer)
Actually makes op learn spell.
Definition: apply.cpp:146
void cftimer_init(void)
Initialize timers.
Definition: timers.cpp:157
int plugins_remove_plugin(const char *id)
Unload the specified plugin.
Definition: plugins.cpp:455
void examine(object *op, object *tmp)
Player examines some object.
Definition: c_object.cpp:1937
int trap_see(object *op, object *trap)
Should op see trap?
Definition: rune.cpp:385
void player_unready_range_ob(player *pl, object *ob)
Unready an object for a player.
Definition: player.cpp:4475
int min_casting_level(const object *caster, const object *spell)
This function takes a caster and spell and presents the effective level the caster needs to be to cas...
Definition: spell_util.cpp:164
int op_on_battleground(object *op, int *x, int *y, archetype **trophy)
Check if the given object (usually a player) is standing on a battleground tile.
Definition: player.cpp:4267
int cast_detection(object *op, object *caster, object *spell)
Detect magic or invisible items.
void cast_magic_storm(object *op, object *tmp, int lvl)
This is really used mostly for spell fumbles and the like.
void command_west(object *op, const char *params)
&#39;west&#39; command.
Definition: c_move.cpp:134
object * find_marked_object(object *op)
Return the object the player has marked with the &#39;mark&#39; command below.
Definition: c_object.cpp:1472
partylist * party_find(const char *partyname)
Find a party by name.
Definition: party.cpp:148
void command_snap(object *op, const char *params)
&#39;snap&#39; command.
Definition: c_chat.cpp:1129
void quest_load_definitions(void)
void tick_the_clock(void)
This performs the basic function of advancing the clock one tick forward.
Definition: weather.cpp:94
void command_delete(object *op, const char *params)
Player wants to totally delete her character.
Definition: c_misc.cpp:1887
void command_list(object *pl, bool is_dm)
Display the list of commands to a player.
Definition: commands.cpp:390
void command_debug(object *op, const char *params)
Player wants to see/change the debug level.
Definition: c_misc.cpp:891
void do_harvest(object *pl, int dir, object *skill)
Player is trying to harvest something.
Definition: c_misc.cpp:2258
void command_snore(object *op, const char *params)
&#39;snore&#39; command.
Definition: c_chat.cpp:1173
void init(int argc, char **argv)
This is the main server initialization function.
Definition: init.cpp:1098
void command_lick(object *op, const char *params)
&#39;lick&#39; command.
Definition: c_chat.cpp:1063
void command_resistances(object *op, const char *params)
Players wants to know her resistances.
Definition: c_misc.cpp:1595
void command_follow(object *op, const char *params)
Follow a player, or stop following a player.
Definition: c_wiz.cpp:2809
int cast_wonder(object *op, object *caster, int dir, object *spell_ob)
wonder is really just a spell that will likely cast another spell.
void command_thank(object *op, const char *params)
&#39;thank&#39; command.
Definition: c_chat.cpp:1206
void command_dumpfriendlyobjects(object *op, const char *params)
Various friendly object-related statistics.
Definition: c_misc.cpp:989
void command_listen(object *op, const char *params)
Change the player&#39;s listen level.
Definition: c_misc.cpp:1088
void cleanupPlugins(void)
Call the crossfire_plugin::closefunc on the various plugins, used at server shutdown.
Definition: plugins.cpp:4621
void process_events(void)
Process all active objects.
Definition: server.cpp:1088
void fix_luck(void)
Fixes luck of players, slowly move it towards 0.
Definition: player.cpp:3932
int cast_invisible(object *op, object *caster, object *spell_ob)
Makes the player or character invisible.
void emergency_save(int flag)
Save all players.
Definition: main.cpp:347
partylist * party_get_first(void)
Returns the first party from the list of all parties.
Definition: party.cpp:196
int write_rune(object *op, object *caster, object *spell, int dir, const char *runename)
Player is attempting to write a magical rune.
Definition: rune.cpp:50
void knowledge_process_incremental(void)
Incrementally send knowledge information to players, and remove information for players who left...
Definition: knowledge.cpp:1439
void delete_character(const char *name)
Totally deletes a character.
Definition: login.cpp:88
int cast_consecrate(object *op, object *caster, object *spell)
A spell to make an altar your god&#39;s.
void plugins_display_list(object *op)
Displays a list of loaded plugins (keystrings and description) in the game log window.
Definition: plugins.cpp:480
void give_initial_items(object *pl, treasurelist *items)
Gives a new player her initial items.
Definition: player.cpp:792
void command_accountpasswd(object *op, const char *params)
Definition: c_wiz.cpp:1638
void command_kill_pets(object *op, const char *params)
Player wants to get rid of pets.
Definition: c_misc.cpp:2194
void put_object_in_sack(object *op, object *sack, object *tmp, uint32_t nrof)
Something tries to put an object into another.
Definition: c_object.cpp:889
void command_forget_spell(object *op, const char *params)
Command for players to forget a spell.
Definition: c_wiz.cpp:2415
int quest_get_player_state(player *pl, sstring quest_code)
Get the quest state for a player.
Definition: quest.cpp:666
void command_unloadplugin(object *op, const char *params)
Unloads the given plugin.
Definition: c_wiz.cpp:2490
void command_purge_quest(object *op, const char *param)
Definition: c_wiz.cpp:2853
void command_sigh(object *op, const char *params)
&#39;sigh&#39; command.
Definition: c_chat.cpp:854
int fire_bow(object *op, object *arrow, int dir, int wc_mod, int16_t sx, int16_t sy)
Creature (monster or player) fires a bow.
Definition: player.cpp:2107
int ok_to_put_more(mapstruct *m, int16_t x, int16_t y, object *op, uint32_t immune_stop)
Returns true if it is ok to put spell op on the space/may provided.
Definition: spell_util.cpp:530
void explode_bullet(object *op)
Causes an object to explode, eg, a firebullet, poison cloud ball, etc.
int cast_transfer(object *op, object *caster, object *spell, int dir)
This spell transfers sp from the player to another person.
void quest_send_initial_states(player *pl)
Send the current quest states for the specified player, if the client supports those notifications...
Definition: quest.cpp:929
void drop(object *op, object *tmp)
Drop an item, either on the floor or in a container.
Definition: c_object.cpp:1120
int players_on_map(mapstruct *m, int show_all)
Returns the count of players on a map, calculated from player list.
Definition: swap.cpp:234
void skill_attack(object *tmp, object *pl, int dir, const char *string, object *skill)
Core routine for use when we attack using a skills system.
void knowledge_first_player_save(player *pl)
Ensure the knowledge state is correctly saved for the player.
Definition: knowledge.cpp:1423
void command_north(object *op, const char *params)
&#39;north&#39; command.
Definition: c_move.cpp:68
int dimension_door(object *op, object *caster, object *spob, int dir)
Teleport through some doors and space.
Structure handling character information for an account.
Definition: account_char.h:27
void command_poke(object *op, const char *params)
&#39;poke&#39; command.
Definition: c_chat.cpp:898
void command_help(object *op, const char *params)
Player is asking for some help.
Definition: c_misc.cpp:1770
int handle_newcs_player(object *op)
Handles commands the player can send us, and various checks on invisibility, golem and such...
Definition: player.cpp:3100
void fire(object *op, int dir)
Received a fire command for the player - go and do it.
Definition: player.cpp:2410
void command_shoottype(object *op, const char *params)
&#39;shoottype&#39; command, set range attack.
Definition: c_range.cpp:369
void command_maps(object *op, const char *params)
&#39;maps&#39; command.
Definition: c_misc.cpp:833
void save_throw_object(object *op, uint32_t type, object *originator)
Object is attacked with some attacktype (fire, ice, ...).
Definition: attack.cpp:202
int cast_destruction(object *op, object *caster, object *spell_ob)
Hit all monsters around the caster.
void command_free(object *op, const char *params)
Totally free an object.
Definition: c_wiz.cpp:1612
Various statistics of objects.
Definition: living.h:35
void command_cry(object *op, const char *params)
&#39;cry&#39; command.
Definition: c_chat.cpp:887
void free_races(void)
Frees all race-related information.
Definition: races.cpp:93
static const flag_definition flags[]
Flag mapping.
void inventory(object *op, object *inv)
Prints object&#39;s inventory.
Definition: c_object.cpp:2117
void move_firewall(object *op)
Move for FIREWALL.
Definition: main.cpp:343
treasurelist represents one logical group of items to be generated together.
Definition: treasure.h:85
void command_dropall(object *op, const char *params)
Command to drop all items that have not been locked.
Definition: c_object.cpp:1182
object * find_applied_skill_by_name(const object *op, const char *name)
Find a skill by name using the last_skill_ob list.
Definition: living.cpp:1932
void knowledge_add_probe_monster(object *op, object *mon)
Display monster details, then add to a player&#39;s knowledge if not already.
Definition: knowledge.cpp:1528
void command_cackle(object *op, const char *params)
&#39;cackle&#39; command.
Definition: c_chat.cpp:777
int learn_skill(object *pl, object *scroll)
Player is trying to learn a skill.
Definition: skill_util.cpp:783
void command_ssdumptable(object *op, const char *params)
Various string-related statistics.
Definition: c_misc.cpp:1017
void command_execute(object *pl, char *command)
Handle a player-issued command.
Definition: commands.cpp:456
void remove_unpaid_objects(object *op, object *env, int free_items)
This goes throws the inventory and removes unpaid objects, and puts them back in the map (location an...
Definition: player.cpp:3229
void dump_spells(void)
Dumps all the spells - now also dumps skill associated with the spell.
Definition: spell_util.cpp:108
void store_spell_expiry(object *spell)
Stores in the spell when to warn player of expiration.
void server_main(int argc, char *argv[])
Server main function.
Definition: server.cpp:1584
void knowledge_send_known(player *pl)
Send initial known knowledge to player, if requested.
Definition: knowledge.cpp:1403
int tailor_god_spell(object *spellop, object *caster)
Changes the attributes of cone, smite, and ball spells as needed by the code.
Definition: gods.cpp:1223
int account_check_string(const char *str)
Checks a string to make sure it does not have any invalid characters.
Definition: account.cpp:360
void command_empty(object *op, const char *params)
&#39;empty&#39; command.
Definition: c_object.cpp:1402
void pets_terminate(object *pet)
Removes a pet, taking care of clearning the owner&#39;s fields if needed.
Definition: pets.cpp:224
int account_link(const char *account_name, const char *player_name)
Adds a player name to an account.
Definition: account.cpp:444
int pray(object *pl, object *skill)
Praying skill handling.
Definition: skills.cpp:1393
void command_sulk(object *op, const char *params)
&#39;sulk&#39; command.
Definition: c_chat.cpp:865
void command_banish(object *op, const char *params)
Add player&#39;s IP to ban_file and kick them off the server.
Definition: c_wiz.cpp:502
void command_run_stop(object *op, const char *params)
Player wants to stop running.
Definition: c_new.cpp:64
Account_Chars * account_char_load(const char *account_name)
For a given account name, load the character information and return it.
int cast_cause_disease(object *op, object *caster, object *spell, int dir)
Let&#39;s try to infect something.
object * monster_find_nearest_enemy(object *npc, object *owner)
Returns the nearest enemy (monster or generator) which is visible to npc.
Definition: monster.cpp:183
void command_growl(object *op, const char *params)
&#39;growl&#39; command.
Definition: c_chat.cpp:832
void command_dmhide(object *op, const char *params)
A players wants to become DM and hide.
Definition: c_wiz.cpp:2519
int detect_magic_on_item(object *pl, object *tmp, object *skill)
Runs a &#39;detect magic&#39; check on a given item.
Definition: skills.cpp:761
int cast_heal(object *op, object *caster, object *spell, int dir)
Heals something.
void quest_set_player_state(player *pl, sstring quest_code, int state)
Set the state of a quest for a player.
Definition: quest.cpp:722
void command_southeast(object *op, const char *params)
&#39;southeast&#39; command.
Definition: c_move.cpp:112
static event_registration m
Definition: citylife.cpp:424
void get_attack_message_for_attack_type(int dam, uint8_t atm_type, const char *victim_name, char *buf1, char *buf2)
Get the attack message for a damage and a type.
Definition: attack.cpp:538
void command_giggle(object *op, const char *params)
&#39;giggle&#39; command.
Definition: c_chat.cpp:799
void pray_at_altar(object *pl, object *altar, object *skill)
Player prays at altar.
Definition: gods.cpp:258
void add_server_collect_hooks()
Definition: init.cpp:1086
archetype * determine_holy_arch(const object *god, const char *type)
Determines the archetype for holy servant and god avatar.
Definition: gods.cpp:676
object * find_random_spell_in_ob(object *ob, const char *skill)
This returns a random spell from &#39;ob&#39;.
Definition: spell_util.cpp:48
int become_follower(object *op, const object *new_god)
This function is called whenever a player has switched to a new god.
Definition: gods.cpp:414
void command_burp(object *op, const char *params)
&#39;burp&#39; command.
Definition: c_chat.cpp:964
int cast_create_missile(object *op, object *caster, object *spell, int dir, const char *stringarg)
Create a missile (nonmagic - magic +4).
int SP_level_range_adjust(const object *caster, const object *spob)
Adjust the range of the spell based on level.
Definition: spell_util.cpp:338
player * find_player_socket(const socket_struct *ns)
Return a player for a socket structure.
Definition: player.cpp:123
void command_mapinfo(object *op, const char *params)
&#39;mapinfo&#39; command.
Definition: c_misc.cpp:807
int cftimer_create(int id, long delay, object *ob, int mode)
Creates a new timer.
Definition: timers.cpp:97
void command_time(object *op, const char *params)
Players asks for the time.
Definition: c_misc.cpp:866
void party_obsolete_parties(void)
Remove unused parties (no players).
Definition: party.cpp:215
object * monster_find_throw_ob(object *op)
Find an item for the monster to throw.
Definition: monster.cpp:2651
int mood_change(object *op, object *caster, object *spell)
This covers the various spells that change the moods of monsters - makes them angry, peaceful, friendly, etc.
void command_take(object *op, const char *params)
This takes (picks up) an item.
Definition: c_object.cpp:797
void recursive_roll(object *op, int dir, object *pusher)
An object is pushed by another which is trying to take its place.
Definition: move.cpp:293
void set_spell_skill(object *op, object *caster, object *spob, object *dest)
Utility function to assign the correct skill when casting.
Definition: spell_util.cpp:94
void command_south(object *op, const char *params)
&#39;south&#39; command.
Definition: c_move.cpp:101
void check_login(object *op, const char *password)
Actually login a player, load from disk and such.
Definition: login.cpp:522
int remove_curse(object *op, object *caster, object *spell)
This function removes the cursed/damned status on equipped items.
void command_rename_item(object *op, const char *params)
Changing the custom name of an item.
Definition: c_object.cpp:2474
void command_groan(object *op, const char *params)
&#39;groan&#39; command.
Definition: c_chat.cpp:1041
void clear_skill(object *who)
This function just clears the chosen_skill and range_skill values in the player.
Definition: skill_util.cpp:396
int cftimer_find_free_id(void)
Finds a free ID for a new timer.
Definition: timers.cpp:144
void receive_player_name(object *op, const char *name)
A player just entered her name.
Definition: c_misc.cpp:1933
void command_mon_aggr(object *op, const char *params)
When DM is possessing a monster, flip aggression on and off, to allow better motion.
Definition: c_wiz.cpp:1405
void command_save(object *op, const char *params)
Player wants to get saved.
Definition: c_misc.cpp:2096
int cast_earth_to_dust(object *op, object *caster, object *spell_ob)
Basically destroys earthwalls in the area.
void destroy_object(object *op)
Recursively object_free_drop_inventory() op and its inventory.
Definition: login.cpp:209
int cast_change_map_lightlevel(object *op, object *spell)
This changes the light level for the entire map.
void command_stack_clear(object *op, const char *params)
Empty DM item stack.
Definition: c_wiz.cpp:2596
void command_northwest(object *op, const char *params)
&#39;northwest&#39; command.
Definition: c_move.cpp:90
void quest_first_player_save(player *pl)
Ensure the quest state is correctly saved for a player.
Definition: quest.cpp:987
int singing(object *pl, int dir, object *skill)
Singing skill handling.
Definition: skills.cpp:1158
void command_kiss(object *op, const char *params)
&#39;kiss&#39; command.
Definition: c_chat.cpp:744
void command_listplugins(object *op, const char *params)
Lists all plugins currently loaded with their IDs and full names.
Definition: c_wiz.cpp:2443
void command_dumpbelow(object *op, const char *params)
Player wants to dump object below her.
Definition: c_wiz.cpp:2887
void command_shutdown(object *op, const char *params)
Totally shutdowns the server.
Definition: c_wiz.cpp:658
void command_overlay_reset(object *op, const char *params)
Removes the overlay for op&#39;s current map.
Definition: c_wiz.cpp:589
void command_disarm(object *op, const char *params)
&#39;disarm&#39; command.
Definition: c_object.cpp:224
void account_char_free(Account_Chars *chars)
This frees all data associated with the character information.
void check_physically_infect(object *victim, object *hitter)
Possibly infect due to direct physical contact i.e., AT_PHYSICAL.
Definition: disease.cpp:663
int fire_bolt(object *op, object *caster, int dir, object *spob)
Cast a bolt-like spell.
void party_join(object *op, partylist *party)
Makes a player join a party.
Definition: party.cpp:85
int transport_can_hold(const object *transport, const object *op, int nrof)
Can transport hold object op? This is a pretty trivial function, but in the future, possible transport may have more restrictions or weight reduction like containers.
Definition: apply.cpp:54
int move_object(object *op, int dir)
Try to move op in the direction "dir".
Definition: move.cpp:39
void command_bleed(object *op, const char *params)
&#39;bleed&#39; command.
Definition: c_chat.cpp:1283
void command_orcknuckle(object *op, const char *params)
Plays the "orcknucke" game.
Definition: c_chat.cpp:108
void command_cast_spell(object *op, const char *params, int cast_now)
Sets up to cast a spell.
Definition: c_range.cpp:146
void monster_check_doors(object *op, mapstruct *m, int x, int y)
Living creature attempts to open a door.
Definition: monster.cpp:2387
void scroll_failure(object *op, int failure, int power)
op made some mistake with a scroll, this takes care of punishment.
Definition: apply.cpp:1254
void command_possess(object *op, const char *params)
DM can possess a monster.
Definition: c_wiz.cpp:1432
void apply_auto_fix(mapstruct *m)
Go through the entire map (only the first time when an original map is loaded) and performs special a...
Definition: main.cpp:258
void cftimer_process_timers(void)
Processes all timers.
Definition: timers.cpp:44
int find_traps(object *pl, object *skill)
Checks for traps on the spaces around the player or in certain objects.
Definition: skills.cpp:1249
void command_nowiz(object *op, const char *params)
Steps down from wizard mode.
Definition: c_wiz.cpp:2080
int hideability(object *ob)
Look at the surrounding terrain to determine the hideability of this object.
Definition: player.cpp:4018
void list_players(object *op, region *reg, partylist *party)
Displays the players in a region or party.
Definition: c_misc.cpp:548
void send_news(const object *op)
Send the news to a player.
Definition: player.cpp:206
void apply_builder_remove(object *pl, int dir)
Item remover.
Definition: build_map.cpp:890
void receive_play_again(object *op, char key)
Player replied to play again / disconnect.
Definition: player.cpp:961
int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, object *spell)
Fires an archetype.
Definition: spell_util.cpp:629
void command_printlos(object *op, const char *params)
Various LOS-related statistics.
Definition: c_misc.cpp:1059
void monster_check_earthwalls(object *op, mapstruct *m, int x, int y)
Living creature attempts to hit an earthwall.
Definition: monster.cpp:2371
void command_mark(object *op, const char *params)
&#39;mark&#39; command, to mark an item for some effects (enchant armor, ...).
Definition: c_object.cpp:1519
void command_hide(object *op, const char *params)
Wizard &#39;hide&#39; command.
Definition: c_wiz.cpp:389
int party_confirm_password(const partylist *party, const char *password)
Checks whether a given password matches the party&#39;s password.
Definition: party.cpp:259
void send_rules(const object *op)
Send the rules to a player.
Definition: player.cpp:170
int alchemy(object *op, object *caster, object *spell_ob)
Change items to gold nuggets.
int playername_ok(const char *cp)
Is the player name valid.
Definition: player.cpp:257
void accounts_clear(void)
This is used purely by the test harness - by clearing the accounts, it can then verify that the data ...
Definition: account.cpp:152
void initPlugins(void)
Plugins initialization.
Definition: plugins.cpp:4573
void counterspell(object *op, int dir)
Nullifies spell effects.
void command_hiccup(object *op, const char *params)
&#39;hiccup&#39; command.
Definition: c_chat.cpp:1052
int animate_weapon(object *op, object *caster, object *spell, int dir)
Generalization of staff_to_snake().
void command_frown(object *op, const char *params)
&#39;frown&#39; command.
Definition: c_chat.cpp:1008
int use_oratory(object *pl, int dir, object *skill)
Oratory skill handling.
Definition: skills.cpp:1005
void monster_do_living(object *op)
For a monster, regenerate hp and sp, potentially clear scared status.
Definition: monster.cpp:727
void command_rules(object *op, const char *params)
Display the server rules.
Definition: c_misc.cpp:228
bool map_can_reset(const mapstruct *map, long current_time)
Returns whether a map can be reset, including all other maps in the same reset group.
Definition: swap.cpp:266
bool pick_up(object *op, object *alt)
Try to pick up an item.
Definition: c_object.cpp:470
void dragon_ability_gain(object *who, int atnr, int level)
When a dragon-player gains a new stage of evolution, he gets some treasure.
Definition: main.cpp:365
void command_pickup(object *op, const char *params)
&#39;pickup&#39; command.
Definition: c_object.cpp:2311
One player.
Definition: player.h:107
void make_visible(object *op)
Makes an object visible again.
Definition: player.cpp:3982
void roll_stats(object *op)
Roll the initial player&#39;s statistics.
Definition: player.cpp:1067
void free_knowledge(void)
Free all knowledge data.
Definition: knowledge.cpp:1280
int pets_summon_object(object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
General purpose summoning function.
Definition: pets.cpp:885
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
Move an object (even linked objects) to another spot on the same map.
Definition: move.cpp:163
char ** account_get_players_for_account(const char *account_name)
Returns an array of strings for the characters on this account - the array is null terminated...
Definition: account.cpp:519
void command_sound(object *op, const char *params)
Player wants to change sound status.
Definition: c_misc.cpp:1908
void command_loadtest(object *op, const char *params)
This command will stress server.
Definition: c_wiz.cpp:306
object * find_key(object *pl, object *container, object *door)
We try to find a key for the door as passed.
Definition: player.cpp:2482
void command_recollect(object *op, const char *params)
Definition: c_wiz.cpp:1531
void rod_adjust(object *rod)
Adjusts rod attributes.
Definition: main.cpp:390
void command_patch(object *op, const char *params)
Wizard wants to altar an object.
Definition: c_wiz.cpp:1493
bool csv_contains(std::string list, std::string item, std::string delim=",")
Split list by comma, then see if item matches anything in the list.
Definition: c_object.cpp:302
void apply_map_builder(object *pl, int dir)
Global building function.
Definition: build_map.cpp:960
void knowledge_send_info(socket_struct *ns)
Send the reply_info for &#39;knowledge_info&#39;.
Definition: knowledge.cpp:1374
void set_darkness_map(mapstruct *m)
Set the darkness level for a map, based on the time of the day.
Definition: main.cpp:371
object * find_skill_by_number(object *who, int skillno)
This returns the first skill pointer of the given subtype (the one that accumulates exp...
Definition: main.cpp:375
void command_dumpallobjects(object *op, const char *params)
Various object-related statistics.
Definition: c_misc.cpp:975
Contains the base information we use to make up a packet we want to send.
Definition: newclient.h:721
const char * sstring
Definition: sstring.h:2
object * pets_get_enemy(object *pet, rv_vector *rv)
Given that &#39;pet&#39; is a friendly object, this function returns a monster the pet should attack...
Definition: pets.cpp:54
partylist * party_form(object *op, const char *partyname)
Forms the party struct for a party called &#39;partyname&#39;.
Definition: party.cpp:40
int use_skill(object *op, const char *string)
Similar to invoke command, it executes the skill in the direction that the user is facing...
Definition: skill_util.cpp:988
void command_southwest(object *op, const char *params)
&#39;southwest&#39; command.
Definition: c_move.cpp:123
void command_afk(object *op, const char *params)
Toggles the afk status of a player.
Definition: c_misc.cpp:773
int should_director_abort(const object *op, const object *victim)
Check if op should abort moving victim because of it&#39;s race or slaying.
Definition: apply.cpp:68
void free_server(void)
Frees all memory allocated around here:
Definition: init.cpp:1145
void command_whereami(object *op, const char *params)
&#39;whereami&#39; command.
Definition: c_misc.cpp:820
void command_news(object *op, const char *params)
Display the server news.
Definition: c_misc.cpp:241
This is a game region.
Definition: map.h:279
void command_accuse(object *op, const char *params)
&#39;accuse&#39; command.
Definition: c_chat.cpp:909
int spell_find_dir(mapstruct *m, int x, int y, object *exclude)
Search what direction a spell should go in, first the center square then some close squares in the gi...
Definition: spell_util.cpp:887
void command_usekeys(object *op, const char *params)
Player wants to change how keys are used.
Definition: c_misc.cpp:1554
int hit_player(object *op, int dam, object *hitter, uint32_t type, int full_hit)
Object is attacked by something.
Definition: attack.cpp:1907
void move_player_attack(object *op, int dir)
The player is also actually going to try and move (not fire weapons).
Definition: player.cpp:2637
void hiscore_init(void)
Initializes the module.
Definition: hiscore.cpp:296
int write_on_item(object *pl, const char *params, object *skill)
Implement the &#39;inscription&#39; skill, which checks for the required skills and marked items before runni...
Definition: skills.cpp:1771
void command_shrug(object *op, const char *params)
&#39;shrug&#39; command.
Definition: c_chat.cpp:1096
void command_toggle_shout(object *op, const char *params)
A simple toggle for the no_shout field.
Definition: c_wiz.cpp:615
void enter_player_savebed(object *op)
This is a basic little function to put the player back to his savebed.
Definition: server.cpp:142
void command_uskill(object *pl, const char *params)
&#39;use_skill&#39; command.
Definition: c_object.cpp:144
void command_dumpmap(object *op, const char *params)
Various map-related statistics.
Definition: c_misc.cpp:1031
char const * newhash(char const *password)
Definition: server.cpp:101
void do_goto(object *op, const char *name, int x, int y)
Definition: c_move.cpp:151
object * drop_object(object *op, object *tmp, uint32_t nrof)
Try to drop an object on the floor.
Definition: c_object.cpp:1025
linked_char * account_get_additional_chars(const char *account_name, const Account_Chars *chars, int *count)
Get a list of character names linked to the specified account which are not listed in chars...
Definition: account.cpp:550
void command_beg(object *op, const char *params)
&#39;beg&#39; command.
Definition: c_chat.cpp:1272
player * find_player_partial_name(const char *plname)
Find a player by a partial name.
Definition: player.cpp:114
void meditate(object *pl, object *skill)
Meditation skill handling.
Definition: skills.cpp:1441
int quest_was_completed(player *pl, sstring quest_code)
Check if a quest was completed once for a player, without taking account the current state...
Definition: quest.cpp:732
object * find_skill_by_name(object *who, const char *name)
This returns the skill pointer of the given name (the one that accumulates exp, has the level...
Definition: skill_util.cpp:209
void command_purge_quest_definitions(object *op, const char *param)
Definition: c_wiz.cpp:2859
int cast_create_town_portal(object *op, object *caster, object *spell)
This function cast the spell of town portal for op.
void command_petmode(object *op, const char *params)
Player wants to change how her pets behave.
Definition: c_misc.cpp:1435
void init_ob_methods(void)
Initializes the ob_method system.
Definition: ob_methods.cpp:35
void account_char_add(Account_Chars *chars, player *pl)
This adds a player to the list of accounts.
int cast_identify(object *op, object *caster, object *spell)
Identifies objects in the players inventory/on the ground.
void command_me(object *op, const char *params)
&#39;me&#39; command.
Definition: c_chat.cpp:47
void change_object(object *op)
Replaces op with its other_arch if it has reached its end of life.
Definition: time.cpp:592
void pets_move_golem(object *op)
Handles a golem&#39;s movement.
Definition: pets.cpp:532
int face_player(object *op, int dir)
Face player in the given direction.
Definition: player.cpp:3041
int check_race_and_class(living *stats, archetype *race, archetype *opclass)
This checks to see if the race and class are legal.
Definition: player.cpp:1435
void command_statistics(object *pl, const char *params)
Prints out some useful information for the character.
Definition: c_misc.cpp:1119
int get_party_password(object *op, partylist *party)
Ask the player for the password of the party she wants to join.
Definition: player.cpp:1026
void command_kick(object *op, const char *params)
Kicks a player from the server.
Definition: c_wiz.cpp:556
int create_aura(object *op, object *caster, object *spell)
Create an aura spell object and put it in the player&#39;s inventory.
void dump_races(void)
Dumps all race information to stderr.
Definition: races.cpp:81
void command_who(object *op, const char *params)
&#39;who&#39; command.
Definition: c_misc.cpp:621
object * fix_stopped_arrow(object *op)
An ARROW stops moving.
Definition: time.cpp:512
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Main dispatch when someone casts a spell.
void shuffle_attack(object *op)
This routine shuffles the attack of op to one of the ones in the list.
void command_drop(object *op, const char *params)
&#39;drop&#39; command.
Definition: c_object.cpp:1306
void command_puke(object *op, const char *params)
&#39;puke&#39; command.
Definition: c_chat.cpp:821
int cast_polymorph(object *op, object *caster, object *spell_ob, int dir)
Polymorph spell casting.
void init_skills(void)
This just sets up the skill_names table above.
Definition: skill_util.cpp:97
void command_wink(object *op, const char *params)
&#39;wink&#39; command.
Definition: c_chat.cpp:1250
int magic_wall(object *op, object *caster, int dir, object *spell_ob)
This creates magic walls.
void display_motd(const object *op)
Sends the message of the day to the player.
Definition: player.cpp:139