diff options
author | Alexander Harkness <me@bearbin.net> | 2020-03-28 19:27:38 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2020-03-28 19:27:38 +0100 |
commit | aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf (patch) | |
tree | d58a1f351a72e194345319ed6a085311f5c08516 /src | |
parent | Inventory changes (#4561) (diff) | |
download | cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar.gz cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar.bz2 cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar.lz cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar.xz cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.tar.zst cuberite-aa9a16b0c6f1838a6c1e61ce6ab83fa8e4ea35bf.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Protocol/Protocol_1_8.cpp | 8 | ||||
-rw-r--r-- | src/Protocol/Protocol_1_9.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index 023fd640d..4d70eadfa 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -1630,7 +1630,7 @@ void cProtocol_1_8_0::SendWholeInventory(const cWindow & a_Window) ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowItems); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteBEInt16(static_cast<Int16>(a_Window.GetNumSlots())); cItems Slots; a_Window.GetSlots(*(m_Client->GetPlayer()), Slots); @@ -1649,7 +1649,7 @@ void cProtocol_1_8_0::SendWindowClose(const cWindow & a_Window) ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowClose); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); } @@ -1667,7 +1667,7 @@ void cProtocol_1_8_0::SendWindowOpen(const cWindow & a_Window) } cPacketizer Pkt(*this, pktWindowOpen); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteString(a_Window.GetWindowTypeName()); Pkt.WriteString(Printf("{\"text\":\"%s\"}", a_Window.GetWindowTitle().c_str())); @@ -1703,7 +1703,7 @@ void cProtocol_1_8_0::SendWindowProperty(const cWindow & a_Window, short a_Prope ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowProperty); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteBEInt16(a_Property); Pkt.WriteBEInt16(a_Value); } diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index c9d460c9e..9eb47fa26 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -1686,7 +1686,7 @@ void cProtocol_1_9_0::SendWholeInventory(const cWindow & a_Window) ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowItems); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteBEInt16(static_cast<Int16>(a_Window.GetNumSlots())); cItems Slots; a_Window.GetSlots(*(m_Client->GetPlayer()), Slots); @@ -1705,7 +1705,7 @@ void cProtocol_1_9_0::SendWindowClose(const cWindow & a_Window) ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowClose); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); } @@ -1723,7 +1723,7 @@ void cProtocol_1_9_0::SendWindowOpen(const cWindow & a_Window) } cPacketizer Pkt(*this, pktWindowOpen); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteString(a_Window.GetWindowTypeName()); Pkt.WriteString(Printf("{\"text\":\"%s\"}", a_Window.GetWindowTitle().c_str())); @@ -1759,7 +1759,7 @@ void cProtocol_1_9_0::SendWindowProperty(const cWindow & a_Window, short a_Prope ASSERT(m_State == 3); // In game mode? cPacketizer Pkt(*this, pktWindowProperty); - Pkt.WriteBEUInt8(a_Window.GetWindowID()); + Pkt.WriteBEUInt8(static_cast<UInt8>(a_Window.GetWindowID())); Pkt.WriteBEInt16(a_Property); Pkt.WriteBEInt16(a_Value); } |