Added cWindow property manipulation API.
Now enchantment table and furnace properties can be set by a plugin
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user