diff --git a/src/cpp/OutfitSystem.cpp b/src/cpp/OutfitSystem.cpp index 7cb5379..d963d4e 100644 --- a/src/cpp/OutfitSystem.cpp +++ b/src/cpp/OutfitSystem.cpp @@ -206,6 +206,11 @@ namespace OutfitSystem { if (mustBePlayable && !!(armor->formFlags & RE::TESObjectARMO::RecordFlags::kNonPlayable)) continue; std::string armorName; + std::string modName; + auto file = armor->GetFile(); + if (file) { + modName = std::string(file->GetFilename()); + } {// get name auto tfn = skyrim_cast(armor); if (tfn) @@ -214,11 +219,15 @@ namespace OutfitSystem { if (armorName.empty())// skip nameless armor continue; if (!nameFilter.empty()) { - auto it = std::search( + auto itName = std::search( armorName.begin(), armorName.end(), nameFilter.begin(), nameFilter.end(), [](char a, char b) { return toupper(a) == toupper(b); }); - if (it == armorName.end()) + auto itModName = std::search( + modName.begin(), modName.end(), + nameFilter.begin(), nameFilter.end(), + [](char a, char b) { return toupper(a) == toupper(b); }); + if (itName == armorName.end() && itModName == modName.end()) continue; } this->armors.push_back(armor);