Commit graph

792 commits

Author SHA1 Message Date
Kelsi
57ccee2c28 feat: show grey target frame name for tapped mobs
Extend the tapped-by-other-player check to the target frame. Mobs
tagged by another player now show a grey name color on the target
frame, matching the grey nameplate treatment and WoW's behavior.

Players can now see at a glance on both nameplates AND target frame
whether a mob is tagged.
2026-03-21 08:37:39 -07:00
Kelsi
586e9e74ff feat: show grey nameplates for mobs tapped by other players
Check UNIT_DYNFLAG_TAPPED_BY_PLAYER (0x0004) on hostile NPC nameplates.
Mobs tagged by another player now show grey health bars instead of red,
matching WoW's visual indication that the mob won't yield loot/XP.

Mobs with TAPPED_BY_ALL_THREAT_LIST (0x0008) still show red since
those are shared-tag mobs that give loot to everyone.
2026-03-21 08:33:54 -07:00
Kelsi
8229a963d1 feat: add player name tab-completion in chat input
When typing commands like /w, /whisper, /invite, /trade, /duel, /follow,
/inspect, etc., pressing Tab now cycles through matching player names.

Name sources (in priority order):
1. Last whisper sender (most likely target for /r follow-ups)
2. Party/raid members
3. Friends list
4. Nearby visible players

Tab cycles through all matches; single match auto-appends a space.
Complements the existing slash-command tab-completion.
2026-03-21 03:49:02 -07:00
Kelsi
e64f9f4585 fix: add mail, auction, quest, and trade windows to Escape key chain
The Escape key now properly closes these windows before showing the
escape menu:
- Mail window (closeMailbox)
- Auction house (closeAuctionHouse)
- Quest details dialog (declineQuest)
- Quest offer reward dialog (closeQuestOfferReward)
- Quest request items dialog (closeQuestRequestItems)
- Trade window (cancelTrade)

Previously these windows required clicking their close button since
Escape would skip directly to the escape menu.
2026-03-21 03:24:23 -07:00
Kelsi
bc4ff501e2 feat: show random suffix names in AH bids and seller auction tabs
Extend random property name resolution to the Bids tab and Your Auctions
(seller) tab. All three auction house tabs now display items with their
full suffix names (e.g., "Gloves of the Monkey" instead of "Gloves").
2026-03-20 19:37:17 -07:00
Kelsi
a13dfff9a1 feat: show random suffix names in auction house item listings
Append suffix name from getRandomPropertyName() to auction browse results
so items display as "Leggings of the Eagle" instead of just "Leggings"
in the auction house search table. Uses the randomPropertyId field from
the SMSG_AUCTION_LIST_RESULT packet data.
2026-03-20 19:33:01 -07:00
Kelsi
14007c81df feat: add /cancelqueuedspell command to clear spell queue
Add cancelQueuedSpell() method that clears queuedSpellId_ and
queuedSpellTarget_. Wire /cancelqueuedspell and /stopspellqueue
slash commands. Useful for combat macros that need to prevent
queued spells from firing after a current cast.
2026-03-20 17:24:16 -07:00
Kelsi
e6fbdfcc02 feat: add /dump command for Lua expression evaluation and debugging
/dump <expression> evaluates a Lua expression and prints the result to
chat. For tables, iterates key-value pairs and displays them. Aliases:
/print. Useful for addon development and debugging game state queries
like "/dump GetSpellInfo(133)" or "/dump UnitHealth('player')".
2026-03-20 17:05:48 -07:00
Kelsi
bf62061a31 feat: expand slash command autocomplete with 30+ missing commands
Add /reload, /reloadui, /rl, /ready, /notready, /readycheck, /cancellogout,
/clearmainassist, /clearmaintank, /mainassist, /maintank, /cloak, /gdemote,
/gkick, /gleader, /gmotd, /gpromote, /gquit, /groster, /leaveparty,
/removefriend, /score, /script, /targetenemy, /targetfriend, /targetlast,
/ticket, and more to the tab-completion list. Alphabetically sorted.
2026-03-20 16:29:32 -07:00
Kelsi
21ead2aa4b feat: add /reload command to re-initialize addon system
Add AddonManager::reload() which saves all SavedVariables, shuts down the
Lua VM, re-initializes it, rescans .toc files, and reloads all addons.
Wire /reload, /reloadui, /rl slash commands that call reload() and fire
VARIABLES_LOADED + PLAYER_LOGIN + PLAYER_ENTERING_WORLD lifecycle events.
Essential for addon development and troubleshooting.
2026-03-20 16:17:04 -07:00
Kelsi
23ebfc7e85 feat: add LFG role check confirmation popup with CMSG_LFG_SET_ROLES
When the dungeon finder initiates a role check (SMSG_LFG_ROLE_CHECK_UPDATE
state=2), show a centered popup with Tank/Healer/DPS checkboxes and
Accept/Leave Queue buttons. Accept sends CMSG_LFG_SET_ROLES with the
selected role mask. Previously only showed passive "Role check in progress"
text with no way to respond.
2026-03-20 16:10:29 -07:00
Kelsi
d1bcd2f844 fix: resolve compiler warnings in lua_engine and game_screen
Remove unused getPlayerUnit() helper in lua_engine.cpp (-Wunused-function).
Increase countStr buffer from 8 to 16 bytes in action bar item count
display to eliminate -Wformat-truncation warning for %d with int32_t.
Build is now warning-free.
2026-03-20 15:53:43 -07:00
Kelsi
e033efc998 feat: add bid status indicators to auction house UI
Show [Winning] (green) or [Outbid] (red) labels on the Bids tab based on
bidderGuid vs player GUID comparison. Show [Bid] (gold) indicator on the
seller's Auctions tab when someone has placed a bid on their listing.
Improves auction house usability by making bid status visible at a glance.
2026-03-20 15:31:41 -07:00
Kelsi
5eaf738b66 feat: show quest POI markers on the world map overlay
Add QuestPoi struct and setQuestPois() to WorldMap, render quest objective
markers as cyan circles with golden outlines and quest title labels. Wire
gossipPois_ (from SMSG_QUEST_POI_QUERY_RESPONSE) through GameScreen to the
world map so quest objectives are visible alongside party dots and taxi nodes.
2026-03-20 15:00:29 -07:00
Kelsi
c1820fd07d feat: add WoW utility functions and SlashCmdList for addon slash commands
Utility functions:
- strsplit(delim, str), strtrim(str), wipe(table)
- date(format), time() — safe replacements for removed os.date/os.time
- format (alias for string.format), tinsert/tremove (table aliases)

