-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix item distribution on level tresholds #848
Conversation
attempt at fixing shiny charm acquisition and changing shinyness
}, | ||
async changeAutoFeed(id, mode) { | ||
let shinx = await this.getShinx(id, ['user_id', 'auto_feed']); | ||
return shinx.setAutoFeed(mode); | ||
}, | ||
async addExperience(id, experience) { | ||
let shinx = await this.getShinx(id, ['user_id', 'experience']); | ||
let shinx = await this.getShinx(id, ['user_id', 'experience', 'level']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Level is determined from the EXP count instead of being stored seperately so it doesn't really make sense to pass that in the arguments.
Level is calculated here: https://github.com/Glazelf/NinigiBot/blob/4b1e535883475dbf3293e34b36c4e2660619d76c/util/shinx/getExpFromLevel.js
Also doesn't look like you're using the level anyways so idk.
return shinx.switchShininessAndGet(); | ||
let user = await this.getUser(id, ['user_id']); | ||
let hasShinyCharm = await this.hasEventTrophy(user.user_id, 'Shiny Charm'); | ||
if (hasShinyCharm) { | ||
return shinx.switchShininessAndGet(); | ||
} else { | ||
throw new Error('User does not have the Shiny Charm'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've gathered this bug is not in the functionality for switching between shiny and non-shiny.
This seems to work correctly already.
The bug seems to be in users not receiving a shiny charm, or any level-up rewards, when reaching the required level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will look into it tomorrow if i remember
Going to close this in favor of #849. |
MIGHT fix #838, not sure just test it bruh idk anymore im dead inside