# jealous-sound/azerothcore-wotlk-coa architecture

> Architecture diagram of the GitHub repository jealous-sound/azerothcore-wotlk-coa, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jealous-sound/azerothcore-wotlk-coa
- Repository: https://github.com/jealous-sound/azerothcore-wotlk-coa

## Overview

AzerothCore is a modular World of Warcraft 3.3.5a MMORPG server framework. A player connects through the game client; the server handles session requests and runs world, character, combat, and loot behavior, returning game state to clients and persisting relevant data. The README documents customization through modules. The sampled code confirms query packet handling, grid terrain/object loading, threat management, player persistence, and stored-loot database operations; broader gameplay subsystems are represented at their enclosing source directory because their implementation was not sampled.

Main entry points: [`src/server/game/Grids/MapGridManager.cpp`](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp) (Maps and grids), [`src/server/game/Handlers/QueryHandler.cpp`](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Handlers/QueryHandler.cpp) (World session), [`src/server/game`](https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/src/server/game) (World runtime), [`src/server/game/Entities/Player/PlayerStorage.cpp`](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Entities/Player/PlayerStorage.cpp) (Player state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client interface"]
  node_gameclient["WoW client"]
  node_session["World session<br/>[QueryHandler.cpp]"]
  node_queries["World queries<br/>[QueryHandler.cpp]"]
end

subgraph group_runtime["World runtime"]
  node_world["World runtime"]
  node_maps["Maps and grids<br/>[MapGridManager.cpp]"]
  node_terrain["Terrain loading<br/>[MapGridManager.cpp]"]
  node_objects["World objects<br/>[MapGridManager.cpp]"]
end

subgraph group_gameplay["Gameplay systems"]
  node_characters["Player state<br/>[PlayerStorage.cpp]"]
  node_combat["Combat and threat<br/>[ThreatManager.cpp]"]
  node_loot["Loot handling"]
end

subgraph group_persistence["Persistence and extensions"]
  node_characterdb[("Character database<br/>[PlayerStorage.cpp]")]
  node_lootstore[("Stored loot")]
  node_worlddata[("World data")]
  node_modules["Custom modules"]
end

node_player(("Player"))

node_player -->|"plays through"| node_gameclient
node_gameclient -->|"sends packets"| node_session
node_session -->|"dispatches queries"| node_queries
node_queries -->|"sends responses"| node_gameclient
node_world -->|"manages maps"| node_maps
node_maps -->|"loads terrain"| node_terrain
node_maps -->|"loads objects"| node_objects
node_characters -->|"executes persistence"| node_characterdb
node_loot -->|"stores and loads"| node_lootstore
node_modules -.->|"extends server"| node_world

click node_session "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Handlers/QueryHandler.cpp"
click node_queries "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Handlers/QueryHandler.cpp"
click node_world "https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/src/server/game"
click node_maps "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp"
click node_terrain "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp"
click node_objects "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp"
click node_characters "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Entities/Player/PlayerStorage.cpp"
click node_combat "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Combat/ThreatManager.cpp"
click node_loot "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Loot/LootItemStorage.cpp"
click node_characterdb "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Entities/Player/PlayerStorage.cpp"
click node_lootstore "https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Loot/LootItemStorage.cpp"
click node_worlddata "https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/src/server/game"
click node_modules "https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/modules"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_gameclient,node_session,node_queries toneBlue
class node_world,node_maps,node_terrain,node_objects toneAmber
class node_characters,node_combat,node_loot toneMint
class node_characterdb,node_lootstore,node_worlddata,node_modules toneRose
class node_player toneIndigo
```

## Components

### Client interface

- **WoW client**
- [World session](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Handlers/QueryHandler.cpp): `src/server/game/Handlers/QueryHandler.cpp`
- [World queries](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Handlers/QueryHandler.cpp): `src/server/game/Handlers/QueryHandler.cpp`

### World runtime

- [World runtime](https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/src/server/game): `src/server/game`
- [Maps and grids](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp): `src/server/game/Grids/MapGridManager.cpp`
- [Terrain loading](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp): `src/server/game/Grids/MapGridManager.cpp`
- [World objects](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Grids/MapGridManager.cpp): `src/server/game/Grids/MapGridManager.cpp`

### Gameplay systems

- [Player state](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Entities/Player/PlayerStorage.cpp): `src/server/game/Entities/Player/PlayerStorage.cpp`
- [Combat and threat](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Combat/ThreatManager.cpp): `src/server/game/Combat/ThreatManager.cpp`
- [Loot handling](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Loot/LootItemStorage.cpp): `src/server/game/Loot/LootItemStorage.cpp`

### Persistence and extensions

- [Character database](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Entities/Player/PlayerStorage.cpp): `src/server/game/Entities/Player/PlayerStorage.cpp`
- [Stored loot](https://github.com/jealous-sound/azerothcore-wotlk-coa/blob/main/src/server/game/Loot/LootItemStorage.cpp): `src/server/game/Loot/LootItemStorage.cpp`
- [World data](https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/src/server/game): `src/server/game`
- [Custom modules](https://github.com/jealous-sound/azerothcore-wotlk-coa/tree/main/modules): `modules`

### Other components

- **Player**

## Connections

- Player → WoW client: plays through
- WoW client → World session: sends packets
- World session → World queries: dispatches queries
- World queries → WoW client: sends responses
- World runtime → Maps and grids: manages maps
- Maps and grids → Terrain loading: loads terrain
- Maps and grids → World objects: loads objects
- Player state → Character database: executes persistence
- Loot handling → Stored loot: stores and loads
- Custom modules → World runtime: extends server
