Optimizations

This commit is contained in:
Sebastian Bularca
2026-04-20 09:51:08 +02:00
parent 2b48af8d3e
commit e7595bdc89
7 changed files with 152 additions and 48 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Jovian.EncounterSystem {
public enum QuestLogEventType {
@@ -46,9 +45,12 @@ namespace Jovian.EncounterSystem {
}
public IEnumerable<string> ResolvedEncounterIds() {
return entries
.Select(entry => entry.encounterInternalId)
.Where(id => !string.IsNullOrEmpty(id));
for(int i = 0; i < entries.Count; i++) {
var id = entries[i].encounterInternalId;
if(!string.IsNullOrEmpty(id)) {
yield return id;
}
}
}
private void Record(QuestLogEventType type, IEncounter from, IEncounter to) {