summaryrefslogtreecommitdiff
path: root/src/equipment.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/equipment.h')
-rw-r--r--src/equipment.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/equipment.h b/src/equipment.h
index 726f7f5e..d40ca55d 100644
--- a/src/equipment.h
+++ b/src/equipment.h
@@ -29,8 +29,6 @@ class Item;
class Equipment
{
public:
- Equipment() = default;
-
class Backend {
public:
virtual Item *getEquipment(int slotIndex) const = 0;
@@ -46,13 +44,17 @@ class Equipment
{}
};
+ Equipment(Backend *backend)
+ : mBackend(backend)
+ {}
+
/**
* Get equipment at the given slot.
*/
Item *getEquipment(int slotIndex) const
{ return mBackend ? mBackend->getEquipment(slotIndex) : nullptr; }
- const std::string getSlotName(int slotIndex) const
+ std::string getSlotName(int slotIndex) const
{ return mBackend ? mBackend->getSlotName(slotIndex) : std::string(); }
int getSlotNumber() const
@@ -67,16 +69,8 @@ class Equipment
void clear()
{ if (mBackend) mBackend->clear(); }
- /**
- * Set equipment at the given slot.
- */
- void setEquipment(int index, int id, int quantity = 0);
-
- void setBackend(Backend *backend)
- { mBackend = backend; }
-
private:
- Backend *mBackend = nullptr;
+ Backend *mBackend;
};
#endif