diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-19 13:51:17 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-19 13:51:17 +0200 |
commit | eb3ed1aec1fb9e4468a7829cabd42572b7554d70 (patch) | |
tree | 4b5f428bf612785af8c306ba40f46c66fe0681a0 /source/cWindow.cpp | |
parent | Fixed Bug #236 (diff) | |
download | cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.gz cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.bz2 cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.lz cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.xz cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.zst cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.zip |
Diffstat (limited to 'source/cWindow.cpp')
-rw-r--r-- | source/cWindow.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/cWindow.cpp b/source/cWindow.cpp index f3b4bc883..2c4534742 100644 --- a/source/cWindow.cpp +++ b/source/cWindow.cpp @@ -10,10 +10,6 @@ #include "cWindowOwner.h" #include "items/Item.h" -#include "packets/cPacket_WholeInventory.h" -#include "packets/cPacket_WindowOpen.h" -#include "packets/cPacket_WindowClose.h" - @@ -239,12 +235,7 @@ void cWindow::Open( cPlayer & a_Player ) m_OpenedBy.push_back( &a_Player ); } - cPacket_WindowOpen WindowOpen; - WindowOpen.m_WindowID = (char)m_WindowID; - WindowOpen.m_InventoryType = (char)m_WindowType; - WindowOpen.m_WindowTitle = m_WindowTitle; - WindowOpen.m_NumSlots = (char)m_NumSlots; - a_Player.GetClientHandle()->Send( WindowOpen ); + a_Player.GetClientHandle()->SendWindowOpen(m_WindowID, m_WindowType, m_WindowTitle, m_NumSlots); } @@ -260,12 +251,10 @@ void cWindow::Close( cPlayer & a_Player ) a_Player.TossItem(true, m_DraggingItem->m_ItemCount); } - cPacket_WindowClose WindowClose; - WindowClose.m_Close = (char)m_WindowID; cClientHandle * ClientHandle = a_Player.GetClientHandle(); if (ClientHandle != NULL) { - ClientHandle->Send(WindowClose); + ClientHandle->SendWindowClose(m_WindowID); } { @@ -349,10 +338,9 @@ void cWindow::Destroy() -void cWindow::SendWholeWindow( cClientHandle* a_Client ) +void cWindow::SendWholeWindow(cClientHandle * a_Client ) { - cPacket_WholeInventory Inventory( this ); - a_Client->Send( Inventory ); + a_Client->SendWholeInventory(*this); } |