Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Achievement update #2470

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions db/pre-re/achievement_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ achievement_db: (
ACH_KILL_PC_TOTAL: (Accumulative) Total kill count. (Player kill)
ACH_KILL_PC_JOB: Kill a player of the specified job. (Player Kill)
ACH_KILL_PC_JOBTYPE: Kill a player of the specified job type. (Player Kill)
ACH_KILL_MOB_CLASS: Kill a particular mob class. (Mob Kill)
ACH_KILL_MOB_CLASS: (Accumulative) Kill a particular mob class. (Mob Kill)
ACH_DAMAGE_PC_MAX: Maximum damage caused on a player. (Player Damage)
ACH_DAMAGE_PC_TOTAL: (Accumulative) Damage on players. (Player Damage)
ACH_DAMAGE_PC_REC_MAX: Maximum damage received by a player. (Receive Player Damage)
Expand Down Expand Up @@ -91,7 +91,8 @@ achievement_db: (
Criteria: { This is a field for achievements whose objectives must meet
certain criteria before evaluating the player's progress for it.
MobId: (mixed) MonsterId required for an objective.
For types such as ACH_KILL_MOB_CLASS and ACH_PET_CREATE. Can be either int or string constant.
For types such as ACH_KILL_MOB_CLASS and ACH_PET_CREATE.
Can be either int or string constant. If set to 0 would apply to any monster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here formatting different

JobId: (mixed) Array or Single entry of JobIds.
For types - ACH_KILL_PC_JOBTYPE, ACH_JOB_CHANGE or ACH_STATUS_BY_JOBTYPE.
Can be either a numeric or string constant.
Expand Down
5 changes: 3 additions & 2 deletions db/re/achievement_db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ achievement_db: (
ACH_KILL_PC_TOTAL: (Accumulative) Total kill count. (Player kill)
ACH_KILL_PC_JOB: Kill a player of the specified job. (Player Kill)
ACH_KILL_PC_JOBTYPE: Kill a player of the specified job type. (Player Kill)
ACH_KILL_MOB_CLASS: Kill a particular mob class. (Mob Kill)
ACH_KILL_MOB_CLASS: (Accumulative) Kill a particular mob class. (Mob Kill)
ACH_DAMAGE_PC_MAX: Maximum damage caused on a player. (Player Damage)
ACH_DAMAGE_PC_TOTAL: (Accumulative) Damage on players. (Player Damage)
ACH_DAMAGE_PC_REC_MAX: Maximum damage received by a player. (Receive Player Damage)
Expand Down Expand Up @@ -91,7 +91,8 @@ achievement_db: (
Criteria: { This is a field for achievements whose objectives must meet
certain criteria before evaluating the player's progress for it.
MobId: (mixed) MonsterId required for an objective.
For types such as ACH_KILL_MOB_CLASS and ACH_PET_CREATE. Can be either int or string constant.
For types such as ACH_KILL_MOB_CLASS and ACH_PET_CREATE.
Can be either int or string constant. If set to 0 would apply to any monster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

JobId: (mixed) Array or Single entry of JobIds.
For types - ACH_KILL_PC_JOBTYPE, ACH_JOB_CHANGE or ACH_STATUS_BY_JOBTYPE.
Can be either a numeric or string constant.
Expand Down
2 changes: 1 addition & 1 deletion src/map/achievement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ static bool achievement_readdb_validate_criteria_mobid(const struct config_setti
nullpo_retr(false, obj);

if (libconfig->setting_lookup_int(t, "MobId", &val)) {
if (mob->db_checkid(val) == 0) {
if (val != 0 && mob->db_checkid(val) == 0) {
ShowError("achievement_readdb_validate_criteria_mobid: Non-existant monster with ID %id provided (Achievement: %d, Objective: %d). Skipping...\n", val, entry_id, obj_idx);
return false;
}
Expand Down