Commit Graph
3371 Commits
Author SHA1 Message Date
agathoandClaude Opus 4.6 0e16dd2f10 feat(combat): Add CombatPhaseDetector for unified opener/execute phase logic across all 39 specs
Provides per-bot combat phase detection (Opener/Sustained/Execute/Finishing)
with spec-specific thresholds and rotation guidance for all 39 specializations.
Each spec has configured execute threshold (20-35%), opener duration (3-8s),
stealth opener flags, execute spell IDs, opener burst CD sequences, and
resource pooling guidance. Integrates with rotation systems via
ShouldPrioritizeSpell() and IsExecuteAbility() queries.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:25:46 -03:00
agathoandClaude Opus 4.6 365a4843ce feat(perf): Add GUID-sharded metrics collector and replace recursive_mutex with shared_mutex
Introduces ShardedMetricsCollector with 256 independent shards for per-bot
performance metrics (AI decision, combat rotation, target selection, etc.).
Each shard has its own std::shared_mutex enabling parallel reader access
(3-5x faster than recursive_mutex for 500+ bots). Also upgrades the existing
Session/BotPerformanceMonitor to use std::shared_mutex for its system-level
tick metrics, replacing OrderedRecursiveMutex. All read-only operations
(reports, queries, degradation checks) now use shared_lock for zero-contention
concurrent access.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:25:17 -03:00
agathoandClaude Opus 4.6 044aa95ea1 feat(combat): Add PreBurstResourcePooling for resource-aware burst CD preparation
Detects when major burst cooldowns are 3-5 seconds from ready and signals
rotation systems to pool resources (energy/rage/mana/etc.) so bots enter
burst windows at 80-95% resource. Supports all 25+ DPS specs with per-spec
burst CD definitions and progressive pooling intensity (light/moderate/aggressive).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:23:30 -03:00
agathoandClaude Opus 4.6 fa9268d5be feat(combat): Add context-aware AddPrioritySystem for intelligent add targeting
Automatically classifies nearby hostile creatures by combat role (healer,
explosive, fixate, enraged, shielding, summoner, berserker) using creature
template data and active spell/aura analysis. Generates role-adjusted
priority scores so tanks pick up loose adds, ranged DPS handle explosives,
and all DPS focus healer adds first. Supports M+ affix awareness
(bolstering, bursting, raging, spiteful) and encounter context scaling.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:21:46 -03:00
agathoandClaude Opus 4.6 e76f7068bc feat(combat): Add IncomingDamagePredictor for proactive defensive CD usage
Bridges InterruptAwareness spell cast detection to damage estimation,
enabling bots to trigger defensive cooldowns BEFORE damage lands rather
than reactively after health drops. Three-phase prediction: active spell
casts via SpellInfo analysis, melee attackers via threat list, and
historical DPS extrapolation. Produces time-bucketed forecasts (1/2/3/5s)
with severity classification and role-aware defensive recommendations.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:19:59 -03:00
agathoandClaude Opus 4.6 7450e2cebb feat(validation): Add SpellIdValidator for startup spell ID validation against SpellDB
Two-phase validation system that catches stale/invalid spell IDs at server
startup instead of silently failing during combat:

Phase 1 - ClassSpellDatabase: Validates all spell IDs stored in rotation,
defensive, cooldown, healing tier, fallback chain, and interrupt maps for
all 39 specs across 13 classes.

Phase 2 - Constexpr SpellValidation: Validates ~1925 constexpr spell ID
definitions from SpellValidation_WoW120.h and SpellValidation_WoW120_Part2.h
via per-class registration functions for all 13 classes.

Uses sSpellMgr->GetSpellInfo(spellId, DIFFICULTY_NONE) for validation.
Logs per-spec breakdowns for specs with errors plus aggregate summary.
Called automatically at end of ClassSpellDatabase::Initialize().

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:19:18 -03:00
agathoandClaude Opus 4.6 2c62d3f912 refactor(bg): Migrate all BG bot behavior from BattlegroundAI into individual script ExecuteStrategy()
Replace the broken role-based system (SetRoleRequirement never called, all bots
default to ROAMER) with dynamic behavior trees in each BG script. This extends
the Temple of Kotmogu "lighthouse pattern" to all 13 battlegrounds.