SlashCmdList system:
- Addons can register custom slash commands via the standard WoW pattern:
  SLASH_MYADDON1 = "/myaddon"
  SlashCmdList["MYADDON"] = function(args) ... end
- Chat input checks SlashCmdList before built-in commands
- dispatchSlashCommand() iterates SLASH_<NAME>1..9 globals to match

Total WoW API surface: 23 functions + SlashCmdList + 14 events.
2026-03-20 11:40:58 -07:00
Kelsi
290e9bfbd8 feat: add Lua 5.1 addon system with .toc loader and /run command
Foundation for WoW-compatible addon support:

- Vendor Lua 5.1.5 source as a static library (extern/lua-5.1.5)
- TocParser: parses .toc files (## directives + file lists)
- LuaEngine: Lua 5.1 VM with sandboxed stdlib (no io/os/debug),
  WoW-compatible print() that outputs to chat, GetTime() stub
- AddonManager: scans Data/interface/AddOns/ for .toc files,
  loads .lua files on world entry, skips LoadOnDemand addons
- /run <code> slash command for inline Lua execution
- HelloWorld test addon that prints to chat on load

Integration: AddonManager initialized after asset manager, addons
loaded once on first world entry, reset on logout. XML frame
parsing is deferred to a future step.
2026-03-20 11:12:07 -07:00
Kelsi
52064eb438 feat: show item tooltip for /use macros when spell tooltip unavailable
When hovering a /use macro whose item's on-use spell isn't in the DBC
(no rich spell tooltip available), the tooltip fell back to showing raw
macro text. Now searches the item info cache and shows the full item
tooltip (stats, quality, binding, description) as a more useful
fallback for /use macros.
2026-03-20 10:12:42 -07:00
Kelsi
71a3abe5d7 feat: show item icon for /use macros on action bar
Macros with /use ItemName tried to find the item as a spell name for
icon resolution, which fails for items without a matching spell (e.g.
engineering trinkets, quest items). Now falls back to searching the
item info cache by name and showing the item's display icon when no
spell name matches.
2026-03-20 10:06:14 -07:00
Kelsi
6b61d24438 feat: document mouseover and @ target syntax in /macrohelp
Add [target=mouseover] and the @ shorthand syntax (@focus, @pet,
@mouseover, @player, @target) to the /macrohelp output. These are
commonly used for mouseover healing macros and were already supported
but not documented in the in-game help.
2026-03-20 09:32:14 -07:00
Kelsi
52d8da0ef0 feat: update /help output with missing commands
The /help text was missing several commonly-used commands: /castsequence,
/use, /threat, /combatlog, /mark, /raidinfo, /assist, /inspect,
/chathelp. Reorganized categories for clarity and added all missing
entries to match the expanded auto-complete list.
2026-03-20 09:27:22 -07:00
Kelsi
0e14174764 feat: expand chat auto-complete with 30+ missing slash commands
Many working slash commands were missing from the chat auto-complete
suggestions: /equipset, /focus, /clearfocus, /cleartarget, /inspect,
/played, /screenshot, /pvp, /duel, /threat, /unstuck, /logout, /loc,
/friend, /ignore, /unignore, /ginvite, /mark, /raidinfo, /helm,
/forfeit, /kneel, /assist, /castsequence, /stopmacro, /help, and more.
Reorganized alphabetically for maintainability.
2026-03-20 09:23:21 -07:00
Kelsi
6bd950e817 feat: support /use macros for action bar icon and indicators
Macros with /use ItemName (e.g. /use Healthstone, /use Engineering
trinket) had no icon, cooldown, or tooltip on the action bar because
only /cast and /castsequence were recognized. Now the spell resolution
also handles /use by looking up the item name in the item info cache
and finding its on-use spell ID. Added getItemInfoCache() accessor.
2026-03-20 09:08:49 -07:00
Kelsi
b960a1cdd5 fix: invalidate macro spell cache when spells are learned/removed
The macro primary spell cache stored 0 (no spell found) when a macro
referenced a spell the player hadn't learned yet. After learning the
spell from a trainer or leveling up, the cache was never refreshed,
so the macro button stayed broken. Now tracks the known spell count
and clears the cache when it changes, ensuring newly learned spells
are resolved on the next frame.
2026-03-20 08:52:57 -07:00
Kelsi
87e1ac7cdd feat: support /castsequence macros for action bar icon and indicators
Macros with /castsequence were treated as having no primary spell, so
they showed no icon, cooldown, range, power, or tooltip on the action
bar. Now both resolveMacroPrimarySpellId() and the icon derivation
code recognize /castsequence commands, strip the reset= spec, and
use comma-separation to find the first spell in the sequence. This
gives /castsequence macros the same visual indicators as /cast macros.
2026-03-20 08:43:19 -07:00
Kelsi
a5609659c7 feat: show cast-failed red flash on macro action bar buttons
The error-flash overlay (red fade on spell cast failure) only applied to
SPELL-type slots. Macro buttons never flashed red when their primary
spell failed to cast. Now resolves the macro's primary spell and checks
the actionFlashEndTimes_ map for a matching flash, completing macro
action bar parity with spell buttons across all 6 visual indicators.
2026-03-20 08:38:24 -07:00
Kelsi
a2df2ff596 feat: show insufficient-power tint on macro action bar buttons
The insufficient-power indicator only applied to SPELL-type slots.
Macro buttons like /cast Fireball never showed the power tint when the
player was out of mana. Now resolves the macro's primary spell and
checks its power cost against the player's current power, giving the
same visual feedback as regular spell buttons.
2026-03-20 08:32:07 -07:00
Kelsi
1d53c35ed7 feat: show out-of-range red tint on macro action bar buttons
The out-of-range indicator (red tint) only applied to SPELL-type action
bar slots. Macro buttons like /cast Frostbolt never turned red even when
the target was out of range. Now resolves the macro's primary spell via
the cached lookup and checks its max range against the target distance,
giving the same visual feedback as regular spell buttons.
2026-03-20 08:27:10 -07:00
Kelsi
3b20485c79 feat: show spell tooltip on macro action bar hover
Hovering a macro button on the action bar previously showed "Macro #N"
with raw macro text. Now resolves the macro's primary spell via the
cached lookup and shows its full rich tooltip (name, school, cost, cast
time, range, description) — same as hovering a regular spell button.
Falls back to the raw text display if no primary spell is found.
Also shows the cooldown remaining in red when the spell is on cooldown.
2026-03-20 08:18:28 -07:00
Kelsi
a103fb5168 fix: key macro cooldown cache by macro ID instead of slot index
The macro primary spell cache was keyed by action bar slot index, so
switching characters or rearranging macros could return stale spell IDs
from the previous character's macro in that slot. Now keyed by macro ID,
which is stable per-macro regardless of which slot it occupies.
2026-03-20 08:14:08 -07:00
Kelsi
bfbf590ee2 refactor: cache macro primary spell ID to avoid per-frame name search
The macro cooldown display from the previous commit iterated all known
spells (400+) every frame for each macro on the action bar, doing
lowercase string comparisons. Moved the spell name resolution into a
cached lookup (macroPrimarySpellCache_) that only runs once per macro
and is invalidated when macro text is edited. The per-frame path now
just does a single hash map lookup + spellCooldowns check.
2026-03-20 08:11:13 -07:00
Kelsi
670055b873 feat: show spell cooldown on macro action bar buttons
Macro buttons on the action bar never showed cooldowns — a /cast
Fireball macro would display no cooldown sweep or timer even when
Fireball was on cooldown. Now resolves the macro's primary spell (from
the first /cast command, stripping conditionals and alternatives) and
checks its cooldown via spellCooldowns. The cooldown sweep overlay and
countdown text display using the resolved spell's remaining time.
2026-03-20 08:07:20 -07:00
Kelsi
625754f0f7 fix: let FSR3 settings persist across restarts without env var
FSR2/FSR3 upscaling mode was forcibly reverted to FSR1 on every startup
unless the WOWEE_ALLOW_STARTUP_FSR2 environment variable was set. This
meant users had to re-select FSR 3.x and re-enable frame generation on
every launch. Removed the env var requirement since the deferred
activation (wait until IN_WORLD state) already provides sufficient
startup safety by preventing FSR init during login/character screens.
2026-03-20 07:53:07 -07:00
Kelsi
72993121ab feat: add pulsing yellow flash to chat tabs with unread messages
Chat tabs with unread messages now pulse yellow to attract attention.
The existing unread count "(N)" suffix was text-only and easy to miss,
especially for whisper and guild tabs. The pulsing color clears when
the tab is clicked, matching standard WoW chat tab behavior.
2026-03-20 06:47:39 -07:00
Kelsi
22742fedb8 feat: add [raid], [noraid], and [spec:N] macro conditionals
Add commonly-used WoW macro conditionals:
- [raid]/[noraid] — checks if the player is in a raid group (groupType
  == 1) vs a regular party. Used for conditional healing/targeting in
  raid content.
