diff options
Diffstat (limited to 'src/map')
74 files changed, 845 insertions, 996 deletions
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index cb8c979c6..061479d87 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -1,15 +1,25 @@ // Copyright (c) Hercules Dev Team, licensed under GNU GPL. // See the LICENSE file -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/HPM.h" +#include "../common/conf.h" +#include "../common/db.h" +#include "../common/des.h" +#include "../common/ers.h" +#include "../common/mapindex.h" +#include "../common/mmo.h" +#include "../common/socket.h" +#include "../common/strlib.h" -#include "HPMmap.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "HPMmap.h" +#include "pc.h" +#include "map.h" +// #include "atcommand.h" #include "battle.h" #include "battleground.h" @@ -27,14 +37,12 @@ #include "itemdb.h" #include "log.h" #include "mail.h" -#include "map.h" #include "mapreg.h" #include "mercenary.h" #include "mob.h" #include "npc.h" #include "party.h" #include "path.h" -#include "pc.h" #include "pc_groups.h" #include "pet.h" #include "quest.h" @@ -46,19 +54,11 @@ #include "trade.h" #include "unit.h" #include "vending.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 <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> #include "../common/HPMDataCheck.h" diff --git a/src/map/atcommand.c b/src/map/atcommand.c index df3be40a5..5fd0faf86 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2,60 +2,57 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/mmo.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/core.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/sysinfo.h" -#include "../config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_CARTS, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP #include "atcommand.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "battle.h" #include "chat.h" -#include "chrif.h" #include "clif.h" +#include "chrif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" #include "intif.h" #include "itemdb.h" #include "log.h" -#include "mail.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" #include "pc_groups.h" // groupid2name +#include "status.h" +#include "skill.h" +#include "mob.h" +#include "npc.h" #include "pet.h" -#include "quest.h" +#include "homunculus.h" +#include "mail.h" +#include "mercenary.h" +#include "elemental.h" +#include "party.h" +#include "guild.h" #include "script.h" -#include "searchstore.h" -#include "skill.h" -#include "status.h" #include "storage.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" -#include "../common/malloc.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 "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "mapreg.h" +#include "quest.h" +#include "searchstore.h" #include "HPMmap.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> + struct atcommand_interface atcommand_s; static char atcmd_output[CHAT_SIZE_MAX]; diff --git a/src/map/atcommand.h b/src/map/atcommand.h index c8a1863af..bc4ab30a3 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -5,9 +5,9 @@ #ifndef _MAP_ATCOMMAND_H_ #define _MAP_ATCOMMAND_H_ -#include "pc_groups.h" #include "../common/conf.h" #include "../common/db.h" +#include "pc_groups.h" /** * Declarations diff --git a/src/map/battle.c b/src/map/battle.c index 0865ee4ba..9089b7102 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT -#include "battle.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battleground.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "skill.h" -#include "status.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" +#include "../common/timer.h" #include "../common/nullpo.h" -#include "../common/random.h" +#include "../common/malloc.h" #include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" #include "../common/socket.h" #include "../common/strlib.h" -#include "../common/sysinfo.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" +#include "../common/HPM.h" + +#include "map.h" +#include "path.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" +#include "mob.h" +#include "itemdb.h" +#include "clif.h" +#include "pet.h" +#include "guild.h" +#include "party.h" +#include "battle.h" +#include "battleground.h" +#include "chrif.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct Battle_Config battle_config; struct battle_interface battle_s; diff --git a/src/map/battle.h b/src/map/battle.h index fbe097c78..88038ddb4 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -5,8 +5,8 @@ #ifndef _MAP_BATTLE_H_ #define _MAP_BATTLE_H_ -#include "map.h" //ELE_MAX #include "../common/cbasetypes.h" +#include "map.h" //ELE_MAX /** * Declarations diff --git a/src/map/battleground.c b/src/map/battleground.c index a7169de0e..68539e25d 100644 --- a/src/map/battleground.c +++ b/src/map/battleground.c @@ -2,32 +2,29 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/strlib.h" +#include "../common/conf.h" #include "battleground.h" - -#include <string.h> -#include <stdio.h> - #include "battle.h" #include "clif.h" -#include "homunculus.h" #include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" // struct mob_data #include "npc.h" -#include "party.h" #include "pc.h" +#include "party.h" #include "pet.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include "homunculus.h" +#include "mercenary.h" +#include "mapreg.h" + +#include <string.h> +#include <stdio.h> struct battleground_interface bg_s; diff --git a/src/map/battleground.h b/src/map/battleground.h index ec0a86f14..05c4eb060 100644 --- a/src/map/battleground.h +++ b/src/map/battleground.h @@ -5,9 +5,9 @@ #ifndef _MAP_BATTLEGROUND_H_ #define _MAP_BATTLEGROUND_H_ +#include "../common/mmo.h" // struct party #include "clif.h" #include "guild.h" -#include "../common/mmo.h" // struct party /** * Defines diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 80264b30d..2a15e66fc 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -2,21 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "buyingstore.h" // struct s_buyingstore - -#include "atcommand.h" // msg_txt -#include "battle.h" // battle_config.* -#include "chrif.h" -#include "clif.h" // clif->buyingstore_* -#include "log.h" // log_pick_pc, log_zeny -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/db.h" // ARR_FIND #include "../common/showmsg.h" // ShowWarning #include "../common/socket.h" // RBUF* #include "../common/strlib.h" // safestrncpy +#include "atcommand.h" // msg_txt +#include "battle.h" // battle_config.* +#include "buyingstore.h" // struct s_buyingstore +#include "clif.h" // clif->buyingstore_* +#include "log.h" // log_pick_pc, log_zeny +#include "pc.h" // struct map_session_data +#include "chrif.h" struct buyingstore_interface buyingstore_s; diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h index 914631872..5141a1013 100644 --- a/src/map/buyingstore.h +++ b/src/map/buyingstore.h @@ -5,11 +5,6 @@ #ifndef _MAP_BUYINGSTORE_H_ #define _MAP_BUYINGSTORE_H_ -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - -struct map_session_data; - /** * Declarations **/ diff --git a/src/map/chat.c b/src/map/chat.c index c9d3e6d46..08fc4a575 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -2,13 +2,12 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "chat.h" - -#include <stdio.h> -#include <string.h> - +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/mmo.h" #include "atcommand.h" // msg_txt() #include "battle.h" // struct battle_config #include "clif.h" @@ -16,12 +15,10 @@ #include "npc.h" // npc_event_do() #include "pc.h" #include "skill.h" // ext_skill_unit_onplace() -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/mmo.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" +#include "chat.h" + +#include <stdio.h> +#include <string.h> struct chat_interface chat_s; diff --git a/src/map/chat.h b/src/map/chat.h index cbc2a391e..b0c6cd905 100644 --- a/src/map/chat.h +++ b/src/map/chat.h @@ -6,12 +6,9 @@ #define _MAP_CHAT_H_ #include "map.h" // struct block_list, CHATROOM_TITLE_SIZE -#include "../common/cbasetypes.h" -#include "../common/db.h" -struct chat_data; struct map_session_data; -struct npc_data; +struct chat_data; #define MAX_CHAT_USERS 20 diff --git a/src/map/chrif.c b/src/map/chrif.c index 81e2d387c..99a1935fd 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -2,16 +2,15 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT -#include "chrif.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/ers.h" +#include "../common/HPM.h" #include "map.h" #include "battle.h" @@ -26,17 +25,15 @@ #include "instance.h" #include "mercenary.h" #include "elemental.h" +#include "chrif.h" #include "quest.h" #include "storage.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.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 <sys/types.h> +#include <time.h> struct chrif_interface chrif_s; diff --git a/src/map/chrif.h b/src/map/chrif.h index 84efc66d3..25e955604 100644 --- a/src/map/chrif.h +++ b/src/map/chrif.h @@ -5,11 +5,9 @@ #ifndef _MAP_CHRIF_H_ #define _MAP_CHRIF_H_ +#include "../common/cbasetypes.h" #include <time.h> - #include "map.h" //TBL_stuff -#include "../common/cbasetypes.h" -#include "../common/db.h" struct status_change_entry; diff --git a/src/map/clif.c b/src/map/clif.c index cb2474961..1a6665307 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2,59 +2,56 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, NEW_CARTS, RENEWAL, SECURE_NPCTIMEOUT -#include "clif.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <stdarg.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/conf.h" +#include "../common/HPM.h" +#include "map.h" +#include "chrif.h" +#include "pc.h" +#include "status.h" +#include "npc.h" +#include "itemdb.h" +#include "chat.h" +#include "trade.h" +#include "storage.h" +#include "script.h" +#include "skill.h" #include "atcommand.h" +#include "intif.h" #include "battle.h" #include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "elemental.h" +#include "mob.h" +#include "party.h" +#include "unit.h" #include "guild.h" +#include "vending.h" +#include "pet.h" #include "homunculus.h" #include "instance.h" -#include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" +#include "mercenary.h" +#include "elemental.h" #include "log.h" +#include "clif.h" #include "mail.h" -#include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "pet.h" #include "quest.h" -#include "script.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "trade.h" -#include "unit.h" -#include "vending.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "irc-bot.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <time.h> struct clif_interface clif_s; diff --git a/src/map/clif.h b/src/map/clif.h index 7b27e1fe6..0f4a9e756 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -5,13 +5,13 @@ #ifndef _MAP_CLIF_H_ #define _MAP_CLIF_H_ -#include <stdarg.h> - -#include "map.h" -#include "packets_struct.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/mmo.h" +#include "../common/socket.h" +#include "../map/map.h" +#include "../map/packets_struct.h" +#include <stdarg.h> /** * Declarations @@ -20,6 +20,7 @@ struct item; struct item_data; struct storage_data; struct guild_storage; +struct block_list; struct unit_data; struct map_session_data; struct homun_data; diff --git a/src/map/date.c b/src/map/date.c index 975a00c50..f38ead858 100644 --- a/src/map/date.c +++ b/src/map/date.c @@ -1,14 +1,10 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - +#include "../common/cbasetypes.h" #include "date.h" - #include <time.h> -#include "../common/cbasetypes.h" - int date_get_year(void) { time_t t; diff --git a/src/map/date.h b/src/map/date.h index b3ed59b2f..46f0d86c3 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -4,8 +4,6 @@ #ifndef _MAP_DATE_H_ #define _MAP_DATE_H_ -#include "../common/cbasetypes.h" - int date_get_year(void); int date_get_month(void); int date_get_day(void); diff --git a/src/map/duel.c b/src/map/duel.c index a423ef240..af2741f77 100644 --- a/src/map/duel.c +++ b/src/map/duel.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "atcommand.h" // msg_txt +#include "clif.h" #include "duel.h" +#include "pc.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> -#include "atcommand.h" // msg_txt -#include "clif.h" -#include "pc.h" -#include "../common/cbasetypes.h" - /*========================================== * Duel organizing functions [LuzZza] *------------------------------------------*/ diff --git a/src/map/duel.h b/src/map/duel.h index 956aed36d..5405d2eee 100644 --- a/src/map/duel.h +++ b/src/map/duel.h @@ -5,10 +5,6 @@ #ifndef _MAP_DUEL_H_ #define _MAP_DUEL_H_ -#include "../common/cbasetypes.h" - -struct map_session_data; - struct duel { int members_count; int invites_count; diff --git a/src/map/elemental.c b/src/map/elemental.c index 323df41e1..f335600d6 100644 --- a/src/map/elemental.c +++ b/src/map/elemental.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "elemental.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/random.h" +#include "../common/strlib.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.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 "../common/timer.h" -#include "../common/utils.h" +#include "elemental.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct elemental_interface elemental_s; diff --git a/src/map/elemental.h b/src/map/elemental.h index aa27aadc9..6d04a41a5 100644 --- a/src/map/elemental.h +++ b/src/map/elemental.h @@ -7,7 +7,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" // NAME_LENGTH /** * Defines diff --git a/src/map/guild.c b/src/map/guild.c index 69f67238d..fa5805c8b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "guild.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battle.h" -#include "clif.h" -#include "instance.h" -#include "intif.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "pc.h" -#include "skill.h" -#include "status.h" -#include "storage.h" -#include "../common/HPM.h" #include "../common/cbasetypes.h" -#include "../common/ers.h" +#include "../common/timer.h" +#include "../common/nullpo.h" #include "../common/malloc.h" #include "../common/mapindex.h" -#include "../common/nullpo.h" #include "../common/showmsg.h" +#include "../common/ers.h" #include "../common/strlib.h" -#include "../common/timer.h" #include "../common/utils.h" +#include "../common/HPM.h" + +#include "map.h" +#include "guild.h" +#include "storage.h" +#include "battle.h" +#include "npc.h" +#include "pc.h" +#include "status.h" +#include "mob.h" +#include "intif.h" +#include "clif.h" +#include "skill.h" +#include "log.h" +#include "instance.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct guild_interface guild_s; diff --git a/src/map/guild.h b/src/map/guild.h index 34e27a56c..b03bd664d 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -5,10 +5,18 @@ #ifndef _MAP_GUILD_H_ #define _MAP_GUILD_H_ -#include "map.h" // EVENT_NAME_LENGTH, TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" +//#include "../common/mmo.h" +#include "map.h" // NAME_LENGTH + +/** + * Declarations + **/ +struct guild; +struct guild_member; +struct guild_position; +struct guild_castle; +struct map_session_data; +struct mob_data; /** * Defines diff --git a/src/map/homunculus.c b/src/map/homunculus.c index b6a83d1cb..ff9f7a5b1 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -2,45 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH -#include "homunculus.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.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 "../common/timer.h" -#include "../common/utils.h" + +#include "homunculus.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct homunculus_interface homunculus_s; diff --git a/src/map/homunculus.h b/src/map/homunculus.h index 9eef6af5b..e6d59e30e 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -5,10 +5,9 @@ #ifndef _MAP_HOMUNCULUS_H_ #define _MAP_HOMUNCULUS_H_ -#include "pc.h" #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/mmo.h" +#include "pc.h" #define MAX_HOM_SKILL_REQUIRE 5 #define homdb_checkid(id) ((id) >= HM_CLASS_BASE && (id) <= HM_CLASS_MAX) diff --git a/src/map/instance.c b/src/map/instance.c index 5789d7dd6..caf622b3d 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -2,32 +2,30 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/db.h" +#include "../common/HPM.h" +#include "clif.h" #include "instance.h" +#include "map.h" +#include "npc.h" +#include "party.h" +#include "pc.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdarg.h> #include <time.h> -#include "clif.h" -#include "map.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.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" - struct instance_interface instance_s; /// Checks whether given instance id is valid or not. diff --git a/src/map/instance.h b/src/map/instance.h index ae649eda7..712a0f141 100644 --- a/src/map/instance.h +++ b/src/map/instance.h @@ -6,11 +6,8 @@ #define _MAP_INSTANCE_H_ #include "script.h" // struct reg_db -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct point - struct block_list; -struct map_session_data; #define INSTANCE_NAME_LENGTH (60+1) diff --git a/src/map/intif.c b/src/map/intif.c index 383150fbc..6bd24368a 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -1,40 +1,37 @@ // Copyright (c) Athena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder -#define HERCULES_CORE - -#include "../config/core.h" // GP_BOUND_ITEMS -#include "intif.h" - -#include <fcntl.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> - -#include "atcommand.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "map.h" #include "battle.h" #include "chrif.h" #include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" +#include "pc.h" +#include "intif.h" #include "log.h" -#include "mail.h" -#include "map.h" -#include "mercenary.h" +#include "storage.h" #include "party.h" -#include "pc.h" +#include "guild.h" #include "pet.h" +#include "atcommand.h" +#include "mercenary.h" +#include "homunculus.h" +#include "elemental.h" +#include "mail.h" #include "quest.h" -#include "storage.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <fcntl.h> +#include <string.h> + struct intif_interface intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index b6ee727f3..290dcfcdc 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -5,22 +5,19 @@ #ifndef _MAP_INTIF_H_ #define _MAP_INTIF_H_ -#include "../common/cbasetypes.h" /** * Declarations **/ -struct auction_data; +struct party_member; struct guild_member; struct guild_position; -struct guild_storage; -struct mail_message; -struct map_session_data; -struct party_member; -struct s_elemental; +struct s_pet; struct s_homunculus; struct s_mercenary; -struct s_pet; +struct s_elemental; +struct mail_message; +struct auction_data; /** * Defines diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index 6f016697f..ff28082e7 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -2,25 +2,23 @@ // See the LICENSE file // Base Author: shennetsind @ http://hercules.ws -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/strlib.h" +#include "../common/showmsg.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/random.h" +#include "map.h" +#include "pc.h" +#include "clif.h" #include "irc-bot.h" #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "clif.h" -#include "map.h" -#include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" - //#define IRCBOT_DEBUG struct irc_bot_interface irc_bot_s; diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h index 60f03fca5..c15a5d46a 100644 --- a/src/map/irc-bot.h +++ b/src/map/irc-bot.h @@ -6,8 +6,6 @@ #ifndef _MAP_IRC_BOT_H_ #define _MAP_IRC_BOT_H_ -#include "../common/cbasetypes.h" - #define IRC_NICK_LENGTH 40 #define IRC_IDENT_LENGTH 40 #define IRC_HOST_LENGTH 63 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 1981f435c..5eeb90be5 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2,27 +2,22 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, RENEWAL -#include "itemdb.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "battle.h" // struct battle_config -#include "map.h" -#include "mob.h" // MAX_MOB_DB -#include "pc.h" // W_MUSICAL, W_WHIP -#include "script.h" // item script processing -#include "../common/conf.h" -#include "../common/malloc.h" #include "../common/nullpo.h" +#include "../common/malloc.h" #include "../common/random.h" #include "../common/showmsg.h" #include "../common/strlib.h" #include "../common/utils.h" +#include "../common/conf.h" +#include "itemdb.h" +#include "map.h" +#include "battle.h" // struct battle_config +#include "script.h" // item script processing +#include "pc.h" // W_MUSICAL, W_WHIP + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct itemdb_interface itemdb_s; diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 12766b288..77fb2e2ec 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -5,12 +5,9 @@ #ifndef _MAP_ITEMDB_H_ #define _MAP_ITEMDB_H_ -#include "map.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" #include "../common/db.h" #include "../common/mmo.h" // ITEM_NAME_LENGTH -#include "../common/sql.h" +#include "map.h" /** * Declarations diff --git a/src/map/log.c b/src/map/log.c index 523ef1d65..19a98f34b 100644 --- a/src/map/log.c +++ b/src/map/log.c @@ -2,24 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "log.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - +#include "../common/cbasetypes.h" +#include "../common/sql.h" // SQL_INNODB +#include "../common/strlib.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "battle.h" #include "itemdb.h" +#include "log.h" #include "map.h" #include "mob.h" #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/sql.h" // SQL_INNODB -#include "../common/strlib.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct log_interface log_s; diff --git a/src/map/log.h b/src/map/log.h index ecfedeac2..b2cb92c20 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -11,10 +11,11 @@ /** * Declarations **/ -struct item; -struct item_data; +struct block_list; struct map_session_data; struct mob_data; +struct item; +struct item_data; /** * Defines diff --git a/src/map/mail.c b/src/map/mail.c index 7ba7d7470..371aa892f 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -2,20 +2,18 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/showmsg.h" #include "mail.h" - -#include <time.h> -#include <string.h> - #include "atcommand.h" -#include "clif.h" #include "itemdb.h" -#include "log.h" +#include "clif.h" #include "pc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "log.h" + +#include <time.h> +#include <string.h> struct mail_interface mail_s; diff --git a/src/map/mail.h b/src/map/mail.h index 30b032ef4..8df537ff3 100644 --- a/src/map/mail.h +++ b/src/map/mail.h @@ -5,11 +5,7 @@ #ifndef _MAP_MAIL_H_ #define _MAP_MAIL_H_ -#include "../common/cbasetypes.h" - -struct item; -struct mail_message; -struct map_session_data; +#include "../common/mmo.h" struct mail_interface { void (*clear) (struct map_session_data *sd); diff --git a/src/map/map.c b/src/map/map.c index 01d3dbb9f..315924e2e 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -2,66 +2,62 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" +#include "../common/timer.h" +#include "../common/ers.h" +#include "../common/grfio.h" +#include "../common/malloc.h" +#include "../common/socket.h" // WFIFO*() +#include "../common/showmsg.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/console.h" +#include "../common/HPM.h" -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL #include "map.h" - -#include <math.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "HPMmap.h" -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" +#include "path.h" #include "chrif.h" #include "clif.h" #include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" #include "intif.h" -#include "irc-bot.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" #include "npc.h" -#include "npc.h" // npc_setcells(), npc_unsetcells() -#include "party.h" -#include "path.h" #include "pc.h" -#include "pet.h" -#include "quest.h" -#include "script.h" -#include "skill.h" #include "status.h" +#include "mob.h" +#include "npc.h" // npc_setcells(), npc_unsetcells() +#include "chat.h" +#include "itemdb.h" #include "storage.h" +#include "skill.h" #include "trade.h" +#include "party.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/console.h" -#include "../common/core.h" -#include "../common/ers.h" -#include "../common/grfio.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // WFIFO*() -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "battle.h" +#include "battleground.h" +#include "quest.h" +#include "script.h" +#include "mapreg.h" +#include "guild.h" +#include "pet.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" +#include "atcommand.h" +#include "log.h" +#include "mail.h" +#include "irc-bot.h" +#include "HPMmap.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <math.h> #ifndef _WIN32 #include <unistd.h> #endif @@ -5486,8 +5482,8 @@ void map_cp_defaults(void) { map->cpsd->bl.y = MAP_DEFAULT_Y; map->cpsd->bl.m = map->mapname2mapid(MAP_DEFAULT); - console->input->addCommand("gm:info",CPCMD_A(gm_position)); - console->input->addCommand("gm:use",CPCMD_A(gm_use)); + console->addCommand("gm:info",CPCMD_A(gm_position)); + console->addCommand("gm:use",CPCMD_A(gm_use)); #endif } /* Hercules Plugin Mananger */ @@ -5843,7 +5839,7 @@ int do_init(int argc, char *argv[]) Sql_HerculesUpdateCheck(map->mysql_handle); #ifdef CONSOLE_INPUT - console->input->setSQL(map->mysql_handle); + console->setSQL(map->mysql_handle); #endif ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port); diff --git a/src/map/map.h b/src/map/map.h index 539b02ed8..c61868b13 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,18 +5,18 @@ #ifndef _MAP_MAP_H_ #define _MAP_MAP_H_ -#include <stdarg.h> - -#include "atcommand.h" #include "../common/cbasetypes.h" #include "../common/core.h" // CORE_ST_LAST #include "../common/mmo.h" #include "../common/mapindex.h" #include "../common/db.h" +#include "../config/core.h" #include "../common/sql.h" +#include "atcommand.h" +#include <stdarg.h> -struct mob_data; struct npc_data; +struct item_data; struct hChSysCh; enum E_MAPSERVER_ST { @@ -36,6 +36,7 @@ enum E_MAPSERVER_ST { #define NATURAL_HEAL_INTERVAL 500 #define MIN_FLOORITEM 2 #define MAX_FLOORITEM START_ACCOUNT_NUM +#define MAX_LEVEL 175 #define MAX_IGNORE_LIST 20 // official is 14 #define MAX_VENDING 12 #define MAX_MAP_SIZE (512*512) // Wasn't there something like this already? Can't find it.. [Shinryo] diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index f026fde00..61c25f24e 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -2,15 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mapreg.h" - -#include <stdlib.h> -#include <string.h> - -#include "map.h" // map->mysql_handle -#include "script.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/ers.h" @@ -19,6 +10,11 @@ #include "../common/sql.h" #include "../common/strlib.h" #include "../common/timer.h" +#include "map.h" // map->mysql_handle +#include "script.h" +#include "mapreg.h" +#include <stdlib.h> +#include <string.h> struct mapreg_interface mapreg_s; diff --git a/src/map/mercenary.c b/src/map/mercenary.c index 26bc8c188..495621014 100644 --- a/src/map/mercenary.c +++ b/src/map/mercenary.c @@ -2,44 +2,42 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "mercenary.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/malloc.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/mmo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "log.h" #include "clif.h" -#include "guild.h" +#include "chrif.h" #include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "pc.h" +#include "status.h" +#include "skill.h" +#include "mob.h" #include "pet.h" +#include "battle.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" #include "script.h" -#include "skill.h" -#include "status.h" +#include "npc.h" #include "trade.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.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 "../common/timer.h" -#include "../common/utils.h" +#include "mercenary.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> struct mercenary_interface mercenary_s; diff --git a/src/map/mercenary.h b/src/map/mercenary.h index b998ac006..dd9266b2e 100644 --- a/src/map/mercenary.h +++ b/src/map/mercenary.h @@ -6,7 +6,6 @@ #include "status.h" // struct status_data, struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" // number of cells that a mercenary can walk to from it's master before being warped #define MAX_MER_DISTANCE 15 diff --git a/src/map/mob.c b/src/map/mob.c index 11ac74621..8f12d4b1b 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2,49 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP -#include "mob.h" - -#include <math.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/ers.h" +#include "../common/random.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/socket.h" -#include "atcommand.h" -#include "battle.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" +#include "intif.h" +#include "pc.h" +#include "pet.h" +#include "status.h" +#include "mob.h" +#include "homunculus.h" +#include "mercenary.h" #include "elemental.h" #include "guild.h" -#include "homunculus.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mercenary.h" -#include "npc.h" +#include "skill.h" +#include "battle.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "quest.h" +#include "npc.h" +#include "log.h" #include "script.h" -#include "skill.h" -#include "status.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" +#include "date.h" +#include "quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <math.h> struct mob_interface mob_s; diff --git a/src/map/mob.h b/src/map/mob.h index d07f78c77..80175b1db 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -5,11 +5,12 @@ #ifndef _MAP_MOB_H_ #define _MAP_MOB_H_ -#include "map.h" // struct status_data, struct view_data, struct mob_skill -#include "status.h" // struct status_data, struct status_change -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" #include "../common/mmo.h" // struct item +#include "guild.h" // struct guardian_data +#include "map.h" // struct status_data, struct view_data, struct mob_skill +#include "status.h" // struct status data, struct status_change +#include "unit.h" // unit_stop_walking(), unit_stop_attack() +#include "npc.h" #define MAX_RANDOMMONSTER 5 diff --git a/src/map/npc.c b/src/map/npc.c index 8e5854dbf..20b500630 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2,44 +2,41 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "npc.h" - -#include <errno.h> -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/db.h" +#include "../common/socket.h" +#include "../common/HPM.h" -#include "battle.h" -#include "chat.h" +#include "map.h" +#include "log.h" #include "clif.h" -#include "instance.h" #include "intif.h" +#include "pc.h" +#include "status.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "script.h" #include "mob.h" -#include "pc.h" #include "pet.h" -#include "script.h" +#include "instance.h" +#include "battle.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.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 "npc.h" +#include "chat.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> +#include <time.h> +#include <errno.h> struct npc_interface npc_s; diff --git a/src/map/npc.h b/src/map/npc.h index 6e9686d33..c154b14d0 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -8,10 +8,10 @@ #include "map.h" // struct block_list #include "status.h" // struct status_change #include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/db.h" struct HPluginData; +struct block_list; +struct npc_data; struct view_data; enum npc_parse_options { diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c index f245ffea5..9d5639efc 100644 --- a/src/map/npc_chat.c +++ b/src/map/npc_chat.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - #ifdef PCRE_SUPPORT +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" + +#include "mob.h" // struct mob_data #include "npc.h" // struct npc_data +#include "pc.h" // struct map_session_data +#include "script.h" // set_var() + +#include "../../3rdparty/pcre/include/pcre.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> - -#include "../../3rdparty/pcre/include/pcre.h" - -#include "mob.h" // struct mob_data -#include "pc.h" // struct map_session_data -#include "script.h" // set_var() -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" +#include <stdarg.h> /** * interface sources diff --git a/src/map/party.c b/src/map/party.c index 7c49e241c..cf5e7bbe3 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -2,37 +2,34 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/socket.h" // last_tick +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/utils.h" +#include "../common/strlib.h" +#include "../common/HPM.h" -#include "../config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP #include "party.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "atcommand.h" //msg_txt() -#include "battle.h" -#include "clif.h" +#include "pc.h" +#include "map.h" #include "instance.h" +#include "battle.h" #include "intif.h" -#include "itemdb.h" +#include "clif.h" #include "log.h" -#include "map.h" -#include "mob.h" // struct mob_data -#include "pc.h" #include "skill.h" #include "status.h" -#include "../common/HPM.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // last_tick -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "itemdb.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + struct party_interface party_s; diff --git a/src/map/party.h b/src/map/party.h index 3bad22b13..ed8289af6 100644 --- a/src/map/party.h +++ b/src/map/party.h @@ -5,12 +5,11 @@ #ifndef _MAP_PARTY_H_ #define _MAP_PARTY_H_ +#include "../common/mmo.h" // struct party +#include "../config/core.h" #include <stdarg.h> -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct party +#include "map.h" #define PARTY_BOOKING_JOBS 6 #define PARTY_BOOKING_RESULTS 10 diff --git a/src/map/path.c b/src/map/path.c index d02e9ee4a..ae9fc389d 100644 --- a/src/map/path.c +++ b/src/map/path.c @@ -2,16 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // CELL_NOSTACK, CIRCULAR_AREA -#include "path.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "map.h" #include "../common/cbasetypes.h" #include "../common/db.h" #include "../common/malloc.h" @@ -19,6 +9,13 @@ #include "../common/random.h" #include "../common/showmsg.h" +#include "path.h" +#include "map.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #define SET_OPEN 0 #define SET_CLOSED 1 diff --git a/src/map/path.h b/src/map/path.h index b48ff05fb..0b67a0120 100644 --- a/src/map/path.h +++ b/src/map/path.h @@ -6,7 +6,6 @@ #define _MAP_PATH_H_ #include "map.h" // enum cell_chk -#include "../common/cbasetypes.h" #define MOVE_COST 10 #define MOVE_DIAGONAL_COST 14 diff --git a/src/map/pc.c b/src/map/pc.c index 45adfe22a..c8fb14e55 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2,16 +2,21 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/core.h" // get_svn_revision() +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/socket.h" // session[] +#include "../common/strlib.h" // safestrncpy() +#include "../common/timer.h" +#include "../common/utils.h" +#include "../common/conf.h" +#include "../common/mmo.h" //NAME_LENGTH +#include "../common/sysinfo.h" -#include "../config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_CARTS, MAX_SPIRITBALL, NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT #include "pc.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - #include "atcommand.h" // get_atcommand_level() #include "battle.h" // battle_config #include "battleground.h" @@ -20,40 +25,32 @@ #include "clif.h" #include "date.h" // is_day_of_*() #include "duel.h" -#include "elemental.h" -#include "guild.h" // guild->search(), guild_request_info() -#include "homunculus.h" -#include "instance.h" #include "intif.h" #include "itemdb.h" #include "log.h" #include "mail.h" #include "map.h" +#include "path.h" +#include "homunculus.h" +#include "instance.h" #include "mercenary.h" -#include "mob.h" // struct mob_data +#include "elemental.h" #include "npc.h" // fake_nd -#include "party.h" // party->search() -#include "path.h" -#include "pc_groups.h" #include "pet.h" // pet_unlocktarget() -#include "quest.h" +#include "party.h" // party->search() +#include "guild.h" // guild->search(), guild_request_info() #include "script.h" // script_config #include "skill.h" #include "status.h" // struct status_data #include "storage.h" -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/core.h" // get_svn_revision() -#include "../common/malloc.h" -#include "../common/mmo.h" //NAME_LENGTH -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" // session[] -#include "../common/strlib.h" // safestrncpy() -#include "../common/sysinfo.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "pc_groups.h" +#include "quest.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> + struct pc_interface pc_s; @@ -10654,7 +10651,9 @@ void pc_defaults(void) { memset(pc->exp_table, 0, sizeof(pc->exp_table) + sizeof(pc->max_level) + sizeof(pc->statp) +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) + sizeof(pc->level_penalty) +#endif + sizeof(pc->skill_tree) + sizeof(pc->smith_fame_list) + sizeof(pc->chemist_fame_list) diff --git a/src/map/pc.h b/src/map/pc.h index c4026a48d..70df9ca56 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,23 +5,23 @@ #ifndef _MAP_PC_H_ #define _MAP_PC_H_ -#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT - +#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus +#include "../common/ers.h" +#include "../common/timer.h" // INVALID_TIMER +#include "atcommand.h" // AtCommandType #include "battle.h" // battle_config -#include "battleground.h" // enum bg_queue_types +#include "battleground.h" #include "buyingstore.h" // struct s_buyingstore -#include "itemdb.h" // MAX_ITEMDELAYS -#include "log.h" // struct e_log_pick_type -#include "map.h" // RC_MAX, ELE_MAX -#include "pc_groups.h" // GroupSettings -#include "script.h" // struct reg_db +#include "itemdb.h" +#include "log.h" +#include "map.h" // RC_MAX +#include "mob.h" +#include "pc_groups.h" +#include "script.h" // struct script_reg, struct script_regstr #include "searchstore.h" // struct s_search_store_info -#include "status.h" // enum sc_type, OPTION_* -#include "unit.h" // struct unit_data, struct view_data +#include "status.h" // OPTION_*, struct weapon_atk +#include "unit.h" // unit_stop_attack(), unit_stop_walking() #include "vending.h" // struct s_vending -#include "../common/cbasetypes.h" -#include "../common/ers.h" // struct eri -#include "../common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus /** * Defines @@ -742,8 +742,9 @@ struct pc_interface { unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; unsigned int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; +#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP) unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; - +#endif unsigned int equip_pos[EQI_MAX]; /* */ struct skill_tree_entry skill_tree[CLASS_COUNT][MAX_SKILL_TREE]; diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c index a917ef409..906462c7e 100644 --- a/src/map/pc_groups.c +++ b/src/map/pc_groups.c @@ -2,14 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pc_groups.h" - -#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() -#include "clif.h" // clif->GM_kick() -#include "map.h" // mapiterator -#include "pc.h" // pc->set_group() #include "../common/cbasetypes.h" #include "../common/conf.h" #include "../common/db.h" @@ -18,6 +10,12 @@ #include "../common/showmsg.h" #include "../common/strlib.h" // strcmp +#include "pc_groups.h" +#include "atcommand.h" // atcommand->exists(), atcommand->load_groups() +#include "clif.h" // clif->GM_kick() +#include "map.h" // mapiterator +#include "pc.h" // pc->set_group() + static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd() struct pc_groups_interface pcg_s; diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h index 7c8cdd82a..5c03f999f 100644 --- a/src/map/pc_groups.h +++ b/src/map/pc_groups.h @@ -5,10 +5,6 @@ #ifndef _MAP_PC_GROUPS_H_ #define _MAP_PC_GROUPS_H_ -#include "../common/cbasetypes.h" -#include "../common/conf.h" -#include "../common/db.h" - /// PC permissions enum e_pc_permission { PC_PERM_NONE = 0, // #0 diff --git a/src/map/pet.c b/src/map/pet.c index aa2be4473..993497434 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -2,39 +2,37 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "pet.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/db.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "atcommand.h" // msg_txt() -#include "battle.h" -#include "chrif.h" -#include "clif.h" +#include "pc.h" +#include "status.h" +#include "map.h" +#include "path.h" #include "intif.h" +#include "clif.h" +#include "chrif.h" +#include "pet.h" #include "itemdb.h" -#include "log.h" -#include "map.h" +#include "battle.h" #include "mob.h" #include "npc.h" -#include "path.h" -#include "pc.h" #include "script.h" #include "skill.h" -#include "status.h" #include "unit.h" -#include "../common/db.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" +#include "atcommand.h" // msg_txt() +#include "log.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct pet_interface pet_s; diff --git a/src/map/pet.h b/src/map/pet.h index 8dde0fac2..4ec30b3fb 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -5,14 +5,8 @@ #ifndef _MAP_PET_H_ #define _MAP_PET_H_ -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "unit.h" // struct unit_data -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // NAME_LENGTH, struct s_pet - -#define MAX_PET_DB 300 -#define MAX_PETLOOT_SIZE 30 +#define MAX_PET_DB 300 +#define MAX_PETLOOT_SIZE 30 struct s_pet_db { short class_; diff --git a/src/map/quest.c b/src/map/quest.c index b76d6bc82..bde276f9d 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -2,37 +2,36 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/socket.h" +#include "../common/timer.h" +#include "../common/malloc.h" +#include "../common/nullpo.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "map.h" +#include "pc.h" +#include "npc.h" +#include "itemdb.h" +#include "script.h" +#include "intif.h" +#include "battle.h" +#include "mob.h" +#include "party.h" +#include "unit.h" +#include "log.h" +#include "clif.h" #include "quest.h" +#include "chrif.h" -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <stdarg.h> #include <time.h> -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "pc.h" -#include "script.h" -#include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/malloc.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" struct quest_interface quest_s; diff --git a/src/map/quest.h b/src/map/quest.h index 87894d639..e01e35619 100644 --- a/src/map/quest.h +++ b/src/map/quest.h @@ -5,10 +5,6 @@ #ifndef _MAP_QUEST_H_ #define _MAP_QUEST_H_ -#include "map.h" // TBL_PC -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_QUEST_OBJECTIVES - #define MAX_QUEST_DB (60355+1) // Highest quest ID + 1 struct quest_db { diff --git a/src/map/script.c b/src/map/script.c index 068be8524..4d77c506b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2,46 +2,6 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // NEW_CARTS, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL -#include "script.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "mail.h" -#include "map.h" -#include "mapreg.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" -#include "pet.h" -#include "quest.h" -#include "skill.h" -#include "status.h" -#include "status.h" -#include "storage.h" -#include "unit.h" #include "../common/cbasetypes.h" #include "../common/malloc.h" #include "../common/md5calc.h" @@ -50,10 +10,47 @@ #include "../common/showmsg.h" #include "../common/socket.h" // usage: getcharip #include "../common/strlib.h" -#include "../common/sysinfo.h" #include "../common/timer.h" #include "../common/utils.h" +#include "../common/sysinfo.h" + +#include "map.h" +#include "path.h" +#include "clif.h" +#include "chrif.h" +#include "itemdb.h" +#include "pc.h" +#include "status.h" +#include "storage.h" +#include "mob.h" +#include "npc.h" +#include "pet.h" +#include "mapreg.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "intif.h" +#include "skill.h" +#include "status.h" +#include "chat.h" +#include "battle.h" +#include "battleground.h" +#include "party.h" +#include "guild.h" +#include "atcommand.h" +#include "log.h" +#include "unit.h" +#include "pet.h" +#include "mail.h" +#include "script.h" +#include "quest.h" +#include "elemental.h" +#include "../config/core.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <math.h> #ifndef WIN32 #include <sys/time.h> #endif diff --git a/src/map/script.h b/src/map/script.h index 899c745da..90b18d87f 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -5,19 +5,17 @@ #ifndef _MAP_SCRIPT_H_ #define _MAP_SCRIPT_H_ +#include "../common/strlib.h" //StringBuf +#include "../common/cbasetypes.h" +#include "map.h" //EVENT_NAME_LENGTH + #include <setjmp.h> #include <errno.h> -#include "map.h" //EVENT_NAME_LENGTH -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/mmo.h" // struct item -#include "../common/sql.h" // Sql -#include "../common/strlib.h" //StringBuf - /** * Declarations **/ +struct map_session_data; struct eri; /** diff --git a/src/map/searchstore.c b/src/map/searchstore.c index 72b28aacd..0144aea93 100644 --- a/src/map/searchstore.c +++ b/src/map/searchstore.c @@ -2,17 +2,14 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "searchstore.h" // struct s_search_store_info - -#include "battle.h" // battle_config.* -#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* -#include "pc.h" // struct map_session_data #include "../common/cbasetypes.h" #include "../common/malloc.h" // aMalloc, aRealloc, aFree #include "../common/showmsg.h" // ShowError, ShowWarning #include "../common/strlib.h" // safestrncpy +#include "battle.h" // battle_config.* +#include "clif.h" // clif->open_search_store_info, clif->search_store_info_* +#include "pc.h" // struct map_session_data +#include "searchstore.h" // struct s_search_store_info struct searchstore_interface searchstore_s; diff --git a/src/map/searchstore.h b/src/map/searchstore.h index c9b93ba54..827e39053 100644 --- a/src/map/searchstore.h +++ b/src/map/searchstore.h @@ -5,12 +5,6 @@ #ifndef _MAP_SEARCHSTORE_H_ #define _MAP_SEARCHSTORE_H_ -#include <time.h> - -#include "map.h" // MESSAGE_SIZE -#include "../common/cbasetypes.h" -#include "../common/mmo.h" // MAX_SLOTS - /** * Defines **/ diff --git a/src/map/skill.c b/src/map/skill.c index b2e94ec79..c8388770a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2,48 +2,46 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION() -#include "skill.h" - -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/strlib.h" +#include "../common/utils.h" +#include "../common/ers.h" -#include "battle.h" -#include "battleground.h" -#include "chrif.h" +#include "map.h" +#include "path.h" #include "clif.h" -#include "date.h" -#include "elemental.h" -#include "guild.h" +#include "pc.h" +#include "status.h" +#include "skill.h" +#include "pet.h" #include "homunculus.h" -#include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" #include "mercenary.h" +#include "elemental.h" #include "mob.h" #include "npc.h" +#include "battle.h" +#include "battleground.h" #include "party.h" -#include "path.h" -#include "pc.h" -#include "pet.h" +#include "itemdb.h" #include "script.h" -#include "status.h" +#include "intif.h" +#include "log.h" +#include "chrif.h" +#include "guild.h" +#include "date.h" #include "unit.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <math.h> + #define SKILLUNITTIMER_INTERVAL 100 diff --git a/src/map/skill.h b/src/map/skill.h index b6dbb1fcb..dda310bd4 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -5,23 +5,19 @@ #ifndef _MAP_SKILL_H_ #define _MAP_SKILL_H_ -#include "../config/core.h" // RENEWAL_CAST - -#include "map.h" // struct block_list -#include "status.h" // enum sc_type -#include "../common/cbasetypes.h" -#include "../common/db.h" #include "../common/mmo.h" // MAX_SKILL, struct square +#include "../common/db.h" +#include "map.h" // struct block_list /** * Declarations **/ -struct homun_data; struct map_session_data; -struct mercenary_data; +struct homun_data; struct skill_unit; -struct square; +struct skill_unit_group; struct status_change_entry; +struct square; /** * Defines diff --git a/src/map/status.c b/src/map/status.c index eb06138da..4c2bc6d22 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2,46 +2,43 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP -#include "status.h" - -#include <math.h> -#include <memory.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> +#include "../common/cbasetypes.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/random.h" +#include "../common/showmsg.h" +#include "../common/malloc.h" +#include "../common/utils.h" +#include "../common/ers.h" +#include "../common/strlib.h" -#include "battle.h" -#include "chrif.h" -#include "clif.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "itemdb.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" #include "path.h" #include "pc.h" #include "pet.h" -#include "script.h" +#include "npc.h" +#include "mob.h" +#include "clif.h" +#include "guild.h" #include "skill.h" +#include "itemdb.h" +#include "battle.h" +#include "chrif.h" #include "skill.h" +#include "status.h" +#include "script.h" #include "unit.h" +#include "homunculus.h" +#include "mercenary.h" +#include "elemental.h" #include "vending.h" -#include "../common/cbasetypes.h" -#include "../common/ers.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/strlib.h" -#include "../common/timer.h" -#include "../common/utils.h" + +#include <time.h> +#include <stdio.h> +#include <stdlib.h> +#include <memory.h> +#include <string.h> +#include <math.h> struct status_interface status_s; diff --git a/src/map/status.h b/src/map/status.h index baa586297..e47c2b365 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -5,18 +5,14 @@ #ifndef _MAP_STATUS_H_ #define _MAP_STATUS_H_ -#include "../config/core.h" // defType, NEW_CARTS, RENEWAL, RENEWAL_ASPD - -#include "../common/cbasetypes.h" #include "../common/mmo.h" struct block_list; -struct elemental_data; -struct homun_data; -struct mercenary_data; struct mob_data; -struct npc_data; struct pet_data; +struct homun_data; +struct mercenary_data; +struct status_change; //Change the equation when the values are high enough to discard the //imprecision in exchange of overflow protection [Skotlex] @@ -1882,7 +1878,11 @@ struct status_interface { int hp_coefficient2[CLASS_COUNT]; int hp_sigma_val[CLASS_COUNT][MAX_LEVEL+1]; int sp_coefficient[CLASS_COUNT]; - int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; // +1 for RENEWAL_ASPD +#ifdef RENEWAL_ASPD + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE+1]; +#else + int aspd_base[CLASS_COUNT][MAX_WEAPON_TYPE]; //[blackhole89] +#endif sc_type Skill2SCTable[MAX_SKILL]; // skill -> status int IconChangeTable[SC_MAX]; // status -> "icon" (icon is a bit of a misnomer, since there exist values with no icon associated) unsigned int ChangeFlagTable[SC_MAX]; // status -> flags diff --git a/src/map/storage.c b/src/map/storage.c index 2db5fff3d..e65ed7b80 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -2,29 +2,27 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/cbasetypes.h" +#include "../common/db.h" +#include "../common/nullpo.h" +#include "../common/malloc.h" +#include "../common/showmsg.h" +#include "map.h" // struct map_session_data #include "storage.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" #include "chrif.h" +#include "itemdb.h" #include "clif.h" -#include "guild.h" #include "intif.h" -#include "itemdb.h" -#include "log.h" -#include "map.h" // struct map_session_data #include "pc.h" -#include "../common/cbasetypes.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/showmsg.h" +#include "guild.h" +#include "battle.h" +#include "atcommand.h" +#include "log.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> struct storage_interface storage_s; struct guild_storage_interface gstorage_s; diff --git a/src/map/storage.h b/src/map/storage.h index 5edb68cfc..8f9f904f6 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,12 +5,11 @@ #ifndef _MAP_STORAGE_H_ #define _MAP_STORAGE_H_ -#include "../common/cbasetypes.h" -#include "../common/db.h" - +struct storage_data; struct guild_storage; struct item; struct map_session_data; +struct DBMap; struct storage_interface { /* */ diff --git a/src/map/trade.c b/src/map/trade.c index 83426c407..44b669ebd 100644 --- a/src/map/trade.c +++ b/src/map/trade.c @@ -2,27 +2,25 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE +#include "../common/nullpo.h" +#include "../common/socket.h" #include "trade.h" - -#include <stdio.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" #include "clif.h" -#include "intif.h" #include "itemdb.h" -#include "log.h" #include "map.h" -#include "npc.h" #include "path.h" #include "pc.h" +#include "npc.h" +#include "battle.h" +#include "chrif.h" #include "storage.h" -#include "../common/nullpo.h" -#include "../common/socket.h" +#include "intif.h" +#include "atcommand.h" +#include "log.h" + +#include <stdio.h> +#include <string.h> struct trade_interface trade_s; diff --git a/src/map/unit.c b/src/map/unit.c index 0ad770e80..151d4bad5 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2,48 +2,45 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "../config/core.h" // RENEWAL_CAST -#include "unit.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "../common/showmsg.h" +#include "../common/timer.h" +#include "../common/nullpo.h" +#include "../common/db.h" +#include "../common/malloc.h" +#include "../common/random.h" +#include "../common/HPM.h" -#include "battle.h" -#include "battleground.h" -#include "chat.h" -#include "chrif.h" -#include "clif.h" -#include "duel.h" -#include "elemental.h" -#include "guild.h" -#include "homunculus.h" -#include "instance.h" -#include "intif.h" #include "map.h" -#include "mercenary.h" -#include "mob.h" -#include "npc.h" -#include "party.h" #include "path.h" #include "pc.h" +#include "mob.h" #include "pet.h" -#include "script.h" +#include "homunculus.h" +#include "instance.h" +#include "mercenary.h" +#include "elemental.h" #include "skill.h" +#include "clif.h" +#include "duel.h" +#include "npc.h" +#include "guild.h" #include "status.h" -#include "storage.h" +#include "unit.h" +#include "battle.h" +#include "battleground.h" +#include "chat.h" #include "trade.h" #include "vending.h" -#include "../common/HPM.h" -#include "../common/db.h" -#include "../common/malloc.h" -#include "../common/nullpo.h" -#include "../common/random.h" -#include "../common/showmsg.h" -#include "../common/socket.h" -#include "../common/timer.h" +#include "party.h" +#include "intif.h" +#include "chrif.h" +#include "script.h" +#include "storage.h" + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + const short dirx[8]={0,-1,-1,-1,0,1,1,1}; const short diry[8]={1,1,0,-1,-1,-1,0,1}; diff --git a/src/map/unit.h b/src/map/unit.h index 9e05647b1..33fa4e052 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,13 +5,15 @@ #ifndef _MAP_UNIT_H_ #define _MAP_UNIT_H_ +//#include "map.h" +struct block_list; +struct unit_data; +struct map_session_data; + #include "clif.h" // clr_type +#include "map.h" // struct block_list #include "path.h" // struct walkpath_data -#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset -#include "../common/cbasetypes.h" - -struct map_session_data; -struct block_list; +#include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset struct unit_data { struct block_list *bl; diff --git a/src/map/vending.c b/src/map/vending.c index c8ac814db..9462975b3 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -2,27 +2,24 @@ // See the LICENSE file // Portions Copyright (c) Athena Dev Teams -#define HERCULES_CORE - -#include "vending.h" - -#include <stdio.h> -#include <string.h> - -#include "atcommand.h" -#include "battle.h" -#include "chrif.h" +#include "../common/nullpo.h" +#include "../common/strlib.h" +#include "../common/utils.h" #include "clif.h" #include "itemdb.h" -#include "log.h" +#include "atcommand.h" #include "map.h" -#include "npc.h" #include "path.h" +#include "chrif.h" +#include "vending.h" #include "pc.h" +#include "npc.h" #include "skill.h" -#include "../common/nullpo.h" -#include "../common/strlib.h" -#include "../common/utils.h" +#include "battle.h" +#include "log.h" + +#include <stdio.h> +#include <string.h> struct vending_interface vending_s; diff --git a/src/map/vending.h b/src/map/vending.h index a70726374..a212f8385 100644 --- a/src/map/vending.h +++ b/src/map/vending.h @@ -7,7 +7,6 @@ #include "../common/cbasetypes.h" #include "../common/db.h" - struct map_session_data; struct s_search_store_search; |