Commit graph

2207 commits

Author SHA1 Message Date
Kelsi
1f1925797f feat: show cooldown overlay on pet action bar spell buttons
Pet spell buttons now dim and display remaining cooldown time when a
spell is on cooldown, matching the feedback available on the player
action bar. Clicking a pet spell while it is on cooldown is also
suppressed to prevent spam-sending CMSG_PET_ACTION to the server.
Cooldown time appears as a text overlay (seconds or "Nm" for minutes)
and is also shown in the hover tooltip.
2026-03-17 15:59:27 -07:00
Kelsi
98dc2a0dc7 feat: show Max Level bar at max level instead of hiding XP bar
When nextLevelXp==0 and playerLevel>0, render a gold fully-filled bar
with centered "Max Level" text instead of hiding the XP bar entirely.
Fixes missing closing brace that caused all subsequent methods to fail
compilation.
2026-03-17 15:28:33 -07:00
Kelsi
c15ef915bf feat: add Ctrl+1..3 keyboard shortcuts for stance/form/presence switching
Ctrl+1, Ctrl+2, Ctrl+3 (up to Ctrl+8 for Druids with many forms) now
cast the Nth available stance spell for classes that use a stance bar.
Ordering matches the stance bar UI so visual and keyboard positions align.
Normal action bar keys 1–= are skipped when Ctrl is held to prevent
accidental spell casts instead of stance switches.
2026-03-17 15:18:04 -07:00
Kelsi
6d83027226 feat: add stance/form/presence bar for Warriors, Druids, Death Knights, Rogues, Priests
Renders a stance bar to the left of the main action bar showing the
player's known stance spells filtered to only those they have learned:
- Warrior: Battle Stance, Defensive Stance, Berserker Stance
- Death Knight: Blood Presence, Frost Presence, Unholy Presence
- Druid: Bear/Dire Bear, Cat, Travel, Aquatic, Moonkin, Tree, Flight forms
- Rogue: Stealth
- Priest: Shadowform

