Skip to content

Added Loyalty System (10.74) - #4636

Open
reyaleman wants to merge 9 commits into
otland:masterfrom
reyaleman:loyalty-system
Open

Added Loyalty System (10.74)#4636
reyaleman wants to merge 9 commits into
otland:masterfrom
reyaleman:loyalty-system

Conversation

@reyaleman

Copy link
Copy Markdown
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
Comment thread src/player.cpp

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.
Comment thread src/vocation.cpp

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.
Comment thread src/vocation.cpp

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.
Comment thread src/vocation.cpp
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.
Comment thread src/configmanager.cpp
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.
Comment thread src/configmanager.cpp
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.
Comment thread schema.sql Outdated
Comment thread data/migrations/36.lua Outdated
@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.

5 participants