[Fix] Refactor project

This commit is contained in:
2026-03-02 12:49:12 +07:00
parent f65976796d
commit f52131f755
44 changed files with 449 additions and 404 deletions
@@ -17,11 +17,12 @@ namespace YachtDice.Modifiers.Definition
public bool EvaluateConditions(ModifierContext context, ModifierInstance instance)
{
for (int i = 0; i < conditions.Count; i++)
foreach (var t in conditions)
{
if (conditions[i] != null && !conditions[i].Evaluate(context, instance))
if (t != null && !t.Evaluate(context, instance))
return false;
}
return true;
}
@@ -12,11 +12,12 @@ namespace YachtDice.Modifiers.Definition
public ModifierDefinition FindById(string id)
{
for (int i = 0; i < modifiers.Count; i++)
foreach (var t in modifiers)
{
if (modifiers[i] != null && modifiers[i].Id == id)
return modifiers[i];
if (t != null && t.Id == id)
return t;
}
return null;
}
}