diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 44 | ||||
-rw-r--r-- | src/char/char.h | 1 | ||||
-rw-r--r-- | src/char/int_auction.c | 25 | ||||
-rw-r--r-- | src/char/int_elemental.c | 22 | ||||
-rw-r--r-- | src/char/int_elemental.h | 2 | ||||
-rw-r--r-- | src/char/int_guild.c | 24 | ||||
-rw-r--r-- | src/char/int_guild.h | 3 | ||||
-rw-r--r-- | src/char/int_homun.c | 21 | ||||
-rw-r--r-- | src/char/int_homun.h | 2 | ||||
-rw-r--r-- | src/char/int_mail.c | 20 | ||||
-rw-r--r-- | src/char/int_mail.h | 3 | ||||
-rw-r--r-- | src/char/int_mercenary.c | 22 | ||||
-rw-r--r-- | src/char/int_mercenary.h | 4 | ||||
-rw-r--r-- | src/char/int_party.c | 25 | ||||
-rw-r--r-- | src/char/int_party.h | 2 | ||||
-rw-r--r-- | src/char/int_pet.c | 22 | ||||
-rw-r--r-- | src/char/int_quest.c | 22 | ||||
-rw-r--r-- | src/char/int_storage.c | 22 | ||||
-rw-r--r-- | src/char/inter.c | 43 | ||||
-rw-r--r-- | src/char/inter.h | 5 | ||||
-rw-r--r-- | src/char/pincode.c | 11 |
21 files changed, 150 insertions, 195 deletions
diff --git a/src/char/char.c b/src/char/char.c index 6c0902644..77e393c0d 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2,30 +2,7 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CONSOLE_INPUT -#include "char.h" - -#include <signal.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> - -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_storage.h" -#include "inter.h" -#include "pincode.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/console.h" #include "../common/core.h" #include "../common/db.h" #include "../common/malloc.h" @@ -36,6 +13,25 @@ #include "../common/strlib.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/console.h" +#include "../common/HPM.h" +#include "int_guild.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_elemental.h" +#include "int_party.h" +#include "int_storage.h" +#include "char.h" +#include "inter.h" +#include "pincode.h" + +#include <sys/types.h> +#include <time.h> +#include <signal.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" @@ -5501,7 +5497,7 @@ int do_init(int argc, char **argv) { Sql_HerculesUpdateCheck(sql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(sql_handle); + console->setSQL(sql_handle); #endif ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port); diff --git a/src/char/char.h b/src/char/char.h index 09a78f6b9..2928929de 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -5,6 +5,7 @@ #ifndef _COMMON_CHAR_H_ #define _COMMON_CHAR_H_ +#include "../config/core.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/db.h" diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 886b5be26..924930867 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_auction.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "int_mail.h" -#include "inter.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/db.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_mail.h" +#include "int_auction.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> static DBMap* auction_db_ = NULL; // int auction_id -> struct auction_data* diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c index 3a36e75a2..ed0c2a9ed 100644 --- a/src/char/int_elemental.c +++ b/src/char/int_elemental.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_elemental.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> bool mapif_elemental_save(struct s_elemental* ele) { bool flag = true; diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h index c869e6fc2..c90891fc4 100644 --- a/src/char/int_elemental.h +++ b/src/char/int_elemental.h @@ -4,7 +4,7 @@ #ifndef _CHAR_INT_ELEMENTAL_H_ #define _CHAR_INT_ELEMENTAL_H_ -#include "../common/cbasetypes.h" +struct s_elemental; void inter_elemental_sql_init(void); void inter_elemental_sql_final(void); diff --git a/src/char/int_guild.c b/src/char/int_guild.c index ffbe48e10..895cbbb94 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -2,25 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "int_guild.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" +#include "../common/db.h" +#include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_guild.h" + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> #define GS_MEMBER_UNMODIFIED 0x00 #define GS_MEMBER_MODIFIED 0x01 diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 5e657ff06..4eb7d310b 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -20,6 +20,9 @@ enum { GS_REMOVE = 0x8000, }; +struct guild; +struct guild_castle; + int inter_guild_parse_frommap(int fd); int inter_guild_sql_init(void); void inter_guild_sql_final(void); diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 795a6b927..143277f05 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -2,23 +2,20 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_homun.h" +#include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" -#include "../common/utils.h" int inter_homunculus_sql_init(void) { diff --git a/src/char/int_homun.h b/src/char/int_homun.h index 9477f4f03..561dc848f 100644 --- a/src/char/int_homun.h +++ b/src/char/int_homun.h @@ -4,8 +4,6 @@ #ifndef _CHAR_INT_HOMUN_H_ #define _CHAR_INT_HOMUN_H_ -#include "../common/cbasetypes.h" - struct s_homunculus; int inter_homunculus_sql_init(void); diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 86a36d59f..826771676 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mail.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> static int mail_fromsql(int char_id, struct mail_data* md) { diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 824ba48a3..7c06cdc1f 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -4,9 +4,6 @@ #ifndef _CHAR_INT_MAIL_H_ #define _CHAR_INT_MAIL_H_ -struct item; -struct mail_message; - int inter_mail_parse_frommap(int fd); void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c index 1dffb656c..aecb3844a 100644 --- a/src/char/int_mercenary.c +++ b/src/char/int_mercenary.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_mercenary.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" -#include "../common/strlib.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> bool mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h index 195a83b34..b614b8cf7 100644 --- a/src/char/int_mercenary.h +++ b/src/char/int_mercenary.h @@ -4,9 +4,7 @@ #ifndef _CHAR_INT_MERCENARY_H_ #define _CHAR_INT_MERCENARY_H_ -#include "../common/cbasetypes.h" - -struct mmo_charstatus; +struct s_mercenary; int inter_mercenary_sql_init(void); void inter_mercenary_sql_final(void); diff --git a/src/char/int_party.c b/src/char/int_party.c index 3e4a743d6..7c328c452 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -2,25 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_party.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" #include "../common/cbasetypes.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mapindex.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/strlib.h" #include "../common/socket.h" +#include "../common/showmsg.h" +#include "../common/mapindex.h" #include "../common/sql.h" -#include "../common/strlib.h" +#include "char.h" +#include "inter.h" +#include "int_party.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct party_data { struct party party; diff --git a/src/char/int_party.h b/src/char/int_party.h index 098c1e9a9..84f00635a 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -14,6 +14,8 @@ enum { PS_BREAK = 0x20, //Specify that this party must be deleted. }; +struct party; + int inter_party_parse_frommap(int fd); int inter_party_sql_init(void); void inter_party_sql_final(void); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 29c40eff9..25f00e6f0 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_pet.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" -#include "../common/showmsg.h" +#include "../common/malloc.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/showmsg.h" #include "../common/utils.h" +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct s_pet *pet_pt; diff --git a/src/char/int_quest.c b/src/char/int_quest.c index 61b43c57d..061dd89d9 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -2,25 +2,23 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "int_quest.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" +#include "../common/mmo.h" #include "../common/db.h" #include "../common/malloc.h" -#include "../common/mmo.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" +#include "../common/sql.h" #include "../common/timer.h" +#include "char.h" +#include "inter.h" +#include "int_quest.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + /** * Loads the entire questlog for a character. * diff --git a/src/char/int_storage.c b/src/char/int_storage.c index bf7b76da0..966e61bb3 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -2,23 +2,19 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "int_storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "char.h" -#include "inter.h" -#include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/socket.h" -#include "../common/sql.h" #include "../common/strlib.h" // StringBuf +#include "../common/sql.h" +#include "char.h" +#include "inter.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + #define STORAGE_MEMINC 16 diff --git a/src/char/inter.c b/src/char/inter.c index 972407ef3..515ca0ec4 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -2,34 +2,33 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - +#include "../common/mmo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "char.h" #include "inter.h" +#include "int_party.h" +#include "int_guild.h" +#include "int_storage.h" +#include "int_pet.h" +#include "int_homun.h" +#include "int_mercenary.h" +#include "int_mail.h" +#include "int_auction.h" +#include "int_quest.h" +#include "int_elemental.h" -#include <errno.h> #include <stdio.h> -#include <stdlib.h> #include <string.h> +#include <stdlib.h> +#include <errno.h> + #include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool] -#include "char.h" -#include "int_auction.h" -#include "int_elemental.h" -#include "int_guild.h" -#include "int_homun.h" -#include "int_mail.h" -#include "int_mercenary.h" -#include "int_party.h" -#include "int_pet.h" -#include "int_quest.h" -#include "int_storage.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" #define WISDATA_TTL (60*1000) //Wis data Time To Live (60 seconds) #define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis diff --git a/src/char/inter.h b/src/char/inter.h index 5e655237e..25b0c2a96 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -5,10 +5,9 @@ #ifndef _CHAR_INTER_H_ #define _CHAR_INTER_H_ -#include "char.h" -#include "../common/sql.h" - struct accreg; +#include "../common/sql.h" +#include "char.h" int inter_init_sql(const char *file); void inter_final(void); diff --git a/src/char/pincode.c b/src/char/pincode.c index 59182f12d..d51953448 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -2,19 +2,16 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pincode.h" - -#include <stdlib.h> - -#include "char.h" #include "../common/cbasetypes.h" #include "../common/mmo.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/strlib.h" +#include "char.h" +#include "pincode.h" + +#include <stdlib.h> int enabled = PINCODE_OK; int changetime = 0; |