preserve exp when resetting materials; fixes #579
This commit is contained in:
@@ -1187,8 +1187,11 @@ void PSOBBCharacterFile::import_tethealla_material_usage(std::shared_ptr<const L
|
|||||||
|
|
||||||
void PSOBBCharacterFile::recompute_stats(std::shared_ptr<const LevelTable> level_table) {
|
void PSOBBCharacterFile::recompute_stats(std::shared_ptr<const LevelTable> level_table) {
|
||||||
uint32_t level = this->disp.stats.level;
|
uint32_t level = this->disp.stats.level;
|
||||||
|
uint32_t exp = this->disp.stats.experience;
|
||||||
level_table->reset_to_base(this->disp.stats, this->disp.visual.char_class);
|
level_table->reset_to_base(this->disp.stats, this->disp.visual.char_class);
|
||||||
level_table->advance_to_level(this->disp.stats, level, this->disp.visual.char_class);
|
level_table->advance_to_level(this->disp.stats, level, this->disp.visual.char_class);
|
||||||
|
this->disp.stats.experience = exp;
|
||||||
|
|
||||||
this->disp.stats.char_stats.atp += (this->get_material_usage(MaterialType::POWER) * 2);
|
this->disp.stats.char_stats.atp += (this->get_material_usage(MaterialType::POWER) * 2);
|
||||||
this->disp.stats.char_stats.mst += (this->get_material_usage(MaterialType::MIND) * 2);
|
this->disp.stats.char_stats.mst += (this->get_material_usage(MaterialType::MIND) * 2);
|
||||||
this->disp.stats.char_stats.evp += (this->get_material_usage(MaterialType::EVADE) * 2);
|
this->disp.stats.char_stats.evp += (this->get_material_usage(MaterialType::EVADE) * 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user