Commit graph

548 commits

Author SHA1 Message Date
Kelsi
f6a0be6a08 Fix empty chat messages and /dismount on Classic/Turtle
Chat: renderTextWithLinks now properly handles |cAARRGGBB color codes
that aren't item links (e.g. colored player names), rendering the text
in the specified color instead of discarding it.

Dismount: Classic/Vanilla lacks CMSG_CANCEL_MOUNT_AURA (TBC+ opcode).
Track mount aura spell ID when mountDisplayId changes, then use
CMSG_CANCEL_AURA as fallback on expansions without the dedicated opcode.
2026-02-14 16:42:47 -08:00
Kelsi
8282583b9a Fix equipment textures: correct DBC field indices and stop texture cycling
Binary ItemDisplayInfo.dbc has 23 fields with texture components at
14-21, not 15-22. The previous "fix" shifted all fields by +1 which
read wrong columns and broke both player and NPC equipment rendering.

Also fix local player texture cycling: rebuildOnlineInventory() was
called on every item query response (including for other players),
unconditionally setting onlineEquipDirty_ which triggered redundant
texture recompositing. Now tracks previous equipment displayInfoIds
and only sets dirty when they actually change.

Unified all 3 equipment texture code paths (local player, other
players, NPCs) to use the DBC layout system with correct field 14
base index.
2026-02-14 16:33:24 -08:00
Kelsi
e0e927cac1 Add clickable item links in chat with stat tooltips
Parse WoW item link format (|cXXXXXXXX|Hitem:ENTRY:...|h[Name]|h|r)
in chat messages. Item names render in quality color, hover shows
tooltip with slot type, armor, and stats. Shift-click inserts the
item link into the chat input. Automatically queries server for
item info on first encounter.
2026-02-14 15:58:54 -08:00
Kelsi
148f63cffe Fix off-by-one in ItemDisplayInfo texture component fields
Texture regions are at DBC fields 15-22, not 14-21. Field 14 is
HelmetGeosetVis[1] (uint32), and getString() on it returned random
strings from the DBC string block, causing garbled textures on
players and missing leg textures on other characters.
2026-02-14 15:54:23 -08:00
Kelsi
3675721016 Improve equipment texture performance and accuracy
Cache composite textures by input key so identical NPC equipment
combos share one GPU texture. Use DBC layout system for
ItemDisplayInfo texture component fields instead of hardcoded
indices (cross-expansion support). Selective player equipment
re-emission on item query response instead of broadcasting to
all players.
2026-02-14 15:48:58 -08:00
Kelsi
d4bea91e37 Fix naked players and NPC gear textures
Default PLAYER_VISIBLE_ITEM layout to known WotLK 3.3.5a values
(base=284, stride=2) so equipment reads work immediately without
waiting for heuristic detection. Add equipment texture compositing
for humanoid NPCs over baked body textures using ItemDisplayInfo.dbc
region lookups (texture-only, no geoset changes to avoid invisibility).
2026-02-14 15:43:09 -08:00
Kelsi
58d8b88721 Fix inspect spam and emote text lookup for other players
Two bugs fixed:
1. SMSG_INSPECT_RESULTS (0x115) was falling through to the inspect
   handler, but this opcode is not the real inspect response. Removed
   the case so only SMSG_INSPECT_TALENT (0x3F4) triggers the handler.
2. EmotesText DBC layout was missing "ID" field in all 4 expansion
   JSON files, causing operator[] to return 0xFFFFFFFF instead of 0.
   This broke the dbcId reverse lookup, so other players' emotes
   always fell back to generic "performs an emote" text. Added ID
   and OthersTargetTextID/OthersNoTargetTextID to all layouts.
