123456789101112131415161718192021222324252627282930 |
- #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;
- }
|