summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/localplayer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 14f85bfe..727b067b 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -63,6 +63,7 @@
#include "resources/animation.h"
#include "resources/imageset.h"
+#include "resources/itemdb.h"
#include "resources/iteminfo.h"
#include "resources/resourcemanager.h"
@@ -331,7 +332,11 @@ void LocalPlayer::clearInventory()
void LocalPlayer::setInvItem(int index, int id, int amount)
{
- mInventory->setItem(index, id, amount);
+ bool equipment = false;
+ int itemType = ItemDB::get(id).getType();
+ if (itemType != ITEM_UNUSABLE && itemType != ITEM_USABLE)
+ equipment = true;
+ mInventory->setItem(index, id, amount, equipment);
}
#endif