1

Sync cell storage after its creation

This commit is contained in:
Eddoursul 2022-07-02 20:47:10 +02:00
parent 1455709755
commit cca2fdafc1
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -222,7 +222,7 @@ namespace ArtifactTracker
RE::TESObjectREFR* cellStorage = nullptr; RE::TESObjectREFR* cellStorage = nullptr;
for (const auto& a_ref : cell->references) { for (const auto& a_ref : cell->references) {
if (a_ref.get()->GetBaseObject()->formID == g_cellContainer->formID) { if (a_ref.get()->GetBaseObject() == g_cellContainer) {
cellStorage = a_ref.get(); cellStorage = a_ref.get();
break; break;
} }
@ -248,6 +248,7 @@ namespace ArtifactTracker
g_persistentStorage->AddForm(cellStorage); g_persistentStorage->AddForm(cellStorage);
g_persistentMap[cellStorage->formID] = cellStorage; g_persistentMap[cellStorage->formID] = cellStorage;
ToggleHomeMode(cellStorage); ToggleHomeMode(cellStorage);
SyncCellStorage();
} else { } else {
SKSE::log::error("Failed to create cell storage in OnCellEnter"); SKSE::log::error("Failed to create cell storage in OnCellEnter");
ToggleHomeMode(nullptr); ToggleHomeMode(nullptr);