summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIbrahem Hossam <hemagx2@gmail.com>2016-03-14 18:35:48 +0200
committerIbrahem Hossam <hemagx2@gmail.com>2016-03-14 18:35:48 +0200
commitd912a98b682ab3dd4080872668ea66b55f2efab3 (patch)
tree964b6acde70d4875d9ba260628def1de63e3b42f
parente5543af5e3b431d7411fa1a493402ea23e9691c2 (diff)
parent6041f7d3be8a0792a287fc9cff7f14c1c3c3b73c (diff)
downloadhercules-d912a98b682ab3dd4080872668ea66b55f2efab3.tar.gz
hercules-d912a98b682ab3dd4080872668ea66b55f2efab3.tar.bz2
hercules-d912a98b682ab3dd4080872668ea66b55f2efab3.tar.xz
hercules-d912a98b682ab3dd4080872668ea66b55f2efab3.zip
Merge pull request #1199 from 4144/roulettedisable
Dont load roulette_db.conf if roulette disabled.
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/itemdb.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 94e629adb..e422a5de4 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3643,6 +3643,8 @@ ACMD(reloadbattleconf)
memcpy(&prev_config, &battle_config, sizeof(prev_config));
battle->config_read(map->BATTLE_CONF_FILENAME);
+ if (prev_config.feature_roulette == 0 && battle_config.feature_roulette == 1 && !clif->parse_roulette_db())
+ battle_config.feature_roulette = 0;
if( prev_config.item_rate_mvp != battle_config.item_rate_mvp
|| prev_config.item_rate_common != battle_config.item_rate_common
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 630bc4488..ce6232965 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2343,7 +2343,7 @@ void do_init_itemdb(bool minimal) {
clif->cashshop_load();
/** it failed? we disable it **/
- if( !clif->parse_roulette_db() )
+ if (battle_config.feature_roulette == 1 && !clif->parse_roulette_db())
battle_config.feature_roulette = 0;
}
void itemdb_defaults(void) {