From 6eb86a3d23953856eeac3a4e7c4f52143e24f880 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Wed, 1 Aug 2007 07:23:58 +0000 Subject: Fixed update of equipment flag, so that items can be equipped properly. --- src/item.cpp | 6 ++++++ src/item.h | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/item.cpp b/src/item.cpp index 487f17da..946181dc 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -31,3 +31,9 @@ Item::Item(int id, int quantity) : mEquipment = getInfo().getType(); } +void Item::setId(int id) +{ + mId = id; + mEquipment = getInfo().getType(); +} + diff --git a/src/item.h b/src/item.h index 2a60bf3a..00a8a043 100644 --- a/src/item.h +++ b/src/item.h @@ -40,8 +40,7 @@ class Item /** * Sets the item id, identifying the item type. */ - void - setId(int id) { mId = id; } + void setId(int id); /** * Returns the item id. -- cgit v1.2.3-70-g09d2