2026-02-14 15:23:32 -08:00
Kelsi
9c61d7ecad Fix SMSG_TALENTS_INFO spam by checking talentType field
Opcode 0x3F4 is SMSG_TALENTS_INFO, sent both for the player's own
talents (type=0, on login/respec) and inspect results (type=1). The
handler was missing the type byte read, treating all packets as
inspect results and spamming "Inspecting target" messages.
2026-02-14 15:16:26 -08:00
Kelsi
314c2cabf5 Fix double 'You' prefix on local emote text 2026-02-14 15:13:54 -08:00
Kelsi
3acb42b363 Resolve emote text from DBC for other players' text emotes
Load third-person emote text templates (othersTarget/othersNoTarget)
from EmotesText.dbc fields 3 and 7 alongside existing sender text.
Build reverse lookup map from dbcId to EmoteInfo for incoming
SMSG_TEXT_EMOTE resolution. Other players now show proper emote
descriptions like "Player dances with Target" instead of generic
"Player performs an emote" text.
2026-02-14 15:11:43 -08:00
Kelsi
a90c130d6e Fix guild roster, /who, /inspect, and character preview bugs
Guild O tab: fallback to character guildId when guildName_ not yet
queried, re-query guild info on roster open. /who: add missing
stringCount field and fix maxLevel default (0→100). /inspect: add
SMSG_INSPECT_TALENT opcode (0x3F4) and rewrite parser for WotLK
PackedGUID+talent format. Character preview: reset all tracking
variables in setAssetManager() to force model reload on login.
2026-02-14 15:05:18 -08:00
Kelsi
be425c94dc Fix SMSG_MESSAGECHAT parser missing receiverGuid for most chat types
The parser was not reading the uint64 receiverGuid that WoW 3.3.5
sends for SAY/GUILD/PARTY/YELL/WHISPER/RAID/etc types, causing all
incoming chat from other players to misparse (blank messages, wrong
type displayed). Also fix TEXT_EMOTE display to not prepend "You " for
incoming emotes from other players, and fix CHANNEL/ACHIEVEMENT types
to read the correct receiverGuid field.
2026-02-14 14:37:53 -08:00
Kelsi
9bcead6a0f Add chat tabs, networked text emotes, channel system, and chat bubbles
Chat tabs filter messages into General/Combat/Whispers/Trade tabs. Text
emotes now send CMSG_TEXT_EMOTE to server and display incoming emotes
from other players. Channel system auto-joins General/Trade on login with
/join, /leave, and /1-/9 shortcuts. Chat bubbles render as ImGui overlays
above entities for SAY/YELL messages with fade-out animation.
2026-02-14 14:30:09 -08:00
Kelsi
ca3150e43d Fix mesh artifacts on vanilla/TBC M2 models when using expansion overlays
Vanilla (v256) and TBC (v263) M2 files embed skin data directly, parsed
during M2Loader::load(). The code unconditionally loaded external .skin
files afterwards, which resolved to WotLK-format .skin files (48-byte
submeshes) from the base manifest — overwriting the correctly parsed
embedded skin (32-byte submeshes) and causing mesh corruption on all
character models. Guard all 13 loadSkin() call sites with version >= 264
so external .skin files are only loaded for WotLK M2s that need them.
2026-02-14 13:57:54 -08:00
Kelsi
a67dca5787 Add overlay extraction for multi-expansion asset deduplication
Extracts each expansion's assets as a CRC-compared overlay against a
base manifest, storing only files that differ. Auto-detects overlay mode
when a base manifest already exists. Adds --as-overlay, --full-base
flags and manifest merge for partial extractions.
2026-02-14 03:09:17 -08:00
Kelsi
03013e751a Cache WoW.exe during asset extraction for Warden MEM_CHECK 2026-02-14 02:17:50 -08:00
Kelsi
5e8384f34e Load WoW.exe PE image for Warden MEM_CHECK responses
Parse PE sections from WoW.exe into a flat virtual memory image so
MEM_CHECK returns real binary contents instead of zeros. Also mocks
KUSER_SHARED_DATA (0x7FFE026C) with Windows 7 version info.
2026-02-14 02:00:15 -08:00
Kelsi
cb79e43a29 Fix vanilla Warden PAGE_B check size (29 bytes, not 24)
PAGE_A uses 24 bytes in vanilla (no addr+len), but PAGE_B always uses
29 bytes (with addr+len) regardless of expansion. Splitting the cases
fixes remaining unknown check type errors on Turtle WoW.
2026-02-14 01:43:40 -08:00
Kelsi
1a44c85264 Fix vanilla Warden check parsing and crypto reset
Vanilla PAGE_A/B checks are 24 bytes (no addr+len), PROC checks are
25 bytes (no second strIdx+offset), unlike WotLK's 29/30. Wrong sizes
caused incomplete responses with bad checksums, silently blocking
character creation on Turtle WoW.
2026-02-14 01:26:26 -08:00
Kelsi
5b08e47941 Fix character creation for expansion-filtered servers (Turtle WoW)
Filter races/classes in character creation screen by expansion profile
constraints, add 10s server response timeout, and reset Warden crypto
state on disconnect so reconnections use the correct session key.
2026-02-14 00:57:33 -08:00
Kelsi
886f4daf2e Add per-expansion asset overlay system and fix CharSections DBC layout
Expansion overlays allow each expansion to supplement the base asset data
via an assetManifest field in expansion.json, loaded at priority 50 (below
HD packs). The asset extractor gains --reference-manifest for delta-only
extraction. Also fixes CharSections field indices (VariationIndex=4,
ColorIndex=5, Texture1=6) across all DBC layout references.
2026-02-14 00:00:26 -08:00
Kelsi
85864ab05b Add separate draggable bag windows, fix dismount and player equipment
Bags are now individual draggable ImGui windows (backpack + each equipped
bag) with per-bag toggle from the bag bar. B key opens/closes all. A
settings toggle under Gameplay lets users switch back to the original
aggregate single-window mode. Window width adapts to bag item name length.