Active form detected from permanent player auras (maxDurationMs == -1).
Clicking an inactive stance casts the corresponding spell. Active stance
shown with green border/tint; inactive stances are slightly dimmed.
Spell name tooltips shown on hover using existing SpellbookScreen lookup.
2026-03-17 15:12:58 -07:00
Kelsi
4edc4017ed feat: show extra stats in equipped item comparison panel (shift-hover)
When shift-hovering an item link in chat to compare with equipped gear,
also display extra stats (hit/crit/haste/AP/SP/expertise) for the
currently-equipped item, matching what is shown for the hovered item.
2026-03-17 14:50:28 -07:00
Kelsi
3b79f44b54 feat: show item flavor/lore text in item tooltip
Display item description (flavor text) from SMSG_ITEM_QUERY_SINGLE_RESPONSE
at the bottom of item tooltips in gold color, matching WoW's standard
tooltip layout where lore text appears below stats and effects.
2026-03-17 14:44:15 -07:00
Kelsi
020ba134cd feat: show item spell effects (Use/Equip/Teaches) in item tooltip
Display Use, Equip, Chance on Hit, and Teaches spell effects from
SMSG_ITEM_QUERY_SINGLE_RESPONSE in item tooltips. Looks up spell
name from Spell.dbc via SpellbookScreen for readable descriptions.
2026-03-17 14:43:22 -07:00
Kelsi
03397ec23c feat: show extra item stats in tooltip (hit/crit/haste/sp/ap/expertise)
Display all ExtraStat entries from SMSG_ITEM_QUERY_SINGLE_RESPONSE in
the item tooltip (hit rating, crit rating, haste, spell power, attack
power, expertise, resilience, etc.). These were previously silently
discarded, making WotLK/TBC gear tooltips incomplete.
2026-03-17 14:42:00 -07:00
Kelsi
f04875514e feat: improve item tooltip with bind type, item level, weapon damage range, and required level
Add standard WoW tooltip fields that were previously missing:
- Bind type (Binds when picked up/equipped/used, Quest Item)
- Unique indicator
- Item Level XX
- Weapon damage range (e.g. '22 - 41 Damage  Speed 2.20') replacing bare DPS
- Damage per second sub-line in dimmed text
- Requires Level XX
2026-03-17 14:41:00 -07:00
Kelsi
8b57e6fa45 feat: add HONOR_GAIN floating combat text for PvP honor gains
Show '+X Honor' floating text in gold when SMSG_PVP_CREDIT is received,
matching WoW's native behavior. Also add HONOR_GAIN to the combat log
panel for a complete record. Previously only a chat message was added.
2026-03-17 14:38:57 -07:00
Kelsi
b6ea78dfab fix: show spell name in REFLECT floating combat text
REFLECT entries already stored the reflected spell ID but the floating
text display showed only "Reflected"/"You Reflect" without the name.
Now shows "Reflected: Fireball" or "Reflect: Frost Nova", matching the
pattern already used by INTERRUPT, DISPEL, and STEAL entries.
2026-03-17 14:26:10 -07:00
Kelsi
5513c4aad5 fix: apply skull-red color and "Lv ??" to level-0 mobs in focus frame
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Consistent with the target frame fix: focus targets with level 0
(unknown/?? mobs) now show skull-red instead of grey, and display
"Lv ??" instead of "Lv 0".
2026-03-17 14:18:49 -07:00
Kelsi
39f4162ec1 fix: show skull-red color and "Lv ??" for unknown-level mobs in target frame
Level 0 in the update fields means the server hasn't sent or
the mob is undetectable (e.g. high-level raid bosses). Previously
these were colored grey (no-XP path) and displayed "Lv 0". Now
they correctly show skull-red and display "Lv ??" to match WoW.
2026-03-17 14:16:14 -07:00
Kelsi
8b9d626aec feat: show directional arrow on world map player marker
Replace the static filled circle with a red triangle arrow that
rotates to match the character's current facing direction.
Uses the same render-space yaw convention as the 3D scene so
the arrow matches in-world orientation.
2026-03-17 14:10:56 -07:00
Kelsi
b23dbc9ab7 feat: apply out-of-range red tint to ranged items on action bar
Extend the existing out-of-range check to cover ITEM slots whose
inventory type is Ranged (bow/gun/crossbow, 40 yd), RangedRight
(wand, 40 yd), or Thrown (30 yd). The check runs after barItemDef
is resolved so the inventory type is available.
2026-03-17 13:59:42 -07:00
Kelsi
5031351736 fix: add free-list to WardenEmulator heap allocator to prevent exhaustion
The bump-pointer allocator never reused freed blocks, causing the 16 MB
emulated heap to exhaust in long sessions even when blocks were freed.

- First-fit reuse from a free-list before advancing the bump pointer
- Coalesce adjacent free blocks to limit fragmentation
- Roll back the bump pointer when the top free block reaches it
- Reset allocator state on initialize() so re-runs start clean
2026-03-17 13:55:37 -07:00
Kelsi
ae40d393c3 feat: show tactical role badges in party frames; fix talent reset
- Add MT/MA/Asst badges to party frames (matching raid frame treatment)
- Clear learnedTalents_ on SMSG_TALENTS_INVOLUNTARILY_RESET so the
  talent screen stays accurate after a server-side talent wipe
