diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-30 08:34:39 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-30 08:34:39 -0600 |
commit | f885dda3c5b289eff21b3c2a889c69f6d1af7d2c (patch) | |
tree | fcc93a2e3e4f88b13e671cb8af2f9099bfb25d5b /src/resources | |
parent | 2bf40f6f1f94cb85d95b8e9ce2942c9d4ce9bd1a (diff) | |
download | mana-f885dda3c5b289eff21b3c2a889c69f6d1af7d2c.tar.gz mana-f885dda3c5b289eff21b3c2a889c69f6d1af7d2c.tar.bz2 mana-f885dda3c5b289eff21b3c2a889c69f6d1af7d2c.tar.xz mana-f885dda3c5b289eff21b3c2a889c69f6d1af7d2c.zip |
Merge weapon types
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/itemdb.cpp | 4 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 21 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 2 |
3 files changed, 0 insertions, 27 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index d9994892..cf7b976b 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -135,11 +135,7 @@ void ItemDB::load() std::string name = XML::getProperty(node, "name", ""); std::string image = XML::getProperty(node, "image", ""); std::string description = XML::getProperty(node, "description", ""); -#ifdef TMWSERV_SUPPORT int weaponType = weaponTypeFromString(XML::getProperty(node, "weapon-type", "")); -#else - int weaponType = XML::getProperty(node, "weapon_type", 0); -#endif int attackRange = XML::getProperty(node, "attack-range", 0); ItemInfo *itemInfo = new ItemInfo; diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index 63b0c00e..c9f71b22 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -45,7 +45,6 @@ void ItemInfo::setWeaponType(int type) // See server item.hpp file for type values. switch (type) { -#ifdef TMWSERV_SUPPORT case WPNTYPE_NONE: mAttackType = ACTION_DEFAULT; break; @@ -64,26 +63,6 @@ void ItemInfo::setWeaponType(int type) break; default: mAttackType = ACTION_ATTACK; -#else - case 0: // none - mAttackType = ACTION_DEFAULT; - break; - case 1: // knife - case 2: // sword - mAttackType = ACTION_ATTACK_STAB; - break; - case 8: // projectile - mAttackType = ACTION_ATTACK_THROW; - break; - case 10: // bow - mAttackType = ACTION_ATTACK_BOW; - break; - case 11: // sickle - mAttackType = ACTION_ATTACK_SWING; - break; - default: - mAttackType = ACTION_ATTACK; -#endif } } diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 327d0e9f..5c76af40 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -115,9 +115,7 @@ class ItemInfo * Constructor. */ ItemInfo(): -#ifdef TMWSERV_SUPPORT mType(ITEM_UNUSABLE), -#endif mWeight(0), mView(0), mAttackType(ACTION_DEFAULT) |