Enchanting table improvements.
This commit is contained in:
@@ -881,7 +881,7 @@ cEnchantingWindow::cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ) :
|
||||
m_BlockY(a_BlockY),
|
||||
m_BlockZ(a_BlockZ)
|
||||
{
|
||||
m_SlotAreas.push_back(new cSlotAreaEnchanting(*this));
|
||||
m_SlotAreas.push_back(new cSlotAreaEnchanting(*this, m_BlockX, m_BlockY, m_BlockZ));
|
||||
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
|
||||
m_SlotAreas.push_back(new cSlotAreaHotBar(*this));
|
||||
}
|
||||
@@ -892,8 +892,13 @@ cEnchantingWindow::cEnchantingWindow(int a_BlockX, int a_BlockY, int a_BlockZ) :
|
||||
|
||||
void cEnchantingWindow::SetProperty(int a_Property, int a_Value)
|
||||
{
|
||||
m_PropertyValue[a_Property] = a_Value;
|
||||
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
|
||||
{
|
||||
ASSERT(!"a_Property is invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PropertyValue[a_Property] = a_Value;
|
||||
super::SetProperty(a_Property, a_Value);
|
||||
}
|
||||
|
||||
@@ -903,8 +908,13 @@ void cEnchantingWindow::SetProperty(int a_Property, int a_Value)
|
||||
|
||||
void cEnchantingWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Player)
|
||||
{
|
||||
m_PropertyValue[a_Property] = a_Value;
|
||||
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
|
||||
{
|
||||
ASSERT(!"a_Property is invalid");
|
||||
return;
|
||||
}
|
||||
|
||||
m_PropertyValue[a_Property] = a_Value;
|
||||
super::SetProperty(a_Property, a_Value, a_Player);
|
||||
}
|
||||
|
||||
@@ -914,6 +924,12 @@ void cEnchantingWindow::SetProperty(int a_Property, int a_Value, cPlayer & a_Pla
|
||||
|
||||
int cEnchantingWindow::GetPropertyValue(int a_Property)
|
||||
{
|
||||
if ((a_Property < 0) || ((size_t)a_Property >= ARRAYCOUNT(m_PropertyValue)))
|
||||
{
|
||||
ASSERT(!"a_Property is invalid");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return m_PropertyValue[a_Property];
|
||||
}
|
||||
|
||||
@@ -921,17 +937,6 @@ int cEnchantingWindow::GetPropertyValue(int a_Property)
|
||||
|
||||
|
||||
|
||||
void cEnchantingWindow::GetBlockPos(int & a_PosX, int & a_PosY, int & a_PosZ)
|
||||
{
|
||||
a_PosX = m_BlockX;
|
||||
a_PosY = m_BlockY;
|
||||
a_PosZ = m_BlockZ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// cChestWindow:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user