diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-09-16 17:48:19 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:31 +0100 |
commit | 892b9732751b64c2016ba476801e1fe4ed4e750f (patch) | |
tree | 99aa40953de5d61e30d47bdf345ee2cb9c3c18e1 /src/Packet.hpp | |
parent | 2017-09-15 (diff) | |
download | AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar.gz AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar.bz2 AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar.lz AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar.xz AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.tar.zst AltCraft-892b9732751b64c2016ba476801e1fe4ed4e750f.zip |
Diffstat (limited to 'src/Packet.hpp')
-rw-r--r-- | src/Packet.hpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/Packet.hpp b/src/Packet.hpp index e00f1ed..f71922f 100644 --- a/src/Packet.hpp +++ b/src/Packet.hpp @@ -8,7 +8,6 @@ enum PacketNameLoginSB { }; enum PacketNamePlaySB { TeleportConfirm = 0x00, - PrepareCraftingGrid, TabCompleteSB, ChatMessageSB, ClientStatus, @@ -26,6 +25,7 @@ enum PacketNamePlaySB { PlayerLook, VehicleMoveSB, SteerBoat, + CraftRecipeRequest, PlayerAbilitiesSB, PlayerDigging, EntityAction, @@ -95,6 +95,7 @@ enum PacketNamePlayCB { EntityCB, VehicleMove, OpenSignEditor, + CraftRecipeResponse, PlayerAbilitiesCB, CombatEvent, PlayerListItem, @@ -986,7 +987,7 @@ struct PacketClickWindow : Packet { stream->WriteShort(Slot); stream->WriteByte(Button); stream->WriteShort(ActionNumber); - stream->WriteInt(Mode); + stream->WriteVarInt(Mode); stream->WriteSlot(ClickedItem); } @@ -1023,4 +1024,20 @@ struct PacketCloseWindowSB : Packet { } unsigned char WindowId; +}; + +struct PacketDisconnect : Packet { + void ToStream(StreamOutput *stream) override { + + } + + void FromStream(StreamInput *stream) override { + Reason = stream->ReadChat(); + } + + int GetPacketId() override { + return PacketNameLoginCB::Disconnect; + } + + std::string Reason; };
\ No newline at end of file |