entity_spell_system/entities/data/talent_row_data.h

42 lines
809 B
C
Raw Normal View History

2019-04-20 14:02:55 +02:00
#ifndef TALENT_ROW_DATA_H
#define TALENT_ROW_DATA_H
#include "core/reference.h"
#include "core/ustring.h"
#include "../../data/talent.h"
2019-04-20 14:02:55 +02:00
class Talent;
class TalentRowData : public Resource {
GDCLASS(TalentRowData, Resource);
2019-04-20 14:02:55 +02:00
public:
Ref<Talent> get_talent_index(int index) const;
void set_talent_index(int index, Ref<Talent> talent);
Ref<Talent> get_talent(int culomn, int rank) const;
void set_talent(int culomn, int rank, Ref<Talent> talent);
bool has_talent_with_id(int id);
Ref<Talent> get_talent_with_id(int id);
2019-04-20 14:02:55 +02:00
TalentRowData();
~TalentRowData();
2019-04-20 14:02:55 +02:00
public:
enum {
MAX_TALENTS_IN_ROW = 5,
MAX_TALENTS_PER_ENTRY = 5,
TOTAL_ENTRIES = MAX_TALENTS_IN_ROW * MAX_TALENTS_PER_ENTRY,
};
2019-04-20 14:02:55 +02:00
protected:
static void _bind_methods();
private:
Ref<Talent> _talents[TOTAL_ENTRIES];
2019-04-20 14:02:55 +02:00
};
#endif