summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-rw-r--r--src/char/HPMchar.c32
-rw-r--r--src/char/HPMchar.h4
-rw-r--r--src/char/Makefile.in12
-rw-r--r--src/char/char.c68
-rw-r--r--src/char/char.h6
-rw-r--r--src/char/geoip.c8
-rw-r--r--src/char/geoip.h2
-rw-r--r--src/char/int_auction.c28
-rw-r--r--src/char/int_auction.h2
-rw-r--r--src/char/int_elemental.c24
-rw-r--r--src/char/int_elemental.h2
-rw-r--r--src/char/int_guild.c28
-rw-r--r--src/char/int_guild.h2
-rw-r--r--src/char/int_homun.c24
-rw-r--r--src/char/int_homun.h2
-rw-r--r--src/char/int_mail.c24
-rw-r--r--src/char/int_mail.h2
-rw-r--r--src/char/int_mercenary.c24
-rw-r--r--src/char/int_mercenary.h2
-rw-r--r--src/char/int_party.c28
-rw-r--r--src/char/int_party.h2
-rw-r--r--src/char/int_pet.c24
-rw-r--r--src/char/int_quest.c26
-rw-r--r--src/char/int_storage.c24
-rw-r--r--src/char/inter.c46
-rw-r--r--src/char/inter.h5
-rw-r--r--src/char/loginif.c19
-rw-r--r--src/char/loginif.h2
-rw-r--r--src/char/mapif.c22
-rw-r--r--src/char/mapif.h2
-rw-r--r--src/char/pincode.c18
-rw-r--r--src/char/pincode.h2
32 files changed, 259 insertions, 257 deletions
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c
index 4b153b244..a159b0351 100644
--- a/src/char/HPMchar.c
+++ b/src/char/HPMchar.c
@@ -5,27 +5,27 @@
#include "HPMchar.h"
+#include "common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/conf.h"
+#include "common/db.h"
+#include "common/des.h"
+#include "common/ers.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/sysinfo.h"
+
+#include "common/HPMDataCheck.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include "../common/HPM.h"
-#include "../common/cbasetypes.h"
-#include "../common/conf.h"
-#include "../common/db.h"
-#include "../common/des.h"
-#include "../common/ers.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/sysinfo.h"
-
-#include "../common/HPMDataCheck.h"
-
bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
/* record address */
switch( type ) {
diff --git a/src/char/HPMchar.h b/src/char/HPMchar.h
index aa266f1de..594bb7f00 100644
--- a/src/char/HPMchar.h
+++ b/src/char/HPMchar.h
@@ -8,8 +8,8 @@
#error You should never include HPMchar.h from a plugin.
#endif
-#include "../common/cbasetypes.h"
-#include "../common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/HPM.h"
struct hplugin;
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 20d19966e..035dbf711 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -9,18 +9,20 @@ CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
SYSINFO_INC = $(COMMON_D)/sysinfo.inc
+COMMON_INCLUDE = -I..
-LIBCONFIG_D = ../../3rdparty/libconfig
+THIRDPARTY_D = ../../3rdparty
+THIRDPARTY_INCLUDE = -I$(THIRDPARTY_D)
+
+LIBCONFIG_D = $(THIRDPARTY_D)/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
scanner.o strbuf.o)
LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
scanctx.h scanner.h strbuf.h wincompat.h)
-LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D)
-MT19937AR_D = ../../3rdparty/mt19937ar
+MT19937AR_D = $(THIRDPARTY_D)/mt19937ar
MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o
MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
-MT19937AR_INCLUDE = -I$(MT19937AR_D)
CHAR_C = char.c HPMchar.c loginif.c mapif.c geoip.c inter.c int_auction.c int_elemental.c int_guild.c \
int_homun.c int_mail.c int_mercenary.c int_party.c int_pet.c \
@@ -98,7 +100,7 @@ char-server: ../../char-server@EXEEXT@
obj_sql/%.o: %.c $(CHAR_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/char/char.c b/src/char/char.c
index 2b8f70969..3435728f3 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -4,9 +4,41 @@
#define HERCULES_CORE
-#include "../config/core.h" // CONSOLE_INPUT
+#include "config/core.h" // CONSOLE_INPUT
#include "char.h"
+#include "char/HPMchar.h"
+#include "char/geoip.h"
+#include "char/int_auction.h"
+#include "char/int_elemental.h"
+#include "char/int_guild.h"
+#include "char/int_homun.h"
+#include "char/int_mail.h"
+#include "char/int_mercenary.h"
+#include "char/int_party.h"
+#include "char/int_pet.h"
+#include "char/int_quest.h"
+#include "char/int_storage.h"
+#include "char/inter.h"
+#include "char/loginif.h"
+#include "char/mapif.h"
+#include "char/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"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "common/utils.h"
+
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
@@ -14,40 +46,8 @@
#include <string.h>
#include <sys/types.h>
#include <time.h>
-
-#include "HPMchar.h"
-#include "geoip.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 "inter.h"
-#include "loginif.h"
-#include "mapif.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"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-#include "../common/utils.h"
-
#ifndef WIN32
- #include <unistd.h>
+# include <unistd.h>
#endif
// private declarations
diff --git a/src/char/char.h b/src/char/char.h
index 516598fbe..be04dbe21 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -5,9 +5,9 @@
#ifndef COMMON_CHAR_H
#define COMMON_CHAR_H
-#include "../common/cbasetypes.h"
-#include "../common/core.h" // CORE_ST_LAST
-#include "../common/db.h"
+#include "common/cbasetypes.h"
+#include "common/core.h" // CORE_ST_LAST
+#include "common/db.h"
enum E_CHARSERVER_ST {
CHARSERVER_ST_RUNNING = CORE_ST_LAST,
diff --git a/src/char/geoip.c b/src/char/geoip.c
index 5d3324ab2..8c415b6bf 100644
--- a/src/char/geoip.c
+++ b/src/char/geoip.c
@@ -6,14 +6,14 @@
#include "geoip.h"
+#include "common/cbasetypes.h"
+#include "common/malloc.h"
+#include "common/showmsg.h"
+
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h> // for stat/lstat/fstat - [Dekamaster/Ultimate GM Tool]
-#include "../common/cbasetypes.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-
struct s_geoip geoip_data;
struct geoip_interface geoip_s;
diff --git a/src/char/geoip.h b/src/char/geoip.h
index a7ab6b9a4..cb980fdb7 100644
--- a/src/char/geoip.h
+++ b/src/char/geoip.h
@@ -5,7 +5,7 @@
#ifndef CHAR_GEOIP_H
#define CHAR_GEOIP_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
/**
* GeoIP information
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index f2ec347cd..6b2a9fe73 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -6,24 +6,24 @@
#include "int_auction.h"
+#include "char/char.h"
+#include "char/int_mail.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "int_mail.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
struct inter_auction_interface inter_auction_s;
static int inter_auction_count(int char_id, bool buy)
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index c27ecd6c3..80e5fbc8a 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_AUCTION_H
#define CHAR_INT_AUCTION_H
-#include "../common/mmo.h"
+#include "common/mmo.h"
#ifdef HERCULES_CORE
void inter_auction_defaults(void);
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c
index 3a5022fe4..e894c866d 100644
--- a/src/char/int_elemental.c
+++ b/src/char/int_elemental.c
@@ -6,22 +6,22 @@
#include "int_elemental.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-
struct inter_elemental_interface inter_elemental_s;
bool mapif_elemental_save(struct s_elemental* ele) {
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index 7aa379ebb..7385fc496 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"
+#include "common/cbasetypes.h"
#ifdef HERCULES_CORE
void inter_elemental_defaults(void);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 2753964e8..b61b276f1 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -4,26 +4,26 @@
#define HERCULES_CORE
-#include "../config/core.h" // DBPATH
+#include "config/core.h" // DBPATH
#include "int_guild.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/cbasetypes.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
#define GS_MEMBER_UNMODIFIED 0x00
#define GS_MEMBER_MODIFIED 0x01
#define GS_MEMBER_NEW 0x02
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index e7d089943..fe7d28ca4 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_GUILD_H
#define CHAR_INT_GUILD_H
-#include "../common/mmo.h"
+#include "common/mmo.h"
enum {
GS_BASIC = 0x0001,
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index 9f91de252..aab585d4c 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -6,22 +6,22 @@
#include "int_homun.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-
struct inter_homunculus_interface inter_homunculus_s;
int inter_homunculus_sql_init(void)
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index 0212da150..113c6d340 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_HOMUN_H
#define CHAR_INT_HOMUN_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
struct s_homunculus;
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index cd2fa0deb..c7740d20a 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -6,22 +6,22 @@
#include "int_mail.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
struct inter_mail_interface inter_mail_s;
static int inter_mail_fromsql(int char_id, struct mail_data* md)
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index 02f640ae2..8e6acf846 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_MAIL_H
#define CHAR_INT_MAIL_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
struct item;
struct mail_data;
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index 3321627c0..6516c7325 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -6,22 +6,22 @@
#include "int_mercenary.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-
struct inter_mercenary_interface inter_mercenary_s;
bool inter_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 049429e1d..632a9ab37 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_MERCENARY_H
#define CHAR_INT_MERCENARY_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
struct mmo_charstatus;
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 8d50c45fa..899ac86ef 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -6,24 +6,24 @@
#include "int_party.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/cbasetypes.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-
struct inter_party_interface inter_party_s;
//Updates party's level range and unsets even share if broken.
diff --git a/src/char/int_party.h b/src/char/int_party.h
index 61d828bc0..df2289982 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -4,7 +4,7 @@
#ifndef CHAR_INT_PARTY_H
#define CHAR_INT_PARTY_H
-#include "../common/mmo.h"
+#include "common/mmo.h"
//Party Flags on what to save/delete.
enum {
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index b01777771..169bae407 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -6,22 +6,22 @@
#include "int_pet.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/utils.h"
-
struct inter_pet_interface inter_pet_s;
//---------------------------------------------------------
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index 036229edd..05655725a 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -6,23 +6,23 @@
#include "int_quest.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-
struct inter_quest_interface inter_quest_s;
/**
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 2584be0cf..cbe7cb5d1 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -4,24 +4,24 @@
#define HERCULES_CORE
-#include "../config/core.h" // GP_BOUND_ITEMS
+#include "config/core.h" // GP_BOUND_ITEMS
#include "int_storage.h"
+#include "char/char.h"
+#include "char/inter.h"
+#include "char/mapif.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h" // StringBuf
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "inter.h"
-#include "mapif.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h" // StringBuf
-
#define STORAGE_MEMINC 16
struct inter_storage_interface inter_storage_s;
diff --git a/src/char/inter.c b/src/char/inter.c
index 3571a3e2e..9707ea710 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -6,33 +6,33 @@
#include "inter.h"
+#include "char/char.h"
+#include "char/geoip.h"
+#include "char/int_auction.h"
+#include "char/int_elemental.h"
+#include "char/int_guild.h"
+#include "char/int_homun.h"
+#include "char/int_mail.h"
+#include "char/int_mercenary.h"
+#include "char/int_party.h"
+#include "char/int_pet.h"
+#include "char/int_quest.h"
+#include "char/int_storage.h"
+#include "char/mapif.h"
+#include "common/cbasetypes.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "geoip.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 "mapif.h"
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.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 a58d3b3a9..2bf8d0847 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -6,8 +6,9 @@
#define CHAR_INTER_H
#include "char.h"
-#include "../common/cbasetypes.h"
-#include "../common/sql.h"
+
+#include "common/cbasetypes.h"
+#include "common/sql.h"
struct accreg;
diff --git a/src/char/loginif.c b/src/char/loginif.c
index f53d9bb71..e90c471e2 100644
--- a/src/char/loginif.c
+++ b/src/char/loginif.c
@@ -6,19 +6,18 @@
#include "loginif.h"
+#include "char/char.h"
+#include "char/mapif.h"
+#include "common/cbasetypes.h"
+#include "common/core.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/timer.h"
+
#include <stdlib.h>
#include <string.h>
-#include "char.h"
-#include "mapif.h"
-
-#include "../common/cbasetypes.h"
-#include "../common/core.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/timer.h"
-
struct loginif_interface loginif_s;
/// Resets all the data.
diff --git a/src/char/loginif.h b/src/char/loginif.h
index 634bd4b8b..66ca046eb 100644
--- a/src/char/loginif.h
+++ b/src/char/loginif.h
@@ -5,7 +5,7 @@
#ifndef CHAR_LOGINIF_H
#define CHAR_LOGINIF_H
-#include "char.h"
+#include "char/char.h"
/**
* loginif interface
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 65f2984fd..92506cd49 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -6,18 +6,18 @@
#include "mapif.h"
-#include <stdlib.h>
+#include "char/char.h"
+#include "char/int_auction.h"
+#include "char/int_guild.h"
+#include "char/int_homun.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 "int_auction.h"
-#include "int_homun.h"
-#include "int_guild.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 <stdlib.h>
void mapif_ban(int id, unsigned int flag, int status);
void mapif_server_init(int id);
diff --git a/src/char/mapif.h b/src/char/mapif.h
index 528522d1e..8a95c8233 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -5,7 +5,7 @@
#ifndef CHAR_MAPIF_H
#define CHAR_MAPIF_H
-#include "char.h"
+#include "char/char.h"
struct s_elemental;
struct s_homunculus;
diff --git a/src/char/pincode.c b/src/char/pincode.c
index c3d2b2298..885a3d1a1 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -6,16 +6,16 @@
#include "pincode.h"
-#include <stdlib.h>
+#include "char/char.h"
+#include "common/cbasetypes.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/random.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
-#include "char.h"
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
+#include <stdlib.h>
struct pincode_interface pincode_s;
diff --git a/src/char/pincode.h b/src/char/pincode.h
index 178d7e427..678448964 100644
--- a/src/char/pincode.h
+++ b/src/char/pincode.h
@@ -5,7 +5,7 @@
#ifndef CHAR_PINCODE_H
#define CHAR_PINCODE_H
-#include "char.h"
+#include "char/char.h"
enum PincodeResponseCode {
PINCODE_OK = 0,