From a51bfee00ebdc64e7fd81548199d66d5c8d05df0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Sat, 8 Aug 2026 10:14:44 +0200 Subject: [PATCH] docs(Agents): add script conventions to cpp-scripts.md (#26962) --- .agents/docs/cpp-scripts.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.agents/docs/cpp-scripts.md b/.agents/docs/cpp-scripts.md index dfa91e39b..3eb5ee0d8 100644 --- a/.agents/docs/cpp-scripts.md +++ b/.agents/docs/cpp-scripts.md @@ -11,4 +11,8 @@ Then declare and call `AddSC_()` from the regional loader (`Spells/spells_ **Module hooks** (e.g. `OnPlayerLogin`, `OnWorldUpdate`, `OnSpellCast`) are declared in `src/server/game/Scripting/ScriptDefines/*.h`. Implement by inheriting the matching base (`PlayerScript`, `WorldScript`, …) and registering with `new MyClass();` (or its `RegisterXxxScript` macro) inside `AddSC_()`. Full list: https://www.azerothcore.org/wiki/hooks-script. +**Conventions:** + +- Script ids (action/event/data/phase) get named enum entries — never raw literals, even when the file already uses them: add the entry and convert that literal's every call site and handler in the same change. + Custom (non-upstream) scripts go in `src/server/scripts/Custom/` (gitignored).