stash reward fix 2
This commit is contained in:
@@ -74,8 +74,10 @@ async function autoBootcampLoop() {
|
|||||||
action_name: 'stashReward',
|
action_name: 'stashReward',
|
||||||
arguments: {}
|
arguments: {}
|
||||||
}, 0, {
|
}, 0, {
|
||||||
|
success: () => {
|
||||||
|
botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
|
||||||
|
},
|
||||||
error: () => {
|
error: () => {
|
||||||
// If stash fails (e.g. inventory is full), fall back to using it immediately
|
|
||||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||||
model_url: `PlayerAttackSpot/${player_id}`,
|
model_url: `PlayerAttackSpot/${player_id}`,
|
||||||
action_name: 'useReward',
|
action_name: 'useReward',
|
||||||
@@ -84,7 +86,6 @@ async function autoBootcampLoop() {
|
|||||||
botLog(player_id, 'bootcamp', `Reward used (inventory full fallback): ${reward.power_id}`);
|
botLog(player_id, 'bootcamp', `Reward used (inventory full fallback): ${reward.power_id}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await botLog(player_id, 'bootcamp', `Reward stashed: ${reward.power_id}`);
|
|
||||||
} else {
|
} else {
|
||||||
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
uw.gpAjax.ajaxPost('frontend_bridge', 'execute', {
|
||||||
model_url: `PlayerAttackSpot/${player_id}`,
|
model_url: `PlayerAttackSpot/${player_id}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user