
#ifndef CLASS_H
#define CLASS_H
#include "LSObject.h"


class CharacterClass {
public:
    explicit CharacterClass(const shared_ptr<LSObject> &obj) {
        const auto optName = obj->GetMember("Name");
        const auto optLevel = obj->GetMember("Level");

        name = optName.has_value() ? optName->CharPtr : string();
        level = optLevel.has_value() ? optLevel->Int : 0;
    }

    string Name() const {
        return this->name;
    }

    int Level() const {
        return this->level;
    }

private:
    string name;
    int level;
};


#endif //CLASS_H
