summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index fa8db881..96f3f8c3 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -128,6 +128,17 @@ Item* LocalPlayer::getInvItem(int index)
return mInventory->getItem(index);
}
+Item* LocalPlayer::searchForItem(int itemId)
+{
+ for(int i = 0; i < INVENTORY_SIZE; i++)
+ {
+ if (itemId == mInventory->getItem(i)->getId()) {
+ return mInventory->getItem(i);
+ }
+ }
+ return NULL;
+}
+
void LocalPlayer::equipItem(Item *item)
{
MessageOut outMsg(mNetwork);