Commit graph

195 commits

Author SHA1 Message Date
Kelsi
79c0887db2 feat: add BG scoreboard (MSG_PVP_LOG_DATA) and fix TBC aura cache for party frames
- Parse MSG_PVP_LOG_DATA to populate BgScoreboardData (players, KB, deaths,
  HKs, honor, BG-specific stats, winner)
- Add /score command to request the scorecard while in a battleground
- Render sortable per-player table with team color-coding and self-highlight
- Refresh button re-requests live data from server
- Fix TBC SMSG_INIT/SET_EXTRA_AURA_INFO_OBSOLETE to populate unitAurasCache_
  for all GUIDs (not just player/target), mirroring WotLK aura update behavior
  so party frame debuff dots work on TBC servers
2026-03-12 12:02:59 -07:00
Kelsi
9c276d1072 feat: add encounter-level DPS/HPS tracking to DPS meter
Track cumulative player damage/healing for the full combat encounter
using the persistent CombatLog, shown alongside the existing 2.5s
rolling window. The encounter row appears after 3s of combat and
persists post-combat until the next engagement, giving a stable
full-fight average rather than the spiky per-window reading.
2026-03-12 11:40:31 -07:00
Kelsi
f3e399e0ff feat: show unread message count on chat tabs
Each non-General chat tab now shows an unread count in parentheses
(e.g. "Whispers (3)") when messages arrive while that tab is inactive.
The counter clears when the tab is selected. The General tab is excluded
since it shows all messages anyway.
2026-03-12 11:23:01 -07:00
Kelsi
afcd6f2db3 feat: add CHANNEL option to chat type dropdown with channel picker
Adds an 11th chat type "CHANNEL" to the dropdown, displaying a secondary
combo box populated from the player's joined channels. Typing /1, /2 etc.
in the input now also auto-switches the dropdown to CHANNEL mode and
selects the corresponding channel. Input text is colored cyan for channel
messages to visually distinguish them from other chat types.
2026-03-12 11:16:42 -07:00
Kelsi
20fef40b7b feat: show area trigger messages as screen banners
SMSG_AREA_TRIGGER_MESSAGE events (dungeon enter messages, objective
triggers, etc.) were previously only appended to chat. Now they also
appear as animated slide-up toasts in the lower-center of the screen:
blue-bordered dark panel with light-blue text, 4.5s lifetime with
35ms slide-in/out animation. Up to 4 simultaneous toasts stack
vertically. Messages still go to chat as before.
2026-03-12 11:06:40 -07:00
Kelsi
661f7e3e8d feat: add persistent combat log window (/combatlog or /cl)
Stores up to 500 combat events in a rolling deque alongside the existing
floating combat text. Events are populated via the existing addCombatText()
call site, resolving attacker/target names from the entity manager and
player name cache at event time.

- CombatLogEntry struct in spell_defines.hpp (type, amount, spellId,
  isPlayerSource, timestamp, sourceName, targetName)
- getCombatLog() / clearCombatLog() accessors on GameHandler
- renderCombatLog() in GameScreen: scrollable two-column table (Time +
  Event), color-coded by event category, with Damage/Healing/Misc filter
  checkboxes, auto-scroll toggle, and Clear button
- /combatlog (/cl) chat command toggles the window
2026-03-12 11:00:10 -07:00
Kelsi
367390a852 feat: add /who results window with sortable player table
Store structured WhoEntry data from SMSG_WHO responses and show them
in a dedicated popup window with Name/Guild/Level/Class/Zone columns.
Right-click on any row to Whisper, Invite, Add Friend, or Ignore.
Window auto-opens when /who or /whois is typed; shows online count
in the title bar. Results persist until the next /who query.
2026-03-12 10:41:18 -07:00
Kelsi
1f7f1076ca feat: add Shaman totem frame with element-colored duration bars
- Renders below pet frame, visible only for Shaman (class 7)
- Shows each active totem (Earth/Fire/Water/Air) with its spell name
  and a colored countdown progress bar
