summaryrefslogtreecommitdiff
path: root/src/itemshortcut.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-09-28 21:26:48 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-09-28 21:26:48 +0200
commit3c89797394c83db8bc2204fdf5841dd3068f09d0 (patch)
tree6fc2d3ad06b9d589851397ff723a32b231a100de /src/itemshortcut.cpp
parent51f0c23ac190c83bebeace8a49cd2ecd1143fa8c (diff)
downloadmana-3c89797394c83db8bc2204fdf5841dd3068f09d0.tar.gz
mana-3c89797394c83db8bc2204fdf5841dd3068f09d0.tar.bz2
mana-3c89797394c83db8bc2204fdf5841dd3068f09d0.tar.xz
mana-3c89797394c83db8bc2204fdf5841dd3068f09d0.zip
Removed getter/setter cruft from ItemInfo
Made the class and the code in general more readable by removing all the needless getters and setters.
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r--src/itemshortcut.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp
index 138c1d12..577f76ae 100644
--- a/src/itemshortcut.cpp
+++ b/src/itemshortcut.cpp
@@ -26,10 +26,6 @@
#include "itemshortcut.h"
#include "playerinfo.h"
-#include "net/inventoryhandler.h"
-
-#include "resources/iteminfo.h"
-
#include "utils/stringutils.h"
ItemShortcut *itemShortcut;
@@ -71,7 +67,7 @@ void ItemShortcut::useItem(int index)
Item *item = PlayerInfo::getInventory()->findItem(mItems[index]);
if (item && item->getQuantity())
{
- if (item->getInfo().getEquippable())
+ if (item->isEquippable())
{
if (item->isEquipped())
item->doEvent(Event::DoUnequip);