2021-05-08 03:36:26 +02:00
|
|
|
#ifndef ITEMREQUIREDPOLICY_H
|
|
|
|
#define ITEMREQUIREDPOLICY_H
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include "policy.h"
|
|
|
|
|
|
|
|
class Item;
|
|
|
|
|
|
|
|
class ItemRequiredPolicy : public Policy
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ItemRequiredPolicy(const std::string& satisfaction, const std::string& dissatisfaction);
|
|
|
|
virtual ~ItemRequiredPolicy() override;
|
|
|
|
|
2021-05-16 01:44:19 +02:00
|
|
|
virtual Policy::CheckResult check(const std::shared_ptr<Actor>& actor) const override;
|
2021-05-08 03:36:26 +02:00
|
|
|
|
|
|
|
void setRequiredItem(const std::shared_ptr<Item>& item);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Item> _item;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ITEMREQUIREDPOLICY_H
|