Browse Source

Items: Add isGold() function to items.h

This patch adds isGold() function to items.h, which checks if the item's
type is gold.
pull/6732/head
tetektoza 2 years ago committed by Anders Jenbo
parent
commit
44aeea0f22
  1. 9
      Source/items.h

9
Source/items.h

@ -333,6 +333,15 @@ struct Item {
}
}
/**
* @brief Checks whether this item is gold.
* @return 'True' in case the item is gold and 'False' otherwise.
*/
bool isGold() const
{
return this->_itype == ItemType::Gold;
}
/**
* @brief Checks whether this item is a helm.
* @return 'True' in case the item is a helm and 'False' otherwise.

Loading…
Cancel
Save