diff options
author | gumi <mekolat@users.noreply.github.com> | 2017-01-27 18:07:45 -0500 |
---|---|---|
committer | gumi <mekolat@users.noreply.github.com> | 2017-01-27 19:24:28 -0500 |
commit | 4237dbc2bf267c4a0af400dcdf7b164b607a06be (patch) | |
tree | e443f08ea06728781dfe79f0246afddee086172e | |
parent | 18e76fe3596aec2b9a862b762cc31a66ac648317 (diff) | |
download | hercules-4237dbc2bf267c4a0af400dcdf7b164b607a06be.tar.gz hercules-4237dbc2bf267c4a0af400dcdf7b164b607a06be.tar.bz2 hercules-4237dbc2bf267c4a0af400dcdf7b164b607a06be.tar.xz hercules-4237dbc2bf267c4a0af400dcdf7b164b607a06be.zip |
remove hardcoded chat area size from clif.c, add chat_area_size to battleconfs20170306
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/map.h | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index bb20b94ff..64fda033f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7167,6 +7167,7 @@ static const struct battle_data { { "castrate_dex_scale", &battle_config.castrate_dex_scale, 150, 1, INT_MAX, }, { "vcast_stat_scale", &battle_config.vcast_stat_scale, 530, 1, INT_MAX, }, { "area_size", &battle_config.area_size, 14, 0, INT_MAX, }, + { "chat_area_size", &battle_config.chat_area_size, 9, 0, INT_MAX, }, { "zeny_from_mobs", &battle_config.zeny_from_mobs, 0, 0, 1, }, { "mobs_level_up", &battle_config.mobs_level_up, 0, 0, 1, }, { "mobs_level_up_exp_rate", &battle_config.mobs_level_up_exp_rate, 1, 1, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 7e7048a38..c55d5ef19 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -362,6 +362,7 @@ struct Battle_Config { int castrate_dex_scale; // added by [MouseJstr] int area_size; // added by [MouseJstr] + int chat_area_size; // added by [gumi] int max_def, over_def_bonus; //added by [Skotlex] diff --git a/src/map/clif.c b/src/map/clif.c index 8759821d5..e4f677cf7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -457,8 +457,8 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target break; case AREA_CHAT_WOC: nullpo_retr(true, bl); - map->foreachinarea(clif->send_sub, bl->m, bl->x-(AREA_SIZE-5), bl->y-(AREA_SIZE-5), - bl->x+(AREA_SIZE-5), bl->y+(AREA_SIZE-5), BL_PC, buf, len, bl, AREA_WOC); + map->foreachinarea(clif->send_sub, bl->m, bl->x-CHAT_AREA_SIZE, bl->y-CHAT_AREA_SIZE, + bl->x+CHAT_AREA_SIZE, bl->y+CHAT_AREA_SIZE, BL_PC, buf, len, bl, AREA_WOC); break; case CHAT: diff --git a/src/map/map.h b/src/map/map.h index b76128762..8c5372093 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -47,6 +47,7 @@ enum E_MAPSERVER_ST { #define MAX_NPC_PER_MAP 512 #define AREA_SIZE (battle->bc->area_size) +#define CHAT_AREA_SIZE (battle->bc->chat_area_size) #define DAMAGELOG_SIZE 30 #define LOOTITEM_SIZE 10 #define MAX_MOBSKILL 50 |