From 5f1d3e0e2fb2c209d7ad23c6c53d69d4258e6788 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Sat, 9 Jan 2021 22:20:57 +0200 Subject: [PATCH] Use the Topic ID of the cloned target from topicinfos --- apps/opencs/model/world/collection.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp index 451ef9d0e1..f657c67a1c 100644 --- a/apps/opencs/model/world/collection.hpp +++ b/apps/opencs/model/world/collection.hpp @@ -15,6 +15,7 @@ #include "columnbase.hpp" #include "collectionbase.hpp" +#include "info.hpp" #include "land.hpp" #include "landtexture.hpp" #include "ref.hpp" @@ -264,6 +265,13 @@ namespace CSMWorld CSMWorld::CellRef* ptr = (CSMWorld::CellRef*) ©.mModified; ptr->mRefNum.mIndex = 0; } + if (type == UniversalId::Type_TopicInfo || type == UniversalId::Type_JournalInfo) + { + CSMWorld::Info* ptr = (CSMWorld::Info*) ©.mModified; + std::vector splitStringContainer; + Misc::StringUtils::split(destination, splitStringContainer, "#"); + ptr->mTopicId = splitStringContainer[0]; + } int index = getAppendIndex(destination, type); insertRecord(copy, getAppendIndex(destination, type));