25 Commits

Author SHA1 Message Date
Kelsi
e00c629bb6 Opcode registry: move to generated canonical+alias pipeline
Introduce data-driven opcode registry with canonical and alias sources:

- Added Data/opcodes/canonical.json as the single canonical LogicalOpcode set.

- Added Data/opcodes/aliases.json for cross-core naming aliases (CMaNGOS/AzerothCore/local legacy).

Added generator and generated include fragments:

- tools/gen_opcode_registry.py emits include/game/opcode_enum_generated.inc, include/game/opcode_names_generated.inc, and include/game/opcode_aliases_generated.inc.

- include/game/opcode_table.hpp now consumes generated enum entries.

- src/game/opcode_table.cpp now consumes generated name and alias tables.

Loader canonicalization behavior:

- OpcodeTable::nameToLogical canonicalizes incoming JSON opcode names via alias table before enum lookup, so implementation code stays stable while expansion maps can use different core spellings.

Validation and build integration:

- Added tools/validate_opcode_maps.py to validate canonical contract across expansions.

- Added CMake targets opcodes-generate and opcodes-validate.

- wowee target now depends on opcodes-generate so generated headers stay current.

Validation/build run:

- cmake -S . -B build

- cmake --build build --target opcodes-generate opcodes-validate

- cmake --build build -j32
2026-02-20 03:02:31 -08:00
Kelsi
32ca09ab30 Opcode tables: sync Classic/WotLK to canonical headers and expand logical mapping coverage
Classic: synchronized Data/expansions/classic/opcodes.json to /home/k/Desktop/classicopcodes.h with exact symbol/value parity (0 missing, 0 mismatches).

WotLK: synchronized Data/expansions/wotlk/opcodes.json to /home/k/Desktop/azerothcoreOpcodes.h and aligned symbol names to AzerothCore naming.

Logical opcode layer: expanded include/game/opcode_table.hpp and src/game/opcode_table.cpp to include missing canonical opcode symbols required by synced tables, and removed legacy alias fallback block so canonical names are used directly.

Gameplay/handler updates included from ongoing fixes: duel/taxi stale opcode cleanup, level-up/sound handling adjustments, and related parser/packet references updated to match canonical opcode identifiers.

Validated by successful full build: cmake --build build -j32.
2026-02-20 02:50:59 -08:00
Kelsi
962a0b90ae Handle classic unhandled opcodes 0x417 and 0x2D2 2026-02-20 02:21:04 -08:00
Kelsi
82d104b9ec Fix movement/warden packet noise and party kill opcode mapping 2026-02-20 02:19:17 -08:00
Kelsi
c52e4e5489 Fix stale opcode mappings and handler wiring across expansions 2026-02-20 01:13:01 -08:00
Kelsi
0e6d502f3b Remove hardcoded WotLK defaults, use JSON as single source of truth for opcodes/fields/DBC layouts 2026-02-20 00:39:20 -08:00
Kelsi
cd0fda2e28 Handle SMSG_NOTIFICATION (0x1CB) for vanilla/Turtle WoW welcome messages 2026-02-20 00:28:51 -08:00
Kelsi
35c448cf4f apply pending protocol, ui, audio, and CodeQL fixes 2026-02-19 16:17:06 -08:00
Kelsi
2856070957 Handle SMSG_QUESTGIVER_QUEST_LIST (0x185) for questgiver flows 2026-02-19 02:53:44 -08:00
Kelsi
82f977d012 Suppress remaining unknown Turtle opcodes with safe consume mappings 2026-02-18 23:42:28 -08:00
Kelsi
7add0a4065 Map and handle additional Turtle combat/movement world opcodes 2026-02-18 23:38:34 -08:00
Kelsi
bba65de46c Handle remaining Turtle world opcodes with safe minimal parsers 2026-02-18 23:26:58 -08:00
Kelsi
4119ac232f Reduce unhandled opcode spam and add missing Turtle opcode names 2026-02-18 23:14:01 -08:00
Kelsi
56c309b27d Fix quest item loot parsing and quest item progress tracking
- add SMSG_QUESTUPDATE_ADD_ITEM logical opcode mapping (0x197)
- handle quest item progress updates in GameHandler
- parse quest-item section in SMSG_LOOT_RESPONSE (regular + quest items)
- add quest item progress storage in quest log entries
- show tracked kill/item progress in Quest Log UI
2026-02-18 04:06:14 -08:00
Kelsi
73e7c86621 Update opcode data and movement integration docs/code 2026-02-18 03:18:22 -08:00
Kelsi
7fd999a3b8 Implement SMSG_WEATHER and wire real game state (map ID, weather, underwater) to lighting system 2026-02-17 17:59:41 -08:00
Kelsi
0564768a6a Fix quest turn-in loop and register SMSG_CANCEL_AUTO_REPEAT
The gossip questIcon field is an integer enum (2=available, 4=incomplete,
5=ready-to-turn-in), not a bitmask. Using (questIcon & 0x04) caused icon=4
(in-progress quests) to be treated as completable, so the client sent
CMSG_QUESTGIVER_REQUEST_REWARD for incomplete quests. The server rejected
these silently and re-sent SMSG_GOSSIP_MESSAGE, causing an infinite loop.

