DestinyItemManager / DIM

Destiny Item Manager
https://destinyitemmanager.com
MIT License
2.07k stars 643 forks source link

Mod assignment doesn't quite understand slot-specific mods #7711

Closed bhollis closed 2 years ago

bhollis commented 2 years ago

Repro:

  1. Pull a 1-energy class item from collections.
  2. Put a 1-energy class item mod on it (e.g. "One-Two Finisher").
  3. Make a loadout that includes that item and another 1-energy mod (e.g. "Snapload Finisher")
  4. Apply the loadout

This loadout will fail, because it attempts to just apply the loadout's mod "Snapload Finisher", without removing the existing mod "One-Two Finisher" first. The item does have one free mod slot, but doesn't have the free energy to do this without removing the existing mod.

[loadout mods] Mods to apply [4237638094]
log.ts:11 [loadout mods] Applying [] to Celestial Nighthawk
log.ts:11 [loadout mods] Applying [] to Iron Fellowship Grips
log.ts:11 [loadout mods] Applying [] to Wild Hunt Vest
log.ts:11 [loadout mods] Applying [] to Praefectus Strides
log.ts:11 [loadout mods] Applying [{socketIndex: 1, mod: {…}, requested: true, energySpend: 0, required: true}] to Icarus Drifter Cape
log.ts:11 [loadout mods] equipping mod Snapload Finisher into Icarus Drifter Cape socket 1
authenticated-fetch.ts:48 POST https://www.bungie.net/Platform/Destiny2/Actions/Items/InsertSocketPlugFree/ 500
fetchWithBungieOAuth @ authenticated-fetch.ts:48
await in fetchWithBungieOAuth (async)
processQueue @ rate-limiter.ts:68
add @ rate-limiter.ts:45
(anonymous) @ rate-limiter.ts:118
(anonymous) @ http-client.ts:126
(anonymous) @ http-client.ts:160
(anonymous) @ http-client.ts:236
(anonymous) @ http-client.ts:201
(anonymous) @ bungie-service-helper.ts:90
insertSocketPlugFree @ api.js:155
awaInsertSocketPlugFree @ advanced-write-actions.ts:132
(anonymous) @ advanced-write-actions.ts:117
(anonymous) @ index.js:16
dispatch @ redux.js:659
(anonymous) @ loadout-apply.ts:1184
(anonymous) @ index.js:16
dispatch @ redux.js:659
(anonymous) @ loadout-apply.ts:1152
(anonymous) @ index.js:16
dispatch @ redux.js:659
(anonymous) @ loadout-apply.ts:1025
(anonymous) @ index.js:16
dispatch @ redux.js:659
(anonymous) @ loadout-apply.ts:506
await in (anonymous) (async)
(anonymous) @ index.js:16
dispatch @ redux.js:659
(anonymous) @ loadout-apply.ts:107
(anonymous) @ action-queue.ts:13
Promise.then (async)
queueAction @ action-queue.ts:12
(anonymous) @ loadout-apply.ts:106
(anonymous) @ index.js:16
handleApply @ Loadouts.tsx:197
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070
executeDispatch @ react-dom.development.js:8243
processDispatchQueueItemsInOrder @ react-dom.development.js:8275
processDispatchQueue @ react-dom.development.js:8288
dispatchEventsForPlugins @ react-dom.development.js:8299
(anonymous) @ react-dom.development.js:8508
batchedEventUpdates$1 @ react-dom.development.js:22396
batchedEventUpdates @ react-dom.development.js:3745
dispatchEventForPluginEventSystem @ react-dom.development.js:8507
attemptToDispatchEvent @ react-dom.development.js:6005
dispatchEvent @ react-dom.development.js:5924
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
discreteUpdates$1 @ react-dom.development.js:22413
discreteUpdates @ react-dom.development.js:3756
dispatchDiscreteEvent @ react-dom.development.js:5889
VM2149 react_devtools_backend.js:4045 [loadout mods] failed to equip mod Snapload Finisher into Icarus Drifter Cape socket 1 DimError: Bungie.net message: The request to apply a change to an item failed. The requirements have not been met.
    at handleErrors (bungie-service-helper.ts:214:15)
    at bungie-service-helper.ts:92:7
    at async advanced-write-actions.ts:117:22
    at async loadout-apply.ts:1184:7
    at async loadout-apply.ts:1152:11
nev-r commented 2 years ago

7465