summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-11-10 10:00:29 +0000
committerAaron Marks <nymacro@gmail.com>2005-11-10 10:00:29 +0000
commite86de3e7ce09660e615792dba50af9de5d2d82c5 (patch)
tree8d2ac25779095112960a2521e9046cffefda03bd /src/being.cpp
parenta13d9f0066aabc966fa6d60951b178bf73dc0f1b (diff)
downloadmanaserv-e86de3e7ce09660e615792dba50af9de5d2d82c5.tar.gz
manaserv-e86de3e7ce09660e615792dba50af9de5d2d82c5.tar.bz2
manaserv-e86de3e7ce09660e615792dba50af9de5d2d82c5.tar.xz
manaserv-e86de3e7ce09660e615792dba50af9de5d2d82c5.zip
Updates to Being, test client, game handler and small update to state update.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 6c97fa98..be0b312d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -310,6 +310,15 @@ bool Being::delInventory(unsigned int itemId)
return false;
}
+bool Being::hasItem(unsigned int itemId) {
+ for (std::vector<unsigned int>::iterator i = inventory.begin();
+ i != inventory.end(); i++) {
+ if (*i == itemId)
+ return true;
+ }
+ return false;
+}
+
bool Being::equip(unsigned int itemId, unsigned char slot)
{
// currently this is too simplistic and doesn't check enough