docs(Agents): VerifiedBuild stamping and DoCast helper rules (#27396)

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This commit is contained in:
Andrew
2026-08-30 20:16:10 -03:00
committed by GitHub
co-authored by Copilot Autofix powered by AI
parent 83cf15628c
commit e5c4f2b09c
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@ Then declare and call `AddSC_<name>()` from the regional loader (`Spells/spells_
**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.
- In AI code, prefer the `DoCast` helpers (`DoCastSelf`, `DoCastVictim`, `DoCastAOE`, …) over raw `me->CastSpell` where possible (use `me->CastSpell` when you need positional casts or custom `CastSpellExtraArgs`).
- A `SpellScript`/`AuraScript` without a matching `spell_script_names` row is inert — ship the binding SQL update in the same change as the C++ registration.
- Never add `UNIT_FLAG*` / `UNIT_FLAG2*` / `UNIT_DYNFLAG*` values without sniff or upstream evidence; the same flag used in another script is not evidence.
- Trigger NPCs (`creature_template.flags_extra` 0x80) have no threat list — `SelectTarget` / `AddThreat` / `UpdateVictim` chains on them silently do nothing. A never-evading helper NPC left on a boss's threatened-by list also stalls the boss's evade/reset forever; make such helpers `IMMUNE_TO_NPC`.
+1
View File
@@ -11,6 +11,7 @@ Run the linter before claiming a change is done: `python apps/codestyle/codestyl
## Data conventions
- `smart_scripts` edits always rewrite the full block — `DELETE` + `INSERT` of every row for the `(entryorguid, source_type)` pair, with the `DELETE` matching both columns — never a partial `UPDATE`, not even for a comment-only fix.
- Sniff-backed changes stamp `VerifiedBuild` (the sniff's client build) on every row the sniff validated, including rows the fix doesn't otherwise touch.
- `creature_immunities`: negative ids are curated shared sets — reference them via `creature_template.CreatureImmunitiesId`, never edit them or allocate new ones. Positive ids are single-creature sets — reuse an existing set only on an exact match; to extend a creature's immunities, insert a superset under a new id and point the creature's `CreatureImmunitiesId` at it.
## The three databases