123456789101112131415161718192021222324252627 |
- #pragma once
- #include "Item.h"
- class ItemStack : public virtual Framework::ReferenceCounter
- {
- private:
- Item* item;
- int size;
- int maxSize;
- public:
- ItemStack( Item* item, int currentSize, int maxSize );
- ItemStack( Item* item, int currentSize );
- ~ItemStack();
- void setMaxSize( int size );
- ItemStack* split( int size );
- Item* extractFromStack();
- bool addToStack( Item* item );
- void addItemStack( ItemStack* zItemStack );
- bool isStackable( Item* zItem ) const;
- const Item* zItem() const;
- int getSize() const;
- int getMaxSize() const;
- };
|