summaryrefslogtreecommitdiff
path: root/src/game-server/item.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-09-27 03:55:19 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-09-27 03:55:19 +0000
commit29ae6d3f42ac55e7bc8c5ad0b044c7b0e662d358 (patch)
tree41ca7bb0f8b557e096a2b783f6c94ea4d3e5006a /src/game-server/item.cpp
parentc27d73abc52bdc463a029a5f6a95e1db5df5abf6 (diff)
downloadmanaserv-29ae6d3f42ac55e7bc8c5ad0b044c7b0e662d358.tar.gz
manaserv-29ae6d3f42ac55e7bc8c5ad0b044c7b0e662d358.tar.bz2
manaserv-29ae6d3f42ac55e7bc8c5ad0b044c7b0e662d358.tar.xz
manaserv-29ae6d3f42ac55e7bc8c5ad0b044c7b0e662d358.zip
Implemented getting the attack zone of weapons from the item database and implemented single target attacks useful for projectile weapons like bows.
Diffstat (limited to 'src/game-server/item.cpp')
-rw-r--r--src/game-server/item.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game-server/item.cpp b/src/game-server/item.cpp
index f14374b6..4d0530f8 100644
--- a/src/game-server/item.cpp
+++ b/src/game-server/item.cpp
@@ -27,6 +27,7 @@
#include "game-server/item.hpp"
+#include "game-server/attackzone.hpp"
#include "game-server/being.hpp"
WeaponType weaponTypeFromString (const std::string &name)
@@ -136,6 +137,11 @@ void ItemModifiers::cancelAttributes(Being *b) const
}
}
+ItemClass::~ItemClass()
+{
+ if (mAttackZone) delete mAttackZone;
+}
+
bool ItemClass::use(Being *itemUser)
{
if (mType != ITEM_USABLE) return false;