17#if PROTOCOL_VERSION < 755
18 next_transaction_id = 1;
19#elif PROTOCOL_VERSION > 755
32 return slots.at(index);
61 for (
size_t i = 0; i < slots_.size(); ++i)
67#if PROTOCOL_VERSION < 755
68 int Window::GetNextTransactionId()
71 return next_transaction_id++;
73#elif PROTOCOL_VERSION > 755
104#if PROTOCOL_VERSION < 763
109#if PROTOCOL_VERSION > 762
119#if PROTOCOL_VERSION > 764
133 return (
static_cast<short>(
type) + 1) * 9;
135 LOG_WARNING(
"First slot asked for unknown InventoryType " <<
static_cast<int>(
type));
#define LOG_WARNING(osstream)
Mutex protected reference, will be locked until destroyed.
short GetFirstPlayerInventorySlot() const
void SetContent(const std::vector< ProtocolCraft::Slot > &slots_)
std::map< short, ProtocolCraft::Slot > GetSlots() const
void SetSlot(const short index, const ProtocolCraft::Slot &slot)
void SetStateId(const int state_id_)
ProtocolCraft::Slot GetSlot(const short index) const
std::shared_mutex window_mutex
std::map< short, ProtocolCraft::Slot > slots
Window(const InventoryType type_=InventoryType::Default)
InventoryType GetType() const
Utilities::ScopeLockedWrapper< const std::map< short, ProtocolCraft::Slot >, std::shared_mutex, std::shared_lock > GetLockedSlots() const
Get a read-only locked version of all the slots.