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.
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!
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.
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
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!!!
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
- 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
- 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.
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)
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