openmw-tes3coop/apps/openmw-mp/CharClass.hpp
Koncord 2d0840cb3a [General] Modernize Script API
This commit changes the style of tes3mp serverside scripting mods. Short list of changes:
* Break compatibility with old server mods
* OOP style lua API
* Basic dependency checker, allowing the installation of multiple server mods without changing configs
* Remove support for C++ plugins
* Change outdated LuaBridge to [sol2](https://github.com/ThePhD/sol2);
* Support GCC, Clang and MSVC compilers
* New environment variables: "TES3MP_SERVER_DIR" and "TES3MP_SERVER_USERDIR";
* New entity "Command controller" for registering new chat commands;
* New Event system
* Simplified Timer API
* All Lua mods now run in their own environments
* Add global namespace - Data that can be used for communicating between mods
* Player and Actor inherit base class NetActor
2017-08-28 00:15:56 +08:00

50 lines
1 KiB
C++

//
// Created by koncord on 12.08.17.
//
#pragma once
#include <string>
#include <tuple>
class LuaState;
class Player;
class CharClass
{
public:
static void Init(LuaState &lua);
public:
explicit CharClass(Player *player);
~CharClass();
void update();
std::string getDefault() const;
void setDefault(const std::string &className);
bool isDefault() const;
std::string getName() const;
void setName(const std::string &className);
std::string getDesc() const;
void setDesc(const std::string &desc);
std::tuple<int, int> getMajorAttributes() const;
void setMajorAttributes(int first, int second);
int getSpecialization() const;
void setSpecialization(int spec);
std::tuple<int, int, int, int> getMinorSkills() const;
void setMinorSkills(int fisrt, int second, int third, int fourth);
std::tuple<int, int, int, int> getMajorSkills() const;
void setMajorSkills(int fisrt, int second, int third, int fourth);
private:
// not controlled pointer
Player *player;
bool changed;
};