Phase 1 - Shared utilities added to base classes:
- BGScriptBase: EngageTarget, FindNearestEnemyPlayer, PatrolAroundPosition
- CTFScriptBase: RefreshFlagState, RunFlagHome, PickupEnemyFlag, HuntEnemyFC,
  EscortFriendlyFC, DefendOwnFlagRoom, ReturnDroppedFlag
- DominationScriptBase: RefreshNodeState, CaptureNode, DefendNode,
  FindNearestCapturableNode, GetBestAssaultTarget

Phase 2-7 - ExecuteStrategy behavior trees for all 13 BGs:
- CTF: WarsongGulch, TwinPeaks (phase-aware flag priority trees)
- Domination: ArathiBasin (3-cap), BattleForGilneas (2-cap), DeepwindGorge,
  SeethingShore (dynamic nodes), EyeOfTheStorm (hybrid CTF/domination)
- Siege: AlteracValley (phase-based), StrandOfTheAncients, IsleOfConquest
- ResourceRace: SilvershardMines (cart escort + lane control)
- Epic: Ashran (road push with event objectives)

Phase 8 - BattlegroundAI.cpp cleanup:
- Reduced from 2,418 to 429 lines (-82%), header from 463 to 164 lines (-65%)
- Removed all legacy behavior methods, strategy structs, role management
- Kept thin dispatch layer, coordinator registration, profiles, metrics

Key patterns applied from ToK lighthouse:
- GUID-hash duty split for deterministic task distribution
- RefreshState throttled to 1s at top of each ExecuteStrategy
- EngageTarget (SetSelection + Attack) at every engagement point
- Phase-ignoring GO search for dynamically spawned BG objects
- Thin delegation: if (script->ExecuteStrategy(player)) return

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-11 19:18:27 -03:00
agathoandClaude Opus 4.6 d5a2aaf267 feat(consumables): Add ConsumableManager for pre-combat buffing and combat potions
Implements comprehensive consumable management system:
- Pre-combat buffing: flasks/phials, food (Well Fed), augment runes
  with context-aware usage (only in dungeons/raids/delves)
- Combat emergency: health potions at <=30% HP, healthstones at <=35% HP,
  mana potions at <=20% mana for healers/casters
- Combat DPS potions: role-appropriate potions during burst windows
- Content-type detection: Open World, Dungeon, Raid, PvP, Delve
- Role detection: Tank, Healer, Melee DPS, Ranged DPS, Caster DPS

Consumable databases cover TWW, Dragonflight, Shadowlands, BfA, Legion,
WoD, and Classic-era items with priority-based selection (best first).
Buff state detection scans active auras for flask/food/rune patterns.

Per-bot instance owned by GameSystemsManager, updated at REDUCED+ tier
with internal throttling (5s out of combat, 500ms in combat).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:48:41 -03:00
Shauren 3a2719552f Core/GameObjects: Fix anim kits
Signed-off-by: luis <[email protected]>
2026-02-10 21:47:47 -03:00
agathoandClaude Opus 4.6 901b0d3a63 feat(ai): Complete proc reaction logic for 7 specs missing consumption
Add proc tracking and rotation-integrated consumption for:
- Devastation Evoker: Essence Burst (free Disintegrate/Pyre in ST/AoE/burst)
- Preservation Evoker: Essence Burst (free Emerald Blossom/Verdant Embrace)
- Restoration Shaman: Tidal Waves (2-stack system from Riptide/Chain Heal,
  consumed by Healing Surge for +40% crit or Healing Wave for +20% speed)
- Shadow Priest: Surge of Insanity (from Devouring Plague, consumed as
  Mind Flay: Insanity or Mind Spike: Insanity based on talent detection)
- Subtlety Rogue: Shadow Techniques (passive auto-attack proc granting
  1 combo point + 8 energy with edge detection)
- Guardian Druid: Gore (Mangle reset + 4 extra rage, priority over normal Mangle)
- Restoration Druid: Clearcasting/Omen of Clarity (free instant Regrowth
  on most injured group member)

