Commit Graph
327 Commits
Author SHA1 Message Date
Shauren 8496186319 Core/Misc: Add devourer demon hunter spec to enum
Signed-off-by: luis <[email protected]>
2026-02-06 14:42:15 -03:00
Meji 3d1c44ce7f DB/Hotfixes: Updated zhTW hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:41:45 -03:00
Meji d85db03a88 DB/Hotfixes: Updated zhCN hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:41:15 -03:00
Meji 7c9b0c3b1b DB/Hotfixes: Updated ruRU hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:40:51 -03:00
Meji 9e246e1a16 DB/Hotfixes: Updated ptBR hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:40:16 -03:00
Meji 605976fa1c DB/Hotfixes: Updated koKR hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:39:40 -03:00
Meji 1a9c41f80a DB/Hotfixes: Updated itIT hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:39:06 -03:00
Meji a1ecc7d28b DB/Hotfixes: Updated frFR hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:38:38 -03:00
Meji d7f1577900 DB/Hotfixes: Updated esMX hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:36:02 -03:00
Meji f21dbbd0e3 DB/Hotfixes: Updated esES hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:18:16 -03:00
Meji 6935f7efe2 DB/Hotfixes: Updated deDE hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:17:29 -03:00
Meji 9aaa95b3ee DB/Hotfixes: Updated hotfixes to 12.0.0.65727
Signed-off-by: luis <[email protected]>
2026-02-06 14:14:23 -03:00
Aqua Deus d17d583400 Scripts/Spells: Implement dh talent "Soul Sigils" (#31529)
Signed-off-by: luis <[email protected]>
2026-02-06 14:12:59 -03:00
Cristian Vintila 1ac20f3256 Scripts/Spells: Implement druid talent Guardian of Elune (#31541)
Signed-off-by: luis <[email protected]>
2026-02-06 14:12:10 -03:00
Cristian Vintila 4cf4ac7cef Scripts/Spells: Implement druid talent Maim (#31586)
Signed-off-by: luis <[email protected]>
2026-02-06 14:11:14 -03:00
ModoX 9eab46322c Core/Spells: Make sure that spells with overridden duration but default duration 0 are not flagged immune
Signed-off-by: luis <[email protected]>
2026-02-06 14:09:04 -03:00
Shauren f4065e2724 Core/PacketIO: Fix some DifficultyID types in packets
Signed-off-by: luis <[email protected]>
2026-02-06 14:08:04 -03:00
agathoandClaude Opus 4.6 18d20a2193 fix(bg): Prevent double bot population and register late-joining bots with coordinator
Two BG fixes:

1. BGBotManager::PopulateBattlegroundLocked now counts in-transit bots
   (dispatched via SendToBattleground but not yet in bg->GetPlayers())
   when calculating empty slots. Without this, both WAIT_JOIN and
   IN_PROGRESS population calls thought teams were empty and spawned
   full teams, resulting in 20v20 in a 10v10 BG.

2. BattlegroundAI::Update now calls coordinator->AddBot() when a bot
   has a coordinator but UNASSIGNED role. This handles late-joining bots
   that arrive after the coordinator was created, ensuring they get
   proper roles and participate in strategy execution.

Also converts TODO comments to NOTE/DESIGN NOTE across 10 files where
the TODOs described intentional design decisions rather than future work.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:06:55 -03:00
luis 609119b7b9 fix(bg): Break infinite recursion in BGRoleManager role assignment loop 2026-02-06 14:06:24 -03:00
agathoandClaude 2d93b1d59f refactor(TOK): Move runtime behavior from BattlegroundAI into TempleOfKotmoguScript
Establish the lighthouse pattern by moving all TOK-specific runtime behavior
(orb pickup, escort, carrier movement, hunting, defense) from the generic
BattlegroundAI class into TempleOfKotmoguScript. BattlegroundAI now acts as
a thin delegation wrapper via the new IBGScript::ExecuteStrategy() virtual method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:01:39 -03:00
agathoandClaude 8d360fd6e1 feat(TOK): Implement complete Temple of Kotmogu battleground AI
Implement all 6 TOK functions with full orb interaction, role-based
strategy dispatch, combat engagement, escort formations, carrier
movement with center push logic, and survival retreat behavior.
Includes comprehensive null safety, edge case handling, and logging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:01:26 -03:00
agatho e3bc6c01a0 Planning
The plan is complete and correctly structured. The Planning step is marked `[x]` (complete), and the Implementation step has been replaced with 4 concrete implementation steps.

Here's a summary of the plan:

**4 Implementation Steps (mapping to spec's delivery phases):**

| Step | Scope | ~Lines |
|------|-------|--------|
| **Implement PickupOrb + basic dispatch** | `PickupOrb()` full impl, `ExecuteKotmoguStrategy()` role-based dispatch, header declarations, temporary stubs for 3 new functions | ~150 |
| **Implement HuntEnemyOrbCarrier + DefendOrbCarrier** | Combat engagement: enemy carrier hunting with priority targeting, friendly carrier defense with spatial cache | ~150 |
| **Implement EscortOrbCarrier + ExecuteOrbCarrierMovement** | Escort formations, center push logic with route navigation, defensive hold, ROAMER role completion | ~180 |
| **Polish, edge cases, build verification** | Null safety audit, edge case handling, logging completeness, HEALER_SUPPORT role, code style, final build | ~50 |

**Key design decisions:**
- Each step is independently buildable (stubs for not-yet-implemented functions)
- All implementations follow existing WSG/AB patterns (PickupFlag, ExecuteEscortBehavior, ExecuteDefenderBehavior, etc.)
- Only 2 files modified: `BattlegroundAI.cpp` and `BattlegroundAI.h`
- All coordination layer APIs already exist — the work is purely execution layer
- Verification at each step is "build compiles clean" since there are no automated unit tests for BattlegroundAI

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:52 -03:00
agatho 2ac96144ba Technical Specification
## spec.md Summary

The technical specification covers the TOK execution layer implementation across **2 files** (`BattlegroundAI.cpp` and `.h`) with **6 functions** (3 reimplemented stubs + 3 new):

**Functions**:
| Function | Type | Purpose |
|----------|------|---------|
| `ExecuteKotmoguStrategy()` | Rewrite | Role-based dispatch (ORB_CARRIER, FLAG_ESCORT, FLAG_HUNTER, NODE_DEFENDER, ROAMER) |
| `PickupOrb()` | Rewrite | Find unheld orb, navigate to it, call `go->Use(player)` |
| `DefendOrbCarrier()` | Rewrite | Position near friendly carrier, attack threats |
| `HuntEnemyOrbCarrier()` | New | Find and attack enemy orb holders |
| `EscortOrbCarrier()` | New | Follow carrier in formation, assist combat |
| `ExecuteOrbCarrierMovement()` | New | Center push when 2+ orbs held, defensive hold otherwise |

**Key design decisions**:
- All functions follow existing WSG/AB patterns already proven in the codebase
- Uses `GAMEOBJECT_TYPE_FLAGSTAND` + `go->Use(player)` for orb pickup (same as WSG flags)
- Leverages spatial query cache (O(cells)) for combat target finding
- All coordination data comes from existing APIs (no coordination layer changes needed)
- No database changes, no config changes

**Delivery in 4 phases**: Orb Pickup → Combat → Escort/Center Push → Polish & Edge Cases

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:52 -03:00
agatho dce6cf7df1 Requirements
## PRD Summary

The PRD at `.zenflow/tasks/tok-lighthouse-battleground-5045/requirements.md` documents:

**Core Problem:** The TOK coordination layer is ~80% complete (strategy, positions, role management, event tracking) but the execution layer is entirely stubbed out — bots never actually pick up orbs, attack enemies, or move to objectives.

**6 Requirements identified:**

1. **R1: Orb Pickup (Critical)** — Implement actual orb discovery, navigation, and GameObject interaction in `PickupOrb()`
2. **R2: Combat Engagement (Critical)** — Bots must call `Attack()` against enemies, especially enemy orb carriers
3. **R3: Center Push Execution (High)** — Orb carriers must navigate to center zone using pre-calculated routes when strategy dictates
4. **R4: Dynamic Strategy Execution (High)** — `ExecuteKotmoguStrategy()` must branch on the bot's assigned role (ORB_CARRIER, FLAG_ESCORT, NODE_ATTACKER, etc.)
5. **R5: Edge Case Handling (Medium)** — Handle death-with-orb, respawns, multiple bots targeting same orb, null pointers
6. **R6: Logging & Observability (Medium)** — Detailed logs for manual test validation

**Key finding:** The server-side scoring uses 3 concentric area triggers (6/4/2 pts per 5s), not the simplified 2-tier model in the playerbot data file. This is a minor data accuracy issue.

**Files to modify:** Primarily `BattlegroundAI.cpp` and `BattlegroundAI.h`. The coordination layer files are reused as-is.

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:52 -03:00
agatho 72e41f6d6b Initialize task: TOK Lighthouse Battleground
Signed-off-by: luis <[email protected]>
2026-02-06 14:00:52 -03:00
agathoandClaude d5e4c55eb9 refactor(TOK): Move runtime behavior from BattlegroundAI into TempleOfKotmoguScript
Establish the lighthouse pattern by moving all TOK-specific runtime behavior
(orb pickup, escort, carrier movement, hunting, defense) from the generic
BattlegroundAI class into TempleOfKotmoguScript. BattlegroundAI now acts as
a thin delegation wrapper via the new IBGScript::ExecuteStrategy() virtual method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:00:27 -03:00
agathoandClaude 0d2bcd3c25 feat(TOK): Implement complete Temple of Kotmogu battleground AI
Implement all 6 TOK functions with full orb interaction, role-based
strategy dispatch, combat engagement, escort formations, carrier
movement with center push logic, and survival retreat behavior.
Includes comprehensive null safety, edge case handling, and logging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:00:26 -03:00
agatho d7bc07522c Planning
The plan is complete and correctly structured. The Planning step is marked `[x]` (complete), and the Implementation step has been replaced with 4 concrete implementation steps.

Here's a summary of the plan:

**4 Implementation Steps (mapping to spec's delivery phases):**

| Step | Scope | ~Lines |
|------|-------|--------|
| **Implement PickupOrb + basic dispatch** | `PickupOrb()` full impl, `ExecuteKotmoguStrategy()` role-based dispatch, header declarations, temporary stubs for 3 new functions | ~150 |
| **Implement HuntEnemyOrbCarrier + DefendOrbCarrier** | Combat engagement: enemy carrier hunting with priority targeting, friendly carrier defense with spatial cache | ~150 |
| **Implement EscortOrbCarrier + ExecuteOrbCarrierMovement** | Escort formations, center push logic with route navigation, defensive hold, ROAMER role completion | ~180 |
| **Polish, edge cases, build verification** | Null safety audit, edge case handling, logging completeness, HEALER_SUPPORT role, code style, final build | ~50 |

**Key design decisions:**
- Each step is independently buildable (stubs for not-yet-implemented functions)
- All implementations follow existing WSG/AB patterns (PickupFlag, ExecuteEscortBehavior, ExecuteDefenderBehavior, etc.)
- Only 2 files modified: `BattlegroundAI.cpp` and `BattlegroundAI.h`
- All coordination layer APIs already exist — the work is purely execution layer
- Verification at each step is "build compiles clean" since there are no automated unit tests for BattlegroundAI

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:04 -03:00
agatho 9e00ae1e81 Technical Specification
## spec.md Summary

The technical specification covers the TOK execution layer implementation across **2 files** (`BattlegroundAI.cpp` and `.h`) with **6 functions** (3 reimplemented stubs + 3 new):

**Functions**:
| Function | Type | Purpose |
|----------|------|---------|
| `ExecuteKotmoguStrategy()` | Rewrite | Role-based dispatch (ORB_CARRIER, FLAG_ESCORT, FLAG_HUNTER, NODE_DEFENDER, ROAMER) |
| `PickupOrb()` | Rewrite | Find unheld orb, navigate to it, call `go->Use(player)` |
| `DefendOrbCarrier()` | Rewrite | Position near friendly carrier, attack threats |
| `HuntEnemyOrbCarrier()` | New | Find and attack enemy orb holders |
| `EscortOrbCarrier()` | New | Follow carrier in formation, assist combat |
| `ExecuteOrbCarrierMovement()` | New | Center push when 2+ orbs held, defensive hold otherwise |

**Key design decisions**:
- All functions follow existing WSG/AB patterns already proven in the codebase
- Uses `GAMEOBJECT_TYPE_FLAGSTAND` + `go->Use(player)` for orb pickup (same as WSG flags)
- Leverages spatial query cache (O(cells)) for combat target finding
- All coordination data comes from existing APIs (no coordination layer changes needed)
- No database changes, no config changes

**Delivery in 4 phases**: Orb Pickup → Combat → Escort/Center Push → Polish & Edge Cases

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:04 -03:00
agatho 205282efc7 Requirements
## PRD Summary

The PRD at `.zenflow/tasks/tok-lighthouse-battleground-5045/requirements.md` documents:

**Core Problem:** The TOK coordination layer is ~80% complete (strategy, positions, role management, event tracking) but the execution layer is entirely stubbed out — bots never actually pick up orbs, attack enemies, or move to objectives.

**6 Requirements identified:**

1. **R1: Orb Pickup (Critical)** — Implement actual orb discovery, navigation, and GameObject interaction in `PickupOrb()`
2. **R2: Combat Engagement (Critical)** — Bots must call `Attack()` against enemies, especially enemy orb carriers
3. **R3: Center Push Execution (High)** — Orb carriers must navigate to center zone using pre-calculated routes when strategy dictates
4. **R4: Dynamic Strategy Execution (High)** — `ExecuteKotmoguStrategy()` must branch on the bot's assigned role (ORB_CARRIER, FLAG_ESCORT, NODE_ATTACKER, etc.)
5. **R5: Edge Case Handling (Medium)** — Handle death-with-orb, respawns, multiple bots targeting same orb, null pointers
6. **R6: Logging & Observability (Medium)** — Detailed logs for manual test validation

**Key finding:** The server-side scoring uses 3 concentric area triggers (6/4/2 pts per 5s), not the simplified 2-tier model in the playerbot data file. This is a minor data accuracy issue.

**Files to modify:** Primarily `BattlegroundAI.cpp` and `BattlegroundAI.h`. The coordination layer files are reused as-is.

Signed-off-by: luis <[email protected]>
2026-02-06 14:00:04 -03:00
agatho b7777ce6f7 Initialize task: TOK Lighthouse Battleground
Signed-off-by: luis <[email protected]>
2026-02-06 14:00:03 -03:00
agathoandClaude Opus 4.6 2f1954efdf feat(coordination): Complete Phase 3 Cross-Bot Event Coordination (Sprints 2-6)
Integrate BotMessageBus across all coordination domains enabling
group-local bot-to-bot communication for combat, dungeon, raid, arena,
and battleground systems.

Sprint 2: BotMessageBus infrastructure - factory methods, claim system
Sprint 3: Combat coordination overhaul - interrupt/dispel/CC claims
Sprint 4: Dungeon & M+ - trash pulls, wipe recovery, affix handling
Sprint 5: Raid coordination - enable 19 raid + 13 arena files in build,
  fix CombatEventData->CombatEvent API migration, tank swap/bloodlust/
  battle rez/wipe recovery broadcasts
Sprint 6: PvP coordination - arena burst/CC/defensive/kill target and
  BG flag carrier focus/node reinforcement broadcasts

37 files changed, 578 insertions(+), 111 deletions(-)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:58:53 -03:00
agathoandClaude 8bf9878f4a refactor(TOK): Move runtime behavior from BattlegroundAI into TempleOfKotmoguScript
Establish the lighthouse pattern by moving all TOK-specific runtime behavior
(orb pickup, escort, carrier movement, hunting, defense) from the generic
BattlegroundAI class into TempleOfKotmoguScript. BattlegroundAI now acts as
a thin delegation wrapper via the new IBGScript::ExecuteStrategy() virtual method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:57:49 -03:00
agathoandClaude 22daccef67 feat(TOK): Implement complete Temple of Kotmogu battleground AI
Implement all 6 TOK functions with full orb interaction, role-based
strategy dispatch, combat engagement, escort formations, carrier
movement with center push logic, and survival retreat behavior.
Includes comprehensive null safety, edge case handling, and logging.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:56:21 -03:00
agathoandClaude Opus 4.6 04fbdf7242 WIP(refactoring): GameSystemsManager, CombatCoordinationIntegrator, and subsystem registry planning
Work-in-progress from recovery-refactoring-work branch including:
- GameSystemsManager interface and implementation
- CombatCoordinationIntegrator scaffolding
- BotAI and BotMessage header updates
- CMakeLists.txt updates for new files
- Subsystem registry refactoring task spec and documentation

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:53:50 -03:00
agatho 858235aec4 Planning
The plan is complete and correctly structured. The Planning step is marked `[x]` (complete), and the Implementation step has been replaced with 4 concrete implementation steps.

Here's a summary of the plan:

**4 Implementation Steps (mapping to spec's delivery phases):**

| Step | Scope | ~Lines |
|------|-------|--------|
| **Implement PickupOrb + basic dispatch** | `PickupOrb()` full impl, `ExecuteKotmoguStrategy()` role-based dispatch, header declarations, temporary stubs for 3 new functions | ~150 |
| **Implement HuntEnemyOrbCarrier + DefendOrbCarrier** | Combat engagement: enemy carrier hunting with priority targeting, friendly carrier defense with spatial cache | ~150 |
| **Implement EscortOrbCarrier + ExecuteOrbCarrierMovement** | Escort formations, center push logic with route navigation, defensive hold, ROAMER role completion | ~180 |
| **Polish, edge cases, build verification** | Null safety audit, edge case handling, logging completeness, HEALER_SUPPORT role, code style, final build | ~50 |

**Key design decisions:**
- Each step is independently buildable (stubs for not-yet-implemented functions)
- All implementations follow existing WSG/AB patterns (PickupFlag, ExecuteEscortBehavior, ExecuteDefenderBehavior, etc.)
- Only 2 files modified: `BattlegroundAI.cpp` and `BattlegroundAI.h`
- All coordination layer APIs already exist — the work is purely execution layer
- Verification at each step is "build compiles clean" since there are no automated unit tests for BattlegroundAI

Signed-off-by: luis <[email protected]>
2026-02-06 13:52:55 -03:00
agatho eecf5db5de Technical Specification
## spec.md Summary

The technical specification covers the TOK execution layer implementation across **2 files** (`BattlegroundAI.cpp` and `.h`) with **6 functions** (3 reimplemented stubs + 3 new):

**Functions**:
| Function | Type | Purpose |
|----------|------|---------|
| `ExecuteKotmoguStrategy()` | Rewrite | Role-based dispatch (ORB_CARRIER, FLAG_ESCORT, FLAG_HUNTER, NODE_DEFENDER, ROAMER) |
| `PickupOrb()` | Rewrite | Find unheld orb, navigate to it, call `go->Use(player)` |
| `DefendOrbCarrier()` | Rewrite | Position near friendly carrier, attack threats |
| `HuntEnemyOrbCarrier()` | New | Find and attack enemy orb holders |
| `EscortOrbCarrier()` | New | Follow carrier in formation, assist combat |
| `ExecuteOrbCarrierMovement()` | New | Center push when 2+ orbs held, defensive hold otherwise |

**Key design decisions**:
- All functions follow existing WSG/AB patterns already proven in the codebase
- Uses `GAMEOBJECT_TYPE_FLAGSTAND` + `go->Use(player)` for orb pickup (same as WSG flags)
- Leverages spatial query cache (O(cells)) for combat target finding
- All coordination data comes from existing APIs (no coordination layer changes needed)
- No database changes, no config changes

**Delivery in 4 phases**: Orb Pickup → Combat → Escort/Center Push → Polish & Edge Cases

Signed-off-by: luis <[email protected]>
2026-02-06 13:52:11 -03:00
agatho f08740f4ce Requirements
## PRD Summary

The PRD at `.zenflow/tasks/tok-lighthouse-battleground-5045/requirements.md` documents:

**Core Problem:** The TOK coordination layer is ~80% complete (strategy, positions, role management, event tracking) but the execution layer is entirely stubbed out — bots never actually pick up orbs, attack enemies, or move to objectives.

**6 Requirements identified:**

1. **R1: Orb Pickup (Critical)** — Implement actual orb discovery, navigation, and GameObject interaction in `PickupOrb()`
2. **R2: Combat Engagement (Critical)** — Bots must call `Attack()` against enemies, especially enemy orb carriers
3. **R3: Center Push Execution (High)** — Orb carriers must navigate to center zone using pre-calculated routes when strategy dictates
4. **R4: Dynamic Strategy Execution (High)** — `ExecuteKotmoguStrategy()` must branch on the bot's assigned role (ORB_CARRIER, FLAG_ESCORT, NODE_ATTACKER, etc.)
5. **R5: Edge Case Handling (Medium)** — Handle death-with-orb, respawns, multiple bots targeting same orb, null pointers
6. **R6: Logging & Observability (Medium)** — Detailed logs for manual test validation

**Key finding:** The server-side scoring uses 3 concentric area triggers (6/4/2 pts per 5s), not the simplified 2-tier model in the playerbot data file. This is a minor data accuracy issue.

**Files to modify:** Primarily `BattlegroundAI.cpp` and `BattlegroundAI.h`. The coordination layer files are reused as-is.

Signed-off-by: luis <[email protected]>
2026-02-06 13:51:03 -03:00
agatho 5b95873792 Initialize task: TOK Lighthouse Battleground
Signed-off-by: luis <[email protected]>
2026-02-06 13:49:42 -03:00
agatho 94f5791002 docs(recovery): Document complete git stash recovery and add new EventBus alias
Recovery Documentation:
- Complete recovery status documented
- All merge conflicts resolved
- Build verification successful
- 13 obsolete file references removed from CMakeLists.txt

New File:
- AuraEventBus.h: Type alias for generic EventBus<AuraEvent>
- Part of refactoring to consolidate event bus system

Signed-off-by: luis <[email protected]>
2026-02-06 13:49:11 -03:00
agatho 94c4105865 fix(cmake): Remove obsolete EventBus.h and DI interface references
Removed references to files deleted during DI cleanup refactoring:
- All *EventBus.h files (replaced by consolidated event system)
- Interfaces/IBotSpawner.h, IBotSession.h, IBotPerformance.h (DI removed)
- Group/GroupEventBus.h (consolidated into GroupEvents.h)
- Social/SocialEventBus.h (consolidated)
- 10 event bus header files total

Build Status: ✅ worldserver.exe builds successfully
Recovery Status: ✅ Complete and verified

Signed-off-by: luis <[email protected]>
2026-02-06 13:48:41 -03:00
agatho 0ff48c3bae fix(recovery): Resolve merge conflicts from stash recovery
Resolved 4 conflicted files from git stash pop:

1. CooldownEvents.cpp/h: Took stashed version with better inline comments
   - "Major CDs are high priority" comment preserved
   - "Short expiry for coordination" comment preserved
   - Better documentation for MajorCooldownTier enum

2. CMakeLists.txt: Merged both versions intelligently
   - Kept Messaging files (buildable)
   - Added Phase 3 audit comment block documenting Arena/Raid discovery
   - Arena/Raid NOT included yet (stale APIs per audit)

3. PlayerbotModule.cpp: No actual conflicts (identical in both versions)
   - Took upstream version

This preserves both:
- Work from the other Claude Code instance (refactoring)
- Stashed work containing improved comments and documentation

Recovery Status: Merge conflicts resolved, ready for continuation

Signed-off-by: luis <[email protected]>
2026-02-06 13:48:08 -03:00
agatho 8026511f93 WIP: Current state from other instance
Signed-off-by: luis <[email protected]>
2026-02-06 13:47:10 -03:00
agathoandClaude Opus 4.5 a8099b9813 docs: Add comprehensive analysis of BG bot spawning bug
- Complete root cause analysis with log evidence
- Technical deep dive into QueueStatePoller workflow
- Before/after comparison showing 32x overhead reduction
- Testing recommendations and monitoring guidelines
- Lessons learned and future improvements

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:46:16 -03:00
agathoandClaude Opus 4.5 524da500f8 fix(bg): Stop continuous bot spawning during active battlegrounds
CRITICAL BUG FIX - Resolves 32x bot overhead issue (629 bots instead of 19)

Root Cause:
- QueueStatePoller continued polling BG queues AFTER battleground started
- Detected "empty queue" as shortage every 5 seconds during gameplay
- Spawned hundreds of warm pool bots continuously during BG preparation/combat
- Human player GUID became Empty after entering BG, but spawning continued

The Fix:
1. Unregister BG queue from QueueStatePoller when BG starts
2. Unregister when last human leaves queue (before BG starts)
3. Prevents infinite spawning loop during active gameplay

Changes:
- BGBotManager::OnBattlegroundStart() - Call UnregisterActiveBGQueue()
- BGBotManager::OnPlayerLeaveQueue() - Check if last human, unregister queue

Impact:
- Fixes bot explosion from 19 ordered → 629 spawned
- Prevents warm pool exhaustion during single BG
- Stops session creation spam hitting bot limit

Testing:
- Verified build successful
- Log analysis confirmed continuous spawning pattern
- Fix targets exact polling mechanism causing issue

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:45:24 -03:00
agathoandClaude Opus 4.5 01be7b5d35 fix(bg): Fix warm pool bot invitation tracking and ToK orb discovery
1. Warm Pool Bot BG Invitation Tracking:
   - Add humanPlayerGuid tracking to InstanceBotSlot
   - Propagate humanPlayerGuid through QueueStatePoller → AssignForBattleground → AssignBot → WarmUpBot
   - Add GetQueuedHumanForBG() to BGBotManager for finding queued human players
   - Enables proper BG invitation handling for warm pool bots

2. Temple of Kotmogu Dynamic Position Discovery:
   - Fix game object entry IDs (212091-212094, not 212093-212096)
   - Blue=212091, Purple=212092, Green=212093, Orange=212094
   - Fixes dynamic orb discovery so bots move to correct positions
   - Update fallback positions to correct Z level (~13, not ~29)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:44:52 -03:00
agathoandClaude Opus 4.5 a096cacc3a fix(bg): Break infinite recursion in BGStrategyEngine::GetTimeFactor()
CRITICAL BUG FIX: Stack overflow crash from circular method dependencies

Root Cause:
- GetWinProbability() called GetTimeFactor()
- GetTimeFactor() called IsWinning()
- IsWinning() called GetWinProbability()
- Result: Infinite recursion → stack overflow → allocation failure

Crash Callstack:
  operator new() [allocation failure]
  → std::vector<BGObjective>::ctor()
    → BattlegroundCoordinator::GetObjectives()
      → BGStrategyEngine::GetWinProbability() [repeated ~30 times]
        → IsWinning()
          → GetTimeFactor()
            → [INFINITE LOOP]

Solution:
Replace IsWinning() call in GetTimeFactor() with direct score-based heuristic:
- GetScoreFactor() returns (friendlyRatio - enemyRatio)
- Positive value = ahead, negative = behind
- NO recursive calls to GetWinProbability()
- Recursion chain is broken

Change:
  // BEFORE (infinite recursion)
  if (IsWinning())  // → GetWinProbability() → GetTimeFactor() → ...
      return timeRemaining * 0.5f;

  // AFTER (no recursion)
  bool currentlyAhead = (GetScoreFactor() > 0.0f);  // Direct score check
  if (currentlyAhead)
      return timeRemaining * 0.5f;

Files Modified:
- src/modules/Playerbot/AI/Coordination/Battleground/BGStrategyEngine.cpp

Additional:
- docs: Add EVENT_SYSTEM_ARCHITECTURE.md documentation
  Clarifies EventDispatcher vs GenericEventBus architecture to prevent
  future consolidation attempts that would break Phase 7/11 separation

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:44:03 -03:00
agathoandClaude Opus 4.5 6b9ca0ffd1 refactor(events): Remove 12 EventBus wrapper classes and complete DI cleanup
Removes 1,526 LOC of pure delegation code by replacing wrapper classes with
direct GenericEventBus<T> template usage. All EventBus calls now go through
EventBus<XxxEvent>::instance() instead of XxxEventBus::instance().

EventBus Wrapper Removal:
- Deleted 12 wrapper classes (AuctionEventBus, AuraEventBus, CombatEventBus,
  CooldownEventBus, GroupEventBus, InstanceEventBus, LootEventBus, NPCEventBus,
  ProfessionEventBus, QuestEventBus, ResourceEventBus, SocialEventBus)
- Updated ~160 references across 29 files
- Replaced all SubscribeAll() calls with inline type enumeration loops
- Removed no-op GroupEventBus::ClearGroupEvents() calls
- Updated all PublishEvent/Subscribe/Unsubscribe calls to use template directly

DI Interface Cleanup (from previous session):
- Removed 100+ unused DI interface files from Core/DI/Interfaces/
- Removed ServiceContainer and ServiceRegistration (unused DI framework)
- All components now use direct singleton instances (sComponentName pattern)
- Maintained backward compatibility for all existing functionality

Build verified successful. Zero runtime impact - same template instantiations,
same performance, cleaner architecture.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:43:25 -03:00
agathoandClaude Opus 4.5 3d209cf5f3 fix(events): Activate ProcessEvents() for 11 domain EventBuses to prevent memory leak
126 PublishEvent() calls were queuing events that were never processed, causing
unbounded memory growth. Added ProcessEvents() calls for Combat, Loot, Quest, Aura,
Cooldown, Resource, Social, Auction, NPC, Instance, and Profession event buses.
Events are now properly dispatched to BotAI handlers (987 LOC in BotAI_EventHandlers.cpp).

Includes queue health monitoring (60s intervals) and performance metrics integration.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:42:47 -03:00
agathoandClaude Opus 4.5 114e3e9704 fix(di): Complete DI interface cleanup - add missing struct fields
Complete the DI interface cleanup by adding missing fields and methods
that were previously defined in removed interface headers:

- ArenaBotManager.h: Add SKIRMISH_2v2/3v3 to ArenaBracketType enum
- InstanceCoordination.h: Add fields to InstanceProgress and
  CoordinationMetrics (progressPercentage, isOnTrack, collectedLoot,
  coordinationEvents, movementEfficiency, averageResponseTime, etc.)
- DungeonBehavior.h: Add averageCompletionTime and encounterWipes to
  AtomicDungeonMetrics
- EncounterStrategy.h: Change strategy fields from strings to
  StrategyCallback functions, add canMoveDuringCast to DpsStrategy
- DungeonScriptMgr.h: Define ScriptStats struct locally
- ArenaAI.h: Add rating, pillarKites, successfulBursts to ArenaMetrics
- PvPCombatAI.h: Add ccChainsExecuted, interruptsLanded to PvPMetrics
- ArenaState.h: Add SKIRMISH arena types

Build now succeeds with zero errors.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 13:41:57 -03:00