From 88d991555380134811165be3c7352be338627215 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 21 Sep 2026 21:15:18 -0300 Subject: [PATCH] docs(Agents): record creature_template_model probability semantics (#27754) --- .agents/docs/sql-guidelines.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.agents/docs/sql-guidelines.md b/.agents/docs/sql-guidelines.md index 5ae1f9e011..33f672aa69 100644 --- a/.agents/docs/sql-guidelines.md +++ b/.agents/docs/sql-guidelines.md @@ -13,6 +13,7 @@ Run the linter before claiming a change is done: `python apps/codestyle/codestyl - Set `flags_extra` on every `difficulty_entry_*` template, not just the base entry: which of the two the engine reads varies by call site. - `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_template_model`: rows were generated from the old `modelid1`-`modelid4` columns, and that migration copied `creature_template.VerifiedBuild` onto every `Idx`, so equal probabilities are that import's default rather than a randomization claim. Judge a stamp by its build, not its `Idx`: a legacy build on the extra rows is migration noise, while later sniff passes stamp `Idx` >= 1 legitimately. Authority is the creature query response's per-index `Probability`, which Classic and retail sniffs carry and 3.3.5 clients omit. Suppress a model by setting its `Probability` to 0 and keeping the row, never by deleting it; keep a creature's only row at 1, since the loader reads a zero total as equal chance and resets every row to 1.0. - `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