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

Refactor VIP_SCRIPT checking #8144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vstumpf
Copy link
Member

@vstumpf vstumpf commented Feb 19, 2024

  • Server Mode: Both
  • Description of Pull Request: Deprecate VIP_SCRIPT, use vip_is_enabled(CHK_VIP_SCRIPT) instead
    When these vip options become configuration, the values of the script constants would change. Since we can't change the value of these constants, we should instead call a function. Right now, it still uses compile-time definitions, but eventually we can change it to pull from a configuration.

sammeepay added a commit to sammeepay/rathena-edit-custom-npcthai that referenced this pull request Feb 24, 2024
Copy link
Member

@Lemongrass3110 Lemongrass3110 left a comment

Choose a reason for hiding this comment

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

I like the idea, but I am against this approach.

Please use script command getbattleflag instead.

@@ -30,7 +30,7 @@
export_constant(MAX_GUILD_STORAGE);
export_constant(MAX_BG_MEMBERS);
export_constant(MAX_CHAT_USERS);
export_constant(VIP_SCRIPT);
export_deprecated_constant(VIP_SCRIPT);
Copy link
Member

Choose a reason for hiding this comment

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

We could sync the constant with the config value.
Then this PR would become a lot smaller and would enable your desired changes as well.

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

2 participants