stashreward / use reward fix

This commit is contained in:
2026-05-01 16:56:23 +03:00
parent 731a7b2f3b
commit bcda80e127

View File

@@ -73,6 +73,16 @@ async function autoBootcampLoop() {
model_url: `PlayerAttackSpot/${player_id}`, model_url: `PlayerAttackSpot/${player_id}`,
action_name: 'stashReward', action_name: 'stashReward',
arguments: {} arguments: {}
}, 0, {
error: () => {
// If stash fails (e.g. inventory is full), fall back to using it immediately
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
model_url: `PlayerAttackSpot/${player_id}`,
action_name: 'useReward',
arguments: {}
});
botLog(player_id, 'bootcamp', `Reward used (inventory full fallback): ${reward.power_id}`);
}
}); });
await botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`); await botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
} else { } else {