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 18:15:57 -0500 |
commit | ac005d74dd4d2ae318a56d2142cb997891e79bf6 (patch) | |
tree | 10b331a892ae1d1a32ae50ceb81f8fc49c854f5e /src | |
parent | 7d71a0828ccb4149d5ce8b13cd5bd2f84a911d6b (diff) | |
download | hercules-ac005d74dd4d2ae318a56d2142cb997891e79bf6.tar.gz hercules-ac005d74dd4d2ae318a56d2142cb997891e79bf6.tar.bz2 hercules-ac005d74dd4d2ae318a56d2142cb997891e79bf6.tar.xz hercules-ac005d74dd4d2ae318a56d2142cb997891e79bf6.zip |
remove hardcoded chat area size from clif.c, add chat_area_size to battleconf
Diffstat (limited to 'src')
-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 887fa9d64..c48241898 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -451,8 +451,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 |