mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
20
dScripts/NPCAddRemoveItem.h
Normal file
20
dScripts/NPCAddRemoveItem.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "CppScripts.h"
|
||||
|
||||
struct ItemSetting {
|
||||
std::vector<LOT> items; // The items to add/remove
|
||||
bool add; // Add items on mission accept
|
||||
bool remove; // Remove items on mission complete
|
||||
};
|
||||
|
||||
/**
|
||||
* Scripts that allows for the addition and removal of sets of items by an NPC
|
||||
*/
|
||||
class NPCAddRemoveItem : public CppScripts::Script {
|
||||
protected:
|
||||
void OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) override;
|
||||
virtual std::map<uint32_t, std::vector<ItemSetting>> GetSettings();
|
||||
private:
|
||||
void OnStartup(Entity *self) override;
|
||||
std::map<uint32_t, std::vector<ItemSetting>> m_MissionItemSettings;
|
||||
};
|
Reference in New Issue
Block a user