2026-03-17 13:50:49 -07:00
Kelsi
f70df191a9 feat: show tactical role badges (MT/MA/Asst) in raid frames
Render "MT" (orange), "MA" (blue), and "A" (light blue) in the
bottom-left of each raid cell using member flags from SMSG_GROUP_LIST
and SMSG_REAL_GROUP_UPDATE (bits 0x02/0x04/0x01). Complements the
existing LFG role badges at bottom-right.
2026-03-17 13:47:53 -07:00
Kelsi
1daead3767 feat: implement SMSG_REAL_GROUP_UPDATE handler
Parse group type, member flags, and leader GUID instead of silently
discarding the packet. Updates partyData so group frames reflect
role changes and leadership transitions in real time.
2026-03-17 13:44:14 -07:00
Kelsi
a43a43ed8e fix: evict oldest minimap tile textures when cache exceeds 128 entries
Prevents unbounded GPU memory growth in long play sessions where the player
visits many zones. Tiles are inserted into a FIFO deque; when the count of
successfully-loaded tiles exceeds MAX_TILE_CACHE (128), the oldest entry is
destroyed and removed from both the cache map and the deque.

At 256×256×4 bytes per tile this caps minimap GPU usage at ~32 MB.
2026-03-17 13:38:18 -07:00
Kelsi
217edc81d9 feat: add item quality link colours to loot roll, loot notify, and loot all-passed messages 2026-03-17 13:33:07 -07:00
Kelsi
6260ac281e feat: extend item link quality colours to vendor purchase, pet feed, and LFG reward messages 2026-03-17 13:27:27 -07:00
Kelsi
29b5b6f959 feat: show item quality colours in loot, quest-item, and auction chat messages
Add buildItemLink() helper that formats |cff...|Hitem:...|h[Name]|h|r links so
the chat renderer draws item names in their quality colour (grey/white/green/
blue/purple/orange) with a small icon and tooltip on hover.