Also adds GORE, CLEARCASTING_RESTO, SURGE_OF_INSANITY, MIND_FLAY_INSANITY,
MIND_SPIKE_INSANITY, and DEATHSPEAKER spell IDs to validation registries.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:46:41 -03:00
agathoandClaude Opus 4.6 9bfd9312ee feat(ai): Add hero talent rotation integration for all 39 specializations
Implements runtime hero talent detection and rotation branches for every
WoW 12.0 specialization. Each spec's UpdateRotation() now lazily detects
the bot's hero talent tree via HeroTalentCache and prioritizes the
corresponding hero-talent-specific ability before the standard rotation.

Hero talent mappings per class:
- Warrior: Slayer/Mountain Thane (Arms), Slayer/Mountain Thane (Fury), Colossus/Mountain Thane (Prot)
- Paladin: Herald of the Sun/Lightsmith (Holy), Lightsmith/Templar (Prot), Templar/Herald of the Sun (Ret)
- DK: Deathbringer/Rider of the Apocalypse (Blood), Deathbringer/Rider (Frost), San'layn/Rider (Unholy)
- DH: Aldrachi Reaver/Fel-Scarred (Havoc), Aldrachi Reaver/Fel-Scarred (Vengeance)
- Druid: Keeper of the Grove/Elune's Chosen (Balance), Druid of the Claw/Wildstalker (Feral),
         Druid of the Claw/Elune's Chosen (Guardian), Keeper of the Grove/Wildstalker (Resto)
- Evoker: Flameshaper/Scalecommander (Dev), Chronowarden/Flameshaper (Pres), Chronowarden/Scalecommander (Aug)
- Hunter: Pack Leader/Dark Ranger (BM), Sentinel/Dark Ranger (MM), Pack Leader/Sentinel (SV)
- Mage: Spellslinger/Sunfury (Arcane), Frostfire/Sunfury (Fire), Frostfire/Spellslinger (Frost)
- Monk: Conduit of the Celestials/Shado-Pan (BrM), Conduit/Master of Harmony (MW),
        Conduit/Shado-Pan (WW)
- Priest: Oracle/Voidweaver (Disc), Oracle/Archon (Holy), Voidweaver/Archon (Shadow)
- Rogue: Deathstalker/Fatebound (Assassination), Trickster/Fatebound (Outlaw),
         Deathstalker/Trickster (Subtlety)
- Shaman: Farseer/Stormbringer (Elemental), Totemic/Stormbringer (Enhancement),
          Farseer/Totemic (Restoration)
- Warlock: Hellcaller/Soul Harvester (Affliction), Diabolist/Soul Harvester (Demonology),
           Hellcaller/Diabolist (Destruction)

Also fixes:
- BGScriptBase.cpp/CTFScriptBase.cpp: Add missing BGSpatialQueryCache.h include
- BotMovementManager.h: Fix PathCache.h include path ambiguity

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:46:12 -03:00
agathoandClaude Opus 4.6 a91933499c feat(perf): Add save tiering, differential saves, idle memory reduction, and anti-cluster dispersal
Implement 4 enhancement gaps identified from mod-playerbots comparison:
- P6: Budget-tier-based save frequency (FULL=5min, REDUCED=15min, MINIMAL=30min)
- P3: Coarse differential saves skip unchanged bot state (FNV-1a checksums)
- P5: ObjectCache::ClearNonEssential() prunes caches on MINIMAL transition
- R1: BotClusterDetector disperses 8+ bot clusters via MoveRandom

Also fixes pre-existing PathCache.h/.cpp shared_lock/unique_lock type
mismatch with OrderedSharedMutex (CTAD fix).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:45:21 -03:00
agathoandClaude Opus 4.6 1f15680a4b fix(bg): Replace broken role-based ToK strategy with dynamic behavior tree
The coordinator role system never populated role requirements, causing all
bots to default to ROAMER. This meant no carriers were defended, no enemy
carriers were hunted, and bots wandered aimlessly after picking up orbs.

