1
Fork 0

Track fishing maps; do not check books for the playable flag

ae-1.6.629
Eddoursul 2 years ago
parent 2b1ed09b30
commit d899a2a03f
  1. BIN
      SKSE/Plugins/ArtifactTrackerFunctions.dll
  2. 31
      Source/ArtifactTrackerDLL/src/BookCheck.cpp

@ -16,7 +16,7 @@ namespace BookCheck
const RE::BGSKeyword* recipeKeyword = dataHandler->LookupForm<RE::BGSKeyword>(0xF5CB0, "Skyrim.esm"); // VendorItemRecipe
for (const auto& form : dataHandler->GetFormArray<RE::TESObjectBOOK>()) {
if (!form || !form->GetPlayable() || form->TeachesSpell()) {
if (!form || form->TeachesSpell()) {
continue;
}
if (form->HasKeyword(recipeKeyword) || IsBook(form)) {
@ -98,17 +98,7 @@ namespace BookCheck
bool IsNote(const char* const modelFileName, size_t modelFileNameLength)
{
// Most items will use one of the note models from the base game, e.g. Note01.nif.
if (ContainsWholeWord(modelFileName, modelFileNameLength, "Note", 4)) {
return true;
}
// The Creation Club Fishing mod does not include 'Note' the inventory art model names for the
// regional fishing maps, instead those items use the following format: FishMap<region>.
if (StartsWith(modelFileName, modelFileNameLength, "FishMap", 7)) {
return true;
}
return false;
return ContainsWholeWord(modelFileName, modelFileNameLength, "Note", 4);
}
bool IsJournal(const char* const modelFileName, size_t modelFileNameLength)
@ -122,16 +112,23 @@ namespace BookCheck
return false;
}
RE::BGSSoundDescriptorForm* pickupSound = book->As<RE::BGSPickupPutdownSounds>()->pickupSound;
size_t modelFileNameLength;
const char* const modelFileName = BookCheck::ExtractFileName(book->inventoryModel->GetModel(), modelFileNameLength);
if (pickupSound && pickupSound->formID == 0xC7A54) { // ITMNoteUp
if (modelFileNameLength == 0) {
return false;
}
size_t modelFileNameLength;
const char* const modelFileName = BookCheck::ExtractFileName(book->inventoryModel->GetModel(), modelFileNameLength);
RE::BGSSoundDescriptorForm* pickupSound = book->As<RE::BGSPickupPutdownSounds>()->pickupSound;
if (pickupSound && pickupSound->formID == 0xC7A54) { // ITMNoteUp
// The Creation Club Fishing mod does not include 'Note' the inventory art model names for the
// regional fishing maps, instead those items use the following format: FishMap<region>.
if (modelFileNameLength >= 11 && StartsWith(modelFileName, modelFileNameLength, "FishMap", 7)) {
return true;
}
if (modelFileNameLength == 0) {
return false;
}

Loading…
Cancel
Save