Applied to: loot received (SMSG_ITEM_PUSH_RESULT), looted from corpse
(handleLootRemoved), quest item count updates, and all three auction
house notifications (sold, outbid, expired).
2026-03-17 13:25:33 -07:00
Kelsi
4049f73ca6 refactor: replace raw console output with LOG_* macros in warden_emulator, transport_manager, keybinding_manager 2026-03-17 13:09:18 -07:00
Kelsi
bf5219c822 refactor: replace std::cout/cerr with LOG_* macros in warden_module.cpp
Convert 60+ raw console output calls to structured LOG_INFO/WARNING/ERROR
macros for consistent logging, proper timestamps, and filtering support.
Remove unused <iostream> include.
2026-03-17 13:04:25 -07:00
Kelsi
8169f5d5c0 feat: add audio feedback for level-up, achievements, duels, group invites, and inventory errors
Wire up remaining UISoundManager calls for milestone and notification events:
- playLevelUp() on SMSG_LEVELUP_INFO
- playAchievementAlert() on SMSG_ACHIEVEMENT_EARNED (self only)
- playTargetSelect() on duel request and group invite
- playError() on inventory change failure
2026-03-17 12:37:19 -07:00
Kelsi
119002626e feat: show chat message when a spell is removed from spellbook
handleRemovedSpell now displays "You have unlearned: [SpellName]."
matching the existing handleLearnedSpell feedback pattern.
2026-03-17 12:35:05 -07:00
Kelsi
6fbf5b5797 feat: add audio feedback for item loot, vendor buy/sell, and spell learning
Wire up remaining UISoundManager calls for core gameplay actions:
- playLootItem() on SMSG_ITEM_PUSH_RESULT and handleLootRemoved
- playPickupBag() on successful vendor purchase (SMSG_BUY_ITEM)
- playDropOnGround() on successful item sell (SMSG_SELL_ITEM)
- playQuestActivate() on trainer spell purchase success
2026-03-17 12:31:38 -07:00
Kelsi
a0b978f95b feat: add audio feedback for quest accept/complete and transaction errors
Wire up UISoundManager calls that were loaded but never invoked:
- playQuestActivate() on quest accept
- playQuestComplete() on server-confirmed quest completion
- playError() on trainer buy failure, vendor buy failure, and sell failure
2026-03-17 12:28:15 -07:00
Kelsi
8c3060f261 feat: show XP percentage in experience bar tooltip
The XP bar tooltip now displays current progress as a percentage
(e.g., "Current: 45000 / 100000 XP (45.0%)"), making it easier to
gauge leveling progress at a glance.
2026-03-17 12:17:23 -07:00
Kelsi
b80d88bded feat: add 'Hold Shift to compare' hint to ItemDef tooltip
The ItemQueryResponseData tooltip overload had this hint but the
primary ItemDef overload did not. Players hovering gear in their
inventory now see the comparison prompt when an equipped equivalent
exists.
2026-03-17 12:12:11 -07:00
Kelsi
1c3f2f4ae3 feat: show exploration XP as floating combat text
Area discovery XP was only shown in the system chat log. Now it also
appears as a floating "+XP" number like kill XP, giving immediate
visual feedback when discovering new zones.
2026-03-17 12:02:17 -07:00
Kelsi
67e6c9a984 fix: TBC parseMailList returns true on empty mailbox for consistency
WotLK and Classic parsers return true on success regardless of mail
count, but TBC returned !inbox.empty() which falsely signals parse
failure on an empty mailbox, potentially causing callers to skip
valid empty-mailbox state.
2026-03-17 11:58:20 -07:00
Kelsi
9750110436 fix: complete item tooltip stat comparison for all secondary stats
The shift-hover gear comparison was missing secondary stat types
(Defense, Dodge, Parry, Block Rating, Hit/Crit/Haste variants,
Healing, Spell Damage, Spell Pen) — only 10 of 22 stat types had
labels. Also adds full extra stats and DPS comparison to the
ItemQueryResponseData tooltip overload (loot window) which had none.
2026-03-17 11:54:01 -07:00
Kelsi
c017c61d2c fix: remove unused syncCounts variable in Warden handler
Eliminates the -Wunused-variable warning for the syncCounts array
that was declared but never populated in the synchronous Warden
check response path.
2026-03-17 11:37:49 -07:00
Kelsi
ef5532cf15 fix: add TBC chat message parser to prevent 12-byte misalignment
TBC 2.4.3 SMSG_MESSAGECHAT has no senderGuid(u64) or unknown(u32)
prefix before type-specific data. The WotLK base parser reads these
12 bytes unconditionally, causing complete misalignment of all chat
message fields — every chat message on a TBC server would parse
garbage for sender, channel, and message content.
2026-03-17 11:23:37 -07:00
Kelsi
e1be8667ed fix: add TBC game object query parser for correct string count
TBC 2.4.3 SMSG_GAMEOBJECT_QUERY_RESPONSE has 2 extra strings after
name[4] (iconName + castBarCaption). WotLK has 3 (adds unk1). Without
this override, the WotLK parser's third readString() consumed bytes
from the data[24] fields, corrupting game object type-specific data
and breaking interactions with doors, chests, mailboxes, and
transports on TBC servers.
2026-03-17 11:20:50 -07:00
Kelsi
1b86f76d31 fix: add TBC overrides for quest giver status and channel packets
TBC 2.4.3 sends quest giver status as uint32 (like Classic), not uint8
(WotLK). Without this override, reading uint8 consumed only 1 of 4
bytes, misaligning all subsequent packet data and breaking quest
markers on NPCs.

