Fixed achievementexists script command (#4379)
Fixes #4378 Thanks to @ecdarreola and @teededung
This commit is contained in:
parent
58f1fdf206
commit
f290bc97be
@ -10362,7 +10362,7 @@ Returns true on success and false on failure.
|
||||
*achievementexists(<achievement id>{,<char id>});
|
||||
|
||||
This function will return if the achievement exists on the player or the supplied
|
||||
<char id>.
|
||||
<char id> and is completed.
|
||||
Returns true on success and false on failure.
|
||||
|
||||
---------------------------------------
|
||||
|
@ -23808,7 +23808,7 @@ BUILDIN_FUNC(achievementexists) {
|
||||
}
|
||||
}
|
||||
|
||||
ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id);
|
||||
ARR_FIND(0, sd->achievement_data.count, i, sd->achievement_data.achievements[i].achievement_id == achievement_id && sd->achievement_data.achievements[i].completed > 0 );
|
||||
script_pushint(st, i < sd->achievement_data.count ? true : false);
|
||||
return SCRIPT_CMD_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user