Skip to content

Commit

Permalink
fix: apply animus mastery exp multiplier independently of unlocked
Browse files Browse the repository at this point in the history
  • Loading branch information
FelipePaluco committed Jan 17, 2025
1 parent a3e4689 commit 4bfd4ee
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3120,13 +3120,8 @@ void Player::addExperience(const std::shared_ptr<Creature> &target, uint64_t exp
float animusMasteryMultiplier = 0;

if (handleAnimusMastery) {
auto mType = g_monsters().getMonsterType(monster->getName());
uint32_t killCounter = this->getBestiaryKillCount(mType->info.raceid);
uint8_t currentLevel = g_iobestiary().getKillStatus(mType, killCounter);
if (currentLevel > 3) {
animusMasteryMultiplier = animusMastery().getExperienceMultiplier();
exp *= animusMasteryMultiplier;
}
animusMasteryMultiplier = animusMastery().getExperienceMultiplier();
exp *= animusMasteryMultiplier;
}

experience += exp;
Expand All @@ -3140,7 +3135,7 @@ void Player::addExperience(const std::shared_ptr<Creature> &target, uint64_t exp
}
}

if (handleAnimusMastery && animusMasteryMultiplier > 0) {
if (handleAnimusMastery) {
expString = fmt::format("{} (animus mastery bonus {:.1f}%)", expString, (animusMasteryMultiplier - 1) * 100);
}

Expand Down

0 comments on commit 4bfd4ee

Please sign in to comment.