summaryrefslogtreecommitdiff
path: root/src/item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cpp')
-rw-r--r--src/item.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/item.cpp b/src/item.cpp
index 374d5051..042c3800 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -1,21 +1,21 @@
/*
* 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
*/
@@ -24,9 +24,17 @@
#include "resources/image.h"
#include "resources/resourcemanager.h"
-Item::Item(int id, int quantity) :
+Item::Item(int id, int quantity, bool equipment
+#ifdef EATHENA_SUPPORT
+ , bool equipped
+#endif
+ ):
mImage(0),
- mQuantity(quantity)
+ mQuantity(quantity),
+ mEquipment(equipment)
+#ifdef EATHENA_SUPPORT
+ , mEquipped(equipped)
+#endif
{
setId(id);
}
@@ -41,8 +49,10 @@ void Item::setId(int id)
{
mId = id;
+#ifdef TMWSERV_SUPPORT
// Types 0 and 1 are not equippable items.
mEquipment = id && getInfo().getType() >= 2;
+#endif
// Load the associated image
if (mImage)
@@ -55,4 +65,3 @@ void Item::setId(int id)
if (!mImage)
mImage = resman->getImage("graphics/gui/unknown-item.png");
}
-