Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old skill boost migration code #40300

Merged
merged 1 commit into from
May 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3337,23 +3337,6 @@ void Character::die( Creature *nkiller )
void Character::apply_skill_boost()
{
for( const skill_boost &boost : skill_boost::get_all() ) {
// For migration, reset previously applied bonus.
// Remove after 0.E or so.
const std::string bonus_name = boost.stat() + std::string( "_bonus" );
std::string previous_bonus = get_value( bonus_name );
if( !previous_bonus.empty() ) {
if( boost.stat() == "str" ) {
str_max -= atoi( previous_bonus.c_str() );
} else if( boost.stat() == "dex" ) {
dex_max -= atoi( previous_bonus.c_str() );
} else if( boost.stat() == "int" ) {
int_max -= atoi( previous_bonus.c_str() );
} else if( boost.stat() == "per" ) {
per_max -= atoi( previous_bonus.c_str() );
}
remove_value( bonus_name );
}
// End migration code
int skill_total = 0;
for( const std::string &skill_str : boost.skills() ) {
skill_total += get_skill_level( skill_id( skill_str ) );
Expand Down