Replace the role switch with per-tick game state evaluation:
- Priority 1: Orb carriers always move to center (never stop for combat)
- Priority 2: Free orbs get picked up (with bot-splitting via m_orbTargeters)
- Priority 3: GUID-hash duty split - 2/3 escort friendly carriers, 1/3 hunt
  enemy carriers, with center-carrier priority weighting
- Priority 4: No carriers - patrol center and fight enemies

Also fix carrier en-route combat that blocked center movement with a
return-true when enemies were within 10yd. Carriers now initiate attack
(so class AI casts abilities) but always continue waypoint movement.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:44:46 -03:00
agathoandClaude Opus 4.6 9f45ea3fb0 feat(commands): Add .bot cheat commands for bot cheat management
Add in-game commands to toggle and manage bot cheats via BotCheatMask:
- .bot cheat <name> — toggle a cheat on selected/group bots
- .bot cheat list — show available cheats and active cheats
- .bot cheat off — clear all cheats on selected/group bots
- .bot cheat mult <type> <value> — set speed/damage/XP multipliers

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:44:01 -03:00
agathoandClaude Opus 4.6 e75d905abf feat(ai): Add RPG-state-based AI budget tier system for CPU optimization
Gate AI subsystems by RPG state to skip unnecessary work in passive states,
reducing CPU per-bot by 30-60% for bots in low-activity states. Three tiers:
FULL (combat/quest/dungeon), REDUCED (travel/city - movement+safety only),
MINIMAL (idle/resting - safety-critical only). Complements existing ST-1
frequency throttling with scope-per-update reduction. Instant combat
escalation ensures bots under attack switch to FULL within one server tick.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:43:06 -03:00
agathoandClaude Opus 4.6 dee387d685 refactor(enchants): Replace SQL enchant/gem data with DB2 client data loading
EnchantGemDatabase now loads entirely from DB2 stores (SpellItemEnchantment,
GemProperties, ChrSpecialization) at startup, scoring each enchant/gem against
spec role and primary stat priorities. Removes all hardcoded SQL data and drops
the now-unnecessary playerbot_enchant_recommendations and
playerbot_gem_recommendations tables. Also replaces hardcoded skill IDs in
GuildTaskManager with SharedDefines enums.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:41:58 -03:00
agathoandClaude Opus 4.6 8acd3117a7 fix(db): Route all new feature queries to playerbot database, not characters
GuildTaskManager, AccountLinkingManager, ChatTemplateManager, and
EnchantGemDatabase were incorrectly using CharacterDatabase for their
queries. All playerbot tables live in the dedicated playerbot database
accessed via sPlayerbotDatabase.

Changes per file:
- Replace #include "DatabaseEnv.h" with "Database/PlayerbotDatabase.h"
- Replace CharacterDatabase.Query() with sPlayerbotDatabase->Query()
- Replace CharacterDatabase.DirectExecute() with sPlayerbotDatabase->Execute()

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:39:57 -03:00
agathoandClaude Opus 4.6 0f0875fe6e feat(playerbot): Add 14 new systems - combat intelligence, RPG simulation, utilities
Implement complete feature batch from mod-playerbots analysis plan:

CRITICAL (4):
- TTK Estimator: Skip long casts on dying targets (rolling 5s DPS window)
- Healing Mana Tiers: 5-tier efficiency gating for 7 healer specs
- Spell Fallback Chains: Try alternatives when primary spell unavailable
- RPG World Simulation: Personality-driven daily routines for idle bots

HIGH (4):
- ClassSpellDatabase: Static shared spell data for all 13 classes
- Population PID Controller: Smooth bot spawning with Kp/Ki/Kd tuning
- Enchant/Gem Templates: Auto-enchant and gem equipment by spec
- Chat/Emote Templates: DB-driven contextual bot chat with locale support

MEDIUM (4):
- ServerLoadMonitor: Scale reaction delays under server load
- DirtyValue<T>: Lazy evaluation template for expensive computations
- Guild Task System: Auto-generated guild tasks with bot assignment
- Packet Handler Cleanup: Remove deprecated opcode-based stubs

