From 7f2bd01f79749d05d18e563c013153376338118e Mon Sep 17 00:00:00 2001 From: cc9cii Date: Wed, 29 Apr 2015 12:08:11 +1000 Subject: [PATCH] Handle plugins that has 0x00 for levelled list types, for example Ravenloft v5.02d, to use 0x01. --- apps/opencs/model/world/refidadapterimp.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 41d8c65d56..e385543838 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -2,6 +2,7 @@ #define CSM_WOLRD_REFIDADAPTERIMP_H #include +#include #include @@ -1895,6 +1896,20 @@ namespace CSMWorld { return QString("All Levels"); } + else if (mType == CSMWorld::UniversalId::Type_CreatureLevelledList && + record.get().mFlags == 0x00) + { + std::cerr << "Unknown creature leveled list type: " << record.get().mFlags + << ", Using \"All Levels\""<< std::endl; + return QString("All Levels"); + } + else if (mType == CSMWorld::UniversalId::Type_ItemLevelledList && + record.get().mFlags == 0x00) + { + std::cerr << "Unknown item leveled list type: " << record.get().mFlags + << ", Using \"Each\""<< std::endl; + return QString("Each"); + } else throw std::runtime_error("unknown leveled list type"); }