Commit Graph
1161 Commits
Author SHA1 Message Date
luis 405a1411b9 // QuestV2CliTask.db2 2026-03-28 09:42:59 -03:00
luis b5f37870c8 typo 2026-03-28 09:10:01 -03:00
luis bbc865ed89 typo 2026-03-28 08:59:37 -03:00
luis a0eeb3f1bc +++ 2026-03-28 08:54:39 -03:00
luis 354cce72a7 66709 2026-03-28 08:52:49 -03:00
Shauren 0e060a2f4f Core/Utils: Fixed Trinity::GetTypeName return value when given std::type_info args directly
Signed-off-by: luis <[email protected]>
2026-03-28 08:51:31 -03:00
luis bd0721c180 +++ 2026-03-28 08:51:21 -03:00
luis 80f2dbae55 ++ 2026-03-28 08:50:39 -03:00
luis 3fb55d86d8 commands update 2026-03-28 08:48:51 -03:00
luis b2346db972 dup 2026-03-28 07:20:45 -03:00
luis bd38860633 fix asssert 2026-03-27 22:10:53 -03:00
luis 6d98a1bfaa fix crash: guard missing hiddenAppearance and avoid ASSERT in LoadAccountItemAppearances 2026-03-27 21:21:07 -03:00
luis 35b4b75b2c typo 2026-03-27 20:09:05 -03:00
luis 33b93d1435 fix db2 2026-03-27 19:36:28 -03:00
luis 0c97fa5e2f Full delves 2026-03-27 19:22:49 -03:00
agathoandClaude Opus 4.6 f48786f599 fix(delves): compilation fixes - worldserver builds clean
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]>
2026-03-27 19:19:42 -03:00
luis b8a1199340 feat(delves): Phase 7 - GM commands, Player update field helpers, build fixes
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
2026-03-27 19:18:11 -03:00
agathoandClaude Opus 4.6 800f7f58f6 fix(delves): correct map IDs, add DifficultyID/ScenarioType constants
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]>
2026-03-27 19:13:48 -03:00
luis 426017bc73 add scripts 2026-03-27 19:12:07 -03:00
agathoandClaude Opus 4.6 306d9caa70 feat(delves): Phase 6 - All 13 delve instance scripts with real map IDs
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]>
2026-03-27 19:09:56 -03:00
luis 1ff85b8cc2 more delve work 2026-03-27 19:09:32 -03:00
luis f11d801cef delves 2026-03-27 13:54:41 -03:00
luis b3c325d539 delve tables still nor work wait for me 2026-03-27 13:53:34 -03:00
luis 804cf6f9f6 delves init 2026-03-27 13:49:33 -03:00
luis 28dfdecf88 Fix build 2026-03-27 08:45:06 -03:00
agatho b202639b7d Fix MotionMaster corruption from worker thread Clear() call
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]>
2026-03-27 08:44:57 -03:00
luis e4f40a2f04 typo 2026-03-27 08:43:44 -03:00
luis 1f8d2c2562 remove wrong impl 2026-03-27 08:28:02 -03:00
luis 58cf98da21 new lua 2026-03-27 08:25:17 -03:00
luis ae4220c491 REWORK 2026-03-27 08:24:17 -03:00
luis 57d072cee8 lua crash 2026-03-26 21:22:51 -03:00
luis da47dd1e47 initial crash fix for eluna 2026-03-26 21:21:07 -03:00
luis 169fb022fa add quest task for wq 2026-03-26 20:55:54 -03:00
luis 6770ccec62 remove unused 2026-03-26 20:40:13 -03:00
luis d8f89644dd delve system part 1 2026-03-26 20:38:54 -03:00
luis 4c3e7d6a74 Add NeedsFood diagnostic, downgrade ObjectiveTracker ERROR to DEBUG 2026-03-26 19:55:29 -03:00
luis 50b4365362 typo 2026-03-26 13:30:52 -03:00
agatho b00b00a753 Blacklist quest givers that return 0 quests to prevent infinite loop
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]>
2026-03-26 13:30:17 -03:00
luis af47a7f487 Fix log spam, stuck walk detection, and mana snapshot for dual-power classes
- 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
2026-03-26 08:43:39 -03:00
agatho 9755fd11c0 Fix MINIMAL budget tier permanently blocking strategy execution
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]>
2026-03-26 08:35:49 -03:00
agatho 3098d3b6d0 Run quest strategy every frame while walking to quest giver
Signed-off-by: luis <[email protected]>
2026-03-26 08:34:46 -03:00
agatho a65ae5b177 Fix RestStrategy using stale health/mana — GetBotAI always returned null
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]>
2026-03-26 08:34:00 -03:00
agatho 58335d9b20 Initialize cached state in BotAI constructor to prevent 0,0,0 position on first tick
Signed-off-by: luis <[email protected]>
2026-03-26 08:33:18 -03:00
luis e5b00529c1 lua fixes 2026-03-26 08:32:26 -03:00
luis aae5614085 init implement methods 2026-03-25 20:56:46 -03:00
agatho 6619d78fbc Move bot state snapshot from worker thread to main thread
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]>
2026-03-25 19:28:57 -03:00
agatho cbdab1cc13 Cache health/mana/map/combat state for worker thread safety
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]>
2026-03-25 19:27:46 -03:00
luis bfce87a158 Scripts/Commands: Set worldstate when using .debug worldstate instead of just sending packet 2026-03-25 13:42:37 -03:00
luis 183ac260e3 Core/Transmog: Implemented TransmogHoliday.db2 transmog conditions 2026-03-25 13:41:50 -03:00
luis 0d9be8a492 db fixes 2026-03-25 13:34:48 -03:00