diff --git a/SCsub b/SCsub
index 9945aa7..312805e 100644
--- a/SCsub
+++ b/SCsub
@@ -55,8 +55,7 @@ sources = [
"entities/skills/entity_skill_data.cpp",
"entities/data/character_spec.cpp",
- "entities/data/talent_row_data.cpp",
-
+
"skeleton/character_bones.cpp",
"entities/stats/stat_data.cpp",
diff --git a/doc_classes/TalentRowData.xml b/doc_classes/TalentRowData.xml
deleted file mode 100644
index 1886526..0000000
--- a/doc_classes/TalentRowData.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
- Contains one row of for a talent specialization.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/entities/data/character_spec.cpp b/entities/data/character_spec.cpp
index b59b467..1c9c448 100644
--- a/entities/data/character_spec.cpp
+++ b/entities/data/character_spec.cpp
@@ -26,46 +26,111 @@ SOFTWARE.
#include "../../defines.h"
-int CharacterSpec::get_id() {
+int CharacterSpec::get_id() const {
return _id;
}
-void CharacterSpec::set_id(int value) {
+void CharacterSpec::set_id(const int value) {
_id = value;
}
-int CharacterSpec::get_num_talent_rows() {
+int CharacterSpec::get_num_rows() const {
return _rows.size();
}
-void CharacterSpec::set_num_talent_rows(int value) {
+void CharacterSpec::set_num_rows(const int value) {
_rows.resize(value);
}
-Ref CharacterSpec::get_talent_row(int index) const {
- ERR_FAIL_INDEX_V(index, _rows.size(), Ref(NULL));
+int CharacterSpec::get_num_columns(const int row) const {
+ ERR_FAIL_INDEX_V(row, _rows.size(), 0);
- return _rows[index];
+ return _rows[row].size();
}
-void CharacterSpec::set_talent_row(const int index, const Ref row) {
- ERR_FAIL_INDEX(index, _rows.size());
+void CharacterSpec::set_num_columns(const int row, int value) {
+ ERR_FAIL_INDEX(row, _rows.size());
- _rows.set(index, row);
+ _rows.write[row].resize(value);
}
-Vector CharacterSpec::get_talent_rows() {
- VARIANT_ARRAY_GET(_rows);
+int CharacterSpec::get_num_ranks(const int row, const int column) const {
+ ERR_FAIL_INDEX_V(row, _rows.size(), 0);
+ ERR_FAIL_INDEX_V(column, _rows[row].size(), 0);
+
+ return _rows[row][column].size();
}
-void CharacterSpec::set_talent_rows(const Vector &talent_rows) {
- VARIANT_ARRAY_SET(talent_rows, _rows, TalentRowData);
+void CharacterSpec::set_num_ranks(const int row, const int column, int value) {
+ ERR_FAIL_INDEX(row, _rows.size());
+
+ _rows.write[row].write[column].resize(value);
}
-Ref CharacterSpec::get_talent(const int row_index, const int culomn, const int rank) const {
- ERR_FAIL_INDEX_V(row_index, _rows.size(), Ref(NULL));
+Vector CharacterSpec::get_talents() {
+ Vector r;
+ for (int i = 0; i < _rows.size(); i++) {
+ Vector col;
- if (_rows[row_index].is_valid()) {
- return _rows[row_index]->get_talent(culomn, rank);
+ for (int j = 0; j < _rows[i].size(); j++) {
+ Vector entries;
+
+ for (int k = 0; k < _rows[j].size(); k++) {
+#if GODOT4
+ entries.push_back(_rows[i][j][k]);
+#else
+ entries.push_back(_rows[i][j][k].get_ref_ptr());
+#endif
+ }
+
+ col.push_back(entries);
+ }
+
+ r.push_back(col);
}
- return Ref(NULL);
+ return r;
+}
+
+Ref CharacterSpec::get_talent(const int row, const int column, const int rank) {
+ ERR_FAIL_INDEX_V(row, _rows.size(), Ref());
+ ERR_FAIL_INDEX_V(column, _rows[row].size(), Ref());
+ ERR_FAIL_INDEX_V(rank, _rows[row][column].size(), Ref());
+
+ return _rows[row][column][rank];
+}
+void CharacterSpec::set_talent(const int row, const int column, const int rank, const Ref &talent) {
+ ERR_FAIL_INDEX(row, _rows.size());
+ ERR_FAIL_INDEX(column, _rows[row].size());
+ ERR_FAIL_INDEX(rank, _rows[row][column].size());
+
+ _rows.write[row].write[column].write[rank] = talent;
+}
+
+bool CharacterSpec::has_talent_with_id(const int id) {
+ for (int i = 0; i < _rows.size(); ++i) {
+ for (int j = 0; j < _rows[i].size(); ++j) {
+ for (int k = 0; k < _rows[i][j].size(); ++k) {
+ const Ref a = _rows[i][j][k];
+
+ if (a.is_valid() && a->get_id() == id)
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+Ref CharacterSpec::get_talent_with_id(const int id) {
+ for (int i = 0; i < _rows.size(); ++i) {
+ for (int j = 0; j < _rows[i].size(); ++j) {
+ for (int k = 0; k < _rows[i][j].size(); ++k) {
+ const Ref a = _rows[i][j][k];
+
+ if (a.is_valid() && a->get_id() == id)
+ return a;
+ }
+ }
+ }
+
+ return Ref();
}
CharacterSpec::CharacterSpec() {
@@ -73,9 +138,128 @@ CharacterSpec::CharacterSpec() {
}
CharacterSpec::~CharacterSpec() {
+ for (int i = 0; i < _rows.size(); ++i) {
+ for (int j = 0; j < _rows[i].size(); ++j) {
+ for (int k = 0; k < _rows[i][j].size(); ++k) {
+ _rows.write[i].write[j].write[k].unref();
+ }
+ }
+ }
+
_rows.clear();
}
+bool CharacterSpec::_set(const StringName &p_name, const Variant &p_value) {
+ String name = p_name;
+
+ if (name.begins_with("row_")) {
+ String nprop = name.get_slicec('/', 0); //row_[]
+ int row_id = nprop.get_slicec('_', 1).to_int();
+
+ if (row_id >= _rows.size()) {
+ _rows.resize(row_id + 1);
+ }
+
+ String cprop = name.get_slicec('/', 1); //column_[] or size
+
+ if (cprop == "size") {
+ _rows.write[row_id].resize(p_value);
+
+ return true;
+ } else {
+ int col_id = cprop.get_slicec('_', 1).to_int();
+
+ if (col_id >= _rows[row_id].size()) {
+ _rows.write[row_id].resize(col_id + 1);
+ }
+
+ String eprop = name.get_slicec('/', 2); //entry_[] or size
+
+ if (eprop == "size") {
+ _rows.write[row_id].write[col_id].resize(p_value);
+
+ return true;
+ } else {
+ int entry_id = eprop.get_slicec('_', 1).to_int();
+
+ if (entry_id >= _rows[row_id][col_id].size()) {
+ _rows.write[row_id].write[col_id].resize(col_id + 1);
+ }
+
+ _rows.write[row_id].write[col_id].write[entry_id] = p_value;
+
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+bool CharacterSpec::_get(const StringName &p_name, Variant &r_ret) const {
+ String name = p_name;
+
+ if (name.begins_with("row_")) {
+ String nprop = name.get_slicec('/', 0); //row_[]
+ int row_id = nprop.get_slicec('_', 1).to_int();
+
+ if (row_id >= _rows.size()) {
+ return false;
+ }
+
+ String cprop = name.get_slicec('/', 1); //column_[] or size
+
+ if (cprop == "size") {
+ r_ret = _rows[row_id].size();
+
+ return true;
+ } else {
+ int col_id = cprop.get_slicec('_', 1).to_int();
+
+ if (col_id >= _rows[row_id].size()) {
+ return false;
+ }
+
+ String eprop = name.get_slicec('/', 2); //entry_[] or size
+
+ if (eprop == "size") {
+ r_ret = _rows[row_id][col_id].size();
+
+ return true;
+ } else {
+
+ int entry_id = eprop.get_slicec('_', 1).to_int();
+
+ if (entry_id >= _rows[row_id][col_id].size()) {
+ return false;
+ }
+
+ r_ret = _rows[row_id][col_id][entry_id];
+
+ return true;
+ }
+ }
+ } else {
+ return false;
+ }
+
+ return false;
+}
+
+void CharacterSpec::_get_property_list(List *p_list) const {
+ for (int i = 0; i < _rows.size(); ++i) {
+ p_list->push_back(PropertyInfo(Variant::INT, "row_" + itos(i) + "/size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED));
+
+ for (int j = 0; j < _rows[i].size(); ++j) {
+ p_list->push_back(PropertyInfo(Variant::INT, "row_" + itos(i) + "/column_" + itos(j) + "/size", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED));
+
+ for (int k = 0; k < _rows[i][j].size(); ++k) {
+ p_list->push_back(PropertyInfo(Variant::OBJECT, "row_" + itos(i) + "/column_" + itos(j) + "/entry_" + itos(k), PROPERTY_HINT_RESOURCE_TYPE, "Aura", PROPERTY_USAGE_DEFAULT));
+ }
+ }
+ }
+}
+
void CharacterSpec::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_id"), &CharacterSpec::get_id);
ClassDB::bind_method(D_METHOD("set_id", "value"), &CharacterSpec::set_id);
@@ -83,15 +267,21 @@ void CharacterSpec::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text_name"), "set_name", "get_name");
- ClassDB::bind_method(D_METHOD("get_num_talent_rows"), &CharacterSpec::get_num_talent_rows);
- ClassDB::bind_method(D_METHOD("set_num_talent_rows", "value"), &CharacterSpec::set_num_talent_rows);
+ ClassDB::bind_method(D_METHOD("get_num_rows"), &CharacterSpec::get_num_rows);
+ ClassDB::bind_method(D_METHOD("set_num_rows", "value"), &CharacterSpec::set_num_rows);
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "num_rows", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), "set_num_rows", "get_num_rows");
- ClassDB::bind_method(D_METHOD("get_talent_row", "index"), &CharacterSpec::get_talent_row);
- ClassDB::bind_method(D_METHOD("set_talent_row", "index", "row"), &CharacterSpec::set_talent_row);
+ ClassDB::bind_method(D_METHOD("get_num_columns", "row"), &CharacterSpec::get_num_columns);
+ ClassDB::bind_method(D_METHOD("set_num_columns", "row", "value"), &CharacterSpec::set_num_columns);
- ClassDB::bind_method(D_METHOD("get_talent", "row_index", "culomn", "rank"), &CharacterSpec::get_talent);
+ ClassDB::bind_method(D_METHOD("get_num_ranks", "row", "culomn"), &CharacterSpec::get_num_ranks);
+ ClassDB::bind_method(D_METHOD("set_num_ranks", "row", "culomn", "value"), &CharacterSpec::set_num_ranks);
- ClassDB::bind_method(D_METHOD("get_talent_rows"), &CharacterSpec::get_talent_rows);
- ClassDB::bind_method(D_METHOD("set_talent_rows", "auras"), &CharacterSpec::set_talent_rows);
- ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "talent_rows", PROPERTY_HINT_NONE, "17/17:TalentRowData", PROPERTY_USAGE_DEFAULT, "TalentRowData"), "set_talent_rows", "get_talent_rows");
+ ClassDB::bind_method(D_METHOD("get_talents"), &CharacterSpec::get_talents);
+
+ ClassDB::bind_method(D_METHOD("get_talent", "row", "culomn", "rank"), &CharacterSpec::get_talent);
+ ClassDB::bind_method(D_METHOD("set_talent", "row", "culomn", "rank"), &CharacterSpec::set_talent);
+
+ ClassDB::bind_method(D_METHOD("has_talent_with_id", "id"), &CharacterSpec::has_talent_with_id);
+ ClassDB::bind_method(D_METHOD("get_talent_with_id", "id"), &CharacterSpec::get_talent_with_id);
}
diff --git a/entities/data/character_spec.h b/entities/data/character_spec.h
index 1150251..ca84aa7 100644
--- a/entities/data/character_spec.h
+++ b/entities/data/character_spec.h
@@ -27,38 +27,44 @@ SOFTWARE.
#include "core/ustring.h"
#include "core/vector.h"
-#include "talent_row_data.h"
-
-class TalentRowData;
class Aura;
class CharacterSpec : public Resource {
GDCLASS(CharacterSpec, Resource);
public:
- int get_id();
- void set_id(int value);
+ int get_id() const;
+ void set_id(const int value);
- int get_num_talent_rows();
- void set_num_talent_rows(int value);
+ int get_num_rows() const;
+ void set_num_rows(const int value);
- Ref get_talent_row(int index) const;
- void set_talent_row(const int index, const Ref row);
+ int get_num_columns(const int row) const;
+ void set_num_columns(const int row, int value);
- Vector get_talent_rows();
- void set_talent_rows(const Vector &auras);
+ int get_num_ranks(const int row, const int column) const;
+ void set_num_ranks(const int row, const int column, int value);
- Ref get_talent(const int row_index, const int culomn, const int rank) const;
+ Vector get_talents();
+
+ Ref get_talent(const int row, const int column, const int rank);
+ void set_talent(const int row, const int column, const int rank, const Ref &talent);
+
+ bool has_talent_with_id(const int id);
+ Ref get_talent_with_id(const int id);
CharacterSpec();
~CharacterSpec();
protected:
+ bool _set(const StringName &p_name, const Variant &p_value);
+ bool _get(const StringName &p_name, Variant &r_ret) const;
+ void _get_property_list(List *p_list) const;
static void _bind_methods();
private:
int _id;
- Vector[ > _rows;
+ Vector > > > _rows;
};
#endif
diff --git a/entities/data/talent_row_data.cpp b/entities/data/talent_row_data.cpp
deleted file mode 100644
index e50aa5f..0000000
--- a/entities/data/talent_row_data.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-Copyright (c) 2019-2020 Péter Magyar
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-#include "talent_row_data.h"
-
-Ref TalentRowData::get_talent_index(int index) const {
- ERR_FAIL_INDEX_V(index, TOTAL_ENTRIES, Ref());
-
- return _talents[index];
-}
-
-void TalentRowData::set_talent_index(int index, Ref talent) {
- ERR_FAIL_INDEX(index, TOTAL_ENTRIES);
-
- _talents[index] = Ref(talent);
-}
-
-Ref TalentRowData::get_talent(int culomn, int rank) const {
- ERR_FAIL_INDEX_V(culomn, MAX_TALENTS_IN_ROW, Ref());
- ERR_FAIL_INDEX_V(rank, MAX_TALENTS_PER_ENTRY, Ref());
-
- return _talents[culomn * MAX_TALENTS_IN_ROW + rank];
-}
-void TalentRowData::set_talent(int culomn, int rank, Ref talent) {
- ERR_FAIL_INDEX(culomn, MAX_TALENTS_IN_ROW);
- ERR_FAIL_INDEX(rank, MAX_TALENTS_PER_ENTRY);
-
- _talents[culomn * MAX_TALENTS_IN_ROW + rank] = talent;
-}
-
-bool TalentRowData::has_talent_with_id(int id) {
- for (int i = 0; i < TOTAL_ENTRIES; ++i) {
- if (_talents[i].is_valid() && _talents[i]->get_id() == id)
- return true;
- }
-
- return false;
-}
-
-Ref TalentRowData::get_talent_with_id(int id) {
- for (int i = 0; i < TOTAL_ENTRIES; ++i) {
- if (_talents[i].is_valid() && _talents[i]->get_id() == id)
- return _talents[i];
- }
-
- return Ref();
-}
-
-TalentRowData::TalentRowData() {
-}
-TalentRowData::~TalentRowData() {
- for (int i = 0; i < TOTAL_ENTRIES; ++i) {
- _talents[i].unref();
- }
-}
-
-void TalentRowData::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_talent_index", "index"), &TalentRowData::get_talent_index);
- ClassDB::bind_method(D_METHOD("set_talent_index", "index", "value"), &TalentRowData::set_talent_index);
-
- ClassDB::bind_method(D_METHOD("get_talent", "culomn", "rank"), &TalentRowData::get_talent);
- ClassDB::bind_method(D_METHOD("set_talent", "culomn", "rank", "talent"), &TalentRowData::set_talent);
-
- ClassDB::bind_method(D_METHOD("has_talent_with_id", "id"), &TalentRowData::has_talent_with_id);
- ClassDB::bind_method(D_METHOD("get_talent_with_id", "id"), &TalentRowData::get_talent_with_id);
-
- for (int i = 0; i < MAX_TALENTS_IN_ROW; ++i) {
- for (int j = 0; j < MAX_TALENTS_PER_ENTRY; ++j) {
- ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "Talent_" + itos(i) + "_" + itos(j), PROPERTY_HINT_RESOURCE_TYPE, "Aura", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_INTERNAL), "set_talent_index", "get_talent_index", i * MAX_TALENTS_IN_ROW + j);
- }
- }
-
- BIND_CONSTANT(MAX_TALENTS_IN_ROW);
- BIND_CONSTANT(MAX_TALENTS_PER_ENTRY);
- BIND_CONSTANT(TOTAL_ENTRIES);
-}
diff --git a/entities/data/talent_row_data.h b/entities/data/talent_row_data.h
deleted file mode 100644
index fe719d6..0000000
--- a/entities/data/talent_row_data.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-Copyright (c) 2019-2020 Péter Magyar
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-*/
-
-#ifndef TALENT_ROW_DATA_H
-#define TALENT_ROW_DATA_H
-
-#include "core/reference.h"
-#include "core/ustring.h"
-
-#include "../../data/auras/aura.h"
-
-class Aura;
-
-class TalentRowData : public Resource {
- GDCLASS(TalentRowData, Resource);
-
-public:
- Ref get_talent_index(int index) const;
- void set_talent_index(int index, Ref talent);
-
- Ref get_talent(int culomn, int rank) const;
- void set_talent(int culomn, int rank, Ref talent);
-
- bool has_talent_with_id(int id);
- Ref get_talent_with_id(int id);
-
- TalentRowData();
- ~TalentRowData();
-
-public:
- enum {
- MAX_TALENTS_IN_ROW = 5,
- MAX_TALENTS_PER_ENTRY = 5,
- TOTAL_ENTRIES = MAX_TALENTS_IN_ROW * MAX_TALENTS_PER_ENTRY,
- };
-
-protected:
- static void _bind_methods();
-
-private:
- Ref _talents[TOTAL_ENTRIES];
-};
-
-#endif
diff --git a/entities/entity.cpp b/entities/entity.cpp
index 5375d32..1e5a109 100644
--- a/entities/entity.cpp
+++ b/entities/entity.cpp
@@ -35,7 +35,6 @@ SOFTWARE.
#include "../pipelines/spell_heal_info.h"
#include "../profiles/class_profile.h"
#include "./data/character_spec.h"
-#include "./data/talent_row_data.h"
#include "./resources/entity_resource_health.h"
#include "./resources/entity_resource_speed.h"
#include "./skills/entity_skill.h"
@@ -4775,12 +4774,8 @@ void Entity::_class_talent_sreceive_learn_request(int spec_index, int class_tale
ERR_FAIL_COND(!spec.is_valid());
- Ref tr = spec->get_talent_row(class_talent_row);
-
- ERR_FAIL_COND(!tr.is_valid());
-
- for (int i = 0; i < TalentRowData::MAX_TALENTS_PER_ENTRY; ++i) {
- Ref class_talent = tr->get_talent(class_talent_culomn, i);
+ for (int i = 0; i < spec->get_num_ranks(class_talent_row, class_talent_culomn); ++i) {
+ Ref class_talent = spec->get_talent(class_talent_row, class_talent_culomn, i);
if (!class_talent.is_valid())
return;
@@ -4803,7 +4798,7 @@ void Entity::_class_talent_sreceive_learn_request(int spec_index, int class_tale
}
if (i > 0) {
- Ref pt = tr->get_talent(class_talent_culomn, i - 1);
+ Ref pt = spec->get_talent(class_talent_row, class_talent_culomn, i - 1);
for (int j = 0; j < aura_gets_count(); ++j) {
Ref ad = aura_gets(j);
@@ -4998,12 +4993,10 @@ void Entity::_character_talent_sreceive_learn_request(int spec_index, int charac
ERR_FAIL_COND(!spec.is_valid());
- Ref tr = spec->get_talent_row(character_talent_row);
+ ERR_FAIL_COND(!spec.is_valid());
- ERR_FAIL_COND(!tr.is_valid());
-
- for (int i = 0; i < TalentRowData::MAX_TALENTS_PER_ENTRY; ++i) {
- Ref character_talent = tr->get_talent(character_talent_culomn, i);
+ for (int i = 0; i < spec->get_num_ranks(character_talent_row, character_talent_culomn); ++i) {
+ Ref character_talent = spec->get_talent(character_talent_row, character_talent_culomn, i);
if (!character_talent.is_valid())
return;
@@ -5026,7 +5019,7 @@ void Entity::_character_talent_sreceive_learn_request(int spec_index, int charac
}
if (i > 0) {
- Ref pt = tr->get_talent(character_talent_culomn, i - 1);
+ Ref pt = spec->get_talent(character_talent_row, character_talent_culomn, i - 1);
for (int j = 0; j < aura_gets_count(); ++j) {
Ref ad = aura_gets(j);
@@ -6467,7 +6460,7 @@ bool Entity::_set(const StringName &p_name, const Variant &p_value) {
return false;
}
- return true;
+ return false;
/*
sets_entity_type((int)((int)dict.get("type", 0)));
@@ -6756,7 +6749,7 @@ bool Entity::_get(const StringName &p_name, Variant &r_ret) const {
return false;
}
- return true;
+ return false;
/*
Dictionary dict;
diff --git a/register_types.cpp b/register_types.cpp
index 0118e10..7aebbf4 100644
--- a/register_types.cpp
+++ b/register_types.cpp
@@ -49,7 +49,6 @@ SOFTWARE.
#include "entities/skills/entity_skill_data.h"
#include "entities/data/character_spec.h"
-#include "entities/data/talent_row_data.h"
#include "data/items/model_visual.h"
#include "data/items/model_visual_entry.h"
@@ -174,7 +173,6 @@ void register_entity_spell_system_types() {
ClassDB::register_class();
ClassDB::register_class();
ClassDB::register_class();
- ClassDB::register_class();
ClassDB::register_class();
]