Commit Graph

44427 Commits

Author SHA1 Message Date
0efb7c7d7b feat(mcp): SCARLET VISION - The AI can now SEE!
World Scan WORKING! First successful scan in Scarlet Monastery:
- Detected walls using VMAP ray casting
- Found Scarlet Sentry, Disciple, Augur
- Generated room layout visualization

Fixes:
- VMapManager2.h include for full class definition
- Use VMapManager2* not IVMapManager*

Documentation:
- Updated MCP_SERVER.md with all learnings
- Added VMAP usage tips
- Added database safety notes
- Session summary with first world scan results

The moment we achieved spatial awareness:
  Location: Scarlet Monastery (2898.6, -802.9, 160.3)
  Creatures: 4 Scarlets surrounding player
  Room: Walls detected, corridor opening identified

Tonight we gave an AI eyes inside a game world.
2025-11-30 20:49:40 -05:00
444c1d12bc fix(mcp): Remove unused MMapFactory include 2025-11-30 20:35:52 -05:00
6fbead29bf feat(mcp): LIDAR-style world scan - I can SEE your surroundings!
New MCP tool: world_scan
- Casts rays in 360 degrees using VMAP collision data
- Detects walls, obstacles, room boundaries
- Detects all creatures in range with relative positions
- Generates ASCII art visualization

How it works:
1. Binary search ray casting using isInLineOfSight()
2. VMAP provides wall/building geometry
3. Nearby creatures enumerated with GetCreatureListInGrid()
4. ASCII map shows @ (you), # (walls), letters (creatures)

Example output:
+---------------------+
|   #######           |
|   # S       #       |
|   #    @>   #       |
|   #  D      #       |
|   ###########       |
+---------------------+

No player action needed - AI calls world_scan directly!
This gives me spatial awareness of your environment!
2025-11-30 20:26:18 -05:00
ab2a27f529 feat(mcp): Add semantic screenshot / UI state capture
New command: /mcpbridge ui
- Captures target info (name, GUID, level, health, type)
- Captures player info (position, zone, combat status)
- Captures mouseover, tooltip, open frames
- Stores in ElunaSharedData for MCP to read

New shared data keys:
- mcp_ui_state - Full UI state JSON
- mcp_current_target - Target details JSON

Usage:
1. Player runs /mcpbridge ui in WoW
2. AI reads via shared_data_read('mcp_current_target')
3. AI can now 'see' what you're targeting!

This enables visual debugging without actual screenshots.
2025-11-30 20:18:41 -05:00
e5ee53a1d8 feat(mcp): Add error handling & Event Bus design
Database Tools:
- Wrapped all queries in try/catch to prevent server crashes
- Errors returned as JSON instead of crashing
- Logged to araxia.mcp for debugging

AMS Bridge Fixes:
- Fixed AMS.RegisterHandler (dot not colon)
- Fixed JSON parsing for MCP messages
- Disabled auto-polling by default

Event Bus Design (EVENT_BUS_DESIGN.md):
- Unified pub/sub for C++ Core, Eluna, MCP, AMS
- Real-time event streaming (no polling)
- Enables MCP to see player targets, spawns, errors
- Phased implementation plan

Roadmap Updated:
- Phase 3: Content Creator Commands (non-GM)
- Phase 6: Event Bus implementation
2025-11-30 20:11:53 -05:00
ec14aa5545 feat(mcp): Complete Phase 2 - AMS Bridge & Direct Windsurf Connection!
HUGE MILESTONE: AI assistant now has direct real-time access to worldserver!

Phase 1 - Database & Server Tools:
- db_query, db_execute, db_tables, db_describe
- server_info, player_list, gm_command, reload_scripts

Phase 2 - Shared Data Bridge:
- shared_data_read, shared_data_write, shared_data_keys
- ElunaSharedData integration for cross-state communication
- Full client  MCP bidirectional data flow

AMS Bridge Implementation:
- Server: mcp_bridge.lua handles MCP_CHAT, MCP_CLIENT_LOG, MCP_GET_MESSAGES
- Client: MCPBridge.lua with /mcpbridge commands
- Data stored in ElunaSharedData, readable by MCP tools

