Fixed formlist iteration in RefHasItem
This commit is contained in:
parent
8039f6315f
commit
324db21c5e
Binary file not shown.
@ -62,11 +62,15 @@ inline bool RefHasItem(RE::TESForm* a_refOrList, RE::FormID a_formID)
|
||||
const auto list = a_refOrList->As<RE::BGSListForm>();
|
||||
|
||||
if (list) {
|
||||
for (const auto& ref : list->forms) {
|
||||
if (ref && RefHasItem(ref, a_formID)) {
|
||||
bool bResult = false;
|
||||
list->ForEachForm([&](RE::TESForm& a_form) {
|
||||
if (&a_form && RefHasItem(&a_form, a_formID)) {
|
||||
bResult = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
return bResult;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user