Added cWindow property manipulation API.
Now enchantment table and furnace properties can be set by a plugin
This commit is contained in:
@@ -664,12 +664,12 @@ void cWindow::BroadcastWholeWindow(void)
|
||||
|
||||
|
||||
|
||||
void cWindow::BroadcastInventoryProgress(short a_Progressbar, short a_Value)
|
||||
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()->SendInventoryProgress(m_WindowID, a_Progressbar, a_Value);
|
||||
(*itr)->GetClientHandle()->SendWindowProperty(*this, a_Progressbar, a_Value);
|
||||
} // for itr - m_OpenedBy[]
|
||||
}
|
||||
|
||||
@@ -677,6 +677,28 @@ void cWindow::BroadcastInventoryProgress(short a_Progressbar, short a_Value)
|
||||
|
||||
|
||||
|
||||
void cWindow::SetProperty(int a_Property, int a_Value)
|
||||
{
|
||||
cCSLock Lock(m_CS);
|
||||
for (cPlayerList::iterator itr = m_OpenedBy.begin(), end = m_OpenedBy.end(); itr != end; ++itr)
|
||||
{
|
||||
(*itr)->GetClientHandle()->SendWindowProperty(*this, a_Property, a_Value);
|
||||
} // for itr - m_OpenedBy[]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Player)
|
||||
{
|
||||
a_Player.GetClientHandle()->SendWindowProperty(*this, a_Property, a_Value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cInventoryWindow:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user