2017-04-09 09:28:38 +00:00
|
|
|
#ifndef OPENMW_SPELLAPI_HPP
|
|
|
|
#define OPENMW_SPELLAPI_HPP
|
2016-11-21 18:37:04 +00:00
|
|
|
|
|
|
|
#define SPELLAPI \
|
2017-07-07 06:25:48 +00:00
|
|
|
{"InitializeSpellbookChanges", SpellFunctions::InitializeSpellbookChanges},\
|
2016-11-21 18:37:04 +00:00
|
|
|
\
|
2017-07-07 06:25:48 +00:00
|
|
|
{"GetSpellbookChangesSize", SpellFunctions::GetSpellbookChangesSize},\
|
|
|
|
{"GetSpellbookAction", SpellFunctions::GetSpellbookAction},\
|
2016-11-21 18:37:04 +00:00
|
|
|
\
|
2017-07-07 06:25:48 +00:00
|
|
|
{"AddSpell", SpellFunctions::AddSpell},\
|
|
|
|
{"RemoveSpell", SpellFunctions::RemoveSpell},\
|
2016-11-21 18:37:04 +00:00
|
|
|
\
|
2017-07-07 06:25:48 +00:00
|
|
|
{"GetSpellId", SpellFunctions::GetSpellId},\
|
|
|
|
\
|
|
|
|
{"SendSpellbookChanges", SpellFunctions::SendSpellbookChanges}
|
2016-11-21 18:37:04 +00:00
|
|
|
|
|
|
|
class SpellFunctions
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2017-07-07 06:25:48 +00:00
|
|
|
static void InitializeSpellbookChanges(unsigned short pid) noexcept;
|
|
|
|
|
2017-01-20 10:43:05 +00:00
|
|
|
static unsigned int GetSpellbookChangesSize(unsigned short pid) noexcept;
|
2017-02-16 12:23:27 +00:00
|
|
|
static unsigned int GetSpellbookAction(unsigned short pid) noexcept;
|
2016-11-21 18:37:04 +00:00
|
|
|
|
|
|
|
static void AddSpell(unsigned short pid, const char* spellId) noexcept;
|
|
|
|
static void RemoveSpell(unsigned short pid, const char* spellId) noexcept;
|
|
|
|
|
|
|
|
static const char *GetSpellId(unsigned short pid, unsigned int i) noexcept;
|
|
|
|
|
2017-07-07 06:25:48 +00:00
|
|
|
static void SendSpellbookChanges(unsigned short pid, bool toOthers = false) noexcept;
|
2016-11-21 18:37:04 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-04-09 09:28:38 +00:00
|
|
|
#endif //OPENMW_SPELLAPI_HPP
|