perf(ui): scope cooldown heartbeat to visible items

This commit is contained in:
Erik 2026-07-25 05:12:58 +02:00
parent f2a015be8e
commit 6b56f4bef2
5 changed files with 132 additions and 3 deletions

View file

@ -156,6 +156,11 @@ public sealed class Spellbook
public int LearnedCount => _learnedSpells.Count;
public int ActiveCount => _activeById.Count;
public bool HasCooldownEnchantments =>
_enchantmentOrderByBucket.TryGetValue(
CooldownBucket,
out List<uint>? order)
&& order.Count != 0;
public bool Knows(uint spellId) => _learnedSpells.ContainsKey(spellId);