- Colored element dot (brown/red/blue/light-blue) identifies element
- Only rendered when at least one totem is active
2026-03-12 10:14:44 -07:00
Kelsi
8a24638ced fix: use uint64_t for chat tab typeMask to avoid UB for ChatType values >= 32, add missing boss/party chat types to Combat tab 2026-03-12 08:54:29 -07:00
Kelsi
9a08edae09 feat: add Low Health Vignette toggle in Settings > Interface
The persistent red-edge vignette (below 20% HP) now has an on/off
checkbox under Settings > Interface > Screen Effects, alongside the
existing Damage Flash toggle. The preference is persisted to settings.cfg.
2026-03-12 07:15:08 -07:00
Kelsi
9a21e19486 feat: highlight chat messages that mention the local player
When a chat message contains the player's character name, the message
is rendered with a golden highlight background and bright yellow text.
A whisper notification sound plays (at most once per new-message scan)
to alert the player. Outgoing whispers and system messages are
excluded from mention detection.
2026-03-12 06:45:27 -07:00
Kelsi
c14b338a92 feat: add Tab autocomplete for slash commands in chat input
Pressing Tab while typing a slash command cycles through all matching
commands (e.g. /em<Tab> → /emote, /emote<Tab> → /emote again).
Unambiguous matches append a trailing space. Repeated Tab presses
cycle forward through all matches. History navigation (Up/Down)
resets the autocomplete session.
2026-03-12 06:38:10 -07:00
Kelsi
e8fe53650b feat: add respawn countdown timer to the death dialog
The "You are dead." dialog now shows a "Release in M:SS" countdown
tracking time elapsed since death. The countdown runs from 6 minutes
(WoW's forced-release window) and disappears once it reaches zero.
Timer resets automatically when the player is no longer dead.
2026-03-12 06:14:18 -07:00
Kelsi
bc5a7867a9 feat: zone entry toast and unspent talent points indicator
- Zone entry toast: centered slide-down banner when entering a new
  zone (tracks renderer's zone name, fires on change)
- Talent indicator: pulsing green '! N Talent Points Available' below
  minimap alongside existing New Mail / BG queue indicators
2026-03-12 05:44:25 -07:00
Kelsi
c35bf8d953 feat: add duel countdown overlay (3-2-1-Fight!)
Parse SMSG_DUEL_COUNTDOWN to get the countdown duration, track the
start time, and render a large centered countdown overlay. Numbers
display in pulsing gold; transitions to pulsing red 'Fight!' for the
last 0.5 seconds. Countdown clears on SMSG_DUEL_COMPLETE.
2026-03-12 05:06:14 -07:00
Kelsi
29a989e1f4 feat: add reputation bar above XP bar
Show a color-coded reputation progress bar for the most recently gained
faction above the XP bar. The bar is auto-shown when any faction rep
changes (watchedFactionId_ tracks the last changed faction). Colors
follow WoW conventions: red=Hated/Hostile, orange=Unfriendly,
yellow=Neutral, green=Friendly, blue=Honored, purple=Revered,
gold=Exalted. Tooltip shows exact standing values on hover.
2026-03-12 05:03:03 -07:00
Kelsi
b34bf39746 feat: add quest completion toast notification
When a quest is turned in (SMSG_QUESTGIVER_QUEST_COMPLETE), a gold-bordered
toast slides in from the right showing "Quest Complete" header with the quest
title, consistent with the rep change and achievement toast systems.
2026-03-12 04:53:03 -07:00
Kelsi
d14982d125 feat: add DPS/HPS meter showing real-time damage and healing output
Floating window right of the cast bar showing player's DPS and healing
per second, derived from combat text entries. Uses actual combat duration
as denominator for accurate readings at fight start. Toggle in Settings
> Network. Saves to settings.cfg.
2026-03-12 04:04:27 -07:00
Kelsi
797bb5d964 feat: add center-screen raid warning and boss emote overlay
RAID_WARNING messages show as flashing red/yellow large text.
RAID_BOSS_EMOTE and MONSTER_EMOTE show as amber text.
Each message fades in quickly, holds for 5 seconds, then fades out.
Up to 3 messages stack vertically below the target frame area.
Dark semi-transparent background box improves readability.
Messages are detected from new chat history entries each frame.
2026-03-12 03:52:54 -07:00
Kelsi
fa947eb9c7 Add quest objective tracker overlay on right side of screen
Shows tracked quests (or first 5 active quests if none tracked) below the
minimap with live kill/item objective counts and completion status.
2026-03-12 03:39:10 -07:00
Kelsi
6cf511aa7f Add damage flash toggle setting and fix map explored zone reveal
Persist damage_flash to settings.cfg; checkbox in Interface > Screen Effects.
Fix world map fog: trust server exploration mask unconditionally when present,
always reveal the current zone immediately regardless of server mask state.
2026-03-12 03:21:49 -07:00
Kelsi
920950dfbd Add threat list window showing live aggro data for current target
Store SMSG_THREAT_UPDATE/SMSG_HIGHEST_THREAT_UPDATE in a per-unit map
(sorted descending by threat) and clear on SMSG_THREAT_REMOVE/CLEAR.
Show a threat window (/threat or via target frame button) with a progress
bar per player and gold highlight for the tank, red if local player has aggro.
2026-03-12 02:59:09 -07:00
Kelsi
43de2be1f2 Add inspect window showing talent summary and gear for inspected players
Store inspect results (talent points, dual-spec state, gear entries) in a
new InspectResult struct instead of discarding them as chat messages.
Open the inspect window automatically from all Inspect menu items and /inspect.
2026-03-12 02:52:40 -07:00
Kelsi
2bdd024f19 Add GM Ticket window (/ticket, /gm commands and Esc menu button) 2026-03-12 02:31:12 -07:00
Kelsi
f4754797bc Add Achievements list window (Y key toggle) with search filter 2026-03-12 02:09:35 -07:00
Kelsi
1bc3e6b677 Add Channels tab to social frame and reputation change toast
Social frame now has three tabs: Friends, Ignore, and Channels. The
Channels tab lists joined channels with right-click Leave and an input
to join new channels.

Also adds a slide-in reputation change toast in the lower-right corner:
shows faction name, delta (+/-), and current standing tier (Honored,
Revered, etc.) whenever SMSG_SET_FACTION_STANDING fires a rep change.
2026-03-12 01:51:18 -07:00
Kelsi
25e2c60603 Add UIErrorsFrame: center-bottom spell error overlay with fade-out 2026-03-12 01:15:11 -07:00
Kelsi
9e5f7c481e Wire achievement toast and ding effect callbacks
Level-up now calls triggerDing() (sound + emote + fade text) in addition to
the screen flash. Achievement earned now calls triggerAchievementToast() via
setAchievementEarnedCallback(), making the existing toast animation visible.
2026-03-12 00:56:31 -07:00
Kelsi
c0f19f5883 Add missing context menu items and nameplate right-click menus
- Focus frame: add Add Friend / Ignore items for player targets
- Guild roster: add Add Friend / Ignore items to member context menu
- Nameplates: right-click shows Target/Set Focus/Whisper/Invite/Friend/Ignore popup
2026-03-12 00:26:47 -07:00
Kelsi
88436fa400 Add jump-to-bottom indicator in chat when scrolled up
Shows a "New messages" button below the chat history area when the
user has scrolled away from the latest messages. Clicking it jumps
back to the most recent messages.
2026-03-11 23:24:27 -07:00
Kelsi
7e271df032 Add level-up golden burst overlay effect
When the player gains a level, a golden vignette flashes on screen edges
and a large "Level X!" text briefly appears in the center, both fading
over ~1 second. Uses the existing LevelUpCallback from GameHandler.
2026-03-11 23:10:21 -07:00
Kelsi
682cb8d44b Add chat input history navigation with Up/Down arrows
Up arrow in the chat input field recalls previously sent messages.
Down arrow moves forward through history; going past the end clears input.
History stores up to 50 unique entries and resets position after each send.
2026-03-11 23:06:24 -07:00
Kelsi
97662800d5 Add /target command and screen damage flash vignette
/target <name> searches visible entities by case-insensitive prefix match.
Red vignette flashes on screen edges when player HP drops, fading over 0.5s.
2026-03-11 22:57:04 -07:00
Kelsi
6e7a32ec7f Add nameplate scale setting to Interface settings tab
Adds a 0.5x-2.0x scale slider under Nameplates in the Interface settings tab. The scale multiplies the base 80×8px nameplate health bar dimensions. Setting is persisted to settings.cfg as 'nameplate_scale'.
2026-03-11 22:49:54 -07:00
Kelsi
355001c236 Add action bar scale setting to Interface settings tab
Adds a 0.5x-1.5x scale slider under Action Bars in the Interface settings tab. The scale multiplies the base 48px slot size for both the main bar and XP bar layout calculations. The setting is persisted to settings.cfg as 'action_bar_scale'.
2026-03-11 22:39:59 -07:00
Kelsi
2f1c9eb01b Add FOV slider to settings, expand combat chat tab with skills/achievements/NPC speech 2026-03-11 22:13:22 -07:00
Kelsi
43c0e9b2e8 Add spell search filter to trainer window 2026-03-11 21:21:14 -07:00
Kelsi
bbf4806fe8 Add item search filter to vendor window 2026-03-11 21:19:47 -07:00
Kelsi
711cb966ef Fix chest interaction and measure server RTT for latency meter
Chests (and lockboxes, coffers, etc.) failed to open because CMSG_LOOT
was only sent on Classic/Turtle expansions, and only when GO type was
already cached as type 3.  Fix: always send CMSG_LOOT after
CMSG_GAMEOBJ_USE (server silently ignores it for non-lootable objects).
Also broaden CMSG_GAMEOBJ_REPORT_USE to all non-mailbox WotLK GOs.

Latency meter: record pingTimestamp_ in sendPing() and compute RTT in
handlePong(); add toggleable "Show Latency Meter" checkbox in Interface
settings (saved to settings.cfg).
2026-03-11 19:45:03 -07:00
Kelsi
6f7c57d975 feat: add graphics quality presets system
Implement quick-access quality presets (Low, Medium, High, Ultra) that adjust multiple graphics settings at once for better user experience. Each preset configures:
- Shadow rendering and distance
- Anti-aliasing (MSAA) level
- Normal mapping and parallax mapping
- Ground clutter density

The system automatically detects when settings deviate from a preset and marks them as "Custom". Presets are persisted to settings.cfg for consistency across sessions. Users can quickly switch between performance and quality modes or tweak individual settings as needed.
2026-03-11 15:21:48 -07:00
Kelsi
1808d98978 feat: implement TOGGLE_MINIMAP and TOGGLE_RAID_FRAMES keybindings
- Add showMinimap_ and showRaidFrames_ visibility flags to GameScreen
- Wire up TOGGLE_MINIMAP (M key) to toggle minimap visibility
- Wire up TOGGLE_RAID_FRAMES (F key) to toggle party/raid frame visibility
- Conditional rendering of minimap markers and party frames
- Completes keybinding manager integration for all 15 customizable actions
2026-03-11 09:24:37 -07:00
Kelsi
a3e0d36a72 feat: add World Map visibility toggle with keybinding support
Implement showWorldMap_ state variable and TOGGLE_WORLD_MAP keybinding
integration to allow players to customize the W key binding for opening/
closing the World Map, consistent with other window toggles like Nameplates
(V key) and Guild Roster (O key).
2026-03-11 07:38:08 -07:00
Kelsi
f7a79b436e feat: integrate keybinding customization UI into Settings window
- Extended KeybindingManager enum with TOGGLE_GUILD_ROSTER (O) and
  TOGGLE_DUNGEON_FINDER (J) to replace hard-coded key checks
- Added Controls tab in Settings UI for rebinding all 10 customizable actions
- Implemented real-time key capture and binding with visual feedback
- Integrated keybinding persistence with main settings.cfg file
- Replaced hard-coded O key (Guild Roster) and I key (Dungeon Finder) checks
  with KeybindingManager::isActionPressed() calls
- Added Reset to Defaults button for restoring original keybindings
2026-03-11 06:51:48 -07:00
Kelsi
06facc0060 feat: implement trade window UI with item slots and gold offering
Previously trade only showed an accept/decline popup with no way to
actually offer items or gold. This commit adds the complete trade flow:

Packets:
- CMSG_SET_TRADE_ITEM (tradeSlot, bag, bagSlot) — add item to slot
- CMSG_CLEAR_TRADE_ITEM (tradeSlot) — remove item from slot
- CMSG_SET_TRADE_GOLD (uint64 copper) — set gold offered
- CMSG_UNACCEPT_TRADE — unaccept without cancelling
- SMSG_TRADE_STATUS_EXTENDED parser — updates trade slot/gold state

State:
- TradeSlot struct: itemId, displayId, stackCount, bag, bagSlot
- myTradeSlots_/peerTradeSlots_ arrays (6 slots each)
- myTradeGold_/peerTradeGold_ (copper)
- resetTradeState() helper clears all state on cancel/complete/close

UI (renderTradeWindow):
- Two-column layout: my offer | peer offer
- Each column shows 6 item slots with item names
- Double-click own slot to remove; right-click empty slot to open
  backpack picker popup
- Gold input field (copper, Enter to set)
- Accept Trade / Cancel buttons
- Window close button triggers cancel trade
2026-03-11 00:44:07 -07:00
Kelsi
8f2974b17c feat: add standalone LFG group-found popup (renderLfgProposalPopup)
Shows a centered modal when LfgState::Proposal is active regardless of
whether the Dungeon Finder window is open, matching WoW behaviour where
the accept/decline prompt always appears over the game world.
Mirrors the BG invite popup pattern; buttons call lfgAcceptProposal().
2026-03-10 21:40:21 -07:00
Kelsi
8ab83987f1 feat: focus target frame with health/power bars and cast bar
Add a compact focus target frame on the right side of the screen
when the player has a focus target set via /focus.

- Shows [Focus] label, name (colored by hostility/level diff), level
- HP bar with green→yellow→red coloring; power bar with type colors
- Cast bar showing spell name and remaining time when focus is casting
- Clicking the frame targets the focus entity
- Clears automatically when focus is lost (/clearfocus)
2026-03-10 21:15:24 -07:00
Kelsi
a7a559cdcc feat: battleground invitation popup with countdown timer
Replace the text-only "/join to enter" message with an interactive
popup that shows the BG name, a live countdown progress bar, and
Enter/Leave Queue buttons.

- Parse STATUS_WAIT_JOIN timeout from SMSG_BATTLEFIELD_STATUS
- Store inviteReceivedTime (steady_clock) on the queue slot
- BgQueueSlot moved to public section so UI can read invite details
- Add declineBattlefield() that sends CMSG_BATTLEFIELD_PORT(action=0)
- acceptBattlefield() optimistically sets statusId=3 to dismiss popup
- renderBgInvitePopup: colored countdown bar (green→yellow→red),
  named BG (Alterac Valley, Warsong Gulch, etc.), auto-dismisses on expiry
2026-03-10 21:12:28 -07:00
Kelsi
6275a45ec0 feat: achievement name in toast, parse earned achievements, loot item tooltips
- Parse SMSG_ALL_ACHIEVEMENT_DATA on login to populate earnedAchievements_ set
- Pass achievement name through callback so toast shows name instead of ID
- Add renderItemTooltip(ItemQueryResponseData) overload for loot/non-inventory contexts
- Loot window now shows full item tooltip on hover (stats, sell price, bind type, etc.)
2026-03-10 20:53:21 -07:00
Kelsi
bee4dde9b7 ui: add side action bars, fix resize positioning, and fix player nameplates
Action bars:
- Expand from 2 bars (24 slots) to 4 bars (48 slots)
- Bar 2: right-edge vertical bar (slots 24-35), off by default
- Bar 3: left-edge vertical bar (slots 36-47), off by default
- New "Interface" settings tab with toggles and offset sliders for all bars
- XP bar Y position now tracks bar 2 visibility and vertical offset

HUD resize fix:
- All HUD elements (action bars, bag bar, XP bar, cast bar, mirror timers)
  now use ImGui::GetIO().DisplaySize instead of window->getWidth/Height()
- DisplaySize is always in sync with the current frame — eliminates the
  one-frame lag that caused bars to misalign after window resize

Player nameplates:
- Show player name only on nameplate (no level number clutter)
- Fall back to "Player (level)" while name query is pending
- NPC nameplates unchanged (still show "level Name")
2026-03-10 15:56:41 -07:00
Kelsi
ec5e7c66c3 fix: derive rest state from PLAYER_BYTES_2 and add action bar 2 settings
XP bar rest state:
- isResting_ now set from PLAYER_BYTES_2 byte 3 bit 0 (rest state flag)
  on both CREATE and VALUES update object handlers
- playerRestedXp_ was missing from VALUES handler — now tracked there too
- Eliminates dependency on SMSG_SET_REST_START (wrong in WotLK opcodes.json)

Interface settings:
- New "Interface" tab in Settings window
- "Show Second Action Bar" toggle (default: on)
- Horizontal/vertical position offset sliders for bar 2
- Settings persisted to/from save file
2026-03-10 15:45:35 -07:00