diff options
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 1c1d8467..10749c9e 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -1,26 +1,26 @@ /* * The Mana World - * Copyright 2004 The Mana World Development Team + * Copyright (C) 2004 The Mana World Development Team * * This file is part of The Mana World. * - * The Mana World is free software; you can redistribute it and/or modify + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * - * The Mana World is distributed in the hope that it will be useful, + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with The Mana World; if not, write to the Free Software + * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _TMW_ITEMINFO_H_ -#define _TMW_ITEMINFO_H_ +#ifndef ITEMINFO_H +#define ITEMINFO_H #include <map> #include <string> @@ -28,7 +28,7 @@ #include "spritedef.h" -#include "../player.h" +#include "../being.h" enum EquipmentSoundEvent { @@ -115,7 +115,11 @@ class ItemInfo * Constructor. */ ItemInfo(): +#ifdef TMWSERV_SUPPORT mType(ITEM_UNUSABLE), +#else + mType(""), +#endif mWeight(0), mView(0), mAttackType(ACTION_DEFAULT) @@ -149,14 +153,20 @@ class ItemInfo void setEffect(const std::string &effect) { mEffect = effect; } - const std::string& - getEffect() const { return mEffect; } + 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; } @@ -192,7 +202,11 @@ 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 short mWeight; /**< Weight in grams. */ int mView; /**< Item ID of how this item looks. */ int mId; /**< Item ID */ |