diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-07-26 21:50:06 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-07-26 21:50:06 +0200 |
commit | cd8720bf7e07c681ef90ba6159afbf53f5546ed2 (patch) | |
tree | d34f62f52260b0029b3b0948a149c539ac5fe88a /source/Inventory.h | |
parent | Added a shortcut for running under helgrind with the most common parameters and suppressions (diff) | |
download | cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar.gz cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar.bz2 cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar.lz cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar.xz cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.tar.zst cuberite-cd8720bf7e07c681ef90ba6159afbf53f5546ed2.zip |
Diffstat (limited to 'source/Inventory.h')
-rw-r--r-- | source/Inventory.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/Inventory.h b/source/Inventory.h index 9ddd00ecd..f8f8042f4 100644 --- a/source/Inventory.h +++ b/source/Inventory.h @@ -130,6 +130,12 @@ public: void SetEquippedSlotNum(int a_SlotNum); int GetEquippedSlotNum(void) { return m_EquippedSlotNum; } + /** Adds (or subtracts, if a_AddToCount is negative) to the count of items in the specified slot. + If the slot is empty, ignores the call. + Returns the new count, or -1 if the slot number is invalid. + */ + int ChangeSlotCount(int a_SlotNum, int a_AddToCount); + /// Adds the specified damage to the specified item; deletes the item and returns true if the item broke. bool DamageItem(int a_SlotNum, short a_Amount); |