Skip to content

Conversation

@reyaleman
Copy link
Contributor

Pull Request Prelude

Changes Proposed

Issues addressed:
#3871 Version 10.74 (The Loyalty System was introduced.)

@ghost ghost requested review from DSpeichert, EvilHero90, MillhioreBT and ranisalt March 14, 2024 16:52

void Player::setLoyaltyBonusSkill(uint8_t skill)
{
if (skill < SKILL_FIRST || skill > SKILL_LAST) {

Check warning

Code scanning / CodeQL

Comparison result is always the same

Comparison is always false because skill >= 0.

Skill Vocation::getSkillByAccumulatedTries(uint8_t skill, uint64_t tries)
{
if (skill < SKILL_FIRST || skill > SKILL_LAST) {

Check warning

Code scanning / CodeQL

Comparison result is always the same

Comparison is always false because skill >= 0.

uint64_t Vocation::getAccumulatedReqSkillTries(uint8_t skill, uint16_t level)
{
if (skill < SKILL_FIRST || skill > SKILL_LAST) {

Check warning

Code scanning / CodeQL

Comparison result is always the same

Comparison is always false because skill >= 0.
uint64_t Vocation::getReqSkillTries(uint8_t skill, uint16_t level)
{
if (skill > SKILL_LAST) {
if (skill < SKILL_FIRST || skill > SKILL_LAST) {

Check warning

Code scanning / CodeQL

Comparison result is always the same

Comparison is always false because skill >= 0.
float ConfigManager::getLoyaltyBonus(uint16_t points) const
{
auto it = std::find_if(loyaltyBonuses.begin(), loyaltyBonuses.end(), [points](auto&& bonus) {
auto&& [minPoints, maxPoints, _] = bonus;

Check notice

Code scanning / CodeQL

Unused local variable

Variable (unnamed local variable) is not used.
float ConfigManager::getLoyaltyBonus(uint16_t points) const
{
auto it = std::find_if(loyaltyBonuses.begin(), loyaltyBonuses.end(), [points](auto&& bonus) {
auto&& [minPoints, maxPoints, _] = bonus;

Check notice

Code scanning / CodeQL

Unused local variable

Variable _ is not used.
@EvilHero90 EvilHero90 added the feature New feature or functionality label Jun 2, 2024
@EvilHero90 EvilHero90 added this to the 1.8 milestone Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or functionality

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants