questinfo requirement update (#4168)
* The <quest ID> is now removed, all the conditions are handled by a <condition> argument. The <condition> is using the achievement_check_condition (like in achievement_db.yml) so any condition (in theory) can be used to display the icon. * A new script command has been added to refresh the bubble for the given player anytime. Thanks to @aleos89 and @secretdataz for the review!
This commit is contained in:
@@ -743,7 +743,7 @@ int *achievement_level(struct map_session_data *sd, bool flag)
|
||||
return info;
|
||||
}
|
||||
|
||||
static bool achievement_check_condition( struct script_code* condition, struct map_session_data* sd, const std::array<int, MAX_ACHIEVEMENT_OBJECTIVES> count ){
|
||||
bool achievement_check_condition( struct script_code* condition, struct map_session_data* sd ){
|
||||
// Save the old script the player was attached to
|
||||
struct script_state* previous_st = sd->st;
|
||||
|
||||
@@ -834,7 +834,7 @@ static bool achievement_update_objectives(struct map_session_data *sd, std::shar
|
||||
if (!ad->condition)
|
||||
return false;
|
||||
|
||||
if (!achievement_check_condition(ad->condition, sd, current_count)) // Parameters weren't met
|
||||
if (!achievement_check_condition(ad->condition, sd)) // Parameters weren't met
|
||||
return false;
|
||||
|
||||
changed = true;
|
||||
@@ -855,7 +855,7 @@ static bool achievement_update_objectives(struct map_session_data *sd, std::shar
|
||||
current_count[it.first] += update_count[it.first];
|
||||
}
|
||||
|
||||
if (!achievement_check_condition(ad->condition, sd, current_count)) // Parameters weren't met
|
||||
if (!achievement_check_condition(ad->condition, sd)) // Parameters weren't met
|
||||
return false;
|
||||
|
||||
changed = true;
|
||||
|
||||
Reference in New Issue
Block a user