quest-wizard/models/events/qw_abstractinventoryevent.h

32 lines
775 B
C
Raw Permalink Normal View History

2023-02-09 08:41:24 -05:00
#ifndef QUESTABSTRACTINVENTORYEVENT_H
#define QUESTABSTRACTINVENTORYEVENT_H
#include "features/qw_inventorymanager.h"
#include "qw_abstractevent.h"
/* QWAbstractInventoryEvent
* Interface for all in-game inventory events. */
class QWAbstractInventoryEvent : public QWAbstractEvent
{
protected:
QWInventoryManager *ptr_inventory;
public:
QWAbstractInventoryEvent();
virtual ~QWAbstractInventoryEvent() override = 0;
virtual void execute() override = 0;
////////////////////////
void setInventoryManager(QWInventoryManager *const inv) noexcept;
QWInventoryManager *inventoryManager() const noexcept;
////////////////////////
virtual void writeToJson(QJsonObject &savejson) override = 0;
};
#endif // QUESTABSTRACTINVENTORYEVENT_H