-
Notifications
You must be signed in to change notification settings - Fork 1
/
Item.h
54 lines (45 loc) · 1.22 KB
/
Item.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//Item.h: header file for Item.cpp. Things like ammo, weapons, and other stuff
//will extend this class
#ifndef _Item
#define _Item
#include "Entity.h"
#include <string>
#include <ostream>
class Item : public Entity
{
public:
//Constructor
Item();
//Copy Constructor
Item(const Item& anItem);
//Destructor
~Item();
//Getters
virtual int getWeight() const;
virtual int getValue() const;
virtual int getRarity() const;
virtual int getEnchantment() const;
virtual int getQuantity() const;
//Setters
virtual void setWeight(int iWeight);
virtual void setValue(int iValue);
virtual void setRarity(int iRarity);
virtual void setEnchantment(int iEnchantment);
virtual void setQuantity(int iQuantity);
//Other methods
virtual void changeLocation(DungeonLevel* dlLevel, Point* pNewLocation);
virtual void pickUp();
virtual std::string getDescription();
virtual void dumpObject();
virtual void dumpObjectData();
virtual void writeFragment(std::ostream & output, int iTabs);
virtual void writeDataAsFragment(std::ostream & output, int iTabs);
virtual void setElementData(std::string sElementName, std::string sValue);
private:
int m_iWeight;
int m_iValue;
int m_iRarity;
int m_iEnchantment;
int m_iQuantity;
};
#endif