Changed form ID of the keywords, minor changes
This commit is contained in:
parent
f813432b3c
commit
ea48cd5a01
Binary file not shown.
Binary file not shown.
@ -45,8 +45,8 @@ namespace ArtifactTracker
|
|||||||
|
|
||||||
const auto recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
|
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 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 extraArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xAFC11A, "Update.esm"); // ETR_ExtraArtifact
|
||||||
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xDE3FD4, "Update.esm"); // ETR_NotArtifact
|
const auto notArtifactKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xAFC11C, "Update.esm"); // ETR_NotArtifact
|
||||||
const auto npcRaceKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0x13794, "Skyrim.esm"); // ActorTypeNPC
|
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) {
|
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
|
// Preloading item lists
|
||||||
|
|
||||||
std::map<std::string, bool> settings{
|
std::map<std::string, bool> settings {
|
||||||
{ "DumpItemList", false },
|
{ "DumpItemList", false },
|
||||||
};
|
};
|
||||||
LoadINI(&settings, "Data/SKSE/Plugins/ArtifactTracker.ini");
|
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
|
const auto plaqueFish = dataHandler->LookupForm<RE::BGSListForm>(0xF4B, "ccBGSSSE001-Fish.esm"); // ccBGSSSE001_FishPlaqueGiftFilterList
|
||||||
if (plaqueFish) {
|
if (plaqueFish) {
|
||||||
plaqueFish->ForEachForm([&](RE::TESForm& a_form) {
|
plaqueFish->ForEachForm([&](RE::TESForm& a_form) {
|
||||||
@ -414,7 +414,7 @@ namespace ArtifactTracker
|
|||||||
|
|
||||||
const auto ref = it->second;
|
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) {
|
for (const auto& persref : g_persistentMap) {
|
||||||
if (persref.second != ref) {
|
if (persref.second != ref) {
|
||||||
if (GetItemCount(persref.second, form)) {
|
if (GetItemCount(persref.second, form)) {
|
||||||
@ -553,8 +553,9 @@ namespace ArtifactTracker
|
|||||||
const auto ref = RE::TESForm::LookupByID(a_event->oldContainer);
|
const auto ref = RE::TESForm::LookupByID(a_event->oldContainer);
|
||||||
|
|
||||||
if (ref->Is(RE::FormType::ActorCharacter)) {
|
if (ref->Is(RE::FormType::ActorCharacter)) {
|
||||||
if (ref->As<RE::Actor>()->IsPlayerTeammate() && GetItemCount(ref->As<RE::TESObjectREFR>(), form) <= 0) { // removed from companion (probably, disarmed)
|
const auto actor = ref->As<RE::Actor>();
|
||||||
if (!g_listStored->HasForm(form) && g_listFound->HasForm(form)) {
|
if (actor && actor->IsPlayerTeammate() && !GetItemCount(actor, form)) { // removed from companion (probably, disarmed)
|
||||||
|
if (g_listFound->HasForm(form)) {
|
||||||
|
|
||||||
if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form)) {
|
if (!GetItemCount(RE::PlayerCharacter::GetSingleton(), form)) {
|
||||||
// player does not have it, check companions
|
// player does not have it, check companions
|
||||||
|
@ -19,7 +19,6 @@ auto EventListener::ProcessEvent(
|
|||||||
-> RE::BSEventNotifyControl
|
-> RE::BSEventNotifyControl
|
||||||
{
|
{
|
||||||
if (a_event->eventName == "KID_KeywordDistributionDone") {
|
if (a_event->eventName == "KID_KeywordDistributionDone") {
|
||||||
SKSE::GetModCallbackEventSource()->RemoveEventSink(EventListener::GetSingleton());
|
|
||||||
ArtifactTracker::Init();
|
ArtifactTracker::Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user