12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #include "Item.h"
- Item::Item( const ItemType* zType, const char* name )
- : ReferenceCounter(),
- zType( zType ),
- damage( 0 ),
- maxDamage( 0 ),
- durability( 0 ),
- maxDurability( 0 ),
- eatable( 0 ),
- placeable( 0 ),
- equippable( 0 ),
- solid( 1 ),
- usable( 0 ),
- maxStackSize( 50 ),
- name( name )
- {}
- const ItemType* Item::zItemType() const
- {
- return zType;
- }
- float Item::getDamage() const
- {
- return damage;
- }
- float Item::getDurability() const
- {
- return durability;
- }
- bool Item::isUsable() const
- {
- return usable;
- }
- bool Item::isEatable() const
- {
- return eatable;
- }
- bool Item::isPlaceable() const
- {
- return placeable;
- }
- bool Item::isEquippable() const
- {
- return equippable;
- }
- bool Item::isSolid() const
- {
- return solid;
- }
- float Item::getMaxDurability() const
- {
- return maxDurability;
- }
- int Item::getMaxStackSize() const
- {
- return maxStackSize;
- }
- float Item::getMaxDamage() const
- {
- return maxDamage;
- }
|