1234567891011121314151617181920212223242526272829303132333435 |
- #include "ItemStack.h"
- #include "Item.h"
- ItemStack::ItemStack( Item* item, int currentSize, int maxSize )
- : ReferenceCounter(),
- item( item ),
- size( currentSize ),
- maxSize( maxSize )
- {}
- ItemStack::ItemStack( Item* item, int currentSize )
- : ItemStack( item, currentSize, item->getMaxStackSize() )
- {}
- ItemStack::~ItemStack()
- {
- if( item )
- item->release();
- }
- int ItemStack::getSize() const
- {
- return size;
- }
- int ItemStack::getMaxSize() const
- {
- return maxSize;
- }
- Item* ItemStack::zItem() const
- {
- return item;
- }
|