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>();
|
const auto list = a_refOrList->As<RE::BGSListForm>();
|
||||||
|
|
||||||
if (list) {
|
if (list) {
|
||||||
for (const auto& ref : list->forms) {
|
bool bResult = false;
|
||||||
if (ref && RefHasItem(ref, a_formID)) {
|
list->ForEachForm([&](RE::TESForm& a_form) {
|
||||||
return true;
|
if (&a_form && RefHasItem(&a_form, a_formID)) {
|
||||||
|
bResult = true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
return true;
|
||||||
|
});
|
||||||
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user