Commit graph

60 commits

Author SHA1 Message Date
kelsi davis
d5b734a591 Add Tier 6 commands: party/raid management
- Uninvite/kick: /uninvite, /kick <player name> to remove player from party/raid
- Leave party: /leave, /leaveparty to leave current group
- Main tank: /maintank, /mt to set target as main tank (uses raid marker index 0)
- Main assist: /mainassist, /ma to set target as main assist (uses raid marker index 1)
- Clear markers: /clearmaintank, /clearmainassist to remove designations
- Raid info: /raidinfo to display raid lockouts and saved instances

Added opcodes:
- CMSG_REQUEST_RAID_INFO (0x2CD) for requesting raid lockout info
- SMSG_RAID_INSTANCE_INFO (0x2CC) for receiving raid info response

New packet builders:
- GroupUninvitePacket for removing players from group
- GroupDisbandPacket for leaving party (with logging)
- RaidTargetUpdatePacket for setting raid markers (main tank/assist)
- RequestRaidInfoPacket for querying raid lockouts

All commands include proper validation and user feedback.
2026-02-07 13:28:46 -08:00
kelsi davis
627c2fe0f6 Add Tier 5 commands: raid, officer, and battleground chat channels
- Raid chat: /raid, /rsay, /ra to send messages to raid
- Raid warning: /raidwarning, /rw to send raid warnings (leader/assist only)
- Officer chat: /officer, /o, /osay to send messages to officer channel
- Battleground chat: /battleground, /bg to send messages in battlegrounds
- Instance chat: /instance, /i to send messages to instance party (uses PARTY type)
- Added all new chat types to dropdown selector
- Added color coding for RAID_WARNING (red), RAID_LEADER, BATTLEGROUND, and BATTLEGROUND_LEADER
- Added chat type names for proper display in chat log
2026-02-07 13:21:15 -08:00
kelsi davis
41844ecc69 Add Tier 4 commands: AFK/DND status and whisper reply
- AFK commands: /afk, /away to toggle AFK status with optional message
- DND commands: /dnd, /busy to toggle DND (Do Not Disturb) with optional message
- Reply command: /r, /reply to respond to the last received whisper
- Track last whisper sender automatically when receiving whispers
- AFK and DND are mutually exclusive (activating one clears the other)
2026-02-07 13:17:01 -08:00
kelsi davis
85a7d66c4e Add Tier 3 commands: guild management, PvP, ready check, and duel forfeit
- Guild commands: /ginfo, /groster, /gmotd, /gpromote, /gdemote, /gquit, /ginvite
- PvP toggle: /pvp to toggle PvP flag
- Ready check system: /readycheck, /ready, /notready for group coordination
- Duel forfeit: /yield, /forfeit, /surrender to cancel active duels
2026-02-07 13:09:12 -08:00
kelsi davis
acef7ccbec Add Tier 2 utility commands: helm/cloak toggles, follow, and assist
Display Toggle Commands:
- Add /helm, /helmet, /showhelm to toggle helm visibility
- Add /cloak, /showcloak to toggle cloak visibility
- Track visibility state with helmVisible_ and cloakVisible_ flags
- Show confirmation messages: "Helm/Cloak is now visible/hidden"
- Use CMSG_SHOWING_HELM (0x2B9) and CMSG_SHOWING_CLOAK (0x2BA)

Follow Command:
- Add /follow and /f to follow current target
- Works with both players and NPCs
- Show "Now following [Name]" confirmation message
- Track follow target with followTargetGuid_ for future movement logic

Assist Command:
- Add /assist to target what your current target is targeting
- Read target's target from UNIT_FIELD_TARGET update fields (offset 6-7)
- Reconstruct 64-bit target GUID from two 32-bit field values
- Automatically switch your target to assist target
- Show helpful messages: "[Name] has no target" when appropriate
- Essential for combat coordination in groups