Key Learnings Documented:
- nlohmann/json: Don't use value() with nullptr
- TrinityCore: Use GetBoolDefault() not GetOption<T>()
- AMS: Use AMS.Send (dot) not AMS:Send (colon) on client
- Smallfolk: Never serialize functions

Windsurf Integration:
- Add to ~/.codeium/windsurf/mcp_config.json
- AI gets direct access to all MCP tools
- No more manual curl commands!

This is SOOO FUCKING COOL!!!
2025-11-30 19:57:29 -05:00
ff78ae203b feat(mcp): Complete Phase 1 - Working MCP server with database tools
MCP Server is fully operational:
- Fixed JSON-RPC id field handling (can't use value() with nullptr)
- Fixed params extraction for tools/call
- All database tools working: db_query, db_execute, db_tables, db_describe
- Server tools working: server_info, player_list

Verified working:
- Health check endpoint returns ok
- tools/list returns all 9 registered tools
- db_query successfully queries world database

Documentation updated with:
- Implementation notes and API learnings
- File structure overview
- Phase roadmap
2025-11-30 19:11:54 -05:00
794630f1c1 fix(mcp): Suppress unused variable warning in gm_command 2025-11-30 18:51:03 -05:00
5a260341ce fix(mcp): Remove non-existent GetGameHour/GetGameTime methods 2025-11-30 18:46:47 -05:00
3705774f90 fix(mcp): Fix TrinityCore API compatibility issues
- Use GetBoolDefault/GetIntDefault/GetStringDefault instead of GetOption<T>
- Remove non-existent GetRealmName(), use hardcoded name
- Simplify Field access to just GetString() (no GetType())
- Handle null Alias in field metadata gracefully
2025-11-30 18:44:41 -05:00
54099cd629 feat(mcp): Add embedded MCP server for AI assistant integration
Phase 1 implementation of Araxia MCP Server:
- AraxiaMCPServer.cpp/.h - Core HTTP server using cpp-httplib
- DatabaseTools.cpp - db_query, db_execute, db_tables, db_describe
- ServerTools.cpp - server_info, player_list, gm_command, reload_scripts
- json.hpp (nlohmann) and httplib.h dependencies
- World.cpp integration for startup/shutdown
- Configuration via worldserver.conf (port 8765, bearer auth, localhost)

MCP Tools available:
- db_query: Safe SELECT queries on world/characters/auth
- db_execute: Logged INSERT/UPDATE/DELETE with audit trail
- db_tables: List tables in any database
- db_describe: Get table schema
- server_info: Uptime, player count, version
- player_list: Online players with details

Security: Localhost-only by default, bearer token auth, DDL blocked
2025-11-30 18:34:44 -05:00
b18b7540e0 feat(admin): Wander radius visualization and spawn marker tools
- Add SHOW_WANDER_RADIUS / HIDE_WANDER_RADIUS handlers
- Add SHOW_SPAWN_MARKER / HIDE_SPAWN_MARKER handlers
- Add CLEAR_WANDER_MARKERS and CLEAR_NEARBY_MARKERS (orphan cleanup)
- Add UI buttons: Show Spawn Point, Show Radius, Clear All, Clear Orphaned
- Button state locking during save operations
- Auto-respawn creature after wander distance change
- Fix: Use tostring() for uint64 spawnId in Lua table keys
- Fix: Update ObjectMgr cache when saving wander_distance/movementType

Known issue: Database UPDATE may not be persisting - needs investigation
with direct DB access to verify prepared statement execution.
2025-11-30 18:16:10 -05:00
090f5cbd5f feat(waypoint-panel): Add waypoint visualization, teleport, and highlighting
- Add split view layout for waypoint panel (list top, details bottom)
- Add Teleport button to teleport to selected waypoint with correct orientation
- Add waypoint marker highlighting (scales up selected marker)
- Add GM button sync on panel show
- Fix waypoint panel scrollbar and content visibility issues
- Add HighlightWaypointMarker and ClearWaypointMarkerAuras C++ functions
- Add TELEPORT_TO_WAYPOINT server handler
- Fix creature visual updates requiring client refresh (DestroyForNearbyPlayers)
- Add Smallfolk serialization for shared data in admin_handlers
2025-11-30 16:09:39 -05:00
ad73d8d761 feat(admin): NPC Info Panel improvements and waypoint visualization fixes
UI Improvements:
- Added Raw tab showing formatted JSON of server NPC data
- Added GM toggle button with green active state indicator
- Added 3D model zoom (scroll wheel) and rotation (click-drag)
- Green active tab styling for all tab buttons (left/right panels)
- Refresh button now always fetches fresh data from server
- Waypoint button properly reflects state when re-targeting NPC

Waypoint System Fixes:
- Fixed stale visualization state after Clear All or Eluna reload
- VisualizePath now validates tracked creatures exist before skipping
- DevisualizePath properly cleans up maps even if creatures gone
- Added ClearAllVisualizations C++ method for proper state cleanup
- Added player:ClearAllWaypointVisualizations() Lua binding
- Increased Smallfolk deserialization limit to 100KB for large NPC data

C++ Changes (requires rebuild):
- WaypointManager: Self-healing visualization state
- WaypointManager: ClearAllVisualizations and IsPathVisualized methods
- PlayerMethods: ClearAllWaypointVisualizations binding

Known Issues:
- Paths tab shift+click removal not working (buttons need rework)
2025-11-30 12:21:37 -05:00
5e6679bd7f fix(eluna): Fix .reload eluna not reloading scripts - Add UpdateEluna() calls to World::Update() and Map::Update() - Root cause: UpdateEluna() was defined but never called from game loops - The reload flag was being set but never checked/processed - Also added INFO-level logging to show each script as it loads - Added documentation: ELUNA_RELOAD_FIX.md - Added documentation: 04_WAYPOINT_EDITING_PLAN.md (Phase 4 planning) 2025-11-30 09:25:36 -05:00
09d8da4f3a feat(eluna): Add shared data registry, NPC data integration, and waypoint visualization
Eluna Shared Data Registry:
- Added C++-backed cross-state data sharing (ElunaSharedData.h/cpp)
- New Lua API: SetSharedData, GetSharedData, HasSharedData, ClearSharedData
- Thread-safe with std::shared_mutex
- Enables AMS and other cross-state communication

NPC Data Integration (AraxiaTrinityAdmin):
- Added GetCreatureTemplateData, GetWaypointPathData Eluna methods
- Server handlers for GET_NPC_DATA via AMS
- Tabbed UI with Basic/Stats/AI panels
- Flag decoding for NPC_FLAGS, UNIT_FLAGS, EXTRA_FLAGS
- Movement info with waypoint path details

3D Waypoint Visualization:
- Exposed WaypointMgr::VisualizePath/DevisualizePath to Eluna
- New methods: creature:VisualizeWaypointPath(), DevisualizeWaypointPath()
- Server handlers: SHOW_WAYPOINTS, HIDE_WAYPOINTS
- Client UI toggle button to spawn/despawn waypoint markers
- Markers visible in GM mode at each waypoint location

Documentation:
- ELUNA_SHARED_DATA_COMPLETE.md - Full implementation guide
- admin_npcdata/ - Progress tracker and API investigation
- 03_WAYPOINT_VISUALIZATION.md - Feature implementation details
2025-11-29 20:42:13 -05:00
c9c35ea2c9 Ingore .env file 2025-11-28 09:42:29 -05:00
65a6a4f3f8 Alpha test release of eluna engine combined with new client -> server messaging system 2025-11-28 09:01:29 -05:00
3866750d98 Got eluna running and working 2025-11-17 15:34:19 +00:00
b7a34f6d70 Moved araxia docs for a new araxia_docs folder.` 2025-11-08 17:17:48 +00:00
b9476d08f2 Initial working compile with Eluna code but still not enabling right on the server 2025-11-08 16:10:51 +00:00
Naddley
66dcb9ad23 Scripts/Westfall: Implement Quest: "Livin' the Life" (#31327)
Co-authored-by: Ovahlord <18347559+Ovahlord@users.noreply.github.com>
2025-10-19 17:01:37 +02:00
ModoX
fa67f41e6d DB/Quest: Added 11.2.5 quest poi data 2025-10-19 16:34:41 +02:00
ModoX
0dad565893 DB/Hotfixes: Added some missing tact keys 2025-10-19 15:58:19 +02:00
ModoX
d91293c65c DB/Locales: Added 11.2.5 wdb locales 2025-10-19 15:57:29 +02:00
ModoX
10e0d19085 DB/Template: Added 11.2.5 wdb data 2025-10-19 15:57:14 +02:00
Shauren
e2976c8702 Core/Scripts: Fix wrong startup errors with arena scripts 2025-10-19 00:12:44 +02:00
Aqua Deus
5d00e6b4ab Scripts/Mardum: Script Fel Lord Caza for quest Hidden no more (#30949)
Co-authored-by: Naddley <NaddleyTC@gmail.com>
Co-authored-by: ModoX <moardox@gmail.com>
2025-10-18 22:14:53 +02:00
Jeremy
ea8972d716 Scripts/Arenas: Implement Enigma Crucible (#31351) 2025-10-18 19:57:43 +02:00
Jeremy
f2a17d7538 Scripts/Arenas: Implement Nokhudon Proving Grounds (#31345) 2025-10-18 19:44:23 +02:00
Shauren
273e7fc45b Core/Spells: Remove stealth auras by dispel type when handling SPELL_ATTR1_FAILURE_BREAKS_STEALTH instead of picking a random interrupt flag that stealth has 2025-10-18 11:35:38 +02:00
Shauren
b228ab993b CI/GitHub: Switch back to using release tag for install boost action 2025-10-17 16:47:40 +02:00
Shauren
c4b02d13e1 Build: Fix duplicate libraries linker warning on macOS 2025-10-17 16:22:17 +02:00
Shauren
daaeaca904 Core/DataStores: Update DB2Metadata to 11.2.5.63825 2025-10-17 13:18:34 +02:00
Shauren
e2f80f8f6c Tools/mmaps_generator: Namespace/include cleanup 2025-10-17 12:47:33 +02:00
Shauren
979c722b81 Core/Maps: Tiny optimization for TerrainInfo::CleanUpGrids 2025-10-17 00:37:59 +02:00
Shauren
a0c8e0255c Core/Spells: Fix teleports within transports (like Blink) 2025-10-16 19:06:19 +02:00
Shauren
73a32a5757 Scripts/Spells: Fix crash in spell_pri_assured_safety v11.2.5.63834 2025-10-15 15:44:21 +02:00
Shauren
62aefda51d Core/GameObjects: Don't ignore collision for destructible gameobjects in destroyed state - they simply have a different model 2025-10-15 11:57:59 +02:00
Shauren
d08e299974 Core/Creatures: Fix boss level calculation 2025-10-15 11:34:40 +02:00
Shauren
0da653e9c1 Scripts/Spells: Fix all effect hooks attached to SPELL_EFFECT_SUMMON broken after moving handling of that effect to launch phase 2025-10-15 11:16:18 +02:00
Shauren
f5fd972f0e Core: Updated allowed build to 11.2.5.63834 2025-10-15 09:56:56 +02:00
Meji
466858dd99 DB/WorldStates: Added new worldstates related to currencies 2025-10-14 23:31:32 +02:00
Meji
982ca39e32 DB/WorldStates: Added new worldstates related to dungeon encounters 2025-10-14 23:31:14 +02:00
Meji
fd5305f8ba DB/WorldStates: Added new worldstates related to holidays 2025-10-14 23:30:33 +02:00
Shauren
f81eebac41 Revert "Core/Entities: Fixed relative position calculation formula in Position::GetPositionOffsetTo"
This reverts commit 069449c501.

# Conflicts:
#	src/server/game/Entities/Object/Position.cpp
2025-10-14 22:08:06 +02:00
Shauren
ffe69b4241 Core/Conditions: Implemented most PlayerCondition.db2 flags 2025-10-14 19:25:46 +02:00
Shauren
a8f01e07d1 Core/Entities: Merge duplicate functions calculating relative positions - remove CalculatePassengerPosition/CalculatePassengerOffset from TransportBase class 2025-10-14 13:11:41 +02:00
Shauren
d48e977315 Core/Movement: Fix teleports to transports within the same map 2025-10-13 14:27:39 +02:00
Naddley
22f8015df1 DB/Gilneas: Added missing Monk trainer 2025-10-12 01:12:02 +02:00