summaryrefslogtreecommitdiffstats
path: root/source/cFurnaceWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cFurnaceWindow.cpp')
-rw-r--r--source/cFurnaceWindow.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/source/cFurnaceWindow.cpp b/source/cFurnaceWindow.cpp
index 963c848ec..8dcd0c8a5 100644
--- a/source/cFurnaceWindow.cpp
+++ b/source/cFurnaceWindow.cpp
@@ -13,21 +13,23 @@
cFurnaceWindow::cFurnaceWindow( cFurnaceEntity* a_Owner )
- : cWindow( a_Owner, true )
+ : cWindow(a_Owner, true, cWindow::Furnace, 1)
, m_Furnace( a_Owner )
{
- SetWindowID( 1 );
- SetWindowType( cWindow::Furnace ); // Furnace
}
-void cFurnaceWindow::Clicked( cPacket_WindowClick* a_ClickPacket, cPlayer & a_Player )
+
+
+
+
+void cFurnaceWindow::Clicked(cPacket_WindowClick * a_ClickPacket, cPlayer & a_Player)
{
cItem Fuel = *GetSlot( 0 );
cWindow::Clicked( a_ClickPacket, a_Player );
- if( m_Furnace )
+ if (m_Furnace != NULL)
{
- if( a_ClickPacket->m_SlotNum >= 0 && a_ClickPacket->m_SlotNum <= 2 ) // them important slots
+ if ((a_ClickPacket->m_SlotNum >= 0) && (a_ClickPacket->m_SlotNum <= 2)) // them important slots
{
if( Fuel.m_ItemID != GetSlot( 0 )->m_ItemID )
m_Furnace->ResetCookTimer();
@@ -40,8 +42,16 @@ void cFurnaceWindow::Clicked( cPacket_WindowClick* a_ClickPacket, cPlayer & a_Pl
}
}
+
+
+
+
void cFurnaceWindow::Close( cPlayer & a_Player )
{
- m_Furnace = 0;
+ m_Furnace = NULL;
cWindow::Close( a_Player );
-} \ No newline at end of file
+}
+
+
+
+