summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-19 13:34:05 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-19 13:34:05 +0200
commitcc600de51f5946af5d4018b7681f2c11c68662e7 (patch)
tree73782543b31568c66bba5d1f87ea0ffcbdca2357 /src/UI
parentUse std::thread (diff)
parentcLuaState: cMonster descendants don't push their specific type. (diff)
downloadcuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar.gz
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar.bz2
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar.lz
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar.xz
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.tar.zst
cuberite-cc600de51f5946af5d4018b7681f2c11c68662e7.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/Window.cpp23
-rw-r--r--src/UI/Window.h15
2 files changed, 11 insertions, 27 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index d83336f75..802d0d219 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -758,20 +758,7 @@ void cWindow::BroadcastWholeWindow(void)
-void cWindow::BroadcastProgress(int a_Progressbar, int a_Value)
-{
- cCSLock Lock(m_CS);
- for (cPlayerList::iterator itr = m_OpenedBy.begin(); itr != m_OpenedBy.end(); ++itr)
- {
- (*itr)->GetClientHandle()->SendWindowProperty(*this, a_Progressbar, a_Value);
- } // for itr - m_OpenedBy[]
-}
-
-
-
-
-
-void cWindow::SetProperty(int a_Property, int a_Value)
+void cWindow::SetProperty(short a_Property, short a_Value)
{
cCSLock Lock(m_CS);
for (cPlayerList::iterator itr = m_OpenedBy.begin(), end = m_OpenedBy.end(); itr != end; ++itr)
@@ -784,7 +771,7 @@ void cWindow::SetProperty(int a_Property, int a_Value)
-void cWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Player)
+void cWindow::SetProperty(short a_Property, short a_Value, cPlayer & a_Player)
{
a_Player.GetClientHandle()->SendWindowProperty(*this, a_Property, a_Value);
}
@@ -919,7 +906,7 @@ cEnchantingWindow::cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ) :
-void cEnchantingWindow::SetProperty(int a_Property, int a_Value)
+void cEnchantingWindow::SetProperty(short a_Property, short a_Value)
{
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
{
@@ -935,7 +922,7 @@ void cEnchantingWindow::SetProperty(int a_Property, int a_Value)
-void cEnchantingWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Player)
+void cEnchantingWindow::SetProperty(short a_Property, short a_Value, cPlayer & a_Player)
{
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
{
@@ -951,7 +938,7 @@ void cEnchantingWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Pla
-int cEnchantingWindow::GetPropertyValue(int a_Property)
+short cEnchantingWindow::GetPropertyValue(short a_Property)
{
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
{
diff --git a/src/UI/Window.h b/src/UI/Window.h
index 6b6dce346..26dd7f125 100644
--- a/src/UI/Window.h
+++ b/src/UI/Window.h
@@ -130,9 +130,6 @@ public:
/// Sends the contents of the whole window to all clients of this window.
void BroadcastWholeWindow(void);
-
- /// Sends the progressbar to all clients of this window (same as SetProperty)
- void BroadcastProgress(int a_Progressbar, int a_Value);
// tolua_begin
@@ -140,10 +137,10 @@ public:
void SetWindowTitle(const AString & a_WindowTitle) { m_WindowTitle = a_WindowTitle; }
/// Sends the UpdateWindowProperty (0x69) packet to all clients of the window
- virtual void SetProperty(int a_Property, int a_Value);
+ virtual void SetProperty(short a_Property, short a_Value);
/// Sends the UpdateWindowPropert(0x69) packet to the specified player
- virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player);
+ virtual void SetProperty(short a_Property, short a_Value, cPlayer & a_Player);
// tolua_end
@@ -287,16 +284,16 @@ class cEnchantingWindow :
typedef cWindow super;
public:
cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ);
- virtual void SetProperty(int a_Property, int a_Value, cPlayer & a_Player) override;
- virtual void SetProperty(int a_Property, int a_Value) override;
+ virtual void SetProperty(short a_Property, short a_Value, cPlayer & a_Player) override;
+ virtual void SetProperty(short a_Property, short a_Value) override;
/** Return the Value of a Property */
- int GetPropertyValue(int a_Property);
+ short GetPropertyValue(short a_Property);
cSlotArea * m_SlotArea;
protected:
- int m_PropertyValue[3];
+ short m_PropertyValue[3];
int m_BlockX, m_BlockY, m_BlockZ;
};