diff --git a/db/import-tmpl/quest_db.yml b/db/import-tmpl/quest_db.yml index 853725d7a8..340fe380ad 100644 --- a/db/import-tmpl/quest_db.yml +++ b/db/import-tmpl/quest_db.yml @@ -42,7 +42,9 @@ # Element Monster element target (default All). Valid elements are Dark, Earth, Fire, Ghost, Holy, Neutral, Poison, Undead, Water, Wind, All. # MinLevel Minimum monster level target. If not supplied but MaxLevel defined, MinLevel is 1. Set to 0 to ignore MinLevel on import. (Default: 0) # MaxLevel Maximum monster level target. Set to 0 to ignore MaxLevel on import. (Default: 0) -# Location Name of hunting location from mapindex. (Default any location) +# Location Map name where kills are counted. (Default any location) +# On normal maps only kills of permanently spawned monsters increase the counter. +# On instance maps all monster kills increase the counter. # MapName Displayed map name in quest UI. (Default: empty string) # Drops: Quest item drop targets. (Default: null) # - Mob Monster to kill. 0 will apply to all monsters. (Default: 0) diff --git a/db/pre-re/quest_db.yml b/db/pre-re/quest_db.yml index bf153a2c48..fea2106340 100644 --- a/db/pre-re/quest_db.yml +++ b/db/pre-re/quest_db.yml @@ -42,7 +42,9 @@ # Element Monster element target (default All). Valid elements are Dark, Earth, Fire, Ghost, Holy, Neutral, Poison, Undead, Water, Wind, All. # MinLevel Minimum monster level target. If not supplied but MaxLevel defined, MinLevel is 1. Set to 0 to ignore MinLevel on import. (Default: 0) # MaxLevel Maximum monster level target. Set to 0 to ignore MaxLevel on import. (Default: 0) -# Location Name of hunting location from mapindex. (Default any location) +# Location Map name where kills are counted. (Default any location) +# On normal maps only kills of permanently spawned monsters increase the counter. +# On instance maps all monster kills increase the counter. # MapName Displayed map name in quest UI. (Default: empty string) # Drops: Quest item drop targets. (Default: null) # - Mob Monster to kill. 0 will apply to all monsters. (Default: 0) diff --git a/db/quest_db.yml b/db/quest_db.yml index e22504b0fd..3eae160b7f 100644 --- a/db/quest_db.yml +++ b/db/quest_db.yml @@ -42,7 +42,9 @@ # Element Monster element target (default All). Valid elements are Dark, Earth, Fire, Ghost, Holy, Neutral, Poison, Undead, Water, Wind, All. # MinLevel Minimum monster level target. If not supplied but MaxLevel defined, MinLevel is 1. Set to 0 to ignore MinLevel on import. (Default: 0) # MaxLevel Maximum monster level target. Set to 0 to ignore MaxLevel on import. (Default: 0) -# Location Name of hunting location from mapindex. (Default any location) +# Location Map name where kills are counted. (Default any location) +# On normal maps only kills of permanently spawned monsters increase the counter. +# On instance maps all monster kills increase the counter. # MapName Displayed map name in quest UI. (Default: empty string) # Drops: Quest item drop targets. (Default: null) # - Mob Monster to kill. 0 will apply to all monsters. (Default: 0) diff --git a/db/re/quest_db.yml b/db/re/quest_db.yml index 89de225789..d3904f0bbf 100644 --- a/db/re/quest_db.yml +++ b/db/re/quest_db.yml @@ -42,7 +42,9 @@ # Element Monster element target (default All). Valid elements are Dark, Earth, Fire, Ghost, Holy, Neutral, Poison, Undead, Water, Wind, All. # MinLevel Minimum monster level target. If not supplied but MaxLevel defined, MinLevel is 1. Set to 0 to ignore MinLevel on import. (Default: 0) # MaxLevel Maximum monster level target. Set to 0 to ignore MaxLevel on import. (Default: 0) -# Location Name of hunting location from mapindex. (Default any location) +# Location Map name where kills are counted. (Default any location) +# On normal maps only kills of permanently spawned monsters increase the counter. +# On instance maps all monster kills increase the counter. # MapName Displayed map name in quest UI. (Default: empty string) # Drops: Quest item drop targets. (Default: null) # - Mob Monster to kill. 0 will apply to all monsters. (Default: 0) diff --git a/doc/yaml/db/quest_db.yml b/doc/yaml/db/quest_db.yml index 945d598799..e23d477320 100644 --- a/doc/yaml/db/quest_db.yml +++ b/doc/yaml/db/quest_db.yml @@ -25,7 +25,9 @@ # Element Monster element target (default All). Valid elements are Dark, Earth, Fire, Ghost, Holy, Neutral, Poison, Undead, Water, Wind, All. # MinLevel Minimum monster level target. If not supplied but MaxLevel defined, MinLevel is 1. Set to 0 to ignore MinLevel on import. (Default: 0) # MaxLevel Maximum monster level target. Set to 0 to ignore MaxLevel on import. (Default: 0) -# Location Name of hunting location from mapindex. (Default any location) +# Location Map name where kills are counted. (Default any location) +# On normal maps only kills of permanently spawned monsters increase the counter. +# On instance maps all monster kills increase the counter. # MapName Displayed map name in quest UI. (Default: empty string) # Drops: Quest item drop targets. (Default: null) # - Mob Monster to kill. 0 will apply to all monsters. (Default: 0) diff --git a/src/map/quest.cpp b/src/map/quest.cpp index 21512048fb..9cb17c2fc4 100644 --- a/src/map/quest.cpp +++ b/src/map/quest.cpp @@ -726,6 +726,12 @@ void quest_update_objective(struct map_session_data *sd, struct mob_data* md) objective_check++; if (qi->objectives[j]->mapid < 0 || (qi->objectives[j]->mapid == sd->bl.m && md->spawn != nullptr)) objective_check++; + else if (qi->objectives[j]->mapid >= 0) { + struct map_data *mapdata = map_getmapdata(sd->bl.m); + + if (mapdata->instance_id && mapdata->instance_src_map == qi->objectives[j]->mapid) + objective_check++; + } } if (objective_check == 6 && sd->quest_log[i].count[j] < qi->objectives[j]->count) {