1
0

Added cWindow property manipulation API.

Now enchantment table and furnace properties can be set by a plugin
This commit is contained in:
madmaxoft
2013-08-18 13:26:37 +02:00
parent 40e9e5b95b
commit 0d323563e4
13 changed files with 154 additions and 48 deletions

View File

@@ -82,7 +82,7 @@ enum
PACKET_WINDOW_CLICK = 0x66,
PACKET_INVENTORY_SLOT = 0x67,
PACKET_INVENTORY_WHOLE = 0x68,
PACKET_INVENTORY_PROGRESS = 0x69,
PACKET_WINDOW_PROPERTY = 0x69,
PACKET_CREATIVE_INVENTORY_ACTION = 0x6B,
PACKET_UPDATE_SIGN = 0x82,
PACKET_PLAYER_LIST_ITEM = 0xC9,
@@ -491,20 +491,6 @@ void cProtocol125::SendHealth(void)
void cProtocol125::SendInventoryProgress(char a_WindowID, short a_ProgressBar, short a_Value)
{
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_INVENTORY_PROGRESS);
WriteByte (a_WindowID);
WriteShort(a_ProgressBar);
WriteShort(a_Value);
Flush();
}
void cProtocol125::SendInventorySlot(char a_WindowID, short a_SlotNum, const cItem & a_Item)
{
cCSLock Lock(m_CSPacket);
@@ -975,6 +961,20 @@ void cProtocol125::SendWindowOpen(char a_WindowID, char a_WindowType, const AStr
void cProtocol125::SendWindowProperty(const cWindow & a_Window, short a_Property, short a_Value)
{
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_WINDOW_PROPERTY);
WriteByte (a_Window.GetWindowID());
WriteShort(a_Property);
WriteShort(a_Value);
Flush();
}
AString cProtocol125::GetAuthServerID(void)
{
// http://wiki.vg/wiki/index.php?title=Session&oldid=2262