|
|
|
@ -198,6 +198,7 @@ namespace Papyrus::ArtifactTracker |
|
|
|
|
|
|
|
|
|
inline void SyncCellStorage(VM* a_vm, StackID a_stackID, RE::StaticFunctionTag*, |
|
|
|
|
RE::TESObjectREFR* a_cellStorage, |
|
|
|
|
RE::BGSListForm* a_excludeContainers, |
|
|
|
|
RE::TESForm* a_excludeForm = NULL) |
|
|
|
|
{ |
|
|
|
|
if (!a_cellStorage) { |
|
|
|
@ -206,7 +207,6 @@ namespace Papyrus::ArtifactTracker |
|
|
|
|
|
|
|
|
|
std::unordered_map<RE::FormID, bool> cellItems; |
|
|
|
|
|
|
|
|
|
const auto storageBase = a_cellStorage->GetBaseObject(); |
|
|
|
|
const auto cell = a_cellStorage->GetParentCell(); |
|
|
|
|
const auto inv = a_cellStorage->GetInventory(); |
|
|
|
|
|
|
|
|
@ -214,7 +214,7 @@ namespace Papyrus::ArtifactTracker |
|
|
|
|
const auto baseObj = a_ref->GetBaseObject(); |
|
|
|
|
|
|
|
|
|
if (baseObj->formType == RE::FormType::Container || (baseObj->formType == RE::FormType::NPC && !a_ref->IsDisabled() && baseObj->As<RE::TESNPC>()->GetRace()->formID == 0x0010760A)) { |
|
|
|
|
if (a_ref->GetBaseObject()->formID == storageBase->formID) { |
|
|
|
|
if (a_excludeContainers->HasForm(a_ref->formID)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -249,7 +249,7 @@ namespace Papyrus::ArtifactTracker |
|
|
|
|
if (!is_artifact(baseObj)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (inv.find(baseObj) == inv.end()) { |
|
|
|
|
if (!a_excludeForm || !is_excluded(baseObj, a_excludeForm)) { |
|
|
|
|
a_cellStorage->AddObjectToContainer(baseObj, nullptr, 1, nullptr); |
|
|
|
|