mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Entity's character level up uses the new system now aswell.
This commit is contained in:
parent
aa5cec5071
commit
2c99111860
@ -6478,12 +6478,10 @@ void Entity::_son_character_level_up(int level) {
|
|||||||
if (!ecd.is_valid())
|
if (!ecd.is_valid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0; i < Stat::MAIN_STAT_ID_COUNT; ++i) {
|
for (int i = 0; i < ESS::get_instance()->stat_get_main_stat_count(); ++i) {
|
||||||
int st = gets_entity_data()->get_entity_class_data()->get_stat_data()->get_level_stat_data()->get_stat_diff(i, gets_character_level() - level, gets_character_level());
|
int st = gets_entity_data()->get_entity_class_data()->get_stat_data()->get_level_stat_data()->get_stat_diff(i, gets_character_level() - level, gets_character_level());
|
||||||
|
|
||||||
int statid = i + Stat::MAIN_STAT_ID_START;
|
Ref<Stat> stat = get_stat(i);
|
||||||
|
|
||||||
Ref<Stat> stat = get_stat(statid);
|
|
||||||
|
|
||||||
Ref<StatModifier> sm = stat->get_modifier(0);
|
Ref<StatModifier> sm = stat->get_modifier(0);
|
||||||
sm->set_base_mod(sm->get_base_mod() + st);
|
sm->set_base_mod(sm->get_base_mod() + st);
|
||||||
|
Loading…
Reference in New Issue
Block a user