Skip to content

Commit ca9b57e

Browse files
remyCasesNylux
authored andcommitted
[Fix] ids in table are now working properly
1 parent dc50143 commit ca9b57e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ModUtils/LootUtils.cs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,16 @@ public static void InjectLootScripts()
184184
}
185185
var idsStruct = variable_struct_get(refStruct, ""Ids"");
186186
187-
if (variable_struct_exists(idsStruct, string(argument0.id)))
187+
var _ids = variable_struct_get_names(idsStruct);
188+
for (var i = 0; i < array_length(_ids); i++;)
188189
{
189-
var referenceLootTable = variable_struct_get(idsStruct, argument0.id);
190-
scr_msl_log(""ref with id: "" + referenceLootTable);
191-
file_text_close(refFile);
192-
return referenceLootTable;
190+
if (real(_ids[i]) == argument0.id)
191+
{
192+
var referenceLootTable = variable_struct_get(idsStruct, _ids[i]);
193+
scr_msl_log(""ref with id: "" + referenceLootTable);
194+
file_text_close(refFile);
195+
return referenceLootTable;
196+
}
193197
}
194198
195199
if (!variable_struct_exists(refStruct, ""Tiers""))

0 commit comments

Comments
 (0)