2021-05-07 21:36:26 -04: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-15 19:44:19 -04:00
|
|
|
virtual Policy::CheckResult check(const std::shared_ptr<Actor>& actor) const override;
|
2021-05-07 21:36:26 -04:00
|
|
|
|
|
|
|
void setRequiredItem(const std::shared_ptr<Item>& item);
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Item> _item;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ITEMREQUIREDPOLICY_H
|