Fix dismount by clearing local mount state immediately (optimistic) instead
of waiting for server confirmation, and allow buff bar right-click dismount
regardless of the aura's buff flag.

Fix other players appearing naked by queuing them for auto-inspect when
the visible item field layout hasn't been detected yet.
2026-02-13 22:51:49 -08:00
Kelsi
89ccb0720a Fix vanilla spell casting and bag contents
Vanilla CMSG_CAST_SPELL target mask is uint16 (not uint32 like WotLK),
the extra 2 bytes were corrupting packets. Also implement full bag
content tracking: extract container slot GUIDs from CONTAINER update
objects, set proper bag sizes, and populate bag items in inventory
rebuild.
2026-02-13 22:14:34 -08:00
Kelsi
811a2a97a8 Fix vanilla M2 walk animation timestamp normalization
Vanilla M2 tracks store absolute timestamps in the flat array (e.g.
1000-2000ms) but the renderer plays animTime from 0 to duration.
Normalize timestamps to 0-relative after slicing per-sequence ranges
so findKeyframeIndex matches correctly.
2026-02-13 21:43:14 -08:00
Kelsi
22728b461f Fix vanilla M2 animations, movement packets, and DBC locale
- Parse vanilla M2 animation tracks (flat arrays with M2Range indices)
  instead of skipping them, fixing T-pose on all vanilla models
- Use C4Quaternion (float[4]) for vanilla bone rotations instead of
  CompressedQuat (int16[4]) which produced garbage transforms
- Fix vanilla M2 attachment struct size (48 bytes, not 40) so weapons
  attach to correct bones instead of model origin
- Route movement packets through expansion-specific packet parsers
  instead of hardcoded WotLK format, fixing server-side position sync
- Fix Spell.dbc field indices for classic/turtle (Name=120, Rank=129,
  IconID=117) - were pointing to Portuguese locale column (+7 offset)
- Change guild roster keybind from J to O (WoW default)
- Add guild opcodes for all expansions
2026-02-13 21:39:48 -08:00
Kelsi
60c93fa1e3 Fix weapon attachments and inspect fallback 2026-02-13 20:26:55 -08:00
Kelsi
2774b47867 Fix movement animations and NPC baked textures 2026-02-13 20:19:33 -08:00
Kelsi
65fe5e8e1d Fix visible equipment item queries 2026-02-13 20:13:37 -08:00
Kelsi
d3211f5493 Show online player equipment 2026-02-13 20:10:19 -08:00
Kelsi
6af9d6ba2d Fix name query parsing for Classic/TBC 2026-02-13 19:52:49 -08:00
Kelsi
bf39c0b900 Auto-detect coinage and inventory fields 2026-02-13 19:47:49 -08:00
Kelsi
24d780e669 Fix chat sender names via name queries 2026-02-13 19:42:42 -08:00
Kelsi
5afd1b65a8 Fix Turtle/Classic parsing and online player textures 2026-02-13 19:40:54 -08:00
Kelsi
d2ff21a95f add guild related opcodes 2026-02-13 19:17:24 -08:00
Kelsi
fb0ae26fe6 Vanilla/Turtle WoW compatibility: fix UPDATE_OBJECT, chat, equipment, creatures
- Route SMSG_UPDATE_OBJECT through polymorphic parsers for correct
  vanilla format (uint8 updateFlags, 6 speeds vs WotLK uint16/9)
