stash reward fix 2

This commit is contained in:
2026-05-01 17:50:39 +03:00
parent bcda80e127
commit d6c2252f5c

View File

@@ -74,8 +74,10 @@ async function autoBootcampLoop() {
action_name: 'stashReward',
arguments: {}
}, 0, {
success: () => {
botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
},
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',
@@ -84,7 +86,6 @@ async function autoBootcampLoop() {
botLog(player_id, 'bootcamp', `Reward used (inventory full fallback): ${reward.power_id}`);
}
});
await botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
} else {
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
model_url: `PlayerAttackSpot/${player_id}`,