32 lines
775 B
C++
32 lines
775 B
C++
#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
|