- Fix SMSG_DESTROY_OBJECT for vanilla (8 bytes, no isDeath field)
- Add MSG_MOVE_* handlers for other player movement relay
- Add ClassicPacketParsers::parseMessageChat with targetGuid read
  and monster-type name handling
- Resolve chat sender names from player name cache before display
- Fix CSV DBC field 0 always treated as numeric ID (fixes 16+ garbled
  Turtle CSVs including Map, AreaTable, Spell, CreatureDisplayInfo)
- Add CSV DBC validation: reject garbled CSVs (>80% zero IDs) and
  fall back to binary DBC files
- Fix ItemDisplayInfo texture component field index (14+ not 15+)
  for binary DBC with gender-aware suffix resolution
- Spawn other players as visible M2 models via creature callback
- Map name cache dedup prevents overwrites from duplicate CSV records
2026-02-13 18:59:09 -08:00
Kelsi
430c2bdcfa Vanilla/Turtle WoW support: M2 loading, bone parsing, textures, auth
- Vanilla M2 bone struct (108 bytes) with 28-byte animation tracks
- Version-aware bone parsing (vanilla vs WotLK format detection)
- Fix CharSections.dbc field layout for vanilla (variation/color at 4-5)
- Remove broken CharSections.csv files (all fields marked as strings)
- Expansion data reload on profile switch (DBC cache clear, layout reload)
- Vanilla packet encryption (VanillaCrypt XOR-based header crypt)
- Extended character preview geoset range (0-99) for vanilla models
- DBC cache clear support in AssetManager
2026-02-13 16:53:28 -08:00
Kelsi
6729f66a37 World auth: default WotLK region/battlegroup ids to 1 2026-02-13 01:57:03 -08:00
Kelsi
bb7d1d7d85 Auth: de-spam realm list requests in UI-driven flow 2026-02-13 01:54:15 -08:00
Kelsi
81e082dc46 World auth: include realmId in AUTH_SESSION 2026-02-13 01:51:49 -08:00
Kelsi
58e1cc47b9 WorldSocket: parse buffered packets before handling FIN close 2026-02-13 01:47:56 -08:00
Kelsi
492703be36 Auth: include CRC in legacy proof; extend Turtle integrity set 2026-02-13 01:41:59 -08:00
Kelsi
5435796a98 Add integrity hash support and SRP tuning options 2026-02-13 01:32:15 -08:00
Kelsi
b3001a4b5b Fail fast when auth TCP disconnects during authentication 2026-02-13 01:14:33 -08:00
Kelsi
9091cb0496 Drain auth socket reads to avoid dropping partial packets on close 2026-02-13 01:12:59 -08:00
Kelsi
280c6ffa1d Use legacy LOGON_PROOF format for auth protocol < 8 2026-02-13 01:10:02 -08:00
Kelsi
dca8fcad31 Handle short vanilla LOGON_PROOF success responses 2026-02-13 01:03:54 -08:00
Kelsi
6a44f02e0c Add authenticator opcode support + auth_probe tool 2026-02-13 00:55:36 -08:00
Kelsi
fd468ce793 Allow per-expansion login header fields + fix challenge FourCC encoding 2026-02-13 00:48:56 -08:00
Kelsi
58ad69d939 Use SRP auth protocol v8 for classic/tbc/turtle servers 2026-02-13 00:45:56 -08:00
Kelsi
7e5fc0ed51 Restore legacy FourCC reversal in LOGON_CHALLENGE 2026-02-13 00:43:22 -08:00