2017-04-09 09:28:38 +00:00
|
|
|
#ifndef OPENMW_QUESTAPI_HPP
|
|
|
|
#define OPENMW_QUESTAPI_HPP
|
2017-01-24 17:32:25 +00:00
|
|
|
|
|
|
|
#define QUESTAPI \
|
2017-07-07 06:25:48 +00:00
|
|
|
{"InitializeJournalChanges", QuestFunctions::InitializeJournalChanges},\
|
2017-07-11 04:15:06 +00:00
|
|
|
{"InitializeKillChanges", QuestFunctions::InitializeKillChanges},\
|
2017-07-07 06:25:48 +00:00
|
|
|
\
|
2017-06-23 05:12:32 +00:00
|
|
|
{"GetJournalChangesSize", QuestFunctions::GetJournalChangesSize},\
|
2017-07-11 04:15:06 +00:00
|
|
|
{"GetKillChangesSize", QuestFunctions::GetKillChangesSize},\
|
2017-01-24 17:32:25 +00:00
|
|
|
\
|
2017-06-23 05:12:32 +00:00
|
|
|
{"AddJournalEntry", QuestFunctions::AddJournalEntry},\
|
|
|
|
{"AddJournalIndex", QuestFunctions::AddJournalIndex},\
|
2017-07-11 04:15:06 +00:00
|
|
|
{"AddKill", QuestFunctions::AddKill},\
|
2017-01-24 17:32:25 +00:00
|
|
|
\
|
2017-06-23 05:12:32 +00:00
|
|
|
{"GetJournalItemQuest", QuestFunctions::GetJournalItemQuest},\
|
|
|
|
{"GetJournalItemIndex", QuestFunctions::GetJournalItemIndex},\
|
|
|
|
{"GetJournalItemType", QuestFunctions::GetJournalItemType},\
|
|
|
|
{"GetJournalItemActorRefId", QuestFunctions::GetJournalItemActorRefId},\
|
2017-07-11 04:15:06 +00:00
|
|
|
{"GetKillRefId", QuestFunctions::GetKillRefId},\
|
|
|
|
{"GetKillNumber", QuestFunctions::GetKillNumber},\
|
2017-01-24 17:32:25 +00:00
|
|
|
\
|
2017-07-11 04:15:06 +00:00
|
|
|
{"SendJournalChanges", QuestFunctions::SendJournalChanges},\
|
|
|
|
{"SendKillChanges", QuestFunctions::SendKillChanges}
|
2017-01-24 17:32:25 +00:00
|
|
|
|
|
|
|
class QuestFunctions
|
|
|
|
{
|
|
|
|
public:
|
2017-07-07 06:25:48 +00:00
|
|
|
static void InitializeJournalChanges(unsigned short pid) noexcept;
|
2017-07-11 04:15:06 +00:00
|
|
|
static void InitializeKillChanges(unsigned short pid) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
|
|
|
|
static unsigned int GetJournalChangesSize(unsigned short pid) noexcept;
|
2017-07-11 04:15:06 +00:00
|
|
|
static unsigned int GetKillChangesSize(unsigned short pid) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
|
2017-06-23 05:12:32 +00:00
|
|
|
static void AddJournalEntry(unsigned short pid, const char* quest, unsigned int index, const char* actorRefId) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
static void AddJournalIndex(unsigned short pid, const char* quest, unsigned int index) noexcept;
|
2017-07-11 04:15:06 +00:00
|
|
|
static void AddKill(unsigned short pid, const char* refId, int number) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
|
|
|
|
static const char *GetJournalItemQuest(unsigned short pid, unsigned int i) noexcept;
|
|
|
|
static int GetJournalItemIndex(unsigned short pid, unsigned int i) noexcept;
|
|
|
|
static int GetJournalItemType(unsigned short pid, unsigned int i) noexcept;
|
2017-06-23 05:12:32 +00:00
|
|
|
static const char *GetJournalItemActorRefId(unsigned short pid, unsigned int i) noexcept;
|
2017-07-11 04:15:06 +00:00
|
|
|
static const char *GetKillRefId(unsigned short pid, unsigned int i) noexcept;
|
|
|
|
static int GetKillNumber(unsigned short pid, unsigned int i) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
|
2017-07-07 06:25:48 +00:00
|
|
|
static void SendJournalChanges(unsigned short pid, bool toOthers = false) noexcept;
|
2017-07-11 04:15:06 +00:00
|
|
|
static void SendKillChanges(unsigned short pid, bool toOthers = false) noexcept;
|
2017-01-24 17:32:25 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-04-09 09:28:38 +00:00
|
|
|
#endif //OPENMW_QUESTAPI_HPP
|