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

Added Loyalty System (10.74) #4636

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

reyaleman
Copy link
Contributor

Pull Request Prelude

Changes Proposed

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


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

Check warning

Code scanning / CodeQL

Comparison result is always the same Warning

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 Warning

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 Warning

Comparison is always false because skill >= 0.
@@ -140,7 +140,7 @@

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 Warning

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 Note

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 Note

Variable _ is not used.
schema.sql Outdated Show resolved Hide resolved
data/migrations/36.lua Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants