summaryrefslogtreecommitdiff
path: root/src/resources/db/itemoptiondb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/itemoptiondb.cpp')
-rw-r--r--src/resources/db/itemoptiondb.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/resources/db/itemoptiondb.cpp b/src/resources/db/itemoptiondb.cpp
index becdf7406..504199bfc 100644
--- a/src/resources/db/itemoptiondb.cpp
+++ b/src/resources/db/itemoptiondb.cpp
@@ -36,6 +36,7 @@
namespace
{
ItemOptionDb::OptionInfos mOptions;
+ const std::vector<ItemFieldType*> mEmptyOption;
bool mLoaded = false;
} // namespace
@@ -141,3 +142,11 @@ void ItemOptionDb::unload()
mOptions.clear();
mLoaded = false;
}
+
+const std::vector<ItemFieldType*> &ItemOptionDb::getFields(const int id)
+{
+ OptionInfos::const_iterator it = mOptions.find(id);
+ if (it == mOptions.end())
+ return mEmptyOption;
+ return (*it).second;
+}