slumber-quest/policies/itemrequiredpolicy.h

24 lines
540 B
C++

#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;
virtual Policy::CheckResult check(const std::shared_ptr<Actor>& actor) const override;
void setRequiredItem(const std::shared_ptr<Item>& item);
private:
std::shared_ptr<Item> _item;
};
#endif // ITEMREQUIREDPOLICY_H