- [spec:1]/[spec:2] — checks the active talent spec (1-based index).
  Used for dual-spec macros that swap gear sets or use different
  rotations per spec.

Updated /macrohelp to list the new conditionals.
2026-03-20 06:42:43 -07:00
Kelsi
a6fe5662c8 fix: implement [target=pet] and [@pet] macro target specifiers
The /macrohelp listed [target=pet] as supported but the conditional
evaluator didn't handle the "pet" specifier for target= or @ syntax.
Now resolves to the player's active pet GUID (or skips the alternative
if no pet is active). Essential for hunter/warlock macros like:
  /cast [target=pet] Mend Pet
  /cast [@pet,dead] Revive Pet
2026-03-20 06:38:13 -07:00
Kelsi
fa82d32a9f feat: add [indoors]/[outdoors] macro conditionals via WMO detection
Add indoor/outdoor state macro conditionals using the renderer's WMO
interior detection. Essential for mount macros that need to select
ground mounts indoors vs flying mounts outdoors. The Renderer now
caches the insideWmo state in playerIndoors_ and exposes it via
isPlayerIndoors(). Updated /macrohelp to list the new conditionals.
2026-03-20 06:29:33 -07:00
Kelsi
114478271e feat: add [pet], [nopet], [group], [nogroup] macro conditionals
Add frequently-used macro conditionals for pet and group state:
- [pet]/[nopet] — checks if the player has an active pet (hunters,
  warlocks, DKs). Essential for pet management macros.