Fix: use exact equality (questIcon == 5 for completable, == 4 for incomplete).

Also register SMSG_CANCEL_AUTO_REPEAT (0x06B) to suppress the unhandled
opcode warning logged on every login.
2026-02-17 15:57:51 -08:00
Kelsi
7952d73740 Handle SMSG_CHARACTER_LOGIN_FAILED (0x041) for AzerothCore/Playerbot compatibility
Previously this opcode was unrecognised and silently dropped, leaving the
client stuck in ENTERING_WORLD with no feedback when the server rejected a
login (duplicate session, world down, disabled race/class, etc.). Now we
decode the LoginFailureReason byte, reset state to CHAR_LIST_RECEIVED so
the player can retry, and surface a red error message on the character screen
via the new CharLoginFailCallback. Also adds isError colour support to
CharacterScreen::setStatus so failures show in red and successes in green.
2026-02-17 13:59:29 -08:00
Kelsi
1d1bc36ebf Implement bank, guild bank, and auction house systems
Add 27 new opcodes, packet builders/parsers, handler methods, inventory
extension with 28 bank slots + 7 bank bags, and UI windows for personal
bank, guild bank (6 tabs x 98 slots), and auction house (browse/sell/bid).
Fix Classic gossip parser to omit boxMoney/boxText fields not present in
Vanilla protocol, fix gossip icon labels with text-based NPC type detection,
and add Turtle WoW opcode mappings for bank and auction interactions.
2026-02-16 21:11:18 -08:00
Kelsi
2ece1bf1cf Add guild features, fix channel joining, and improve whisper reply
Guild: add disband, leader transfer, public/officer note commands with
roster context menu showing rank names and officer notes column. Auto-refresh
roster after guild events.

Channels: fix city/region channels not working by accepting SMSG_CHANNEL_NOTIFY
during ENTERING_WORLD state (server auto-joins before VERIFY_WORLD) and handling
PLAYER_ALREADY_MEMBER notification.

Whisper: /r now switches to whisper tab and sets target to last sender,
matching WoW behavior.

Camera: extend WMO collision raycasting to work outside WMOs too.
2026-02-16 20:16:14 -08:00
Kelsi
27d6150ecb Add mailbox system and fix logging performance stutter
Implement full mail send/receive: SMSG_SHOW_MAILBOX, CMSG_GET_MAIL_LIST,
SMSG_MAIL_LIST_RESULT, CMSG_SEND_MAIL, SMSG_SEND_MAIL_RESULT, mail take
money/item/delete/mark-as-read, and inbox/compose UI windows.

Fix periodic stuttering in Stormwind caused by synchronous per-line disk
flushes in the logger — remove fileStream.flush() and std::endl, downgrade
high-volume per-packet/per-model/per-texture LOG_INFO to LOG_DEBUG.
2026-02-15 14:00:41 -08:00
Kelsi
190fdd6126 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
a3ae03606b 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
010243bbd9 add guild related opcodes 2026-02-13 19:17:24 -08:00
Kelsi
90a1aa8a92 Add multi-expansion support with data-driven protocol layer
Replace hardcoded WotLK protocol constants with a data-driven architecture
supporting Classic 1.12.1, TBC 2.4.3, and WotLK 3.3.5a. Each expansion
has JSON profiles for opcodes, update fields, and DBC layouts, plus C++
polymorphic packet parsers for binary format differences (movement flags,
speed fields, transport data, spline format, char enum layout).

Key components:
- ExpansionRegistry: scans Data/expansions/*/expansion.json at startup
- OpcodeTable: logical enum <-> wire values loaded from JSON
- UpdateFieldTable: field indices loaded from JSON per expansion
- DBCLayout: schema-driven DBC field lookups replacing magic numbers
- PacketParsers: WotLK/TBC/Classic parsers with correct flag positions
- Multi-manifest AssetManager: layered manifests with priority ordering
- HDPackManager: overlay texture packs with expansion compatibility
- Auth screen expansion picker replacing hardcoded version dropdown
2026-02-12 22:56:36 -08:00