Files
ThordekkCore/MOVEMENT_ARBITER_MIGRATION_AUDIT_2025-10-22.md
T
2026-01-20 21:33:16 -03:00

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)

  1. EncounterStrategy.cpp - 7 calls (Priority 205 - DUNGEON_MECHANIC)
  2. AdvancedBehaviorManager.cpp - 6 calls (Priority 210 - PVP_FLAG_CAPTURE, etc.)
  3. CombatAIIntegrator.cpp - 7 unmigrated calls (Priority 240/130 mixed)
  4. InterruptManager.cpp - 2 calls (Priority 220 - INTERRUPT_POSITIONING)
  5. StockadeScript.cpp - 1 call (Priority 205 - DUNGEON_MECHANIC)
  6. SpellInterruptAction.cpp - 1 call (Priority 220 - INTERRUPT_POSITIONING)
  7. KitingManager.cpp - 1 call (Priority 175 - KITING)
  8. FormationManager.cpp - 1 call (Priority 160 - FORMATION)

TIER 2: HIGH (ClassAI Positioning) - 20 calls in 9 files

Priority 170 (ROLE_POSITIONING)

  1. RoleBasedCombatPositioning.cpp - 9 calls (CRITICAL GAP)
  2. MageAI.cpp - 3 calls
  3. HunterAI.cpp - 2 calls
  4. WarlockAI.cpp - 1 call
  5. ProtectionSpecialization.cpp - 1 call
  6. CombatSpecializationBase.cpp - 1 call
  7. PriestAI.cpp - 1 call
  8. MageAI_Specialization.cpp - 1 call
  9. FrostSpecialization.cpp - 1 call
  10. MageSpecialization.cpp - 1 call
  11. BeastMasteryHunterRefactored.h - 2 calls

TIER 3: MEDIUM (Dungeon/Group) - 5 calls in 1 file

Priority 110 (DUNGEON_POSITIONING)

  1. DungeonBehavior.cpp - 5 calls

TIER 4: LOW (Utility/Misc) - 19 calls in 11 files

Priority 0-50 (LOW/MINIMAL)

  1. NPCInteractionManager.cpp - 2 calls (Priority 20 - EXPLORATION)
  2. BotActionProcessor.cpp - 2 calls (varies)
  3. EnhancedBotAI.cpp - 1 call (varies)
  4. InteractionManager.cpp - 1 call (Priority 20)
  5. InteractionManager_COMPLETE_FIX.cpp - 1 call (Priority 20)
  6. Action.cpp - 1 call (varies)
  7. BotMovementUtil.h - 1 call (utility)
  8. PositionManager.cpp - 1 call (varies)
  9. CommonActions.cpp - 2 calls (varies)
  10. BotAI.cpp - 2 calls (wrapper functions - needs review)
  11. 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:

  1. MoveJump() - Jump movement (found in ObstacleAvoidanceManager)
  2. MoveIdle() - Idle movement (found in QuestStrategy)
  3. MoveRandom() - Random movement
  4. MoveConfused() - Confusion movement
  5. MoveFleeing() - Fear/flee movement
  6. MoveCharge() - Charge movement
  7. MoveLand() - Flying→ground transition
  8. MoveTakeOff() - Ground→flying transition
  9. MoveHome() - Return to spawn point

Action Required: Add factory methods to MovementRequest for these movement types


Phase 6A: Special Movement Support (1-2 days)

  1. Add MoveJump support to MovementArbiter
  2. Add MoveIdle, MoveRandom support
  3. Add other special movements (Flee, Confuse, Charge, etc.)
  4. Update MovementRequest with new factory methods
  5. Test special movement arbitration

Phase 6B: TIER 1 Critical Systems (2-3 days)

  1. ✅ EncounterStrategy.cpp (7 calls)
  2. ✅ AdvancedBehaviorManager.cpp (6 calls)
  3. ✅ CombatAIIntegrator.cpp (7 remaining calls)
  4. ✅ InterruptManager.cpp (2 calls)
  5. ✅ Other TIER 1 files (4 calls)

Phase 6C: TIER 2 ClassAI Systems (2 days)

  1. ✅ RoleBasedCombatPositioning.cpp (9 calls) - HIGHEST PRIORITY
  2. ✅ ClassAI files (11 calls across 10 files)

Phase 6D: TIER 3-4 Remaining (1 day)

  1. ✅ DungeonBehavior.cpp (5 calls)
  2. ✅ Utility/interaction files (19 calls)
  3. ✅ Review BotAI wrapper functions

Phase 7: Final Verification (1 day)

  1. ✅ Verify 100% MotionMaster→Arbiter coverage
  2. ✅ Verify SpatialGrid alignment for all systems
  3. ✅ Verify ThreadPool safety
  4. ✅ Performance testing with 100+ bots
  5. ✅ 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

  1. ✅ Complete this audit document
  2. ✅ Add special movement support to Movement Arbiter
  3. ✅ Migrate RoleBasedCombatPositioning (CRITICAL)
  4. ✅ Migrate TIER 1 systems (EncounterStrategy, etc.)
  5. ✅ 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