stashreward / use reward fix
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user