diff --git a/CHANGELOG.md b/CHANGELOG.md index bb6702eec4..86ba74cce9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,7 @@ Bug #6680: object.cpp handles nodetree unsafely, memory access with dangling pointer Bug #6682: HitOnMe doesn't fire as intended Bug #6697: Shaders vertex lighting incorrectly clamped + Bug #6705: OpenMW CS: A typo in the Creature levelled list Bug #6711: Log time differs from real time Bug #6717: Broken script causes interpreter stack corruption Bug #6718: Throwable weapons cause arrow enchantment effect to be applied to the whole body diff --git a/apps/opencs/model/world/columns.cpp b/apps/opencs/model/world/columns.cpp index deaf5823c3..6f253a3513 100644 --- a/apps/opencs/model/world/columns.cpp +++ b/apps/opencs/model/world/columns.cpp @@ -267,7 +267,7 @@ namespace CSMWorld { ColumnId_LevelledList,"Levelled List" }, { ColumnId_LevelledItemId,"Levelled Item" }, - { ColumnId_LevelledItemLevel,"Item Level" }, + { ColumnId_LevelledItemLevel,"PC Level" }, { ColumnId_LevelledItemType, "Calculate all levels <= player" }, { ColumnId_LevelledItemTypeEach, "Select a new item for each instance" }, { ColumnId_LevelledItemChanceNone, "Chance None" }, @@ -373,6 +373,8 @@ namespace CSMWorld { ColumnId_Persistent, "Persistent" }, { ColumnId_Blocked, "Blocked" }, + { ColumnId_LevelledCreatureId,"Levelled Creature" }, + { -1, 0 } // end marker }; } diff --git a/apps/opencs/model/world/columns.hpp b/apps/opencs/model/world/columns.hpp index 8cf02b46ac..604a2f8ca1 100644 --- a/apps/opencs/model/world/columns.hpp +++ b/apps/opencs/model/world/columns.hpp @@ -346,6 +346,8 @@ namespace CSMWorld ColumnId_Persistent = 313, ColumnId_Blocked = 314, + ColumnId_LevelledCreatureId = 315, + // Allocated to a separate value range, so we don't get a collision should we ever need // to extend the number of use values. ColumnId_UseValue1 = 0x10000, diff --git a/apps/opencs/model/world/refidcollection.cpp b/apps/opencs/model/world/refidcollection.cpp index 2e0c7e2028..b5f887e3e6 100644 --- a/apps/opencs/model/world/refidcollection.cpp +++ b/apps/opencs/model/world/refidcollection.cpp @@ -617,27 +617,39 @@ CSMWorld::RefIdCollection::RefIdCollection() mColumns.back().addColumn( new RefIdColumn (Columns::ColumnId_PartRefFemale, CSMWorld::ColumnBase::Display_BodyPart)); - LevListColumns levListColumns (baseColumns); + LevListColumns creatureLevListColumns (baseColumns); + LevListColumns itemLevListColumns (baseColumns); + std::map creatureLevListMap, itemLevListMap; + creatureLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList, + new NestedLevListRefIdAdapter (UniversalId::Type_CreatureLevelledList))); + itemLevListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList, + new NestedLevListRefIdAdapter (UniversalId::Type_ItemLevelledList))); - // Nested table + // Levelled creature nested table mColumns.emplace_back(Columns::ColumnId_LevelledList, ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue); - levListColumns.mLevList = &mColumns.back(); - std::map levListMap; - levListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList, - new NestedLevListRefIdAdapter (UniversalId::Type_CreatureLevelledList))); - levListMap.insert(std::make_pair(UniversalId::Type_ItemLevelledList, - new NestedLevListRefIdAdapter (UniversalId::Type_ItemLevelledList))); - mNestedAdapters.emplace_back(&mColumns.back(), levListMap); + creatureLevListColumns.mLevList = &mColumns.back(); + mNestedAdapters.emplace_back(&mColumns.back(), creatureLevListMap); + mColumns.back().addColumn( + new RefIdColumn (Columns::ColumnId_LevelledCreatureId, CSMWorld::ColumnBase::Display_Referenceable)); + mColumns.back().addColumn( + new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer)); + + // Levelled item nested table + mColumns.emplace_back(Columns::ColumnId_LevelledList, + ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue); + itemLevListColumns.mLevList = &mColumns.back(); + mNestedAdapters.emplace_back(&mColumns.back(), itemLevListMap); mColumns.back().addColumn( new RefIdColumn (Columns::ColumnId_LevelledItemId, CSMWorld::ColumnBase::Display_Referenceable)); mColumns.back().addColumn( new RefIdColumn (Columns::ColumnId_LevelledItemLevel, CSMWorld::ColumnBase::Display_Integer)); - // Nested list + // Shared levelled list nested list mColumns.emplace_back(Columns::ColumnId_LevelledList, ColumnBase::Display_NestedHeader, ColumnBase::Flag_Dialogue | ColumnBase::Flag_Dialogue_List); - levListColumns.mNestedListLevList = &mColumns.back(); + creatureLevListColumns.mNestedListLevList = &mColumns.back(); + itemLevListColumns.mNestedListLevList = &mColumns.back(); std::map nestedListLevListMap; nestedListLevListMap.insert(std::make_pair(UniversalId::Type_CreatureLevelledList, new NestedListLevListRefIdAdapter (UniversalId::Type_CreatureLevelledList))); @@ -673,9 +685,9 @@ CSMWorld::RefIdCollection::RefIdCollection() new IngredientRefIdAdapter (ingredientColumns))); mAdapters.insert (std::make_pair (UniversalId::Type_CreatureLevelledList, new LevelledListRefIdAdapter ( - UniversalId::Type_CreatureLevelledList, levListColumns))); + UniversalId::Type_CreatureLevelledList, creatureLevListColumns))); mAdapters.insert (std::make_pair (UniversalId::Type_ItemLevelledList, - new LevelledListRefIdAdapter (UniversalId::Type_ItemLevelledList, levListColumns))); + new LevelledListRefIdAdapter (UniversalId::Type_ItemLevelledList, itemLevListColumns))); mAdapters.insert (std::make_pair (UniversalId::Type_Light, new LightRefIdAdapter (lightColumns))); mAdapters.insert (std::make_pair (UniversalId::Type_Lockpick,