summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-28 02:50:05 +0300
committerGitHub <noreply@github.com>2017-01-28 02:50:05 +0300
commita0d69352ee8dcdcd293ccc2762103864b073b455 (patch)
tree10b331a892ae1d1a32ae50ceb81f8fc49c854f5e
parent7d71a0828ccb4149d5ce8b13cd5bd2f84a911d6b (diff)
parentac005d74dd4d2ae318a56d2142cb997891e79bf6 (diff)
downloadhercules-a0d69352ee8dcdcd293ccc2762103864b073b455.tar.gz
hercules-a0d69352ee8dcdcd293ccc2762103864b073b455.tar.bz2
hercules-a0d69352ee8dcdcd293ccc2762103864b073b455.tar.xz
hercules-a0d69352ee8dcdcd293ccc2762103864b073b455.zip
Merge pull request #1562 from mekolat/chat-area
remove hardcoded chat area size
-rw-r--r--conf/map/battle/client.conf5
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/map.h1
5 files changed, 9 insertions, 3 deletions
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf
index 818db3142..15fa71faf 100644
--- a/conf/map/battle/client.conf
+++ b/conf/map/battle/client.conf
@@ -69,6 +69,9 @@ pet_hair_style: 100
// Visible area size (how many squares away from a player can they see)
area_size: 14
+// Chat area size (how many squares away from a player can they chat)
+chat_area_size: 9
+
// Maximum walk path (how many cells a player can walk going to cursor)
// default: 17(official)
max_walk_path: 17
@@ -107,7 +110,7 @@ save_body_style: false
// Do not display cloth colors for the wedding costume?
// Note: Both save_clothcolor and wedding_modifydisplay have to be enabled
-// for this option to take effect. Set this to true if your cloth palettes
+// for this option to take effect. Set this to true if your cloth palettes
// pack doesn't has wedding palettes (or has less than the other jobs)
wedding_ignorepalette: false
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