TBC channel join/leave packets use Classic format (name+password only).
The WotLK base prepends channelId/hasVoice/joinedByZone, causing
servers to reject the malformed packets and breaking channel features.
2026-03-17 11:16:02 -07:00
Kelsi
dc8619464a fix: add TBC guild roster parser to avoid gender byte misalignment
TBC 2.4.3 SMSG_GUILD_ROSTER has the same rank structure as WotLK
(variable rankCount + goldLimit + bank tab permissions), but does NOT
include a gender byte per member (WotLK added it). Without this
override, TBC fell through to the WotLK parser which read a spurious
gender byte, causing every subsequent field in each member entry to
misalign.
2026-03-17 11:10:54 -07:00
Kelsi
a7f7c4aa93 feat: show power type names in combat log energize/drain entries
Combat log now shows specific power type names (Mana, Rage, Energy,
Focus, Happiness, Runic Power) instead of generic "power" for ENERGIZE
and POWER_DRAIN events. Uses the powerType field added to CombatLogEntry
in the previous commit.
2026-03-17 11:03:20 -07:00
Kelsi
01685cc0bb feat: add ghost mode visual overlay when player is dead
Apply a cold blue-grey fullscreen overlay when the player is in ghost
form, creating a desaturated, muted appearance that clearly signals the
death state. Uses the existing overlay pipeline infrastructure. Applied
in both parallel and non-parallel rendering paths, after underwater tint
but before brightness adjustment so UI elements remain unaffected.
2026-03-17 10:58:07 -07:00
Kelsi
2d53ff0c07 feat: show environmental damage type in combat text and log
Fall, lava, drowning, fatigue, slime, and fire damage now display their
specific type instead of generic "Environmental damage" in both floating
combat text and the combat log window. The envType byte from
SMSG_ENVIRONMENTAL_DAMAGE_LOG is propagated via the powerType field to
the display layer. Added powerType to CombatLogEntry for consistent
access in the persistent combat log.
2026-03-17 10:54:07 -07:00
Kelsi
1152a70201 fix: handle transport data in other player movement packets
Other players on transports (boats, zeppelins, trams) were not properly
tracked because handleOtherPlayerMovement() did not read transport data
from MSG_MOVE_* packets. This caused entities to slide off transports
between movement updates since no transport attachment was established.

Now reads the transport GUID and local offset from the packet using
expansion-aware wire flags (0x200 for WotLK/TBC, 0x02000000 for
Classic/Turtle), registers a transport attachment so the entity follows
the transport smoothly via updateAttachedTransportChildren(), and clears
the attachment when the player disembarks.
2026-03-17 10:40:35 -07:00
Kelsi
f5297f9945 feat: show craft queue count on cast bar during batch crafting 2026-03-17 10:30:18 -07:00
Kelsi
9aed192503 fix: load skill DBCs on login and handle loot slot changes
- Load SkillLine.dbc and SkillLineAbility.dbc during SMSG_INITIAL_SPELLS
  so isProfessionSpell() works immediately without visiting a trainer
- Implement SMSG_LOOT_SLOT_CHANGED handler to remove items taken by
  other players in group loot, keeping the loot window in sync
2026-03-17 10:20:29 -07:00
Kelsi
7b03d5363b feat: profession crafting improvements and combat sound fixes
- Suppress spell sounds for profession/tradeskill spells (crafting is silent)
- Add craft quantity UI to profession trainer: recipe selector, quantity
  input, Create button, and Stop button for active queue
- Known recipes show Create button to cast directly from trainer window
- Craft queue auto-recasts on CREATE_ITEM completion, cancels on failure
- Fix missing combat sounds: player spell impacts on enemies, enemy spell
  cast sounds targeting player, instant melee ability weapon sounds
2026-03-17 10:12:49 -07:00
Kelsi
502d506a44 feat: make bag windows draggable 2026-03-17 10:12:35 -07:00
Kelsi
192c6175b8 feat: add brightness slider to Video settings
Black overlay dims below 50%, white overlay brightens above 50%.
Persisted in settings.cfg, with restore-defaults support.
2026-03-17 09:04:53 -07:00
Kelsi
cf3fe70f1f fix: hide window on shutdown to prevent OS force-close dialog
SDL_HideWindow immediately on shutdown so the OS doesn't show a
"not responding" dialog during the slow cleanup process.
2026-03-17 09:04:47 -07:00
Kelsi
3667ff4998 fix: use uniform 22-byte loot item size for Classic/TBC/Turtle
SMSG_LOOT_RESPONSE items include randomSuffix and randomPropertyId
fields across all expansions, not just WotLK. Using 14-byte size for
Classic/TBC caused item data to be read at wrong offsets.
2026-03-17 09:04:40 -07:00