blob: e8a40b9071b290655e81a22698b31f9cb7ab2d27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <nlohmann/json.hpp>
#include "entry.h"
#include <memory>
namespace entry {
struct itemImpl;
class Item : public Entry {
public:
Item();
static std::shared_ptr<Item> create(const nlohmann::json& data);
virtual ~Item() {}
virtual int getCost(void) const;
virtual double getWeight(void) const;
virtual std::string getCostWeightText() const;
virtual std::string getText() const override;
virtual std::string getText(const creature::Creature& c) const override;
NLOHMANN_FRIEND_DECLARES(Item);
private:
std::shared_ptr<itemImpl> data;
};
}
|