summaryrefslogtreecommitdiff
path: root/src/map/achievement.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-21 23:54:58 +0200
committerGitHub <noreply@github.com>2018-10-21 23:54:58 +0200
commit1b11cd930df89f322419fa57917e91f625d8dd1b (patch)
tree9246025ea97111971cf3c7226bca6a87c98e7033 /src/map/achievement.c
parent0e339e308ff176e4c70bcc72403c8aec009e7f0b (diff)
parenta3187aaf7916354efb78ca41f2c9e916e29d61db (diff)
downloadhercules-1b11cd930df89f322419fa57917e91f625d8dd1b.tar.gz
hercules-1b11cd930df89f322419fa57917e91f625d8dd1b.tar.bz2
hercules-1b11cd930df89f322419fa57917e91f625d8dd1b.tar.xz
hercules-1b11cd930df89f322419fa57917e91f625d8dd1b.zip
Merge pull request #2234 from dastgirp/issue/2217
Fixed Assertion Error when refine is failed
Diffstat (limited to 'src/map/achievement.c')
-rw-r--r--src/map/achievement.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/achievement.c b/src/map/achievement.c
index 68fc8a983..7148acae8 100644
--- a/src/map/achievement.c
+++ b/src/map/achievement.c
@@ -772,6 +772,10 @@ static void achievement_validate_refine(struct map_session_data *sd, unsigned in
criteria.goal = sd->status.inventory[idx].refine;
+ // achievement should not trigger if refine is 0
+ if (criteria.goal == 0)
+ return;
+
/* Universal */
achievement->validate_type(sd,
success ? ACH_EQUIP_REFINE_SUCCESS : ACH_EQUIP_REFINE_FAILURE,