- [group]/[nogroup]/[party] — checks if the player is in a party or
  raid. Used for conditional targeting and ability usage.

Updated /macrohelp output to list the new conditionals.
2026-03-20 06:25:02 -07:00
Kelsi
a9e0a99f2b feat: add /macrohelp command to list available macro conditionals
Players can now type /macrohelp to see all supported macro conditionals
grouped by category (state, target, form, keys, aura). Also added to
the /help output and chat auto-complete list. This helps users discover
the macro system without external documentation.
2026-03-20 06:17:23 -07:00
Kelsi
d7059c66dc feat: add mounted/swimming/flying/stealthed/channeling macro conditionals
Add commonly-used WoW macro conditionals that were missing:
- [mounted]/[nomounted] — checks isMounted() state
- [swimming]/[noswimming] — checks SWIMMING movement flag
- [flying]/[noflying] — checks CAN_FLY + FLYING movement flags
- [stealthed]/[nostealthed] — checks UNIT_FLAG_SNEAKING (0x02000000)
- [channeling]/[nochanneling] — checks if currently channeling a spell

These are essential for common macros like mount/dismount toggles,
rogue opener macros, and conditional cast sequences.
2026-03-20 06:13:27 -07:00
Kelsi
29c938dec2 feat: add Isle of Conquest to battleground score frame
Add IoC (map 628) to the BG score display with Alliance/Horde
reinforcement counters (world state keys 4221/4222, max 300).
2026-03-20 05:40:53 -07:00
Kelsi
9d1fb39363 feat: add "Usable" filter to auction house and query token item names
Add a "Usable" checkbox to the AH search UI that filters results to
items the player can actually equip/use (server-side filtering via the
usableOnly parameter in CMSG_AUCTION_LIST_ITEMS). Also ensure token
item names for extended costs are queried from the server via
ensureItemInfo() so they display properly instead of "Item#12345".
2026-03-20 05:34:17 -07:00
Kelsi
5230815353 feat: display detailed honor/arena/token costs for vendor items
Load ItemExtendedCost.dbc and show specific costs (e.g. "2000 Honor",
"200 Arena", "30x Badge of Justice") instead of generic "[Tokens]" for
vendor items with extended costs. Items with both gold and token costs
now show both. Token item names are resolved from item info cache.
2026-03-20 05:28:45 -07:00
Kelsi
0b8e1834f6 feat: group dungeon finder list by expansion with separator headers
Some checks failed
Build / Build (arm64) (push) Has been cancelled
Build / Build (x86-64) (push) Has been cancelled
Build / Build (macOS arm64) (push) Has been cancelled
Build / Build (windows-arm64) (push) Has been cancelled
Build / Build (windows-x86-64) (push) Has been cancelled
Security / CodeQL (C/C++) (push) Has been cancelled
Security / Semgrep (push) Has been cancelled
Security / Sanitizer Build (ASan/UBSan) (push) Has been cancelled
Categorize dungeons into Random/Classic/TBC/WotLK sections with visual
separators in the dropdown for easier navigation.
2026-03-18 12:43:04 -07:00
Kelsi
d149255c58 feat: implement petition signing flow for guild charter creation
Parse SMSG_PETITION_QUERY_RESPONSE, SMSG_PETITION_SHOW_SIGNATURES,
and SMSG_PETITION_SIGN_RESULTS. Add UI to view signatures, sign
petitions, and turn in completed charters. Send CMSG_PETITION_SIGN
and CMSG_TURN_IN_PETITION packets.
2026-03-18 12:31:48 -07:00
Kelsi
41e15349c5 feat: improve arena team UI with names, types, and roster requests
Store team name and type (2v2/3v3/5v5) from SMSG_ARENA_TEAM_QUERY_RESPONSE.
Display proper team labels instead of raw IDs. Add Load/Refresh roster
buttons and CMSG_ARENA_TEAM_ROSTER request support.
2026-03-18 12:26:23 -07:00
Kelsi
aed8c94544 feat: add instance difficulty indicator on minimap
Show Normal/Heroic/25-Man difficulty badge below zone name when inside
a dungeon or raid instance. Orange-highlighted for heroic modes.
2026-03-18 12:21:41 -07:00
Kelsi
801f29f043 fix: sync player appearance after barber shop or polymorph
PLAYER_BYTES and PLAYER_BYTES_2 changes in SMSG_UPDATE_OBJECT now
update the Character struct's appearanceBytes and facialFeatures,
and fire an appearance-changed callback that resets the inventory
screen preview so it reloads with the new hair/face values.
2026-03-18 12:17:00 -07:00
Kelsi
5d5083683f fix: correct Eye of the Storm bgTypeId and simplify BG invite popup
Eye of the Storm uses bgTypeId 7 (from BattlemasterList.dbc), not 6.
BG invite popup now uses the stored bgName from the queue slot instead
of re-deriving the name with a duplicate switch statement.
2026-03-18 12:03:36 -07:00
Kelsi
64fd7eddf8 feat: implement barber shop UI with hair/facial customization
Adds a functional barber shop window triggered by SMSG_ENABLE_BARBER_SHOP.
Players can adjust hair style, hair color, and facial features using
sliders bounded by race/gender max values. Sends CMSG_ALTER_APPEARANCE
on confirm; server result closes the window on success. Escape key
also closes the barber shop.
2026-03-18 11:58:01 -07:00
Kelsi
8dfd916fe4 feat: add right-click context menu to target and focus frames
Right-clicking the target or focus frame name now opens a context
menu with Set Focus/Target, Clear Focus, Whisper, Invite, Trade,
Duel, Inspect, Add Friend, and Ignore options (player-specific
options only shown for player targets).
2026-03-18 11:48:22 -07:00