LOW (2):
- Account Linking: Permission-based bot account sharing
- BotCheatMask: Debug cheat system with 15 flags and multipliers

Includes SQL schemas, subsystem registrations, and user documentation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:39:23 -03:00
agathoandClaude Opus 4.6 764103da11 fix(bg): Close ToK behavioral gaps - proactive combat, orb rush, kiting
Five behavioral gaps fixed in Temple of Kotmogu bot AI:

1. Carrier fights while traveling to center: Carriers now engage enemies
   within 15yd en route instead of being passive targets. Chase within
   10yd, attack-and-continue for 10-15yd enemies.

2. Proactive escort combat: Escorts now engage the closest enemy within
   20yd of the carrier regardless of carrier combat state, instead of
   waiting until the carrier is already being attacked.

3. Dropped orb rush: Any bot within 40yd of a free orb rushes to pick
   it up, overriding assigned role. Prevents orbs sitting on ground
   while bots escort/hunt/defend elsewhere.

4. Contested orb fighting: When PickupOrb finds no GO (orb was taken),
   bots engage nearby enemies at the location instead of standing idle.

5. Carrier kiting in center: When HP 30-60% and 2+ enemies within 10yd,
   carrier moves away from enemy cluster while staying in center zone,
   maintaining attack on closest enemy.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-10 21:38:24 -03:00
luis 5a0839fe33 Quest and misc db fixes 2026-02-07 13:58:22 -03:00
Shauren 1f87241f1a Core/Objects: Refactor entity fragment functions to separate global array and move ClearChangesMask there
* Additionally unify argument order for UF::Structure::WriteSomething and Object::BuildValuesSomething

Signed-off-by: luis <[email protected]>
2026-02-07 13:14:33 -03:00
agathoandClaude Opus 4.6 c4902451ef fix(bg): Add combat initiation, fix ToK center coords, always push center
- Add player->Attack(enemy, true) at all 15 enemy engagement points
  across BattlegroundAI.cpp (7 sites) and TempleOfKotmoguScript.cpp
  (8 sites). Without Attack(), bots only did SetSelection+ChaseTarget
  which is movement-only — combat never started, no PvP occurred.
- Fix ToK CENTER_X/Y from (1732,1287) to (1783.5,1333.4) — the actual
  geometric center of the 4 orb positions. Old coords were ~69yd off,
  causing carriers to navigate to the wrong location.
- Simplify carrier movement to always push center for 3-6x scoring
  bonus instead of requiring 2+ orbs and time conditions.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 13:13:11 -03:00
agathoandClaude Opus 4.6 e75b5c7cb4 fix(bg): Fix ToK orb pickup phase mismatch and BG population race condition
- Replace phase-sensitive GetGameObjectListWithEntryInGrid with
  GetGameObjectListWithOptionsInGrid (IgnorePhases=true) for ToK orb
  pickup. Dynamically spawned BG orbs may not share bot PhaseShift,
  causing silent filter in grid search VisitImpl().
- Add ProcessPendingPopulations() retry system in BGBotManager that
  retries PopulateBattleground every 5s for up to 2 minutes after BG
  start, fixing 8v5 starts caused by warm pool bots still in async login.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 13:12:24 -03:00
agathoandClaude Opus 4.6 8cee246f2b fix(bg): Fix ToK starting with 5v5 instead of 10v10
Add explicit BATTLEGROUND_TK and BATTLEGROUND_SM cases to GetBGTeamSize()
(return 10) and GetBGMinPlayers() (return 5). Fix QueueStatePoller DBC
fallback which incorrectly divided BattlemasterListEntry::MaxPlayers by 2
(the field is already per-team, as GetMaxPlayersPerTeam() returns it
directly). Use BGBotManager::GetBGTeamSize() as primary fallback instead
of the DBC lookup.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 13:10:10 -03:00
agathoandClaude Opus 4.6 3c92d7aae6 fix(bg): Fix ToK bots converging on same orb, stuck at empty spawns, and idle carriers
Replace broken event-based orb tracking (ORB_PICKED_UP never fired) with
aura-based RefreshOrbState() that scans all BG players for orb auras every
second. Add m_orbTargeters map to distribute bots 1-per-orb instead of all
targeting the same one. Clear targeting when no GO found at orb location so
bots fall through to escort/hunt instead of looping. Add EscortOrbCarrier
fallback for ORB_CARRIER role when no orbs are available.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 13:09:12 -03:00
agathoandClaude Opus 4.6 900ee56f03 fix(bg): Fix BG bot lifecycle - cleanup on end, end when human leaves, stop over-spawning
Three fixes for BG bot lifecycle issues:

