Skip to content

Allow character command at low level if they have alts #350

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

Volte6
Copy link
Member

@Volte6 Volte6 commented Apr 27, 2025

Description

The character command only works at level 5 and above. Creating an alt makes them level 1, not allowing them to switch back to their original character.

This fixes it.

Changes

  • Command works at level 5 OR if they have alt characters in storage.

Issues

#349

@Jasrags Jasrags requested a review from Copilot April 28, 2025 01:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables low-level users with alternate characters to use the "character" command.

  • The command now validates that a user either has a character level of 5 or higher or possesses alternate characters.
  • The duplicate alt character loading logic has been removed in favor of a single initialization.
Comments suppressed due to low confidence (2)

internal/usercommands/character.go:54

  • [nitpick] Consider using a consistent variable to check for available alternates (either 'altNames' or 'nameToAlt') across the function to improve clarity.
if user.Character.Level < 5 && len(nameToAlt) < 1 {

internal/usercommands/character.go:73

  • [nitpick] Since 'altNames' is already initialized outside and used to check for alternate characters in the prompt, consider refactoring to use this consistently rather than maintaining two separate representations.
if isNew {

@Volte6 Volte6 merged commit c2d849e into master Apr 28, 2025
1 check passed
@Volte6 Volte6 deleted the 349-alt-char-swap branch April 28, 2025 02:41
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.

3 participants