clean up patch enable quest logic
This commit is contained in:
+1
-4
@@ -459,15 +459,12 @@ bool Quest::has_version_any_language(Version v) const {
|
||||
return ((it != this->versions.end()) && ((it->first & 0xFF00) == k));
|
||||
}
|
||||
|
||||
shared_ptr<const VersionedQuest> Quest::version(Version v, uint8_t language, bool allow_language_fallback) const {
|
||||
shared_ptr<const VersionedQuest> Quest::version(Version v, uint8_t language) const {
|
||||
// Return the requested version, if it exists
|
||||
try {
|
||||
return this->versions.at(this->versions_key(v, language));
|
||||
} catch (const out_of_range&) {
|
||||
}
|
||||
if (!allow_language_fallback) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Return the English version, if it exists
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user