2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
#include "CppScripts.h"
|
|
|
|
|
|
|
|
struct ItemSetting {
|
2022-07-28 13:39:57 +00:00
|
|
|
std::vector<LOT> items; // The items to add/remove
|
|
|
|
bool add; // Add items on mission accept
|
|
|
|
bool remove; // Remove items on mission complete
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Scripts that allows for the addition and removal of sets of items by an NPC
|
|
|
|
*/
|
2023-10-09 20:31:25 +00:00
|
|
|
class NPCAddRemoveItem : virtual public CppScripts::Script {
|
2021-12-05 17:54:36 +00:00
|
|
|
protected:
|
2023-01-22 23:38:47 +00:00
|
|
|
void OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) override;
|
2022-07-28 13:39:57 +00:00
|
|
|
virtual std::map<uint32_t, std::vector<ItemSetting>> GetSettings();
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
2022-07-28 13:39:57 +00:00
|
|
|
void OnStartup(Entity* self) override;
|
|
|
|
std::map<uint32_t, std::vector<ItemSetting>> m_MissionItemSettings;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|