|
|
|
@ -34,7 +34,7 @@ namespace ArtifactTracker |
|
|
|
|
|
|
|
|
|
if (!dataHandler) { |
|
|
|
|
// Called before kDataLoaded?
|
|
|
|
|
log::error("RE::TESDataHandler is not initialized."); |
|
|
|
|
log::error("DataHandler is not initialized."); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -169,7 +169,8 @@ namespace ArtifactTracker |
|
|
|
|
return true; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if (g_listStored->forms.size() + g_listFound->forms.size() + g_listNew->forms.size() != g_artifactMap.size()) { |
|
|
|
|
std::uint32_t savedCount = g_listStored->forms.size() + g_listFound->forms.size() + g_listNew->forms.size(); |
|
|
|
|
if (savedCount != g_artifactMap.size()) { |
|
|
|
|
log::info("Reverting g_listNew"); |
|
|
|
|
ListRevert(g_listNew); |
|
|
|
|
} |
|
|
|
@ -355,7 +356,7 @@ namespace ArtifactTracker |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (cellStorage) { |
|
|
|
|
if (!g_persistentStorage->HasForm(cellStorage)) { |
|
|
|
|
if (!g_persistentMap.contains(cellStorage->formID)) { |
|
|
|
|
g_persistentStorage->AddForm(cellStorage); |
|
|
|
|
g_persistentMap[cellStorage->formID] = cellStorage; |
|
|
|
|
} |
|
|
|
@ -582,7 +583,7 @@ namespace ArtifactTracker |
|
|
|
|
g_listStored->AddForm(form); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else if (a_event->oldContainer == 0x14) { // dropped, consumed, dismantle, removed by script
|
|
|
|
|
} else if (a_event->oldContainer == 0x14) { // dropped, consumed, dismantled, removed by script
|
|
|
|
|
|
|
|
|
|
if (!g_listStored->HasForm(form)) { |
|
|
|
|
if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form) && !FollowersHaveItem(form)) { |
|
|
|
@ -649,7 +650,7 @@ namespace ArtifactTracker |
|
|
|
|
} else { |
|
|
|
|
const auto container = ref->As<RE::TESObjectREFR>(); |
|
|
|
|
if (container) { |
|
|
|
|
if (g_cellStorage && IsInSameCell(container)) { // deleted from container at home
|
|
|
|
|
if (g_cellStorage && IsInSameCell(container)) { // removed from container at home
|
|
|
|
|
|
|
|
|
|
if (!GetItemCount(container, form)) { |
|
|
|
|
SyncCellStorage(container); |
|
|
|
@ -726,7 +727,7 @@ namespace ArtifactTracker |
|
|
|
|
|
|
|
|
|
void OnLocationChange() |
|
|
|
|
{ |
|
|
|
|
std::uint32_t iCurrentFollowers = 0; |
|
|
|
|
std::int32_t iCurrentFollowers = 0; |
|
|
|
|
|
|
|
|
|
for (const auto& actor : GetPlayerFollowers()) { |
|
|
|
|
iCurrentFollowers += actor->formID; |
|
|
|
|