openmw-tes3coop/apps/openmw-mp/Script/Functions/Books.hpp
David Cernat 6dde0ca9c9 [Server] Rework script functons by removing unnecessary vector buffers
Add new initialization script functions to allow clearing all player changes vectors in a manner consistent with Actor and World functions

Add toOthers boolean to all methods that send packets with player changes vectors
2017-07-07 09:25:48 +03:00

32 lines
872 B
C++

#ifndef OPENMW_BOOKAPI_HPP
#define OPENMW_BOOKAPI_HPP
#define BOOKAPI \
{"InitializeBookChanges", BookFunctions::InitializeBookChanges},\
\
{"GetBookChangesSize", BookFunctions::GetBookChangesSize},\
\
{"AddBook", BookFunctions::AddBook},\
\
{"GetBookId", BookFunctions::GetBookId},\
\
{"SendBookChanges", BookFunctions::SendBookChanges}
class BookFunctions
{
public:
static void InitializeBookChanges(unsigned short pid) noexcept;
static unsigned int GetBookChangesSize(unsigned short pid) noexcept;
static void AddBook(unsigned short pid, const char* bookId) noexcept;
static const char *GetBookId(unsigned short pid, unsigned int i) noexcept;
static void SendBookChanges(unsigned short pid, bool toOthers = false) noexcept;
private:
};
#endif //OPENMW_BOOKAPI_HPP