* Added motd_type

* Edited atcommand.c to fix compile warnings

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@436 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2004-12-02 17:50:15 +00:00
parent 90e4b14002
commit 11e1774c1d
6 changed files with 20 additions and 4 deletions

View File

@ -6,6 +6,8 @@ Date Added
- Added skill_range_leniency
* Added check for clif.c in case the server didn't realise we've died [celest]
* Added a fix for @npcmove by JohnC and Fredzilla
* Added motd_type [celest]
* Edited atcommand.c to fix compile warnings [celest]
12/1
- Make it build against gcc 2.95 [MouseJstr]

View File

@ -751,5 +751,8 @@ skill_steal_type: yes
// Setting this at 1 would be enough.
skill_range_leniency: 1
// Set this to 1 if your clients have langtype problems and can't display motd properly
motd_type: 0
import: conf/import/battle_conf.txt

View File

@ -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.

View File

@ -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,9 +5568,14 @@ 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;

View File

@ -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]

View File

@ -838,6 +838,9 @@ int pc_authok(int id, int login_id2, time_t connect_until_time, struct mmo_chars
break;
}
}
if (battle_config.motd_type)
clif_disp_onlyself(sd,buf,strlen(buf));
else
clif_displaymessage(sd->fd, buf);
}
fclose(fp);