5e9d455b5ca32ca2d7a4fc29ad0e59fe9d5ecd3c
PROBLEM 1: "Pool bot failed to login via BotSpawner" - Bots in maintenance state after warmup failure PROBLEM 2: "No account ID for bot (not in slot or CharacterCache)" - Bots with account_id = 0 in playerbot_instance_pool table - CharacterCache doesn't have the account association ROOT CAUSE: The ON DUPLICATE KEY UPDATE clause in SyncToDatabase() did NOT include `account_id`, so: 1. Bot initially saved with account_id = 0 (bug in some code path) 2. WarmUpBot corrects it from CharacterCache and updates the slot 3. SyncToDatabase INSERTs the correct account_id, BUT 4. ON DUPLICATE KEY UPDATE doesn't update account_id column 5. On restart, LoadFromDatabase loads account_id = 0 again SOLUTION: 1. Add `account_id = VALUES(account_id)` to ON DUPLICATE KEY UPDATE - Now account_id corrections are persisted properly 2. Add account_id repair in LoadFromDatabase() - If account_id = 0, try to get it from CharacterCache - Log warning if CharacterCache also has no account This ensures bots with previously corrupted account_id values will be repaired on next load and the fix will be persisted. Co-Authored-By: Claude Opus 4.5 <[email protected]> Signed-off-by: luis <[email protected]>
WowCommunityProject
Blizzlike WowCommunity project
Languages
C++
89.3%
C
10.1%
CMake
0.4%