summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/battle.c9
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/pc.c5
4 files changed, 15 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ce2ffaf08..7accfa639 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2884,7 +2884,7 @@ int atcommand_go(
return -1;
}
} else if (town >= 0 && town < (int)(sizeof(data) / sizeof(data[0]))) {
- m = map_mapname2mapid(data[town].map);
+ m = map_mapname2mapid((char *)data[town].map);
if (m >= 0 && map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, "You are not authorised to warp you to this destination map.");
return -1;
@@ -2893,7 +2893,7 @@ int atcommand_go(
clif_displaymessage(fd, "You are not authorised to warp you from your actual map.");
return -1;
}
- if (pc_setpos(sd, data[town].map, data[town].x, data[town].y, 3) == 0) {
+ if (pc_setpos(sd, (char *)data[town].map, data[town].x, data[town].y, 3) == 0) {
clif_displaymessage(fd, msg_table[0]); // Warped.
} else {
clif_displaymessage(fd, msg_table[1]); // Map not found.
diff --git a/src/map/battle.c b/src/map/battle.c
index 9a11ab892..e90eebbad 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5213,6 +5213,7 @@ static const struct {
{ "skill_steal_rate", &battle_config.skill_steal_rate}, // [celest]
{ "night_darkness_level", &battle_config.night_darkness_level}, // [celest]
{ "skill_range_leniency", &battle_config.skill_range_leniency}, // [celest]
+ { "motd_type", &battle_config.motd_type}, // [celest]
//SQL-only options start
#ifndef TXT_ONLY
@@ -5443,6 +5444,7 @@ void battle_set_defaults() {
battle_config.skill_steal_rate = 100;
battle_config.night_darkness_level = 9;
battle_config.skill_range_leniency = 1;
+ battle_config.motd_type = 0;
battle_config.castrate_dex_scale = 150;
@@ -5566,8 +5568,13 @@ void battle_validate_conf() {
if (battle_config.night_darkness_level > 10) // Celest
battle_config.night_darkness_level = 10;
- if (battle_config.skill_range_leniency <= 0) // Celest
+ if (battle_config.skill_range_leniency < 0) // Celest
battle_config.skill_range_leniency = 0;
+
+ if (battle_config.motd_type < 0)
+ battle_config.motd_type = 0;
+ else if (battle_config.motd_type > 1)
+ battle_config.motd_type = 1;
if (battle_config.vending_max_value > 10000000 || battle_config.vending_max_value<=0) // Lupus & Kobra_k88
battle_config.vending_max_value = 10000000;
diff --git a/src/map/battle.h b/src/map/battle.h
index b0f6c523d..32dabb53e 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -341,6 +341,7 @@ extern struct Battle_Config {
int skill_steal_rate; // [celest]
int night_darkness_level; // [celest]
int skill_range_leniency; // [celest]
+ int motd_type; // [celest]
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/pc.c b/src/map/pc.c
index c047b5745..94ee62fbb 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -838,7 +838,10 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
break;
}
}
- clif_displaymessage(sd->fd, buf);
+ if (battle_config.motd_type)
+ clif_disp_onlyself(sd,buf,strlen(buf));
+ else
+ clif_displaymessage(sd->fd, buf);
}
fclose(fp);
}