1
0

CreativeInventory Update

- Fixed various problems with the new creative inventory (Crafting, furnace, etc)
- Creative inventory will now be saved to disk, so you keep your creative inventory also for the next sessions

git-svn-id: http://mc-server.googlecode.com/svn/trunk@162 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
lapayo94@gmail.com
2012-01-01 18:45:28 +00:00
parent 01398f8424
commit ac63775297
9 changed files with 107 additions and 85 deletions

View File

@@ -18,6 +18,8 @@ cInventory::~cInventory()
{
delete [] m_Slots;
delete m_EquippedItem;
if( GetWindow() ) GetWindow()->Close( *m_Owner );
CloseWindow();
}
cInventory::cInventory(cPlayer* a_Owner)
@@ -35,6 +37,14 @@ cInventory::cInventory(cPlayer* a_Owner)
m_EquippedItem = new cItem();
m_EquippedSlot = 0;
if( !GetWindow() )
{
cWindow* Window = new cWindow( this, false );
Window->SetSlots( m_Slots, c_NumSlots );
Window->SetWindowID( 0 );
OpenWindow( Window );
}
}
bool cInventory::AddItem( cItem & a_Item )