1. End BG when last human leaves: MonitorActiveBattlegrounds() now checks
   for human presence in active BGs. After a 30s grace period with no
   humans, the BG ends as a draw via EndBattleground(TEAM_OTHER).

2. Release and logout BG bots on BG end: OnBattlegroundEnd() now releases
   pool bots via InstanceBotPool::ReleaseBot(), logs out all BG bots via
   BotWorldSessionMgr::RemovePlayerBot(), and notifies the orchestrator
   via OnInstanceEnded(). Previously only tracking maps were cleared.

3. Fix zone spawner over-spawning with no humans: CalculateTargetBotCount()
   now uses _lastRealPlayerCount (humans only) instead of the broken
   condition that always applied minimums in static mode or counted bot
   sessions as active players.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 07:40:55 -03:00
agathoandClaude Opus 4.6 cc8f3ea465 docs(audit): Update audit reports to reflect zero-TODO milestone
Update COMPREHENSIVE_AUDIT_REPORT.md and INCOMPLETE_IMPLEMENTATIONS_REPORT.md
to document the February 2026 TODO cleanup results: 50 TODOs resolved across
29 files, 15 MIGRATION markers standardized across 6 files, zero remaining
production TODOs verified by codebase scan.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 07:19:20 -03:00
agathoandClaude Opus 4.6 fb41d15af3 cleanup(code): Resolve all TODO comments and standardize MIGRATION markers
Resolve 50 TODO comments across 29 production files and standardize 15 MIGRATION
comments across 6 files, achieving zero remaining TODOs in production code.

Implementations:
- DemandCalculator: IsQuestHub() via QuestHubDatabase, GetBotCountInZone() via BotSpawner
- QuestPathfinder: Replace hardcoded RUN_SPEED with player->GetSpeed(MOVE_RUN)
- PlayerbotGroupScript: Add bot detection via PlayerBotHooks::IsPlayerBot()

