|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|