1 | // Copyright (c) Athena Dev Teams - Licensed under GNU GPL |
---|
2 | // For more information, see LICENCE in the main folder |
---|
3 | |
---|
4 | #ifndef _CHAR_H_ |
---|
5 | #define _CHAR_H_ |
---|
6 | |
---|
7 | #include "../common/mmo.h" |
---|
8 | |
---|
9 | #define START_CHAR_NUM 150000 |
---|
10 | #define MAX_MAP_SERVERS 30 |
---|
11 | |
---|
12 | #define DEFAULT_AUTOSAVE_INTERVAL 300*1000 |
---|
13 | |
---|
14 | struct character_data { |
---|
15 | struct mmo_charstatus status; |
---|
16 | int global_num; |
---|
17 | struct global_reg global[GLOBAL_REG_NUM]; |
---|
18 | }; |
---|
19 | |
---|
20 | struct mmo_charstatus* search_character(int aid, int cid); |
---|
21 | struct mmo_charstatus* search_character_byname(char* character_name); |
---|
22 | int search_character_index(char* character_name); |
---|
23 | char* search_character_name(int index); |
---|
24 | int search_character_online(int aid, int cid); |
---|
25 | |
---|
26 | int mapif_sendall(unsigned char *buf, unsigned int len); |
---|
27 | int mapif_sendallwos(int fd,unsigned char *buf, unsigned int len); |
---|
28 | int mapif_send(int fd,unsigned char *buf, unsigned int len); |
---|
29 | |
---|
30 | int char_married(int pl1,int pl2); |
---|
31 | int char_child(int parent_id, int child_id); |
---|
32 | int char_family(int cid1, int cid2, int cid3); |
---|
33 | void char_clearparty(int party_id); |
---|
34 | |
---|
35 | int char_log(char *fmt, ...); |
---|
36 | |
---|
37 | int request_accreg2(int account_id, int char_id); |
---|
38 | int char_parse_Registry(int account_id, int char_id, unsigned char *buf, int len); |
---|
39 | int save_accreg2(unsigned char *buf, int len); |
---|
40 | int char_account_reg_reply(int fd,int account_id,int char_id); |
---|
41 | |
---|
42 | extern int char_name_option; |
---|
43 | extern char char_name_letters[]; |
---|
44 | extern int autosave_interval; |
---|
45 | extern char db_path[]; |
---|
46 | extern int guild_exp_rate; |
---|
47 | extern int log_inter; |
---|
48 | //Exported for use in the TXT-SQL converter. |
---|
49 | extern char char_txt[]; |
---|
50 | int char_config_read(const char *cfgName); |
---|
51 | int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg, int *reg_num); |
---|
52 | int parse_friend_txt(struct mmo_charstatus *p); |
---|
53 | |
---|
54 | #endif /* _CHAR_H_ */ |
---|