Implementation:
- Add ShowingHelmPacket and ShowingCloakPacket builders
- Add toggleHelm() and toggleCloak() methods with state management
- Add followTarget() for setting follow target
- Add assistTarget() with smart target field reading
- Use Entity::getFields() to access protected update fields
- Handle missing targets and invalid states gracefully
- All commands provide chat feedback
- Support multiple aliases for user convenience
2026-02-07 13:03:21 -08:00
kelsi davis
ec32286b0d Add Tier 1 utility commands: ignore, sit/stand, and logout
Ignore Commands:
- Add /ignore <name> to block messages from players
- Add /unignore <name> to unblock players
- Maintain ignoreCache for name-to-GUID lookups
- Show confirmation and error messages for ignore actions
- Use CMSG_ADD_IGNORE (0x6C) and CMSG_DEL_IGNORE (0x6D)

Sit/Stand/Kneel Commands:
- Add /sit to sit down (stand state 1)
- Add /stand to stand up (stand state 0)
- Add /kneel to kneel (stand state 8)
- Instant visual feedback with CMSG_STAND_STATE_CHANGE (0x101)
- Support for additional stand states (chair, sleep, etc.)

Logout Commands:
- Add /logout and /camp to initiate logout with countdown
- Add /cancellogout to cancel pending logout
- Show "Logging out in 20 seconds..." or "Logout complete" messages
- Track logout state with loggingOut_ flag to prevent duplicate requests
- Handle instant logout (in inn/city) vs countdown logout
- Use opcodes:
  - CMSG_LOGOUT_REQUEST (0x4B)
  - CMSG_LOGOUT_CANCEL (0x4E)
  - SMSG_LOGOUT_RESPONSE (0x4C)
  - SMSG_LOGOUT_COMPLETE (0x4D)

Implementation:
- Add LogoutRequestPacket, LogoutCancelPacket builders
- Add LogoutResponseParser to parse server logout responses
- Add StandStateChangePacket builder for stance changes
- Add AddIgnorePacket and DelIgnorePacket for ignore list management
- Add handleLogoutResponse() and handleLogoutComplete() handlers
- Add ignoreCache map and loggingOut_ state tracking
- All commands display feedback in chat window
2026-02-07 12:58:11 -08:00
kelsi davis
6f45c6ab69 Add /roll and friend management commands
Roll Command:
- Add /roll, /random, /rnd commands for random number generation
- Support multiple formats: /roll, /roll 100, /roll 1-100, /roll 10 50
- Broadcasts rolls to party/raid with "[Name] rolls X (min-max)" format
- Cap max roll at 10,000 to prevent abuse
- Use MSG_RANDOM_ROLL (0x1FB) bidirectional opcode

Friend Commands:
- Add /friend add <name>, /addfriend <name> to add friends
- Add /friend remove <name>, /removefriend <name> to remove friends
- Support aliases: /delfriend, /remfriend
- Maintain local friends cache mapping names to GUIDs for lookups
- Display status messages for all friend actions:
  - Friend added/removed confirmations
  - Friend online/offline notifications
  - Error messages (not found, already friends, list full, ignoring)

Social Opcodes:
- Add CMSG_ADD_FRIEND (0x69) and SMSG_FRIEND_STATUS (0x68)
- Add CMSG_DEL_FRIEND (0x6A) for friend removal
- Add CMSG_SET_CONTACT_NOTES (0x6B) for friend notes (future use)
- Add CMSG_ADD_IGNORE (0x6C) and CMSG_DEL_IGNORE (0x6D) (future use)

