10 KiB
10 KiB
Movement Arbiter Migration - Comprehensive Audit
Date: 2025-10-22 Status: Phase 6 - In Progress Auditor: Claude Code
Executive Summary
Migration Status: INCOMPLETE ❌
- Total MotionMaster Calls Found: 81 calls across 36 files
- Migrated Systems: ~30% (Phases 3-5 completed)
- Remaining Work: ~70% (56+ calls in 25+ files)
Critical Gaps Found
❌ MISSED in Phase 3 (Emergency Systems)
- ObstacleAvoidanceManager - 3 calls (NOW FIXED ✅)
❌ MISSED in Phase 4 (ClassAI Positioning)
- RoleBasedCombatPositioning - 9 calls (Priority 170) - CRITICAL GAP
❌ INCOMPLETE Phase 5 (Strategy Systems)
- CombatAIIntegrator - 7 remaining calls (mixed priorities)
- EncounterStrategy - 7 calls (Priority 205)
- AdvancedBehaviorManager - 6 calls (Priority 120-210)
- DungeonBehavior - 5 calls (Priority 110)
Detailed Findings
Files by Call Count (Top 15)
| Rank | File | Calls | MovementArbiter? | Priority | Migration Status |
|---|---|---|---|---|---|
| 1 | RoleBasedCombatPositioning.cpp | 9 | ❌ NO | 170 | NOT STARTED |
| 2 | CombatAIIntegrator.cpp | 9 | ✅ YES (partial) | 240,130 | INCOMPLETE |
| 3 | EncounterStrategy.cpp | 7 | ❌ NO | 205 | NOT STARTED |
| 4 | AdvancedBehaviorManager.cpp | 6 | ❌ NO | 120-210 | NOT STARTED |
| 5 | DungeonBehavior.cpp | 5 | ❌ NO | 110 | NOT STARTED |
| 6 | MageAI.cpp | 3 | ❌ NO | 170 | NOT STARTED |
| 7 | ObstacleAvoidanceManager.cpp | 3 | ✅ YES | 245 | COMPLETE ✅ |
| 8 | InterruptManager.cpp | 2 | ❌ NO | 220 | NOT STARTED |
| 9 | BotActionProcessor.cpp | 2 | ❌ NO | varies | NOT STARTED |
| 10 | QuestStrategy.cpp | 2 | ✅ YES | 50 | COMPLETE ✅ |
| 11 | NPCInteractionManager.cpp | 2 | ❌ NO | 20 | NOT STARTED |
| 12 | BotAI.cpp | 2 | ✅ YES | wrapper fns | REVIEW NEEDED |
| 13 | DeathRecoveryManager.cpp | 2 | ✅ YES | 255 | COMPLETE ✅ |
| 14 | LootStrategy.cpp | 2 | ✅ YES | 40 | COMPLETE ✅ |
| 15 | HunterAI.cpp | 2 | ❌ NO | 170 | NOT STARTED |
Files 16-36 (1 call each)
| File | MovementArbiter? | Priority | Status |
|---|---|---|---|
| KitingManager.cpp | ❌ NO | 175 | NOT STARTED |
| StockadeScript.cpp | ❌ NO | 205 | NOT STARTED |
| EnhancedBotAI.cpp | ❌ NO | varies | NOT STARTED |
| SpellInterruptAction.cpp | ❌ NO | 220 | NOT STARTED |
| InteractionManager_COMPLETE_FIX.cpp | ❌ NO | 20 | NOT STARTED |
| Action.cpp | ❌ NO | varies | NOT STARTED |
| BotMovementUtil.h | ❌ NO | utility | NOT STARTED |
| InteractionManager.cpp | ❌ NO | 20 | NOT STARTED |
| WarlockAI.cpp | ❌ NO | 170 | NOT STARTED |
| MechanicAwareness.cpp | ✅ YES | 250 | COMPLETE ✅ |
| ProtectionSpecialization.cpp | ❌ NO | 170 | NOT STARTED |
| CombatSpecializationBase.cpp | ❌ NO | 170 | NOT STARTED |
| FormationManager.cpp | ❌ NO | 160 | NOT STARTED |
| PriestAI.cpp | ❌ NO | 170 | NOT STARTED |
| MageAI_Specialization.cpp | ❌ NO | 170 | NOT STARTED |
| FrostSpecialization.cpp | ❌ NO | 170 | NOT STARTED |
| CombatMovementStrategy.cpp | ✅ YES | 130 | COMPLETE ✅ |
| PositionManager.cpp | ❌ NO | varies | NOT STARTED |
| MageSpecialization.cpp | ❌ NO | 170 | NOT STARTED |
| CommonActions.cpp | ❌ NO (2 calls) | varies | NOT STARTED |
| BeastMasteryHunterRefactored.h | ❌ NO (2 calls) | 170 | NOT STARTED |
Migration Priority Tiers
TIER 1: CRITICAL (Must Complete) - 37 calls in 8 files
Priority 200-255 (Emergency/Boss/Dungeon Mechanics)
- EncounterStrategy.cpp - 7 calls (Priority 205 - DUNGEON_MECHANIC)
- AdvancedBehaviorManager.cpp - 6 calls (Priority 210 - PVP_FLAG_CAPTURE, etc.)
- CombatAIIntegrator.cpp - 7 unmigrated calls (Priority 240/130 mixed)
- InterruptManager.cpp - 2 calls (Priority 220 - INTERRUPT_POSITIONING)
- StockadeScript.cpp - 1 call (Priority 205 - DUNGEON_MECHANIC)
- SpellInterruptAction.cpp - 1 call (Priority 220 - INTERRUPT_POSITIONING)
- KitingManager.cpp - 1 call (Priority 175 - KITING)
- FormationManager.cpp - 1 call (Priority 160 - FORMATION)
TIER 2: HIGH (ClassAI Positioning) - 20 calls in 9 files
Priority 170 (ROLE_POSITIONING)
- RoleBasedCombatPositioning.cpp - 9 calls (CRITICAL GAP)
- MageAI.cpp - 3 calls
- HunterAI.cpp - 2 calls
- WarlockAI.cpp - 1 call
- ProtectionSpecialization.cpp - 1 call
- CombatSpecializationBase.cpp - 1 call
- PriestAI.cpp - 1 call
- MageAI_Specialization.cpp - 1 call
- FrostSpecialization.cpp - 1 call
- MageSpecialization.cpp - 1 call
- BeastMasteryHunterRefactored.h - 2 calls
TIER 3: MEDIUM (Dungeon/Group) - 5 calls in 1 file
Priority 110 (DUNGEON_POSITIONING)
- DungeonBehavior.cpp - 5 calls
TIER 4: LOW (Utility/Misc) - 19 calls in 11 files
Priority 0-50 (LOW/MINIMAL)
- NPCInteractionManager.cpp - 2 calls (Priority 20 - EXPLORATION)
- BotActionProcessor.cpp - 2 calls (varies)
- EnhancedBotAI.cpp - 1 call (varies)
- InteractionManager.cpp - 1 call (Priority 20)
- InteractionManager_COMPLETE_FIX.cpp - 1 call (Priority 20)
- Action.cpp - 1 call (varies)
- BotMovementUtil.h - 1 call (utility)
- PositionManager.cpp - 1 call (varies)
- CommonActions.cpp - 2 calls (varies)
- BotAI.cpp - 2 calls (wrapper functions - needs review)
- QuestStrategy.cpp - 1 MoveIdle() call (Priority 50) - REVIEW NEEDED
Completed Migrations (Phase 3-5)
✅ Phase 3: Emergency Systems (3 systems)
- DeathRecoveryManager.cpp - 2 calls (Priority 255) ✅
- MechanicAwareness.cpp - 1 call (Priority 250) ✅
- CombatAIIntegrator.cpp - 2 emergency calls (Priority 240) ✅
- ObstacleAvoidanceManager.cpp - 2 calls (Priority 245) ✅ (Fixed after audit)
✅ Phase 4: ClassAI Positioning
STATUS: CLAIMED COMPLETE but RoleBasedCombatPositioning NOT MIGRATED ❌
✅ Phase 5: Strategy Systems (4 systems)
- CombatMovementStrategy.cpp - 1 call (Priority 130) ✅
- QuestStrategy.cpp - 1 call (Priority 50) ✅
- LootStrategy.cpp - 2 calls (Priority 40) ✅
- LeaderFollowBehavior.cpp - 1 call (Priority 70) ✅
Total Migrated: ~25 calls (31%)
Special Movement Types NOT Supported
Movement Arbiter Gaps
The following MotionMaster methods are NOT SUPPORTED by Movement Arbiter:
- MoveJump() - Jump movement (found in ObstacleAvoidanceManager)
- MoveIdle() - Idle movement (found in QuestStrategy)
- MoveRandom() - Random movement
- MoveConfused() - Confusion movement
- MoveFleeing() - Fear/flee movement
- MoveCharge() - Charge movement
- MoveLand() - Flying→ground transition
- MoveTakeOff() - Ground→flying transition
- MoveHome() - Return to spawn point
Action Required: Add factory methods to MovementRequest for these movement types
Recommended Migration Plan
Phase 6A: Special Movement Support (1-2 days)
- Add MoveJump support to MovementArbiter
- Add MoveIdle, MoveRandom support
- Add other special movements (Flee, Confuse, Charge, etc.)
- Update MovementRequest with new factory methods
- Test special movement arbitration
Phase 6B: TIER 1 Critical Systems (2-3 days)
- ✅ EncounterStrategy.cpp (7 calls)
- ✅ AdvancedBehaviorManager.cpp (6 calls)
- ✅ CombatAIIntegrator.cpp (7 remaining calls)
- ✅ InterruptManager.cpp (2 calls)
- ✅ Other TIER 1 files (4 calls)
Phase 6C: TIER 2 ClassAI Systems (2 days)
- ✅ RoleBasedCombatPositioning.cpp (9 calls) - HIGHEST PRIORITY
- ✅ ClassAI files (11 calls across 10 files)
Phase 6D: TIER 3-4 Remaining (1 day)
- ✅ DungeonBehavior.cpp (5 calls)
- ✅ Utility/interaction files (19 calls)
- ✅ Review BotAI wrapper functions
Phase 7: Final Verification (1 day)
- ✅ Verify 100% MotionMaster→Arbiter coverage
- ✅ Verify SpatialGrid alignment for all systems
- ✅ Verify ThreadPool safety
- ✅ Performance testing with 100+ bots
- ✅ Document completion
Estimated Completion
Current Progress: 31% (25/81 calls) Remaining Work: 69% (56 calls) Estimated Time: 6-8 days for complete migration
Next Immediate Steps
- ✅ Complete this audit document
- ✅ Add special movement support to Movement Arbiter
- ✅ Migrate RoleBasedCombatPositioning (CRITICAL)
- ✅ Migrate TIER 1 systems (EncounterStrategy, etc.)
- ✅ Continue systematic migration by tier
Notes
- NO SHORTCUTS ALLOWED - Per project rules, ALL calls must be migrated
- Some "migrated" files (QuestStrategy, LootStrategy) show 2 calls because they have FALLBACK code (correct)
- BotAI.cpp wrapper functions (MoveTo, Follow) may need deprecation/removal
- MoveJump and other special movements require Arbiter support before migration