From 9c9c105cd26a0b8349cd529c31c2a0800da697ce Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Thu, 10 Jan 2008 15:45:25 +0000 Subject: Item types and weapon types are now identified by name instead of numbers in the items.xml. Removed entries for eAthena compatiblity from items.xml (the database isn't eAthena compatible anymore), added item type and weapon-type properties to all items. All healing items now have a healing effect. --- src/resources/iteminfo.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/resources/iteminfo.cpp') diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index f1ebd0a9..ade7f685 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -45,23 +45,22 @@ ItemInfo::getSprite(int gender) const void ItemInfo::setWeaponType(int type) { - // See server item.hpp file for type values. switch (type) { - case 0: // none + case WPNTYPE_NONE: mAttackType = ACTION_DEFAULT; break; - case 1: // knife - case 2: // sword + case WPNTYPE_KNIFE: + case WPNTYPE_SWORD: mAttackType = ACTION_ATTACK_STAB; break; - case 8: // projectile + case WPNTYPE_THROWN: mAttackType = ACTION_ATTACK_THROW; break; - case 10: // bow + case WPNTYPE_BOW: mAttackType = ACTION_ATTACK_BOW; break; - case 11: // sickle + case WPNTYPE_SICKLE: mAttackType = ACTION_ATTACK_SWING; break; default: -- cgit v1.2.3-70-g09d2