Add destructor to simple level stat data.

This commit is contained in:
Relintai 2020-04-25 19:32:50 +02:00
parent 2c99111860
commit 9ede69c7b4
2 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,10 @@ SimpleLevelStatData::SimpleLevelStatData() {
}
}
SimpleLevelStatData::~SimpleLevelStatData() {
_stat_per_level.clear();
}
bool SimpleLevelStatData::_set(const StringName &p_name, const Variant &p_value) {
if (ESS::get_instance()->stat_is_property(p_name)) {
int stat_id = ESS::get_instance()->stat_get_property_id(p_name);

View File

@ -37,6 +37,7 @@ public:
int _get_stat_diff(int stat, int old_level, int new_level);
SimpleLevelStatData();
~SimpleLevelStatData();
protected:
bool _set(const StringName &p_name, const Variant &p_value);