Skip to content

Conversation

@Tereneckla
Copy link

Changes Proposed:

Cache the config value. Example code should show the best practices

@Yehonal Yehonal requested a review from Copilot October 15, 2025 16:38
Copy link

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 refactors configuration value access to use a caching mechanism instead of direct sConfigMgr calls, improving performance by avoiding repeated config lookups. The change demonstrates best practices for config value caching in the AzerothCore framework.

Key changes:

  • Introduces a config caching system using ConfigValueCache with enum-based config identifiers
  • Replaces direct sConfigMgr->GetOption calls with cached config value access
  • Adds proper initialization through a WorldScript hook

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants