summaryrefslogtreecommitdiff
path: root/src/map/achievement.c
diff options
context:
space:
mode:
authorDastgir <dastgirp@gmail.com>2018-08-07 18:58:55 +0530
committerHaru <haru@dotalux.com>2019-04-07 18:01:52 +0200
commitcd32aea9bdd0addf1dbd96cf1cdeb3c798d93e34 (patch)
tree9081fe065493187c30cf03e36eb1c19e26ca22b9 /src/map/achievement.c
parente1e951c805916853e55ff5b9ce0531e0cf483ebf (diff)
downloadhercules-cd32aea9bdd0addf1dbd96cf1cdeb3c798d93e34.tar.gz
hercules-cd32aea9bdd0addf1dbd96cf1cdeb3c798d93e34.tar.bz2
hercules-cd32aea9bdd0addf1dbd96cf1cdeb3c798d93e34.tar.xz
hercules-cd32aea9bdd0addf1dbd96cf1cdeb3c798d93e34.zip
Added configuration to enable/disable achievement system
Diffstat (limited to 'src/map/achievement.c')
-rw-r--r--src/map/achievement.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/achievement.c b/src/map/achievement.c
index 057ea29c3..7ab80e183 100644
--- a/src/map/achievement.c
+++ b/src/map/achievement.c
@@ -301,6 +301,9 @@ static int achievement_validate_type(struct map_session_data *sd, enum achieveme
Assert_ret(criteria->goal != 0);
+ if (battle_config.feature_enable_achievement == 0)
+ return 0;
+
if (type == ACH_QUEST) {
ShowError("achievement_validate_type: ACH_QUEST is not handled by this function. (use achievement_validate())\n");
return 0;
@@ -358,6 +361,9 @@ static bool achievement_validate(struct map_session_data *sd, int aid, unsigned
Assert_retr(false, progress > 0);
Assert_retr(false, obj_idx < MAX_ACHIEVEMENT_OBJECTIVES);
+ if (battle_config.feature_enable_achievement == 0)
+ return false;
+
if ((ad = achievement->get(aid)) == NULL) {
ShowError("achievement_validate: Invalid Achievement %d provided.", aid);
return false;