using AcDream.Runtime.Gameplay; namespace AcDream.Runtime; public readonly record struct RuntimePendingInventoryRequestSnapshot( ulong Token, int Kind, uint ItemId, bool Dispatched); public readonly record struct RuntimeInventoryStateSnapshot( uint RequestedExternalContainerId, uint CurrentExternalContainerId, int BusyCount, bool CanBeginRequest, RuntimePendingInventoryRequestSnapshot? PendingRequest, int ShortcutCount, long ShortcutRevision, int ItemManaCount, long ItemManaRevision); public readonly record struct RuntimeShortcutSnapshot( int Index, uint ObjectId, uint SpellId); public interface IRuntimeInventoryStateView { RuntimeInventoryStateSnapshot Snapshot { get; } bool TryGetShortcut(int index, out RuntimeShortcutSnapshot shortcut); bool TryGetItemMana(uint objectId, out float fraction); } public readonly record struct RuntimeCharacterSnapshot( long CharacterRevision, long SpellbookRevision, RuntimeCharacterOptionsSnapshot Options, RuntimeMovementSkillSnapshot MovementSkills, int LearnedSpellCount, int ActiveEnchantmentCount, int DesiredComponentCount, int SkillCount, uint SpellbookFilters); public readonly record struct RuntimeVitalSnapshot( int Kind, uint Ranks, uint Start, uint Experience, uint Current, uint Maximum); public readonly record struct RuntimeAttributeSnapshot( int Kind, uint Ranks, uint Start, uint Experience, uint Current); public readonly record struct RuntimeSkillSnapshot( uint SkillId, uint Ranks, uint Status, uint Experience, uint Initial, uint Resistance, double LastUsed, uint FormulaBonus, uint CurrentLevel); public interface IRuntimeCharacterView { RuntimeCharacterSnapshot Snapshot { get; } bool TryGetVital(int kind, out RuntimeVitalSnapshot vital); bool TryGetAttribute(int kind, out RuntimeAttributeSnapshot attribute); bool TryGetSkill(uint skillId, out RuntimeSkillSnapshot skill); bool KnowsSpell(uint spellId); bool TryGetFavorite(int tabIndex, int position, out uint spellId); bool TryGetDesiredComponent(uint componentId, out uint amount); } public readonly record struct RuntimeSocialSnapshot( long FriendsRevision, int FriendCount, long SquelchRevision, int SquelchedAccountCount, int SquelchedCharacterCount, int GlobalSquelchTypeCount, int NegotiatedChatRoomCount); public readonly record struct RuntimeFriendSnapshot( uint Id, string Name, bool Online, bool AppearOffline); public interface IRuntimeSocialView { RuntimeSocialSnapshot Snapshot { get; } bool TryGetFriend(uint characterId, out RuntimeFriendSnapshot friend); }