summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-02 17:50:15 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-02 17:50:15 +0000
commit665680682b57d01415afb478b67d0c7c61d21119 (patch)
tree775245f9ea473abcac9d4c29c77c69daa1061345 /src/map/battle.c
parent493fb3cce76b9b659010b8aeee07916de85cdd5b (diff)
downloadhercules-665680682b57d01415afb478b67d0c7c61d21119.tar.gz
hercules-665680682b57d01415afb478b67d0c7c61d21119.tar.bz2
hercules-665680682b57d01415afb478b67d0c7c61d21119.tar.xz
hercules-665680682b57d01415afb478b67d0c7c61d21119.zip
* Added motd_type
* Edited atcommand.c to fix compile warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c9
1 files changed, 8 insertions, 1 deletions
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;