Implementation:
- Add RandomRollPacket builder and RandomRollParser for roll data
- Add AddFriendPacket and DelFriendPacket builders
- Add FriendStatusParser to handle server friend status updates
- Add friendsCache map to store friend name-to-GUID mappings
- Add handleRandomRoll() and handleFriendStatus() packet handlers
- Comprehensive slash command parsing with multiple formats and aliases
2026-02-07 12:51:30 -08:00
kelsi davis
f9c4cbddee Add server info commands: /time, /played, and /who
- Add CMSG_QUERY_TIME (0x1CE) and SMSG_QUERY_TIME_RESPONSE (0x1CF) opcodes
- Add CMSG_REQUEST_PLAYED_TIME (0x1CC) and SMSG_PLAYED_TIME (0x1CD) opcodes
- Add CMSG_WHO (0x062) and SMSG_WHO (0x063) opcodes
- Implement /time command to query and display server time
- Implement /played command to show total and level playtime statistics
- Implement /who [name] command to list online players with level and guild
- Add packet builders: QueryTimePacket, RequestPlayedTimePacket, WhoPacket
- Add response parsers for all three server info packet types
- Add handlers that format and display responses in chat as system messages
- Format played time as "X days, Y hours, Z minutes" for readability
- Format server time as "YYYY-MM-DD HH:MM:SS" for readability
2026-02-07 12:43:32 -08:00
kelsi davis
8b8e32e716 Add /inspect command to view player equipment
- Add CMSG_INSPECT (0x114) and SMSG_INSPECT_RESULTS (0x115) opcodes
- Implement InspectPacket builder for sending inspect requests
- Add inspectTarget() method to GameHandler with validation
- Add /inspect slash command in chat system
- Validate target is a player before sending inspect request
- Show helpful error messages for invalid inspect attempts
- Display confirmation message when inspect request is sent
2026-02-07 12:37:13 -08:00
kelsi davis
4da8c75af4 Add whisper support and slash command chat system
- Add WHISPER to chat type dropdown with target name field
- Implement comprehensive slash command parsing for all chat channels
- Support /w, /whisper, /tell, /t for whispers (with or without target name)
- Add /s, /y, /p, /g shortcuts for say, yell, party, guild
- Auto-fill whisper target field when switching to WHISPER with player targeted
- Allow /w <message> to whisper currently targeted player
- Add helpful error messages for invalid whisper usage
- Maintain backward compatibility with existing /logout and /invite commands
2026-02-07 12:30:36 -08:00
kelsi davis
545cfbbc0e Upgrade to C++20 and fix all compilation warnings
- Upgrade from C++17 to C++20
- Remove unused helper functions (selectSpawnPreset, parseVec3Csv, parseYawPitchCsv)
- Mark unused parameters with [[maybe_unused]] attribute
- Remove unused variables (nameColor, currentRace, steppingUp, steppingDown, awayFromWallMotion)
- Fix all -Wunused-* warnings

Build now completes with zero warnings.
2026-02-07 11:43:37 -08:00
kelsi davis
352d179aaa Fix compilation errors from single-player removal
- Rename spRace_, spGender_, spClass_ to playerRace_, playerGender_, playerClass_
- Remove swingTimer_ reference (server-side combat only)
- Remove teleporter panel UI and all references
- Remove T key binding for teleporter

Build now completes successfully with zero errors.
2026-02-07 11:26:49 -08:00
kelsi davis
180b78d106 Fix compilation errors from single-player removal
- Fixed corrupted header (removed orphaned code fragment)
- Restored NPC callbacks needed for online animations
  - NpcDeathCallback, NpcRespawnCallback, NpcSwingCallback
  - These were incorrectly removed as "SP-only" but are used for animations in online mode
- Removed calls to deleted methods:
  - getItemTemplateName, getItemTemplateQuality (used fallback in loot window)
  - notifyInventoryChanged, notifyEquipmentChanged (SP persistence markers)
- Removed hearthstone single-player handling (now uses server)

All online features preserved. Code should now compile.
2026-02-07 00:00:06 -08:00
kelsi davis
99d5f9a33a Remove single-player mode to focus on multiplayer
Removed all single-player/offline mode functionality:
- Removed ~2,200 lines of SQLite database code
- Removed 11 public SP methods from GameHandler
- Removed SP member variables and state flags
- Removed SP UI elements (auth screen button, game settings)
- Removed SQLite3 build dependency
- Deleted docs/single-player.md
- Updated documentation (README, FEATURES, CHANGELOG)

