1

Added support for Immersive Display Overhaul

This commit is contained in:
Eddoursul 2022-07-03 16:37:56 +02:00
parent 477029e357
commit 33410ccee7
3 changed files with 60 additions and 58 deletions

Binary file not shown.

View File

@ -438,11 +438,8 @@ namespace ArtifactTracker
g_listFound->AddForm(form); g_listFound->AddForm(form);
return; return;
}
if (a_event->oldContainer != 0x14) { } else if (a_event->oldContainer == 0x14) {
return;
}
// Items moved from player's inventory // Items moved from player's inventory
@ -510,6 +507,11 @@ namespace ArtifactTracker
ListRemoveItem(g_listFound, form); ListRemoveItem(g_listFound, form);
g_listNew->AddForm(form); g_listNew->AddForm(form);
} }
} else if (g_cellStorage && a_event->reference) {
// Items dropped by someone else at home.
// Mainly for compatibility with Immersive Display Overhaul
SyncCellStorage();
}
} }
void AddRefArtifactsToList(RE::TESForm* a_refOrList, RE::BGSListForm* a_targetList, RE::BGSListForm* a_excludeList) void AddRefArtifactsToList(RE::TESForm* a_refOrList, RE::BGSListForm* a_targetList, RE::BGSListForm* a_excludeList)

View File

@ -31,7 +31,7 @@ auto EventListener::ProcessEvent(
RE::BSTEventSource<RE::TESContainerChangedEvent>* a_eventSource) RE::BSTEventSource<RE::TESContainerChangedEvent>* a_eventSource)
-> RE::BSEventNotifyControl -> RE::BSEventNotifyControl
{ {
if (!ArtifactTracker::g_bHomeContainer && (a_event->newContainer == 0x14 || a_event->oldContainer == 0x14)) { if (!ArtifactTracker::g_bHomeContainer && (a_event->newContainer == 0x14 || a_event->oldContainer == 0x14 || (ArtifactTracker::IsHome() && a_event->reference))) {
const auto form = ArtifactTracker::GetArtifactByID(a_event->baseObj); const auto form = ArtifactTracker::GetArtifactByID(a_event->baseObj);
if (form) { if (form) {
ArtifactTracker::OnContainerChanged(a_event, form); ArtifactTracker::OnContainerChanged(a_event, form);