59 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
74 lines
4.6 KiB
Markdown
74 lines
4.6 KiB
Markdown
# Local faction compatibility
|
||
|
||
Initialization and an authoritative standing round trip are now verified in the
|
||
actual Forever client. Reputation values were not changed to compensate for
|
||
protocol errors; the disposable character received a reversible test marker.
|
||
|
||
`src/reputation.cpp` decodes Turtle `ReputationMgr::SendInitialReputations`
|
||
(src/game/ReputationMgr.cpp): implicit reputation-list indices, flags8,
|
||
standing delta32. The audited implementation declares64 but pads69 entries.
|
||
The decoder accepts exact counts or that specific64/69 case, rejects malformed
|
||
sizes/truncation and does not infer faction identities from slot positions.
|
||
|
||
Forever `Server/Packets/ReputationPackets.cpp::InitializeFactions::Write` uses
|
||
actual faction IDs, flags16 and standing32, plus a separate bonus list.
|
||
`SetFactionStanding::Write` uses modern list index, gain, new standing and zero.
|
||
ClassicOpcodes::TranslateServerOpcode maps initialization to4701CF, standing to
|
||
4701D7 and visibility to4701D5. The visibility message uses a modern list index,
|
||
not an ID. Native/source packet bytes still require real-client validation.
|
||
|
||
`ops/gameplay_db2_export.cs` reads the actual local70334 Faction.db2 through the
|
||
existing DBCD library and WoWDBDefs schema. `ops/export_faction_map.py` compares
|
||
the local Turtle Faction.dbc, matches faction IDs and the selected race/class
|
||
base-standing masks, and emits a bounded map file. Standing is translated as
|
||
Turtle delta + Turtle base − Forever base, preserving the actual total.
|
||
Turtle forced-invisible8 becomes Hidden, not Forever Header8; legacy Rival64
|
||
does not become modern propagated reputation64. Other audited flags retain their
|
||
meaning. Cache updates are atomic after validating the complete packet.
|
||
|
||
The generated Human Warrior profile maps43 factions. Eleven have no usable
|
||
client definition/index: missing IDs10,1001,1007,1008,1011,1012,1014 and existing
|
||
IDs61,108,269,893 with modern reputation index−1. They are reported and omitted,
|
||
never aliased to unrelated factions. Turtle-specific definitions require a
|
||
separate reproducible client-data solution. Provenance is recorded in
|
||
`evidence/gameplay/faction-profile-human-warrior.json`. That profile must not be
|
||
reused for another race/class without regenerating its base masks.
|
||
|
||
Enable the generated profile with `GATEWAY_FACTION_MAP=runtime/faction-map.txt`.
|
||
Gateway restart tooling preserves private account bindings and creates a binary
|
||
recovery point. Initial reputation capture begins after selected-character login,
|
||
including packets arriving before the self-create. Other authentication packets
|
||
are excluded from this capture.
|
||
|
||
Validation: malformed/truncated data,64/69 counts, faction IDs, flags, base
|
||
adjustments, moved list indices, standing gains and invalid-update cache isolation
|
||
are covered in protocol-tests. Four initial-faction cases match the pinned native
|
||
serializer. Debug and ASan/UBSan CTest each pass3/3. Separate live evidence follows.
|
||
|
||
## Actual client verification
|
||
|
||
Actual C_Reputation.GetNumFactions/GetFactionDataByIndex are functions; the old
|
||
GetNumFactions/GetFactionInfo globals are nil. No TOGGLEREPUTATION binding or
|
||
binding name containingREPUT was found. OpenC, then the handshake icon on the
|
||
right of the character panel: its actual tooltip readsReputation. This action
|
||
opened the real reputation panel, with no Lua error.
|
||
|
||
The authenticated Turtle initial122 packet was captured before self-create in
|
||
`population-1037612-302430710946622`. The gateway translated69 rows/43 mapped
|
||
definitions and reported one visible unsupported row. WowB shows Darnassus,
|
||
Gnomeregan Exiles, Ironforge and Stormwind asFriendly. Darnassus3100 total is
|
||
displayed as100/6000; Stormwind4000 as1000/6000. Local Turtle records have zero
|
||
standing deltas and flags17, consistent with those race/class bases. Screenshots
|
||
and the actual initialization packet are under `evidence/gameplay/reputation-*`.
|
||
The absent visible Turtle faction is covered by the data limitations above.
|
||
|
||
Before a state-change test, a local SQL read confirmed Stormwind has no spillover
|
||
template. The existing disposable test database/config recovery point was kept.
|
||
Native `.modify rep 72 4075` then `.modify rep 72 4000` produced Turtle124 bodies
|
||
`01000000130000004b000000` and `010000001300000000000000`. Actual WowB changed
|
||
the progress1000→1075→1000/6000 and printed reputation gain75 then loss75.
|
||
Flags and the original total were restored. No quest, talent, item or permission
|
||
change was involved. This verifies initial standings, rank/progress and live
|
||
standing updates, not unsupported Turtle-specific faction definitions, AtWar,
|
||
inactive/watch controls or every possible reputation rank.
|