Files modified:
- src/game/game_handler.cpp: 2,852 lines (down from 4,921)
- include/game/game_handler.hpp: Removed SP API
- src/core/application.cpp/hpp: Removed startSinglePlayer()
- src/ui/*: Removed SP UI logic
- CMakeLists.txt: Removed SQLite3

All online multiplayer features preserved and tested.
2026-02-06 23:52:16 -08:00
Kelsi
5cc3d9645c Fix vendor buying and add quest turn-in flow
CMSG_BUY_ITEM was missing the trailing uint8 bag field, causing the
server to silently drop undersized packets. Add handlers for
SMSG_QUESTGIVER_REQUEST_ITEMS and SMSG_QUESTGIVER_OFFER_REWARD with
UI windows for quest completion and reward selection.
2026-02-06 21:50:15 -08:00
Kelsi
848f419ac4 Fix spell cast error messages, action bar drag-drop, and player name display
- Rewrite SpellCastResult enum to match AzerothCore 3.3.5a values (was misaligned, showing wrong error messages like "Not while trading" instead of "Unit not in front")
- Fix spellbook-to-action-bar drag-drop by using ImGuiHoveredFlags_AllowWhenBlockedByActiveItem for cross-window hover detection
- Fix player frame showing wrong character name by looking up activeCharacterGuid instead of always using characters[0]
- Clear playerNameCache on disconnect to prevent stale names across sessions
2026-02-06 21:25:35 -08:00
Kelsi
d4d5a22685 Fix spellbook drag-drop onto action bar by detecting mouse release over slot 2026-02-06 20:36:29 -08:00
Kelsi
37d6298b72 Fix action bar click-to-cast and add spellbook drag-and-drop
Left-click on action bar slots now casts spells/uses items instead of starting a drag. Right-click-drag rearranges slots. Spells can be dragged from the spellbook directly onto the action bar, replacing the old "Assign to" button row.
2026-02-06 20:27:01 -08:00
Kelsi
4e2cf0af8e Add UI opacity slider to settings window
Adds an Interface section with a UI Opacity slider (20-100%) that controls the transparency of all ImGui UI elements via the global style alpha.
2026-02-06 20:19:39 -08:00
Kelsi
e6a80c68c1 Add quest markers (! and ?) above NPCs and on minimap
Parse SMSG_QUESTGIVER_STATUS and SMSG_QUESTGIVER_STATUS_MULTIPLE packets to track per-NPC quest status, render yellow/gray ! and ? markers in 3D world space above NPC heads with distance-based scaling, and show corresponding dots on the minimap.
2026-02-06 20:10:10 -08:00
Kelsi
0a26eef154 Send CMSG_LOOT_MONEY for online gold looting and replace action bar right-click removal with drag-to-ground 2026-02-06 19:24:44 -08:00
Kelsi
affb5f4f04 Add item support for action bar with drag-from-inventory and key/click use
Allow picking up consumables from inventory and dropping them onto action bar
slots. Items display their icon or name, can be used via click or hotkey
(1-0,-,=), and cleared with right-click. Adds useItemById to find and use
items from backpack by item ID.
2026-02-06 19:17:35 -08:00
Kelsi
fdc614902b Fix online interactions, UI, and inventory sync 2026-02-06 18:34:45 -08:00
Kelsi
7436420cd1 Add player death handling, race-aware faction hostility, and all-race texture support
- Death screen with "Release Spirit" button sends CMSG_REPOP_REQUEST
- Detect player death/resurrection via health updates (VALUES and CREATE)
- Faction hostility map now built per-character race instead of hardcoded Human
- CharSections.dbc texture lookup enabled for all races (was Human-only)
- Fallback texture paths use race folder names instead of hardcoded Human
- Player name in unit frame is clickable for self-targeting
2026-02-06 17:27:20 -08:00
Kelsi
81166346ef Fix respawned corpse movement, faction hostility, and add WoW-canonical mob level colors
Reset NPC animation to idle when health goes from 0 to >0 (respawn), prevent
dead NPCs from being moved by server movement packets. Fix faction hostility
to check factionGroup Monster bit and individual enemy arrays, not just
enemyGroup. Add level-based mob coloring: grey (no XP), green (easy), yellow
(even), orange (hard), red (very hard) for target frame and selection circle.
2026-02-06 16:47:07 -08:00
Kelsi
2aa8187562 Fix camera orbit, deselect, chat formatting, loot/vendor bugs, critter hostility, and character screen
Smooth idle camera orbit without jump at loop boundary, click empty space to
deselect target, auto-target when attacked, fix critter hostility so neutral
factions aren't flagged red, add armor/stats to item templates, fix loot
iterator invalidation, show item template names as fallback, position drop
confirmation at cursor, remove [SYSTEM] chat prefix, show NPC names in monster
say/yell, and prevent auto-login on character select screen.
2026-02-06 16:40:44 -08:00
Kelsi
caeb6f56f7 Fix hair/vendor/loot bugs, revamp spellbook with tabs and icons, clean up action bar, add talent placeholder
- Fix white hair: always override M2 type-6 texture with DBC hair texture when available
- Fix vendor sell: add sellPrice to ItemDef/ItemTemplateRow, use directly instead of empty cache
- Fix empty loot: skip loot window when corpse has no items and no gold
- Revamp spellbook (P key): tabbed UI (General/Active/Passive), spell icons from SpellIcon.dbc, rank text
- Clean up action bar: only auto-populate Attack and Hearthstone, rest assigned via spellbook
- Add talent placeholder (N key): 3-tab window with level/talent point display
- Fix ffplay cleanup: non-blocking waitpid with SIGKILL fallback to prevent orphaned audio processes
- Fix pre-existing getQualityColor visibility for loot window rendering
2026-02-06 16:04:25 -08:00
Kelsi
2ddef93f52 Fix spell targeting, item query parsing, loot UI, hair/skin textures, and attack animations
Fix spell cast target fallback using selected target instead of no-op tautology.
Fix SMSG_ITEM_QUERY_SINGLE_RESPONSE to always read 10 stat pairs (server sends
all 10 regardless of statsCount), fixing misaligned armor/stat reads. Fix XP gain
parser to read float groupRate + uint8 RAF instead of bogus uint32 groupBonus.
Add item icons and quality-colored names to loot window. Use actual character
appearance bytes for CharSections.dbc skin/face/hair lookups instead of hardcoded
defaults. Add weapon-type-aware attack animation selection (2H prioritizes anim 18).
Add readable spell cast failure messages and vendor sell hint.
2026-02-06 15:41:29 -08:00
Kelsi
f0aad5e97f Fix spline parsing, hair texture, and popup window positioning
Restore unconditional verticalAccel/effectStartTime reads in spline parser
with pointCount safety cap at 256. Load player hair texture from
CharSections.dbc instead of hardcoded path, and restrict render fallback
to not apply skin composite to hair batches. Change loot/gossip/vendor
windows to re-center on each open via ImGuiCond_Appearing.
2026-02-06 15:18:50 -08:00
Kelsi
a09bea5e1e Add spell icons to action bar from SpellIcon.dbc
Load spell icons via Spell.dbc field 133 (SpellIconID) -> SpellIcon.dbc
(icon path) -> BLP texture from Interface\Icons\. Icons are cached as GL
textures and rendered with ImageButton, with cooldown text overlaid on the
icon. Falls back to truncated spell name text for missing icons.
2026-02-06 14:30:54 -08:00
Kelsi
394e91cd9e Add character screen model preview, item icons, stats panel, and fix targeting bugs
Enhanced the C-key character screen with a 3-column layout featuring a 3D
character model preview (with drag-to-rotate), item icons loaded from BLP
textures via ItemDisplayInfo.dbc, and a stats panel showing base + equipment
bonuses. Fixed selection circle clipping under terrain by adding a Z offset,
and corrected faction hostility logic that was wrongly marking hostile mobs
as friendly.
2026-02-06 14:24:38 -08:00
Kelsi
7128ea1417 Restructure inventory UI, add vendor selling, camera intro on all spawns, and quest log
Split inventory into bags-only (B key) and character screen (C key). Vendor window
auto-opens bags with sell prices on hover and right-click to sell. Add camera intro
pan on all login/spawn/teleport/hearthstone events and idle orbit after 2 minutes.
Add quest log UI, SMSG_MONSTER_MOVE handling, deferred creature spawn queue, and
creature fade-in/movement interpolation for online mode.
2026-02-06 13:47:03 -08:00
Kelsi
a4a39c7f0f Fix quest details parser, ImGui ID conflict, and gossip reopen guard
Quest details parser now reads all 6 choice + 4 reward item slots
(matching AzerothCore's fixed-size arrays) with bounds checking at
every step. Use loop index for quest ImGui IDs instead of questId to
avoid conflicts. Don't reopen gossip window while quest details are
showing.
2026-02-06 12:08:47 -08:00
Kelsi
67a3da3bae Add quest details dialog, fix vendor UI, suppress both-button clicks
Parse SMSG_QUESTGIVER_QUEST_DETAILS and show quest text with Accept/
Decline buttons. Vendor window now shows item names with quality colors,
stat tooltips on hover, player money, and closes properly via X button.
Suppress left/right-click targeting and interaction when the other mouse
button is held (both-button run forward).
2026-02-06 11:59:51 -08:00
Kelsi
60be428250 Add quest opcodes, fix gossip select packet, and NPC combat animations
Fix CMSG_GOSSIP_SELECT_OPTION missing menuId field (was causing
ByteBufferException). Add 12 quest opcodes and clickable quest items in
gossip dialog. NPC attack/death animation callbacks now work for both
single-player and server-spawned creatures, and SMSG_ATTACKERSTATEUPDATE
triggers NPC swing animations.
2026-02-06 11:45:35 -08:00
Kelsi
82e63fc95d Trigger player model visual update when online inventory changes
rebuildOnlineInventory() now sets a dirty flag that GameScreen checks
each frame to call updateCharacterGeosets/Textures and loadEquippedWeapons.
2026-02-06 03:13:42 -08:00
Kelsi
ab1f39c73b Fix online mode combat and implement server inventory sync
Right-click now attacks hostile NPCs (npcFlags==0) and interacts with
friendly ones in online mode. Parse UNIT_FIELD_FLAGS (59) and
UNIT_NPC_FLAGS (82) from update packets. Stop auto-attack when target
dies or despawns. Add CMSG_ITEM_QUERY_SINGLE/SMSG_ITEM_QUERY_SINGLE_RESPONSE
to populate inventory from server item objects and player slot fields.
2026-02-06 03:11:43 -08:00
Kelsi
f1bdf0bb67 Add missing includes for audio and camera controller 2026-02-05 17:55:30 -08:00
Kelsi
3ef0f8c2f1 Add mouse sensitivity and invert mouse to settings UI
Larger settings window (440x520) to fit all sections.
2026-02-05 17:51:14 -08:00
Kelsi
d1e9bbeb1f Persist single-player settings and add defaults 2026-02-05 17:40:15 -08:00
Kelsi
1530900bc7 Add audio volume controls to settings 2026-02-05 17:32:21 -08:00
Kelsi
dd28b647c4 Add back to game button on escape menu 2026-02-05 16:21:17 -08:00
Kelsi
ce1db3a331 Stop music on quit 2026-02-05 16:17:04 -08:00
Kelsi
26f91b032f Adjust settings UI and remove F4 shadows toggle 2026-02-05 16:16:03 -08:00
Kelsi
716393c059 Add shadows toggle and F4 hotkey 2026-02-05 16:14:11 -08:00
Kelsi
83ef27c570 Add video settings UI and refresh loading assets 2026-02-05 16:11:00 -08:00
Kelsi
f725f7834f Add escape menu with logout/quit/settings 2026-02-05 16:01:38 -08:00
Kelsi
66f78bb192 Add /logout chat command 2026-02-05 15:59:06 -08:00
Kelsi
140a2e2c22 Fix single-player spawn coords and show action bar spell names 2026-02-05 15:07:13 -08:00
Kelsi
0ff34364b6 Add sqlite single-player persistence with autosave 2026-02-05 14:55:42 -08:00