diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-06 22:10:16 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-06 22:10:16 +0200 |
commit | e8366993ce3f1cc0c2c6cde1d133773d1f23c474 (patch) | |
tree | 789fd452065ff6aa68f2ceac5664959bdb24afc0 /source/cFurnaceWindow.cpp | |
parent | Added the Doxygen configuration file (diff) | |
download | cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.gz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.bz2 cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.lz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.xz cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.zst cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.zip |
Diffstat (limited to 'source/cFurnaceWindow.cpp')
-rw-r--r-- | source/cFurnaceWindow.cpp | 26 |
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 +} + + + + |