azerothcore / azerothcore/mod-progression-system
Progression-System Rework
- Dominant language
- C++
- Stars
- 82
- Forks
- 68
- Avg merge
- 59m
- Merged PRs (30d)
- 10
Description
## How the system currently works:
Each applied SQL gets saved to the database with a hash value. If the SQL file gets changed and thus the hash changes as well, the SQL file will get re-applied.
This often brings problems when updating files in the progression-system.
For example: We update a file in the 10-19 bracket which removes NPCs, but don't update the SQL which would respawn them in the 20-29 bracket. The server will now re-apply the first SQL file, deleting the NPCs again but not re-apply the other SQL to spawn them in again. This leads to all sorts of weird issues where you need to double check every SQL you change for possible regressions.
This also leads to some developers making new SQL files instead of updating old ones, which severely impact the readability of the whole module. For example: certain brackets now have 2 or more SQL files which spawn/despawn NPCs because its too much of a hassle to update both and deal with possible weird behaviours.
## What we should do:
There are several ways which the system could be reworked. From internal talks the general opinion seems to be that the system should apply every SQL from 0-10 up to the currently selected bracket on every startup and get rid of the hash checks. This would impact startup times of the server slightly but since all SQL files SHOULD be re-applicable this would result in no more weird behaviours when updating.
If whoever gets to work on this has a different opinion about this though, or a different idea how the problems could be fixed feel free to propose those ideas first before working on a solution.
Contributor guide
No contributing guide indexed for this repository
Research direction
No source files or tests are named. Start by locating the progression-system startup path and the hash-check logic that applies SQL through the selected bracket; define the chosen redesign and verify that startup behavior no longer causes cross-bracket regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100