-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
feat: add event scheduler by json #3085
base: main
Are you sure you want to change the base?
Conversation
af9e0d0
to
e5eb93e
Compare
03f9c93
to
837bb04
Compare
0821470
to
ef78a00
Compare
can it be tested? |
yes |
Quality Gate passedIssues Measures |
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.
porem quando o jogador efetuar o login não informa no server log
parece que não está ativo
no event.json está configurado como no exemplo
{
"name": "50% Loot Bonus",
"startdate": "01/01/2025",
"enddate": "01/17/2025",
"ingame": {
"lootrate": 150
},
"description": "Increases loot by 50%.",
"colors": {
"colordark": "#2b1e10",
"colorlight": "#4a2e18"
},
"details": {
"displaypriority": 6,
"isseasonal": 0,
"specialevent": 1
}
},
Description
This PR introduces a new feature for the Event Scheduler system that enables it to read event configurations from a JSON file. This change modernizes and simplifies the way events are configured, moving away from XML files to a more developer-friendly JSON format. The update aims to improve readability, maintainability, and flexibility when managing event data.
Additionally, the new implementation enhances consistency by providing a unified approach for defining event details, loot tables, and other parameters. The JSON-based configuration also helps reduce parsing errors and makes the addition of new event properties easier.
New case from login.php (myaac):
Feature Highlights:
Behaviour
Actual
Currently, the Event Scheduler uses an XML file to manage events, which makes it more difficult to add or modify configurations due to the verbosity and inflexibility of XML.
Expected
The Event Scheduler should now use a JSON file (
events.json
) to manage events. JSON provides a more compact, readable, and maintainable structure for event configuration. Users should be able to add, edit, and manage events more easily with this new format.Type of change
How Has This Been Tested
Tests were conducted to ensure that the new JSON format loads correctly and events are scheduled as expected. The tests included validating successful parsing of the JSON file, checking the correct initialization of event properties, and ensuring existing functionality remains stable.
Checklist