Build fixes for Visual Studio 2022 (RelWithDebInfo):
- Fix GetBattlenetAccountId: use player->GetSession()->GetBattlenetAccountId()
(method is on WorldSession, not Player)
- Fix GetHomebind: use player->m_homebind (public member, not a method)
- Fix REACT_HELPER -> REACT_ASSIST (correct enum value)
- Fix DoMeleeAttackIfReady: use me->DoMeleeAttackIfReady() (Unit method)
- Fix DoSpellAttackIfReady: replace with me->DoMeleeAttackIfReady() as
fallback (spell IDs not yet configured)
- Fix InstanceMapScript.h -> ScriptMgr.h include in all 13 delve scripts
- Remove duplicate ScriptMgr.h includes
- Remove Player.cpp death hook (use InstanceScript::OnUnitDeath instead)
- Remove delves_common.h include from Player.cpp (scripts dir not in
game include path)
Verified: worldserver.exe builds successfully with zero errors.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: luis <[email protected]>
Add GM commands and polish:
- cs_delve.cpp: comprehensive GM command suite:
.delve info - show delve system status
.delve season - show active season and spells
.delve bountiful - show today's bountiful delves
.delve progress - show account-wide progress (tier, vault, keys)
.delve settier N - set highest unlocked tier
.delve companion info - show companion state
.delve companion level N - set companion level
.delve companion role N - set role (0=DPS, 1=Healer, 2=Tank)
- Player.h/cpp: add SetDelveData() and ClearDelveData() public methods
for update field access (m_values is protected, external code can't
access it directly)
- DelveInstance.cpp: refactored to use Player methods instead of direct
m_values access, removed UpdateFields.h dependency
Data corrections from DB2 deep analysis:
- DelvesDefines.h: add DELVE_DIFFICULTY_ID=208 and DELVE_SCENARIO_TYPE=8
(delves use their own difficulty and scenario type, not generic Solo)
- The Sinkhole: fix primary mapId from 2687 to 2767 (2687 is alt variant)
- delve_template SQL: add verified zoneIDs from AreaTable.db2 for all 13
delves, add comments about alternate variant maps
- Confirmed: MapChallengeMode is NOT used by delves (field stays 0)
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: luis <[email protected]>
Add instance scripts for all 13 TWW Season 1 delves with verified
map IDs extracted from Map.db2:
Isle of Dorn:
- Earthcrawl Mines (2680), Fungal Folly (2664), Kriegval's Rest (2681)
The Ringing Deeps:
- The Waterworks (2683), The Dread Pit (2684)
Hallowfall:
- Nightfall Sanctum (2686), Mycomancer Cavern (2679),
Skittering Breach (2685), The Sinkhole (2687)
Azj-Kahet:
- The Spiral Weave (2688), Tak-Rethan Abyss (2689),
The Underkeep (2690), Zekvir's Lair (2682)
All scripts extend DelveInstanceScript with boss encounter data,
delve lifecycle hooks, and are registered in the KhazAlgar
script loader. SQL populates delve_template with verified map IDs.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: luis <[email protected]>
BotMovementController::MoveToPosition called MotionMaster::Clear() from
the worker thread while Player::Update() on the main thread was also
using the MotionMaster. This data race corrupted the motion type to
invalid value 19, preventing all bot movement.
Removed the Clear() call — MovePoint() handles the active motion
internally without needing an explicit clear.
Also added NeedsFood diagnostic and downgraded ObjectiveTracker logs.
Signed-off-by: luis <[email protected]>
Bots repeatedly interacted with the same NPC (Image of Archmage Xylem)
every tick, getting 0 accepted quests each time but never trying other
NPCs. The spatial grid scan always picked the closest quest giver.
Now tracks NPCs that returned 0 quests in _failedQuestGiverGuids and
skips them in future scans. When all nearby NPCs are blacklisted, the
search falls through to the quest hub / teleport path. The blacklist
clears on teleport (new zone has new NPCs).
Signed-off-by: luis <[email protected]>
- Remove STRAT-SELECT diagnostic (60k lines per session)
- Downgrade CalculateObjectivePriorities from ERROR to TRACE (60k lines)
- Throttle "walking to quest giver" log to once per 5 seconds
- Detect stuck walks (distance not decreasing for 30s) and clear pending
- Fix mana snapshot using GetMaxPower(POWER_MANA) instead of GetPowerType
so Warlocks (soul shards + mana) and Paladins (holy power + mana) get
correct mana percentage instead of 100% default
RPG states IDLE/RESTING/INACTIVE mapped to MINIMAL budget tier which
skipped UpdateStrategies entirely via goto throttled_update_complete.
After death+respawn at spirit healer, the RPG routine classified the
bot as IDLE -> MINIMAL -> strategies never ran -> bot idle forever.
Strategies are what drive bots OUT of idle state (find quest givers,
accept quests, start grinding). They must always run regardless of
budget tier.
Signed-off-by: luis <[email protected]>
BotAI doesn't extend PlayerAI/UnitAI, so dynamic_cast<BotAI*>(GetAI())
always returned nullptr. The cached health/mana values were never read,
falling back to stale bot->GetHealthPct() on the worker thread.
RestStrategy already receives BotAI* ai as a parameter — use
ai->GetCachedHealthPct() and ai->GetCachedManaPct() directly instead
of trying to look up BotAI from the Player.
Signed-off-by: luis <[email protected]>
The state cache (health, mana, position, map, combat) was being
populated at the start of UpdateAI on the worker thread, reading the
same stale data it was trying to avoid. Health showed 53% for hours
while actually 100% because GetHealthPct() returns the value from the
last Player::Update() call on the main thread.
Now BotSession::SnapshotBotState() runs on the main thread from
BotWorldSessionMgr::ProcessAllDeferredPackets(), after Player::Update()
has already run. Worker threads read these cached values which are
guaranteed current.
Uses movespline->ComputePosition() for accurate interpolated position
instead of FinalDestination() which only gives the endpoint.
Signed-off-by: luis <[email protected]>
All bot stats read via GetHealthPct(), GetPowerPct(), GetMapId(),
IsInCombat() are only updated on the main thread during Player::Update.
Worker threads reading them directly get stale data — health showing
53% when actually 100%, causing rest strategy to idle bots for hours.
BotAI now caches health, mana, map ID, and combat state at the start
of each UpdateAI tick. RestStrategy uses these cached values instead
of reading from the bot directly.
Signed-off-by: luis <[email protected]>