Comment standardization:
- TODO stubs → DESIGN/LIMITATION/ARCHITECTURE documentation comments
- MIGRATION COMPLETE noise → descriptive architectural comments
- Empty/stale TODOs removed entirely

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-07 07:12:04 -03:00
StorM dfad4f5819 fix MajorCooldownTracker.h 2026-02-07 09:28:32 +01:00
StorM b7f9b926a4 fix BGScriptRegistry.cpp 2026-02-07 09:26:35 +01:00
StorM b59a689b9f fix ActivitySession.h 2026-02-07 09:07:30 +01:00
StorM bada006bcd fix ActivitySession.cpp 2026-02-07 09:06:10 +01:00
StorM 9e6a57667c fix ClaimResolver.h 2026-02-07 09:03:08 +01:00
MoltenCrystal 567306d6b6 Scripts/Spells: Handle Thunder Clap slow and Rend (#31525)
Signed-off-by: luis <[email protected]>
2026-02-06 20:24:42 -03:00
agathoandClaude Opus 4.6 a47d8b6b88 fix(bg): Fix vtable dispatch crash in DominationScriptBase::OnLoad
Add `override` keyword to all virtual function overrides across 16 BG
script headers to catch signature mismatches at compile time.

Extract virtual calls (GetNodeCount/GetNodeData) from
DominationScriptBase::OnLoad into a new InitializeNodeTracking() method
called by derived classes after base OnLoad completes. This avoids
virtual dispatch at the fragile IBGScript/DominationScriptBase vtable
slot boundary, where MSVC RelWithDebInfo builds with stale .obj files
could route GetNodeCount (returns uint32, RCX=this) through
GetObjectivePath (returns std::vector<Position>, RCX=hidden_return,
RDX=this), causing ACCESS_VIOLATION when RDX=0.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 20:22:23 -03:00
agathoandClaude Opus 4.6 c72a04bdef fix(bg): Move coordinator creation to main thread to prevent worker thread crashes
Coordinator Initialize() accesses Battleground data (GetPlayers, GetMapId),
loads BG scripts, and runs map grid operations (FindNearestGameObject 500yd)
which are NOT thread-safe. The previous commit moved Initialize() outside
the lock but still ran it on worker threads, causing ACCESS_VIOLATION in
TempleOfKotmoguScript::OnLoad -> DominationScriptBase::OnLoad vtable crash.

Fix: Worker threads now queue creation requests via _pendingCreations map.
The main thread processes them in Update() -> ProcessPendingCreations()
where Battleground access is safe. Coordinator available within one tick.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 20:17:38 -03:00
agathoandClaude Opus 4.6 90a7bf8aca fix(bg): Resolve mutex contention causing 10-30s thread pool hangs in BG coordinator
BattlegroundCoordinatorManager held _mutex during expensive coordinator
Initialize() (grid scans, pathfinding, script loading) and Update() calls,
blocking all worker threads from GetCoordinatorForPlayer() lookups. This
caused thread pool timeouts and bots standing idle at spawn.

Fix: copy-and-release pattern - only hold _mutex for map insert/find/erase,
never during coordinator operations. Added _creatingCoordinators guard to
prevent redundant Initialize() calls from multiple worker threads.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 20:00:43 -03:00
agathoandClaude Opus 4.6 fac92714c0 fix(bg): Register BG scripts explicitly and stop QueueStatePoller over-spawning
Two root causes for idle bots and over-population in battlegrounds:

1. BGScriptRegistry had 0 registered scripts at runtime. The
   REGISTER_BG_SCRIPT macro uses static global constructors for
   auto-registration, but MSVC's linker dead-strips object files from
   static libraries when no external symbol references them. The previous
   ForceInclude/volatile-pointer pattern did not prevent this.
   Fix: Replace with explicit RegisterScript() calls in
   InitializeBGScripts() for all 14 BG map IDs.

2. QueueStatePoller kept re-polling every 5-10 seconds after assigning
   warm pool bots. Since bots take time to login and enter the queue
   asynchronously, the poller saw "0/10 Alliance, 0/10 Horde" on each
   poll and spawned another full batch (14 rounds = ~280 bots for 10v10).
   Fix: Unregister the BG queue from the poller immediately after the
   warm pool (or JIT) fully satisfies the demand. Also copy the active
   queue set before iterating to avoid iterator invalidation.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 19:39:09 -03:00
Naddleyandfunjoker f2077de55d Scripts/Westfall: Implement Quest: "Murder Was The Case That They Gave Me" (#31494)
- re-spawn Hobo spawns with createobject2
- pooled spawns

Co-Authored-By: funjoker <[email protected]>
Signed-off-by: luis <[email protected]>
2026-02-06 14:46:27 -03:00
Shauren 0f32a1d35d Core/Players: Fixed spellpower for devourer demon hunters (currently the only intellect based spec without mana)
Signed-off-by: luis <[email protected]>
2026-02-06 14:45:55 -03:00
Aqua Deus 47e7f1768a Scripts/Spells: Implement dh talent "Enduring Torment" (#31523)
Signed-off-by: luis <[email protected]>
2026-02-06 14:45:12 -03:00
Cristian Vintila 63cb26eecf Scripts/Spells: Update Atonement trigger spells (#31651)
Signed-off-by: luis <[email protected]>
2026-02-06 14:44:28 -03:00
Cristian Vintila 70b2af2acd Scripts/Spells: Implement druid talent Flower Walk (#31532)
Signed-off-by: luis <[email protected]>
2026-02-06 14:43:45 -03:00
Aqua Deus 269ab5a25a Scripts/Spells: Implement proc of dk talent Suppression (#30243)
Signed-off-by: luis <[email protected]>
2026-02-06 14:42:40 -03:00
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