mirror of
https://github.com/4sval/FModel.git
synced 2026-03-23 18:24:36 -05:00
FModel 3.1.0.5
This commit is contained in:
parent
3ff24995c0
commit
aa3a7fc0c4
|
|
@ -81,10 +81,15 @@ namespace PakReader.Pak
|
|||
public T GetIndexedExport<T>(int index) where T : IUExport
|
||||
{
|
||||
var exports = Exports;
|
||||
int foundCount = 0;
|
||||
for (int i = 0; i < exports.Length; i++)
|
||||
{
|
||||
if (i == index && exports[i] is T)
|
||||
return (T)exports[i];
|
||||
if (exports[i] is T)
|
||||
{
|
||||
if (foundCount == index)
|
||||
return (T)exports[i];
|
||||
foundCount++;
|
||||
}
|
||||
}
|
||||
return default;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user