From ec789f1b874f47f78af5416fd35b0f44a0f1a986 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 31 Jul 2022 00:19:25 +0200 Subject: [PATCH] Fixed the property validation for aura triggers and aura stat attributes in Spell. --- modules/entity_spell_system/data/spells/spell.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/entity_spell_system/data/spells/spell.cpp b/modules/entity_spell_system/data/spells/spell.cpp index 95fe98388..cf5c241e4 100644 --- a/modules/entity_spell_system/data/spells/spell.cpp +++ b/modules/entity_spell_system/data/spells/spell.cpp @@ -2278,23 +2278,26 @@ void Spell::_validate_property(PropertyInfo &property) const { String prop = property.name; if (prop.begins_with("aura_stat_attribute_")) { - if (prop.ends_with("count")) + if (prop.ends_with("count")) { return; + } - int frame = prop.get_slicec('/', 0).get_slicec('_', 2).to_int(); + int frame = prop.get_slicec('/', 0).get_slicec('_', 3).to_int(); if (frame >= _aura_stat_attribute_count) { property.usage = 0; } - if (property.name.ends_with("stat")) + if (property.name.ends_with("stat")) { property.hint_string = ESS::get_singleton()->stat_get_string(); + } } else if (prop == "diminishing_return_category") { property.hint_string = ESS::get_singleton()->dminishing_return_categories_get(); } else if (prop.begins_with("aura_trigger_")) { - if (prop.ends_with("count")) + if (prop.ends_with("count")) { return; + } - int frame = prop.get_slicec('/', 0).get_slicec('_', 1).to_int(); + int frame = prop.get_slicec('/', 0).get_slicec('_', 2).to_int(); if (frame >= _aura_trigger_count) { property.usage = 0; } else {