- game_handler.cpp: use-after-move on node.id after std::move(node)
(save nodeId before the move)
- tcp_socket.cpp, world_socket.cpp: virtual call in destructor bypasses
dispatch; use qualified TCPSocket::disconnect() / WorldSocket::disconnect()
to make intent explicit
- wmo_renderer.cpp: float loop counters risk precision drift; replace with
integer step counts and reconstruct float from index
- game_screen.cpp: (float + 0.5) cast to int is incorrect rounding;
use std::lround instead
warden_emulator.cpp: guard unicorn include + entire implementation with
HAVE_UNICORN; provide stub implementations for platforms without Unicorn
(Windows ARM64 which has no unicorn MSYS2 package)
warden_module.cpp: include <windows.h> for VirtualAlloc/HMODULE/etc on
Windows; always include warden_emulator.hpp so unique_ptr destructor compiles
regardless of HAVE_UNICORN
world_packets.hpp + game_handler.cpp: rename CharCreateResult::ERROR to
CharCreateResult::CHAR_ERROR to avoid wingdi.h #define ERROR 0 collision
Guard X11 display crash handler with __linux__, add Windows GlobalMemoryStatusEx
path in memory_monitor, guard warden cache paths with APPDATA on Windows, and
make pkg-config optional in CMakeLists with a find_library fallback. Add Windows
x86-64 CI job using MSYS2 MINGW64 to the build workflow.
SMSG_QUEST_QUERY_RESPONSE skipped only 18 uint32s before reading the
title string, but Classic layout has 40 fields before the title
(16 header + 8 reward items + 12 choice items + 4 POI fields).
Reading from the wrong position landed inside reward item data where
empty slots contain 0-bytes, so readString() returned "", overwriting
the "Quest #N" placeholder with an empty title — making quests
invisible in the UI even though they were in the quest log.
Fixes:
- Expansion-aware skip count: 40 for Classic/Turtle, 55 for WotLK
- Guard: only update title if parsed string is non-empty and printable
- Also scan quest log fields in VALUES update path (not just CREATE_OBJECT2),
so quests are detected even when the server sends partial updates
- Add Entity::setOrientation() to update facing without cancelling movement
- Force attacker and victim to face each other on SMSG_ATTACKSTART
- Fix orientation sign error in MonsterMove: use atan2(-dy, dx) throughout so
NPCs don't glide backward; clamp FacingAngle moves that are >90° off travel vector
- Tab-target: skip dead units and non-hostiles at both build and advance time;
stale entries (killed between presses) are skipped inline rather than cycling to them
- Spirit healer resurrection: detect same-map SMSG_NEW_WORLD with resurrectPending_
and skip the full world reload/entity clear, preventing the fall-forever bug
- add per-frame nearby creature render sync from entity positions/orientation to prevent model-vs-target-circle drift
- treat lootable dynflag as dead state hint for unit spawn/deferred-display paths
- fire NPC death callback when a late display spawn is already dead/lootable
- remove loot-response money fallback announce/SFX to stop duplicate copper messages on re-opened corpses
- use movement animation (prefer run, fallback walk) for server-driven creature moves
- synthesize short movement duration for duration-less movement deltas to avoid glide/attack-pose sliding
- return to idle after both walk/run movement states
- drive target circle from entity latest position and always interpolate selected/engaged targets
- propagate item damage range and delay into ItemDef during inventory rebuild
- show weapon damage, speed, and DPS in inventory/character slot tooltips
- fix online spawn camera pitch sign so third-person camera starts above ground
- send CMSG_BUY_ITEM as vendorGuid + itemId + count (drop extra slot/bag fields)
- reset vendor list state before parsing SMSG_LIST_INVENTORY to prevent stale items carrying over
- add packet length guards for list-inventory header and per-item rows
- keep optional extended-cost parsing for cross-core compatibility
- Trigger ding when UNIT_FIELD_LEVEL increases for player: plays LevelUp sound,
cheer emote animation, and shows screen overlay
- renderDingEffect(): 3 expanding golden rings + "LEVEL X!" / "DING!" text
drawn via ImDrawList foreground (3s duration, fades out last 0.8s)
- triggerDing() wires sound (UiSoundManager::playLevelUp) + emote + overlay
- LevelUpCallback in GameHandler fires on genuine level increase (newLevel > oldLevel)
- "Test: Level Up" button in escape menu triggers ding at current player level
- Fix SMSG_QUESTGIVER_REQUEST_ITEMS: read emoteDelay(u32)+emoteId(u32)+autoFinish(u8)
instead of 5 uint32s — the 11-byte over-read corrupted requiredMoney, itemCount,
and all item data (itemId/count/displayInfoId)
- Fix garbled CSV fallback in asset_manager: return nullptr instead of silently
returning garbled DBC data when binary fallback is unavailable
- Add NPC spawn diagnostics: log when UNIT blocks have displayId=0 (wrong field index)
and when spawn callback fires with displayId + position
- Improve getModelPathForDisplayId failure logging: distinguish displayDataMap_ miss
vs modelIdToPath_ miss, and include map sizes for context
Checkbox in Settings > Gameplay > Loot section. When enabled, all items
are automatically sent CMSG_AUTOSTORE_LOOT_ITEM on loot response (same
as right-click looting each item). Gold always auto-loots regardless.
Setting persists in settings.cfg as auto_loot=0/1.
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.
Root cause: OpcodeTable::loadFromJson() cleared all mappings before
loading the expansion JSON, so any WotLK opcode absent from Turtle WoW's
opcodes.json (including SMSG_AURA_UPDATE and SMSG_AURA_UPDATE_ALL) was
permanently lost. Changed loadFromJson to patch/merge on top of existing
defaults so only explicitly listed opcodes are overridden.
Also fix isBuff border color: was testing flag 0x02 (effect 2 active)
instead of 0x80 (negative/debuff flag).
Add client-side duration countdown: AuraSlot.receivedAtMs is stamped
when the packet arrives; getRemainingMs(nowMs) subtracts elapsed time so
buff tooltips show accurate remaining duration instead of stale snapshot.
Re-send CMSG_ATTACKSWING every second while auto-attacking so combat
resumes automatically when the server pauses the attack loop (out of
range, etc). Previously the client kept autoAttacking=true but never
re-engaged, requiring the player to manually right-click again.
Also remove leftover single-player/offline references from comments.
SMSG_ATTACKERSTATEUPDATE, SMSG_SPELLNONMELEEDAMAGELOG, and SMSG_SPELLDAMAGELOG
were showing combat text for all combat events in the zone, not just the
player's own fights. Added early-return in all three handlers when neither
the attacker nor target is the player.
- audio_engine.cpp: cache key was based on vector pointer address, not
content — cache never hit since each asset load produces a new
allocation. Replace with FNV-1a over head+tail bytes + size, giving
correct content-based identity at O(1) cost. Add 256-entry cap with
eviction to prevent unbounded growth over long sessions.
- game_handler.hpp/cpp, spellbook_screen, game_screen: knownSpells was
a std::vector with O(n) std::find lookups scattered across packet
handlers and UI code. Switch to std::unordered_set for O(1) insert,
erase, and membership checks. Update all push_back/erase-remove/find
call sites to use set operations.
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.
- Add TurtlePacketParsers with dedicated movement block parser (Classic format + transport timestamp)
- Fix quest giver status: read uint32 and translate vanilla enum values for Classic/Turtle
- Fix quest accept packet: remove trailing uint32 that vanilla servers reject
- Fix quest details parser: auto-detect vanilla vs WotLK format (informUnit field)
- Fix spellbook and action bar icons: fallback to WotLK DBC field indices when expansion layout fails
- Fix spell cast failure messages: translate vanilla SpellCastResult codes (+1 offset)
- Fix realm list: correct type values (6=RP, 8=RP-PvP) and population thresholds
- Fix music: disable looping for zone music, auto-advance to next random track when finished
- Add music anti-repeat: avoid playing the same track back-to-back
- Make TBC update block parsing resilient (keep parsed blocks on failure instead of aborting)
- Add right-click attack on hostile mobs
- Add name query diagnostic logging
CMSG_CHAR_CREATE was silently dropped by the server because the packet
was 4 bytes too short. Wireshark capture of the real 1.12.1 client
revealed 4 trailing zero bytes after outfitId. Also treat IN_PROGRESS
(code 46) as success since Turtle WoW sends it instead of SUCCESS.