summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am170
-rw-r--r--src/echar/char.c (renamed from src/char/char.c)20
-rw-r--r--src/echar/char.h (renamed from src/char/char.h)0
-rw-r--r--src/echar/config.c (renamed from src/char/config.c)12
-rw-r--r--src/echar/config.h (renamed from src/char/config.h)0
-rw-r--r--src/echar/init.c (renamed from src/char/init.c)52
-rw-r--r--src/ecommon/config.c (renamed from src/common/config.c)16
-rw-r--r--src/ecommon/config.h (renamed from src/common/config.h)0
-rw-r--r--src/ecommon/init.c (renamed from src/common/init.c)18
-rw-r--r--src/ecommon/init.h (renamed from src/common/init.h)0
-rw-r--r--src/ecommon/ip.c (renamed from src/common/ip.c)12
-rw-r--r--src/ecommon/ip.h (renamed from src/common/ip.h)0
-rw-r--r--src/elogin/config.c (renamed from src/login/config.c)12
-rw-r--r--src/elogin/config.h (renamed from src/login/config.h)0
-rw-r--r--src/elogin/init.c (renamed from src/login/init.c)22
-rw-r--r--src/elogin/login.c (renamed from src/login/login.c)14
-rw-r--r--src/elogin/login.h (renamed from src/login/login.h)0
-rw-r--r--src/elogin/md5calc.c (renamed from src/login/md5calc.c)0
-rw-r--r--src/elogin/md5calc.h (renamed from src/login/md5calc.h)0
-rw-r--r--src/elogin/mt_rand.c (renamed from src/login/mt_rand.c)0
-rw-r--r--src/elogin/mt_rand.h (renamed from src/login/mt_rand.h)0
-rw-r--r--src/elogin/parse.c (renamed from src/login/parse.c)28
-rw-r--r--src/elogin/parse.h (renamed from src/login/parse.h)0
-rw-r--r--src/elogin/send.c (renamed from src/login/send.c)16
-rw-r--r--src/elogin/send.h (renamed from src/login/send.h)0
-rw-r--r--src/emap/atcommand.c (renamed from src/map/atcommand.c)24
-rw-r--r--src/emap/atcommand.h (renamed from src/map/atcommand.h)0
-rw-r--r--src/emap/clif.c (renamed from src/map/clif.c)37
-rw-r--r--src/emap/clif.h (renamed from src/map/clif.h)0
-rw-r--r--src/emap/data/itemd.c (renamed from src/map/data/itemd.c)18
-rw-r--r--src/emap/data/itemd.h (renamed from src/map/data/itemd.h)0
-rw-r--r--src/emap/data/mapd.c (renamed from src/map/data/mapd.c)16
-rw-r--r--src/emap/data/mapd.h (renamed from src/map/data/mapd.h)0
-rw-r--r--src/emap/data/npcd.c (renamed from src/map/data/npcd.c)18
-rw-r--r--src/emap/data/npcd.h (renamed from src/map/data/npcd.h)0
-rw-r--r--src/emap/data/session.c (renamed from src/map/data/session.c)16
-rw-r--r--src/emap/data/session.h (renamed from src/map/data/session.h)0
-rw-r--r--src/emap/init.c (renamed from src/map/init.c)83
-rw-r--r--src/emap/itemdb.c (renamed from src/map/itemdb.c)24
-rw-r--r--src/emap/itemdb.h (renamed from src/map/itemdb.h)0
-rw-r--r--src/emap/lang.c (renamed from src/map/lang.c)22
-rw-r--r--src/emap/lang.h (renamed from src/map/lang.h)0
-rw-r--r--src/emap/mail.c (renamed from src/map/mail.c)22
-rw-r--r--src/emap/mail.h (renamed from src/map/mail.h)0
-rw-r--r--src/emap/map.c (renamed from src/map/map.c)36
-rw-r--r--src/emap/map.h (renamed from src/map/map.h)0
-rw-r--r--src/emap/mob.c (renamed from src/map/mob.c)18
-rw-r--r--src/emap/mob.h (renamed from src/map/mob.h)0
-rw-r--r--src/emap/npc.c (renamed from src/map/npc.c)26
-rw-r--r--src/emap/npc.h (renamed from src/map/npc.h)0
-rw-r--r--src/emap/parse.c (renamed from src/map/parse.c)36
-rw-r--r--src/emap/parse.h (renamed from src/map/parse.h)0
-rw-r--r--src/emap/pc.c (renamed from src/map/pc.c)28
-rw-r--r--src/emap/pc.h (renamed from src/map/pc.h)0
-rw-r--r--src/emap/permission.c (renamed from src/map/permission.c)16
-rw-r--r--src/emap/permission.h (renamed from src/map/permission.h)0
-rw-r--r--src/emap/quest.c (renamed from src/map/quest.c)16
-rw-r--r--src/emap/quest.h (renamed from src/map/quest.h)0
-rw-r--r--src/emap/script.c (renamed from src/map/script.c)50
-rw-r--r--src/emap/script.h (renamed from src/map/script.h)0
-rw-r--r--src/emap/scriptdefines.h (renamed from src/map/scriptdefines.h)0
-rw-r--r--src/emap/send.c (renamed from src/map/send.c)32
-rw-r--r--src/emap/send.h (renamed from src/map/send.h)0
-rw-r--r--src/emap/skill.c (renamed from src/map/skill.c)20
-rw-r--r--src/emap/skill.h (renamed from src/map/skill.h)0
-rw-r--r--src/emap/status.c (renamed from src/map/status.c)24
-rw-r--r--src/emap/status.h (renamed from src/map/status.h)0
-rw-r--r--src/emap/struct/itemdext.h (renamed from src/map/struct/itemdext.h)0
-rw-r--r--src/emap/struct/mapdext.h (renamed from src/map/struct/mapdext.h)0
-rw-r--r--src/emap/struct/npcdext.h (renamed from src/map/struct/npcdext.h)0
-rw-r--r--src/emap/struct/sessionext.h (renamed from src/map/struct/sessionext.h)0
-rw-r--r--src/emap/unit.c (renamed from src/map/unit.c)26
-rw-r--r--src/emap/unit.h (renamed from src/map/unit.h)0
-rw-r--r--src/emap/utils/formatutils.c (renamed from src/map/utils/formatutils.c)28
-rw-r--r--src/emap/utils/formatutils.h (renamed from src/map/utils/formatutils.h)0
75 files changed, 515 insertions, 513 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 19f8bcb..c26d169 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,93 +1,93 @@
AUTOMAKE_OPTIONS = subdir-objects
-CHAR_SRC = char/char.c \
- char/char.h \
- char/config.c \
- char/config.h \
- char/init.c \
- common/config.c \
- common/config.h \
- common/init.c \
- common/init.h \
- common/ip.c \
- common/ip.h
+CHAR_SRC = echar/char.c \
+ echar/char.h \
+ echar/config.c \
+ echar/config.h \
+ echar/init.c \
+ ecommon/config.c \
+ ecommon/config.h \
+ ecommon/init.c \
+ ecommon/init.h \
+ ecommon/ip.c \
+ ecommon/ip.h
-LOGIN_SRC = login/config.c \
- login/config.h \
- login/init.c \
- login/login.c \
- login/login.h \
- login/md5calc.c \
- login/md5calc.h \
- login/mt_rand.c \
- login/mt_rand.h \
- login/parse.c \
- login/parse.h \
- login/send.c \
- login/send.h \
- common/config.c \
- common/config.h \
- common/init.c \
- common/init.h \
- common/ip.c \
- common/ip.h
+LOGIN_SRC = elogin/config.c \
+ elogin/config.h \
+ elogin/init.c \
+ elogin/login.c \
+ elogin/login.h \
+ elogin/md5calc.c \
+ elogin/md5calc.h \
+ elogin/mt_rand.c \
+ elogin/mt_rand.h \
+ elogin/parse.c \
+ elogin/parse.h \
+ elogin/send.c \
+ elogin/send.h \
+ ecommon/config.c \
+ ecommon/config.h \
+ ecommon/init.c \
+ ecommon/init.h \
+ ecommon/ip.c \
+ ecommon/ip.h
-MAP_SRC = map/atcommand.c \
- map/atcommand.h \
- map/clif.c \
- map/clif.h \
- map/init.c \
- map/itemdb.c \
- map/itemdb.h \
- map/lang.c \
- map/lang.h \
- map/mail.c \
- map/mail.h \
- map/map.c \
- map/map.h \
- map/mob.c \
- map/mob.h \
- map/npc.c \
- map/npc.h \
- map/parse.c \
- map/parse.h \
- map/pc.c \
- map/pc.h \
- map/permission.c \
- map/permission.h \
- map/quest.c \
- map/quest.h \
- map/script.c \
- map/script.h \
- map/scriptdefines.h \
- map/send.c \
- map/send.h \
- map/skill.c \
- map/skill.h \
- map/status.c \
- map/status.h \
- map/unit.c \
- map/unit.h \
- map/data/itemd.c \
- map/data/itemd.h \
- map/data/mapd.c \
- map/data/mapd.h \
- map/data/npcd.c \
- map/data/npcd.h \
- map/data/session.c \
- map/data/session.h \
- map/struct/itemdext.h \
- map/struct/mapdext.h \
- map/struct/npcdext.h \
- map/struct/sessionext.h \
- map/utils/formatutils.c \
- map/utils/formatutils.h \
- common/config.c \
- common/config.h \
- common/init.c \
- common/init.h
+MAP_SRC = emap/atcommand.c \
+ emap/atcommand.h \
+ emap/clif.c \
+ emap/clif.h \
+ emap/init.c \
+ emap/itemdb.c \
+ emap/itemdb.h \
+ emap/lang.c \
+ emap/lang.h \
+ emap/mail.c \
+ emap/mail.h \
+ emap/map.c \
+ emap/map.h \
+ emap/mob.c \
+ emap/mob.h \
+ emap/npc.c \
+ emap/npc.h \
+ emap/parse.c \
+ emap/parse.h \
+ emap/pc.c \
+ emap/pc.h \
+ emap/permission.c \
+ emap/permission.h \
+ emap/quest.c \
+ emap/quest.h \
+ emap/script.c \
+ emap/script.h \
+ emap/scriptdefines.h \
+ emap/send.c \
+ emap/send.h \
+ emap/skill.c \
+ emap/skill.h \
+ emap/status.c \
+ emap/status.h \
+ emap/unit.c \
+ emap/unit.h \
+ emap/data/itemd.c \
+ emap/data/itemd.h \
+ emap/data/mapd.c \
+ emap/data/mapd.h \
+ emap/data/npcd.c \
+ emap/data/npcd.h \
+ emap/data/session.c \
+ emap/data/session.h \
+ emap/struct/itemdext.h \
+ emap/struct/mapdext.h \
+ emap/struct/npcdext.h \
+ emap/struct/sessionext.h \
+ emap/utils/formatutils.c \
+ emap/utils/formatutils.h \
+ ecommon/config.c \
+ ecommon/config.h \
+ ecommon/init.c \
+ ecommon/init.h
-SHARED_CFLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -DPCRE_SUPPORT
+SHARED_CFLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty
SHARED_LDFLAGS = -avoid-version -Wl,--no-undefined
if ENABLE_SANITIZE
diff --git a/src/char/char.c b/src/echar/char.c
index dccc7ac..fc0fb6d 100644
--- a/src/char/char.c
+++ b/src/echar/char.c
@@ -5,17 +5,17 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../char/char.h"
-
-#include "common/ip.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
#include "char/char.h"
-#include "char/config.h"
+
+#include "ecommon/ip.h"
+#include "echar/char.h"
+#include "echar/config.h"
void echar_parse_char_login_map_server(int *fd)
{
diff --git a/src/char/char.h b/src/echar/char.h
index b013f44..b013f44 100644
--- a/src/char/char.h
+++ b/src/echar/char.h
diff --git a/src/char/config.c b/src/echar/config.c
index 3454a74..f8cff5f 100644
--- a/src/char/config.c
+++ b/src/echar/config.c
@@ -5,13 +5,13 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
-#include "char/config.h"
+#include "echar/config.h"
char *inter_server_ip = NULL;
int min_char_class = 0;
diff --git a/src/char/config.h b/src/echar/config.h
index d60abc0..d60abc0 100644
--- a/src/char/config.h
+++ b/src/echar/config.h
diff --git a/src/char/init.c b/src/echar/init.c
index 6c8e34d..a167636 100644
--- a/src/char/init.c
+++ b/src/echar/init.c
@@ -5,34 +5,34 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mapindex.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.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/inter.h"
-#include "../../../char/loginif.h"
-#include "../../../char/mapif.h"
-
-#include "common/config.h"
-#include "common/init.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
#include "char/char.h"
-#include "char/config.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 "ecommon/config.h"
+#include "ecommon/init.h"
+#include "echar/char.h"
+#include "echar/config.h"
-#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
HPExport struct hplugin_info pinfo =
{
diff --git a/src/common/config.c b/src/ecommon/config.c
index 232b199..0395dd7 100644
--- a/src/common/config.c
+++ b/src/ecommon/config.c
@@ -5,14 +5,14 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mapindex.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-
-#include "common/config.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+
+#include "ecommon/config.h"
const char *default_map = NULL;
int default_x = 0;
diff --git a/src/common/config.h b/src/ecommon/config.h
index 9c24932..9c24932 100644
--- a/src/common/config.h
+++ b/src/ecommon/config.h
diff --git a/src/common/init.c b/src/ecommon/init.c
index 07bb936..d0304b2 100644
--- a/src/common/init.c
+++ b/src/ecommon/init.c
@@ -5,15 +5,15 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/conf.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mapindex.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/sysinfo.h"
-#include "../../../common/timer.h"
+#include "common/HPMi.h"
+#include "common/conf.h"
+#include "common/malloc.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/sysinfo.h"
+#include "common/timer.h"
void interfaces_init_common(void)
{
diff --git a/src/common/init.h b/src/ecommon/init.h
index 41f844c..41f844c 100644
--- a/src/common/init.h
+++ b/src/ecommon/init.h
diff --git a/src/common/ip.c b/src/ecommon/ip.c
index bad4b61..eb6d792 100644
--- a/src/common/ip.c
+++ b/src/ecommon/ip.c
@@ -5,13 +5,13 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
-#include "common/ip.h"
+#include "ecommon/ip.h"
bool checkAllowedIp(const char* const mask, const char* const ip)
{
diff --git a/src/common/ip.h b/src/ecommon/ip.h
index 1b0ba18..1b0ba18 100644
--- a/src/common/ip.h
+++ b/src/ecommon/ip.h
diff --git a/src/login/config.c b/src/elogin/config.c
index d6ea4bd..83c3c4f 100644
--- a/src/login/config.c
+++ b/src/elogin/config.c
@@ -5,13 +5,13 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
-#include "login/config.h"
+#include "elogin/config.h"
char *update_server = NULL;
char *inter_server_ip = NULL;
diff --git a/src/login/config.h b/src/elogin/config.h
index ad63371..ad63371 100644
--- a/src/login/config.h
+++ b/src/elogin/config.h
diff --git a/src/login/init.c b/src/elogin/init.c
index 06e747b..6105b3b 100644
--- a/src/login/init.c
+++ b/src/elogin/init.c
@@ -5,19 +5,19 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../login/login.h"
-
-#include "common/init.h"
-#include "login/config.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
#include "login/login.h"
-#include "login/parse.h"
-#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+#include "ecommon/init.h"
+#include "elogin/config.h"
+#include "elogin/login.h"
+#include "elogin/parse.h"
+
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
HPExport struct hplugin_info pinfo =
{
diff --git a/src/login/login.c b/src/elogin/login.c
index bee7aa2..3766a1e 100644
--- a/src/login/login.c
+++ b/src/elogin/login.c
@@ -5,14 +5,14 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../login/login.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "login/login.h"
-#include "login/md5calc.h"
+#include "elogin/md5calc.h"
bool elogin_check_password(const char* md5key __attribute__ ((unused)),
int *passwdenc __attribute__ ((unused)),
diff --git a/src/login/login.h b/src/elogin/login.h
index 0783a5c..0783a5c 100644
--- a/src/login/login.h
+++ b/src/elogin/login.h
diff --git a/src/login/md5calc.c b/src/elogin/md5calc.c
index bfa7b92..bfa7b92 100644
--- a/src/login/md5calc.c
+++ b/src/elogin/md5calc.c
diff --git a/src/login/md5calc.h b/src/elogin/md5calc.h
index cf82738..cf82738 100644
--- a/src/login/md5calc.h
+++ b/src/elogin/md5calc.h
diff --git a/src/login/mt_rand.c b/src/elogin/mt_rand.c
index 627d9dd..627d9dd 100644
--- a/src/login/mt_rand.c
+++ b/src/elogin/mt_rand.c
diff --git a/src/login/mt_rand.h b/src/elogin/mt_rand.h
index d798fee..d798fee 100644
--- a/src/login/mt_rand.h
+++ b/src/elogin/mt_rand.h
diff --git a/src/login/parse.c b/src/elogin/parse.c
index d803843..8f62e9f 100644
--- a/src/login/parse.c
+++ b/src/elogin/parse.c
@@ -5,20 +5,20 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../login/account.h"
-#include "../../../login/login.h"
-
-#include "common/ip.h"
-#include "login/config.h"
-#include "login/md5calc.h"
-#include "login/parse.h"
-#include "login/send.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "login/account.h"
+#include "login/login.h"
+
+#include "ecommon/ip.h"
+#include "elogin/config.h"
+#include "elogin/md5calc.h"
+#include "elogin/parse.h"
+#include "elogin/send.h"
int clientVersion = 0;
diff --git a/src/login/parse.h b/src/elogin/parse.h
index b5c2418..b5c2418 100644
--- a/src/login/parse.h
+++ b/src/elogin/parse.h
diff --git a/src/login/send.c b/src/elogin/send.c
index 420028c..396c314 100644
--- a/src/login/send.c
+++ b/src/elogin/send.c
@@ -5,15 +5,15 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../login/login.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "login/login.h"
-#include "login/config.h"
-#include "login/send.h"
+#include "elogin/config.h"
+#include "elogin/send.h"
void send_server_version(int fd)
{
diff --git a/src/login/send.h b/src/elogin/send.h
index 5fdb6c4..5fdb6c4 100644
--- a/src/login/send.h
+++ b/src/elogin/send.h
diff --git a/src/map/atcommand.c b/src/emap/atcommand.c
index cd972ad..c697b22 100644
--- a/src/map/atcommand.c
+++ b/src/emap/atcommand.c
@@ -5,19 +5,19 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/atcommand.h"
-#include "../../../map/clif.h"
-#include "../../../map/map.h"
-#include "../../../map/pc.h"
-#include "../../../map/skill.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
#include "map/atcommand.h"
-#include "map/lang.h"
+#include "map/clif.h"
+#include "map/map.h"
+#include "map/pc.h"
+#include "map/skill.h"
+#include "emap/atcommand.h"
+#include "emap/lang.h"
const char* eatcommand_msgsd(struct map_session_data *sd, int *msgPtr)
{
diff --git a/src/map/atcommand.h b/src/emap/atcommand.h
index ab970c6..ab970c6 100644
--- a/src/map/atcommand.h
+++ b/src/emap/atcommand.h
diff --git a/src/map/clif.c b/src/emap/clif.c
index 127cd16..7651f09 100644
--- a/src/map/clif.c
+++ b/src/emap/clif.c
@@ -5,24 +5,25 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/cbasetypes.h"
-#include "../../../map/mob.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-#include "../../../map/quest.h"
-
-#include "map/clif.h"
-#include "map/lang.h"
-#include "map/send.h"
-#include "map/data/mapd.h"
-#include "map/data/session.h"
-#include "map/struct/mapdext.h"
-#include "map/struct/sessionext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/cbasetypes.h"
+#include "map/guild.h"
+#include "map/mob.h"
+#include "map/npc.h"
+#include "map/pc.h"
+#include "map/quest.h"
+
+#include "emap/clif.h"
+#include "emap/lang.h"
+#include "emap/send.h"
+#include "emap/data/mapd.h"
+#include "emap/data/session.h"
+#include "emap/struct/mapdext.h"
+#include "emap/struct/sessionext.h"
void eclif_quest_send_list(TBL_PC *sd)
{
diff --git a/src/map/clif.h b/src/emap/clif.h
index 5fd155b..5fd155b 100644
--- a/src/map/clif.h
+++ b/src/emap/clif.h
diff --git a/src/map/data/itemd.c b/src/emap/data/itemd.c
index 55351a1..4b171b2 100644
--- a/src/map/data/itemd.c
+++ b/src/emap/data/itemd.c
@@ -5,16 +5,16 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/battle.h"
-#include "../../../map/itemdb.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/battle.h"
+#include "map/itemdb.h"
-#include "map/data/itemd.h"
-#include "map/struct/itemdext.h"
+#include "emap/data/itemd.h"
+#include "emap/struct/itemdext.h"
struct ItemdExt *itemd_get_by_item(struct item *item)
{
diff --git a/src/map/data/itemd.h b/src/emap/data/itemd.h
index d3c529b..d3c529b 100644
--- a/src/map/data/itemd.h
+++ b/src/emap/data/itemd.h
diff --git a/src/map/data/mapd.c b/src/emap/data/mapd.c
index a557dc9..cb1a506 100644
--- a/src/map/data/mapd.c
+++ b/src/emap/data/mapd.c
@@ -5,15 +5,15 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/map.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/map.h"
-#include "map/data/mapd.h"
-#include "map/struct/mapdext.h"
+#include "emap/data/mapd.h"
+#include "emap/struct/mapdext.h"
struct MapdExt *mapd_get(int m)
{
diff --git a/src/map/data/mapd.h b/src/emap/data/mapd.h
index a0878ae..a0878ae 100644
--- a/src/map/data/mapd.h
+++ b/src/emap/data/mapd.h
diff --git a/src/map/data/npcd.c b/src/emap/data/npcd.c
index 0112916..183db46 100644
--- a/src/map/data/npcd.c
+++ b/src/emap/data/npcd.c
@@ -5,16 +5,16 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/battle.h"
-#include "../../../map/npc.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/battle.h"
+#include "map/npc.h"
-#include "map/data/npcd.h"
-#include "map/struct/npcdext.h"
+#include "emap/data/npcd.h"
+#include "emap/struct/npcdext.h"
struct NpcdExt *npcd_get(TBL_NPC *nd)
{
diff --git a/src/map/data/npcd.h b/src/emap/data/npcd.h
index 52f3b76..52f3b76 100644
--- a/src/map/data/npcd.h
+++ b/src/emap/data/npcd.h
diff --git a/src/map/data/session.c b/src/emap/data/session.c
index 7a6e16a..c3c3ffa 100644
--- a/src/map/data/session.c
+++ b/src/emap/data/session.c
@@ -5,15 +5,15 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/pc.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/pc.h"
-#include "map/data/session.h"
-#include "map/struct/sessionext.h"
+#include "emap/data/session.h"
+#include "emap/struct/sessionext.h"
struct SessionExt *session_get(int fd)
{
diff --git a/src/map/data/session.h b/src/emap/data/session.h
index 040b408..040b408 100644
--- a/src/map/data/session.h
+++ b/src/emap/data/session.h
diff --git a/src/map/init.c b/src/emap/init.c
index d14f5b0..c74c441 100644
--- a/src/map/init.c
+++ b/src/emap/init.c
@@ -5,55 +5,56 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/channel.h"
-#include "../../../map/chat.h"
-#include "../../../map/chrif.h"
-#include "../../../map/clif.h"
-#include "../../../map/duel.h"
-#include "../../../map/elemental.h"
-#include "../../../map/homunculus.h"
-#include "../../../map/instance.h"
-#include "../../../map/intif.h"
-#include "../../../map/irc-bot.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/mail.h"
-#include "../../../map/mapreg.h"
-#include "../../../map/mercenary.h"
-#include "../../../map/mob.h"
-#include "../../../map/npc.h"
-#include "../../../map/party.h"
-#include "../../../map/pet.h"
-#include "../../../map/pc.h"
-#include "../../../map/script.h"
-#include "../../../map/storage.h"
-#include "../../../map/trade.h"
-#include "../../../map/quest.h"
-
-#include "common/config.h"
-#include "common/init.h"
-#include "map/atcommand.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/channel.h"
+#include "map/chat.h"
+#include "map/chrif.h"
#include "map/clif.h"
+#include "map/duel.h"
+#include "map/elemental.h"
+#include "map/homunculus.h"
+#include "map/guild.h"
+#include "map/instance.h"
+#include "map/intif.h"
+#include "map/irc-bot.h"
#include "map/itemdb.h"
-#include "map/lang.h"
#include "map/mail.h"
-#include "map/map.h"
+#include "map/mapreg.h"
+#include "map/mercenary.h"
#include "map/mob.h"
#include "map/npc.h"
-#include "map/unit.h"
-#include "map/parse.h"
-#include "map/permission.h"
+#include "map/party.h"
+#include "map/pet.h"
#include "map/pc.h"
-#include "map/quest.h"
#include "map/script.h"
-#include "map/skill.h"
-#include "map/status.h"
+#include "map/storage.h"
+#include "map/trade.h"
+#include "map/quest.h"
-#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+#include "ecommon/config.h"
+#include "ecommon/init.h"
+#include "emap/atcommand.h"
+#include "emap/clif.h"
+#include "emap/itemdb.h"
+#include "emap/lang.h"
+#include "emap/mail.h"
+#include "emap/map.h"
+#include "emap/mob.h"
+#include "emap/npc.h"
+#include "emap/unit.h"
+#include "emap/parse.h"
+#include "emap/permission.h"
+#include "emap/pc.h"
+#include "emap/quest.h"
+#include "emap/script.h"
+#include "emap/skill.h"
+#include "emap/status.h"
+
+#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
extern int langScriptId;
diff --git a/src/map/itemdb.c b/src/emap/itemdb.c
index 13c56cf..34905a9 100644
--- a/src/map/itemdb.c
+++ b/src/emap/itemdb.c
@@ -5,19 +5,19 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/map.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-
-#include "map/data/itemd.h"
-#include "map/struct/itemdext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/itemdb.h"
+#include "map/map.h"
#include "map/npc.h"
+#include "map/pc.h"
+
+#include "emap/data/itemd.h"
+#include "emap/struct/itemdext.h"
+#include "emap/npc.h"
bool eitemdb_is_item_usable(struct item_data *item)
{
diff --git a/src/map/itemdb.h b/src/emap/itemdb.h
index 5e35d57..5e35d57 100644
--- a/src/map/itemdb.h
+++ b/src/emap/itemdb.h
diff --git a/src/map/lang.c b/src/emap/lang.c
index ffc682d..d6a1910 100644
--- a/src/map/lang.c
+++ b/src/emap/lang.c
@@ -5,17 +5,17 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-
-#include "map/lang.h"
-#include "map/data/session.h"
-#include "map/struct/sessionext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/npc.h"
+#include "map/pc.h"
+
+#include "emap/lang.h"
+#include "emap/data/session.h"
+#include "emap/struct/sessionext.h"
#define MAX_LANGS 100
diff --git a/src/map/lang.h b/src/emap/lang.h
index 4afc6b9..4afc6b9 100644
--- a/src/map/lang.h
+++ b/src/emap/lang.h
diff --git a/src/map/mail.c b/src/emap/mail.c
index d136192..a3d92c8 100644
--- a/src/map/mail.c
+++ b/src/emap/mail.c
@@ -5,17 +5,17 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/db.h"
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/battle.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/map.h"
-#include "../../../map/pc.h"
+#include "common/db.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/battle.h"
+#include "map/itemdb.h"
+#include "map/map.h"
+#include "map/pc.h"
bool email_invalid_operation(struct map_session_data *sd)
{
diff --git a/src/map/mail.h b/src/emap/mail.h
index 2c3aca2..2c3aca2 100644
--- a/src/map/mail.h
+++ b/src/emap/mail.h
diff --git a/src/map/map.c b/src/emap/map.c
index c1d6299..55f4245 100644
--- a/src/map/map.c
+++ b/src/emap/map.c
@@ -5,24 +5,24 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/db.h"
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/battle.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/map.h"
-#include "../../../map/pc.h"
-
-#include "map/permission.h"
-#include "map/send.h"
-#include "map/data/itemd.h"
-#include "map/data/session.h"
-#include "map/struct/itemdext.h"
-#include "map/struct/sessionext.h"
+#include "common/db.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/battle.h"
+#include "map/itemdb.h"
+#include "map/map.h"
+#include "map/pc.h"
+
+#include "emap/permission.h"
+#include "emap/send.h"
+#include "emap/data/itemd.h"
+#include "emap/data/session.h"
+#include "emap/struct/itemdext.h"
+#include "emap/struct/sessionext.h"
int emap_addflooritem_post(int retVal,
struct item *item,
diff --git a/src/map/map.h b/src/emap/map.h
index 3b9afce..3b9afce 100644
--- a/src/map/map.h
+++ b/src/emap/map.h
diff --git a/src/map/mob.c b/src/emap/mob.c
index 5e029f0..c4c8bcf 100644
--- a/src/map/mob.c
+++ b/src/emap/mob.c
@@ -5,15 +5,15 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/battle.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/mob.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/battle.h"
+#include "map/itemdb.h"
+#include "map/mob.h"
int emob_deleteslave_sub(struct block_list *bl, va_list ap)
{
diff --git a/src/map/mob.h b/src/emap/mob.h
index d0d9e87..d0d9e87 100644
--- a/src/map/mob.h
+++ b/src/emap/mob.h
diff --git a/src/map/npc.c b/src/emap/npc.c
index 64ee0f3..16fe2bb 100644
--- a/src/map/npc.c
+++ b/src/emap/npc.c
@@ -5,20 +5,20 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/map.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-
-#include "map/data/mapd.h"
-#include "map/data/npcd.h"
-#include "map/struct/mapdext.h"
-#include "map/struct/npcdext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/map.h"
#include "map/npc.h"
+#include "map/pc.h"
+
+#include "emap/data/mapd.h"
+#include "emap/data/npcd.h"
+#include "emap/struct/mapdext.h"
+#include "emap/struct/npcdext.h"
+#include "emap/npc.h"
void enpc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char* start,
const char* buffer, const char* filepath, int *retval)
diff --git a/src/map/npc.h b/src/emap/npc.h
index 4f584fe..4f584fe 100644
--- a/src/map/npc.h
+++ b/src/emap/npc.h
diff --git a/src/map/parse.c b/src/emap/parse.c
index 38e42f3..c5179cd 100644
--- a/src/map/parse.c
+++ b/src/emap/parse.c
@@ -5,24 +5,24 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/channel.h"
-#include "../../../map/clif.h"
-#include "../../../map/homunculus.h"
-#include "../../../map/mercenary.h"
-#include "../../../map/pc.h"
-#include "../../../map/pet.h"
-#include "../../../map/unit.h"
-
-#include "map/parse.h"
-#include "map/send.h"
-#include "map/map.h"
-#include "map/data/session.h"
-#include "map/struct/sessionext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/channel.h"
+#include "map/clif.h"
+#include "map/homunculus.h"
+#include "map/mercenary.h"
+#include "map/pc.h"
+#include "map/pet.h"
+#include "map/unit.h"
+
+#include "emap/parse.h"
+#include "emap/send.h"
+#include "emap/map.h"
+#include "emap/data/session.h"
+#include "emap/struct/sessionext.h"
void map_parse_version(int fd)
{
diff --git a/src/map/parse.h b/src/emap/parse.h
index 8d137ad..8d137ad 100644
--- a/src/map/parse.h
+++ b/src/emap/parse.h
diff --git a/src/map/pc.c b/src/emap/pc.c
index c24c758..59ac6e2 100644
--- a/src/map/pc.c
+++ b/src/emap/pc.c
@@ -5,21 +5,21 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/pc.h"
-
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/itemdb.h"
#include "map/pc.h"
-#include "map/data/itemd.h"
-#include "map/data/mapd.h"
-#include "map/data/session.h"
-#include "map/struct/itemdext.h"
-#include "map/struct/mapdext.h"
-#include "map/struct/sessionext.h"
+
+#include "emap/pc.h"
+#include "emap/data/itemd.h"
+#include "emap/data/mapd.h"
+#include "emap/data/session.h"
+#include "emap/struct/itemdext.h"
+#include "emap/struct/mapdext.h"
+#include "emap/struct/sessionext.h"
int langScriptId;
diff --git a/src/map/pc.h b/src/emap/pc.h
index e850b81..e850b81 100644
--- a/src/map/pc.h
+++ b/src/emap/pc.h
diff --git a/src/map/permission.c b/src/emap/permission.c
index 03026d0..b05b04b 100644
--- a/src/map/permission.c
+++ b/src/emap/permission.c
@@ -5,14 +5,14 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/map.h"
-#include "../../../map/npc.h"
-#include "../../../map/status.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/map.h"
+#include "map/npc.h"
+#include "map/status.h"
unsigned int permission_send_gm_flag = UINT_MAX - 1;
unsigned int permission_show_client_version_flag = UINT_MAX - 2;
diff --git a/src/map/permission.h b/src/emap/permission.h
index a585c98..a585c98 100644
--- a/src/map/permission.h
+++ b/src/emap/permission.h
diff --git a/src/map/quest.c b/src/emap/quest.c
index c2b85bf..5ad82f6 100644
--- a/src/map/quest.c
+++ b/src/emap/quest.c
@@ -5,16 +5,16 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/quest.h"
-
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/itemdb.h"
#include "map/quest.h"
+#include "emap/quest.h"
+
/**
* Reads and parses an entry from the quest_db.
*
diff --git a/src/map/quest.h b/src/emap/quest.h
index c947bcc..c947bcc 100644
--- a/src/map/quest.h
+++ b/src/emap/quest.h
diff --git a/src/map/script.c b/src/emap/script.c
index 02e34a4..d492430 100644
--- a/src/map/script.c
+++ b/src/emap/script.c
@@ -5,32 +5,32 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/chrif.h"
-#include "../../../map/clif.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-#include "../../../map/script.h"
-#include "../../../map/quest.h"
-#include "../../../map/unit.h"
-
-#include "map/script.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/chrif.h"
#include "map/clif.h"
-#include "map/lang.h"
-#include "map/scriptdefines.h"
-#include "map/send.h"
-#include "map/data/mapd.h"
-#include "map/data/npcd.h"
-#include "map/data/session.h"
-#include "map/struct/mapdext.h"
-#include "map/struct/npcdext.h"
-#include "map/struct/sessionext.h"
-#include "map/utils/formatutils.h"
+#include "map/npc.h"
+#include "map/pc.h"
+#include "map/script.h"
+#include "map/quest.h"
+#include "map/unit.h"
+
+#include "emap/script.h"
+#include "emap/clif.h"
+#include "emap/lang.h"
+#include "emap/scriptdefines.h"
+#include "emap/send.h"
+#include "emap/data/mapd.h"
+#include "emap/data/npcd.h"
+#include "emap/data/session.h"
+#include "emap/struct/mapdext.h"
+#include "emap/struct/npcdext.h"
+#include "emap/struct/sessionext.h"
+#include "emap/utils/formatutils.h"
BUILDIN(l)
{
diff --git a/src/map/script.h b/src/emap/script.h
index 41c96ee..41c96ee 100644
--- a/src/map/script.h
+++ b/src/emap/script.h
diff --git a/src/map/scriptdefines.h b/src/emap/scriptdefines.h
index 1a6cf14..1a6cf14 100644
--- a/src/map/scriptdefines.h
+++ b/src/emap/scriptdefines.h
diff --git a/src/map/send.c b/src/emap/send.c
index b9d826e..6f3f257 100644
--- a/src/map/send.c
+++ b/src/emap/send.c
@@ -5,22 +5,22 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/clif.h"
-#include "../../../map/mob.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-#include "../../../map/pet.h"
-#include "../../../map/unit.h"
-
-#include "map/send.h"
-#include "map/permission.h"
-#include "map/data/session.h"
-#include "map/struct/sessionext.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/clif.h"
+#include "map/mob.h"
+#include "map/npc.h"
+#include "map/pc.h"
+#include "map/pet.h"
+#include "map/unit.h"
+
+#include "emap/send.h"
+#include "emap/permission.h"
+#include "emap/data/session.h"
+#include "emap/struct/sessionext.h"
void send_npccommand (TBL_PC *sd, int npcId, int cmd)
{
diff --git a/src/map/send.h b/src/emap/send.h
index efa89ad..efa89ad 100644
--- a/src/map/send.h
+++ b/src/emap/send.h
diff --git a/src/map/skill.c b/src/emap/skill.c
index 37ada8d..b909feb 100644
--- a/src/map/skill.c
+++ b/src/emap/skill.c
@@ -5,16 +5,16 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/db.h"
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/pc.h"
-#include "../../../map/npc.h"
-#include "../../../map/script.h"
+#include "common/db.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "map/pc.h"
+#include "map/npc.h"
+#include "map/script.h"
int eskill_check_condition_castend_post(int retVal,
TBL_PC* sd,
diff --git a/src/map/skill.h b/src/emap/skill.h
index 132e909..132e909 100644
--- a/src/map/skill.h
+++ b/src/emap/skill.h
diff --git a/src/map/status.c b/src/emap/status.c
index 916ee78..6f853d5 100644
--- a/src/map/status.c
+++ b/src/emap/status.c
@@ -5,19 +5,19 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../map/itemdb.h"
-#include "../../../map/map.h"
-#include "../../../map/npc.h"
-#include "../../../map/pc.h"
-#include "../../../map/status.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/itemdb.h"
+#include "map/map.h"
+#include "map/npc.h"
+#include "map/pc.h"
+#include "map/status.h"
-#include "map/data/npcd.h"
-#include "map/struct/npcdext.h"
+#include "emap/data/npcd.h"
+#include "emap/struct/npcdext.h"
int class_move_speed[CLASS_COUNT];
diff --git a/src/map/status.h b/src/emap/status.h
index fb0198b..fb0198b 100644
--- a/src/map/status.h
+++ b/src/emap/status.h
diff --git a/src/map/struct/itemdext.h b/src/emap/struct/itemdext.h
index 8d4a555..8d4a555 100644
--- a/src/map/struct/itemdext.h
+++ b/src/emap/struct/itemdext.h
diff --git a/src/map/struct/mapdext.h b/src/emap/struct/mapdext.h
index 15fee7f..15fee7f 100644
--- a/src/map/struct/mapdext.h
+++ b/src/emap/struct/mapdext.h
diff --git a/src/map/struct/npcdext.h b/src/emap/struct/npcdext.h
index 2158f2c..2158f2c 100644
--- a/src/map/struct/npcdext.h
+++ b/src/emap/struct/npcdext.h
diff --git a/src/map/struct/sessionext.h b/src/emap/struct/sessionext.h
index a592e50..a592e50 100644
--- a/src/map/struct/sessionext.h
+++ b/src/emap/struct/sessionext.h
diff --git a/src/map/unit.c b/src/emap/unit.c
index 97860e1..54dca56 100644
--- a/src/map/unit.c
+++ b/src/emap/unit.c
@@ -5,20 +5,20 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../common/HPMi.h"
-#include "../../../common/malloc.h"
-#include "../../../common/mmo.h"
-#include "../../../common/socket.h"
-#include "../../../common/strlib.h"
-#include "../../../common/timer.h"
-#include "../../../map/unit.h"
-#include "../../../map/map.h"
-#include "../../../map/mob.h"
-#include "../../../map/pc.h"
-#include "../../../map/skill.h"
-#include "../../../map/status.h"
-
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
#include "map/unit.h"
+#include "map/map.h"
+#include "map/mob.h"
+#include "map/pc.h"
+#include "map/skill.h"
+#include "map/status.h"
+
+#include "emap/unit.h"
int eunit_can_move(struct block_list *bl)
{
diff --git a/src/map/unit.h b/src/emap/unit.h
index 675bf0e..675bf0e 100644
--- a/src/map/unit.h
+++ b/src/emap/unit.h
diff --git a/src/map/utils/formatutils.c b/src/emap/utils/formatutils.c
index 6777423..70a7541 100644
--- a/src/map/utils/formatutils.c
+++ b/src/emap/utils/formatutils.c
@@ -5,22 +5,22 @@
#include <stdlib.h>
#include <string.h>
-#include "../../../../common/HPMi.h"
-#include "../../../../common/malloc.h"
-#include "../../../../common/mmo.h"
-#include "../../../../common/socket.h"
-#include "../../../../common/strlib.h"
-#include "../../../../map/script.h"
+#include "common/HPMi.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/script.h"
-#include "../../../../map/chrif.h"
-#include "../../../../map/clif.h"
-#include "../../../../map/npc.h"
-#include "../../../../map/pc.h"
-#include "../../../../map/script.h"
-#include "../../../../map/quest.h"
+#include "map/chrif.h"
+#include "map/clif.h"
+#include "map/npc.h"
+#include "map/pc.h"
+#include "map/script.h"
+#include "map/quest.h"
-#include "map/utils/formatutils.h"
-#include "map/lang.h"
+#include "emap/utils/formatutils.h"
+#include "emap/lang.h"
int format_sub(struct script_state* st, int translate)
{
diff --git a/src/map/utils/formatutils.h b/src/emap/utils/formatutils.h
index 361ad84..361ad84 100644
--- a/src/map/utils/formatutils.h
+++ b/src/emap/utils/formatutils.h