From 2bf40f6f1f94cb85d95b8e9ce2942c9d4ce9bd1a Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 30 Mar 2009 07:19:36 -0600 Subject: Merge item types to remove more #ifdefs --- src/resources/itemdb.cpp | 4 ---- src/resources/iteminfo.h | 11 ----------- 2 files changed, 15 deletions(-) (limited to 'src/resources') diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index db919b64..d9994892 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -147,12 +147,8 @@ void ItemDB::load() itemInfo->setImageName(image); itemInfo->setName(name.empty() ? _("Unnamed") : name); itemInfo->setDescription(description); -#ifdef TMWSERV_SUPPORT int type = itemTypeFromString(typeStr); itemInfo->setType(type); -#else - itemInfo->setType(typeStr); -#endif itemInfo->setView(view); itemInfo->setWeight(weight); itemInfo->setWeaponType(weaponType); diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index bcee1fbd..327d0e9f 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -158,18 +158,11 @@ class ItemInfo const std::string &getEffect() const { return mEffect; } -#ifdef TMWSERV_SUPPORT void setType(short type) { mType = type; } short getType() const { return mType; } -#else - void setType(const std::string &type) - { mType = type; } - - const std::string &getType() const { return mType; } -#endif void setWeight(short weight) { mWeight = weight; } @@ -205,11 +198,7 @@ class ItemInfo std::string mName; std::string mDescription; /**< Short description. */ std::string mEffect; /**< Description of effects. */ -#ifdef TMWSERV_SUPPORT char mType; /**< Item type. */ -#else - std::string mType; /**< Item type. */ -#endif std::string mParticle; /**< Particle effect used with this item */ short mWeight; /**< Weight in grams. */ int mView; /**< Item ID of how this item looks. */ -- cgit v1.2.3-70-g09d2