Core Code Structure

Most cores follow the exact same file structure, with only minor variations.

For TSWoW, the core is not stored in the root repository, but inside a submodule that contains the same structure as a normal core.

  • Repository Root: readme, licensing information, entrypoint for CMake and various other configuration files.
    • .circleci/.github: Scripts relating to building the core automatically on the GitHub repository.
      • Rarely relevant for developers
    • cmake: Scripts relating to setting up the build system and finding libraries that the core depends on.
      • Occasionally relevant for developers
    • contrib : Various other scripts
      • Rarely relevant for developers
    • dep: Third-party libraries that ship with the core, rarely touched
    • doc: Old documentation, rarely touched
    • sql: SQL files used to set up the servers databases
    • tests: Automatic tests
    • src: The actual server source code
      • common: Code used across multiple components in the core, such as cryptography functions, logging and networking.
      • genrev: A single cmake script used to generate revision information from the git repository.
      • tools: Code for DBC/Map/VMAP/MMAP extractors
      • server: Code used for the worldserver/authserver.
        • authserver: Code building the authserver executable
        • worldserver: Code building the worldserver executable (does not contain gameplay code)
        • database: Code used for interacting with the database (used by both authserver and worldserver)
        • shared: Similar to the common library, but more specifically for authserver/worldserver stuff.
        • scripts: Code used to script specific behavior in the game, such as very specific spells, dungeon bosses, instances, battlegrounds and chat commands.
        • game: Contains all primary game logic, by far the most important directory in the entire core.
          • Usually split into various modules and subsystems, see Core Modules.