2 bugs / farm and bandit

This commit is contained in:
2026-05-02 02:21:32 +03:00
parent 6157ae1034
commit d8ba139d07
3 changed files with 16 additions and 19 deletions

View File

@@ -185,7 +185,8 @@ async function autoFarmLoop() {
if (allFull) {
log('⚠️ Auto-farm: ALL warehouses are full (>95%) — skipping loot this cycle');
try {
await apiFetch(`${BASE_URL}/api/farm_status?player_id=${player_id}`, {
const world_id = uw.Game?.world_id || '';
await apiFetch(`${BASE_URL}/api/farm_status?player_id=${player_id}&world_id=${world_id}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ warehouse_full: true })
@@ -200,7 +201,8 @@ async function autoFarmLoop() {
await executeFarmLoot({ payload: { loot_option: farmSettings.loot_option } });
// Report success so dashboard shows last_farmed_at
try {
await apiFetch(`${BASE_URL}/api/farm_status?player_id=${player_id}`, {
const world_id = uw.Game?.world_id || '';
await apiFetch(`${BASE_URL}/api/farm_status?player_id=${player_id}&world_id=${world_id}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ warehouse_full: false })