diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 62fe834c8..1bdb8e39a 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5530,8 +5530,48 @@ atcommand_reloadbattleconf( const int fd, struct map_session_data* sd,
const char* command, const char* message)
{
+ struct Battle_Config prev_config;
+ memcpy(&prev_config, &battle_config, sizeof(prev_config));
+
battle_config_read(BATTLE_CONF_FILENAME);
- mob_reload(); //Needed as well so rate changes take effect.
+
+ if (memcmp(&prev_config.item_rate_mvp,
+ &battle_config.item_rate_mvp,
+ sizeof(battle_config.item_rate_mvp)+
+ sizeof(battle_config.item_rate_common)+
+ sizeof(battle_config.item_rate_common_boss)+
+ sizeof(battle_config.item_rate_card)+
+ sizeof(battle_config.item_rate_card_boss)+
+ sizeof(battle_config.item_rate_equip)+
+ sizeof(battle_config.item_rate_equip_boss)+
+ sizeof(battle_config.item_rate_heal)+
+ sizeof(battle_config.item_rate_heal_boss)+
+ sizeof(battle_config.item_rate_use)+
+ sizeof(battle_config.item_rate_use_boss)+
+ sizeof(battle_config.item_rate_treasure)+
+ sizeof(battle_config.item_rate_adddrop)+
+ sizeof(battle_config.logarithmic_drops)+
+ sizeof(battle_config.item_drop_common_min)+
+ sizeof(battle_config.item_drop_common_max)+
+ sizeof(battle_config.item_drop_card_min)+
+ sizeof(battle_config.item_drop_card_max)+
+ sizeof(battle_config.item_drop_equip_min)+
+ sizeof(battle_config.item_drop_equip_max)+
+ sizeof(battle_config.item_drop_mvp_min)+
+ sizeof(battle_config.item_drop_mvp_max)+
+ sizeof(battle_config.item_drop_heal_min)+
+ sizeof(battle_config.item_drop_heal_max)+
+ sizeof(battle_config.item_drop_use_min)+
+ sizeof(battle_config.item_drop_use_max)+
+ sizeof(battle_config.item_drop_treasure_min)+
+ sizeof(battle_config.item_drop_treasure_max)
+ ) != 0)
+ { //Drop rates changed.
+ mob_reload(); //Needed as well so rate changes take effect.
+#ifndef TXT_ONLY
+ chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
+#endif
+ }
clif_displaymessage(fd, msg_txt(255));
return 0;
}
|