comments: protocol, the opcode table and its name list

1,065 comment lines become 340; the code is unchanged. Corrected:
- CMSG_CANCEL_CAST carried CMSG_CANCEL_AURA's doc;
- the inspect reply is parsed, then dropped;
- mount failures reach the player as error lines, so they are no
  longer a deviation;
- the pet-stable note moves from SMSG_INVALIDATE_PLAYER to the stable
  constants.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sam
2026-09-23 20:17:23 +07:00
co-authored by Claude Opus 5.5
parent 6f1810fc08
commit 905e4d3d66
2 changed files with 332 additions and 1057 deletions
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
//! The full 1.12.1 world-opcode name table — **generated** from vmangos
//! `Server/Protocol/Opcodes_1_12_1.h` (825 entries, deduped by number, sorted):
//! Every 1.12.1 world opcode's name, generated from vmangos `Server/Protocol/Opcodes_1_12_1.h`
//! (825 entries, deduped by number, sorted):
//!
//! ```sh
//! sed -nE 's/^[[:space:]]+([A-Z_0-9]+)[[:space:]]*=[[:space:]]*([0-9]+),.*/\2 \1/p' \
@@ -7,13 +7,9 @@
//! | awk '!seen[$1]++ {printf " (0x%04X, \"%s\"),\n", $1, $2}'
//! ```
//!
//! The 1.12.1 wire is frozen, so this table can never go stale. It exists for the
//! *instruments* — naming an opcode in the dropped-packet tally (the debug panel's
//! wire-coverage gap detector) and in skip logs — never for dispatch (that's
//! [`super::opcode`]'s explicitly-verified constants).
//! For diagnostics only (the dropped-packet tally, skip logs); dispatch uses [`super::opcode`].
/// Look up the canonical 1.12.1 name of a world opcode (either direction), if the number is
/// assigned at all. O(log n) over the sorted table.
/// The 1.12.1 name of a world opcode in either direction, by binary search of the sorted table.
pub fn opcode_name(opcode: u16) -> Option<&'static str> {
NAMES
.binary_search_by_key(&opcode, |&(n, _)| n)