|
|
|
@ -45,8 +45,8 @@ namespace ArtifactTracker |
|
|
|
|
|
|
|
|
|
const auto recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
|
|
|
|
|
const auto excludeKeywords = dataHandler->LookupForm<RE::BGSListForm>(0x801, "Artifact Tracker.esp"); // ETR_ExcludeMiscKeywords
|
|
|
|
|
const auto extraArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD3, "Update.esm"); // ETR_ExtraArtifact
|
|
|
|
|
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD4, "Update.esm"); // ETR_NotArtifact
|
|
|
|
|
const auto extraArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xAFC11A, "Update.esm"); // ETR_ExtraArtifact
|
|
|
|
|
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xAFC11C, "Update.esm"); // ETR_NotArtifact
|
|
|
|
|
const auto npcRaceKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0x13794, "Skyrim.esm"); // ActorTypeNPC
|
|
|
|
|
|
|
|
|
|
if (!g_cellContainer || !g_listNew || !g_listStored || !g_listFound || !g_persistentStorage || !g_homeKeyword || !recipeKeyword || !excludeKeywords || !extraArtifactKeyword || !notArtifactKeyword || !npcRaceKeyword) { |
|
|
|
@ -57,7 +57,7 @@ namespace ArtifactTracker |
|
|
|
|
|
|
|
|
|
// Preloading item lists
|
|
|
|
|
|
|
|
|
|
std::map<std::string, bool> settings{ |
|
|
|
|
std::map<std::string, bool> settings { |
|
|
|
|
{ "DumpItemList", false }, |
|
|
|
|
}; |
|
|
|
|
LoadINI(&settings, "Data/SKSE/Plugins/ArtifactTracker.ini"); |
|
|
|
@ -121,7 +121,7 @@ namespace ArtifactTracker |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Fishing CC (remove, when KID adds formlist support)
|
|
|
|
|
// Fishing CC (remove after KID receives formlist support)
|
|
|
|
|
const auto plaqueFish = dataHandler->LookupForm<RE::BGSListForm>(0xF4B, "ccBGSSSE001-Fish.esm"); // ccBGSSSE001_FishPlaqueGiftFilterList
|
|
|
|
|
if (plaqueFish) { |
|
|
|
|
plaqueFish->ForEachForm([&](RE::TESForm& a_form) { |
|
|
|
@ -414,7 +414,7 @@ namespace ArtifactTracker |
|
|
|
|
|
|
|
|
|
const auto ref = it->second; |
|
|
|
|
|
|
|
|
|
if (ref && GetItemCount(ref, form) <= 0) { // no items left in the container
|
|
|
|
|
if (ref && !GetItemCount(ref, form)) { // no items left in the container
|
|
|
|
|
for (const auto& persref : g_persistentMap) { |
|
|
|
|
if (persref.second != ref) { |
|
|
|
|
if (GetItemCount(persref.second, form)) { |
|
|
|
@ -553,8 +553,9 @@ namespace ArtifactTracker |
|
|
|
|
const auto ref = RE::TESForm::LookupByID(a_event->oldContainer); |
|
|
|
|
|
|
|
|
|
if (ref->Is(RE::FormType::ActorCharacter)) { |
|
|
|
|
if (ref->As<RE::Actor>()->IsPlayerTeammate() && GetItemCount(ref->As<RE::TESObjectREFR>(), form) <= 0) { // removed from companion (probably, disarmed)
|
|
|
|
|
if (!g_listStored->HasForm(form) && g_listFound->HasForm(form)) { |
|
|
|
|
const auto actor = ref->As<RE::Actor>(); |
|
|
|
|
if (actor && actor->IsPlayerTeammate() && !GetItemCount(actor, form)) { // removed from companion (probably, disarmed)
|
|
|
|
|
if (g_listFound->HasForm(form)) { |
|
|
|
|
|
|
|
|
|
if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form)) { |
|
|
|
|
// player does not have it, check companions
|
|
|
|
|