investment.h 980 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include <array>
  3. #include <cstddef>
  4. #include <cstdint>
  5. namespace sunrise::state {
  6. /** Fixed runtime capacity for safe account unlock overrides. */
  7. inline constexpr std::size_t kUnlockOverrideCapacity = 127;
  8. /** One logical unlock-flag value stored by slot. */
  9. struct UnlockFlagOverride {
  10. std::uint16_t slot{};
  11. std::uint8_t value{};
  12. };
  13. /** One logical signed unlock value stored by slot. */
  14. struct UnlockValueOverride {
  15. std::uint16_t slot{};
  16. std::int32_t value{};
  17. };
  18. /** Global family-5 object and its bounded account overrides. */
  19. struct Family5State {
  20. std::uint64_t objectSoid{};
  21. std::array<UnlockFlagOverride, kUnlockOverrideCapacity> flags{};
  22. std::size_t flagCount{};
  23. std::array<UnlockValueOverride, kUnlockOverrideCapacity> values{};
  24. std::size_t valueCount{};
  25. bool contentGateArm{};
  26. };
  27. /** Account-wide evaluated content state. */
  28. struct InvestmentState {
  29. Family5State family5;
  30. };
  31. } // namespace sunrise::state