summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-05 18:36:58 +0100
committermadmaxoft <github@xoft.cz>2013-11-05 18:37:57 +0100
commit88472b7ce68822c4487142d43308bd2fe9874e54 (patch)
tree94faa3c9d45497b174b6d5f412df9c284a856651 /source
parentMerge pull request #307 from mc-server/MobImprovements (diff)
downloadcuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar.gz
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar.bz2
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar.lz
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar.xz
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.tar.zst
cuberite-88472b7ce68822c4487142d43308bd2fe9874e54.zip
Diffstat (limited to '')
-rw-r--r--source/ClientHandle.cpp13
-rw-r--r--source/ClientHandle.h1
-rw-r--r--source/Inventory.cpp9
-rw-r--r--source/Inventory.h2
-rw-r--r--source/Protocol/Protocol.h1
-rw-r--r--source/Protocol/Protocol125.cpp9
-rw-r--r--source/Protocol/Protocol125.h1
-rw-r--r--source/Protocol/Protocol17x.h1
-rw-r--r--source/Protocol/ProtocolRecognizer.cpp10
-rw-r--r--source/Protocol/ProtocolRecognizer.h1
10 files changed, 2 insertions, 46 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index 6860a29ca..3fb2b7e4c 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -255,8 +255,8 @@ void cClientHandle::Authenticate(void)
// Send time
m_Protocol->SendTimeUpdate(World->GetWorldAge(), World->GetTimeOfDay());
- // Send inventory
- m_Player->GetInventory().SendWholeInventory(*this);
+ // Send contents of the inventory window
+ m_Protocol->SendWholeInventory(*m_Player->GetWindow());
// Send health
m_Player->SendHealth();
@@ -2004,15 +2004,6 @@ void cClientHandle::SendWeather(eWeather a_Weather)
-void cClientHandle::SendWholeInventory(const cInventory & a_Inventory)
-{
- m_Protocol->SendWholeInventory(a_Inventory);
-}
-
-
-
-
-
void cClientHandle::SendWholeInventory(const cWindow & a_Window)
{
m_Protocol->SendWholeInventory(a_Window);
diff --git a/source/ClientHandle.h b/source/ClientHandle.h
index ef6dbd124..f7fa2b36f 100644
--- a/source/ClientHandle.h
+++ b/source/ClientHandle.h
@@ -134,7 +134,6 @@ public:
void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4);
void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ );
void SendWeather (eWeather a_Weather);
- void SendWholeInventory (const cInventory & a_Inventory);
void SendWholeInventory (const cWindow & a_Window);
void SendWindowClose (const cWindow & a_Window);
void SendWindowOpen (char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots);
diff --git a/source/Inventory.cpp b/source/Inventory.cpp
index d5fc7f0d8..90b998358 100644
--- a/source/Inventory.cpp
+++ b/source/Inventory.cpp
@@ -393,15 +393,6 @@ void cInventory::CopyToItems(cItems & a_Items)
-void cInventory::SendWholeInventory(cClientHandle & a_Client)
-{
- a_Client.SendWholeInventory(*this);
-}
-
-
-
-
-
void cInventory::SendSlot(int a_SlotNum)
{
cItem Item(GetSlot(a_SlotNum));
diff --git a/source/Inventory.h b/source/Inventory.h
index f8f8042f4..3c6a19de8 100644
--- a/source/Inventory.h
+++ b/source/Inventory.h
@@ -110,8 +110,6 @@ public:
// tolua_end
- void SendWholeInventory(cClientHandle & a_Client);
-
/// Returns the player associated with this inventory (const version)
const cPlayer & GetOwner(void) const { return m_Owner; }
diff --git a/source/Protocol/Protocol.h b/source/Protocol/Protocol.h
index 6bea4edbb..5d66808cf 100644
--- a/source/Protocol/Protocol.h
+++ b/source/Protocol/Protocol.h
@@ -99,7 +99,6 @@ public:
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) = 0;
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) = 0;
virtual void SendWeather (eWeather a_Weather) = 0;
- virtual void SendWholeInventory (const cInventory & a_Inventory) = 0;
virtual void SendWholeInventory (const cWindow & a_Window) = 0;
virtual void SendWindowClose (const cWindow & a_Window) = 0;
virtual void SendWindowOpen (char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots) = 0;
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index ef40f265a..4cb1197da 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -940,15 +940,6 @@ void cProtocol125::SendWeather(eWeather a_Weather)
-void cProtocol125::SendWholeInventory(const cInventory & a_Inventory)
-{
- SendWholeInventory(*(a_Inventory.GetOwner().GetWindow()));
-}
-
-
-
-
-
void cProtocol125::SendWholeInventory(const cWindow & a_Window)
{
cCSLock Lock(m_CSPacket);
diff --git a/source/Protocol/Protocol125.h b/source/Protocol/Protocol125.h
index 1da50a1d4..ad61dea74 100644
--- a/source/Protocol/Protocol125.h
+++ b/source/Protocol/Protocol125.h
@@ -76,7 +76,6 @@ public:
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) override;
virtual void SendWeather (eWeather a_Weather) override;
- virtual void SendWholeInventory (const cInventory & a_Inventory) override;
virtual void SendWholeInventory (const cWindow & a_Window) override;
virtual void SendWindowClose (const cWindow & a_Window) override;
virtual void SendWindowOpen (char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots) override;
diff --git a/source/Protocol/Protocol17x.h b/source/Protocol/Protocol17x.h
index e3a51b844..f63cd8187 100644
--- a/source/Protocol/Protocol17x.h
+++ b/source/Protocol/Protocol17x.h
@@ -85,7 +85,6 @@ public:
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) override;
virtual void SendWeather (eWeather a_Weather) override;
- virtual void SendWholeInventory (const cInventory & a_Inventory) override;
virtual void SendWholeInventory (const cWindow & a_Window) override;
virtual void SendWindowClose (const cWindow & a_Window) override;
virtual void SendWindowOpen (char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots) override;
diff --git a/source/Protocol/ProtocolRecognizer.cpp b/source/Protocol/ProtocolRecognizer.cpp
index 67f924d7e..501e8bbe0 100644
--- a/source/Protocol/ProtocolRecognizer.cpp
+++ b/source/Protocol/ProtocolRecognizer.cpp
@@ -605,16 +605,6 @@ void cProtocolRecognizer::SendWeather(eWeather a_Weather)
-void cProtocolRecognizer::SendWholeInventory(const cInventory & a_Inventory)
-{
- ASSERT(m_Protocol != NULL);
- m_Protocol->SendWholeInventory(a_Inventory);
-}
-
-
-
-
-
void cProtocolRecognizer::SendWholeInventory(const cWindow & a_Window)
{
ASSERT(m_Protocol != NULL);
diff --git a/source/Protocol/ProtocolRecognizer.h b/source/Protocol/ProtocolRecognizer.h
index 79dc5568f..9bf550309 100644
--- a/source/Protocol/ProtocolRecognizer.h
+++ b/source/Protocol/ProtocolRecognizer.h
@@ -111,7 +111,6 @@ public:
virtual void SendUpdateSign (int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) override;
virtual void SendUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) override;
virtual void SendWeather (eWeather a_Weather) override;
- virtual void SendWholeInventory (const cInventory & a_Inventory) override;
virtual void SendWholeInventory (const cWindow & a_Window) override;
virtual void SendWindowClose (const cWindow & a_Window) override;
virtual void SendWindowOpen (char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots) override;