File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -447,21 +447,21 @@ const InventoryContainer = Vue.createApp({
447
447
if ( sourceItem . amount < amountToTransfer ) {
448
448
throw new Error ( "Insufficient amount of item in source inventory" ) ;
449
449
}
450
-
451
- if ( targetInventoryType == "other" )
452
- {
450
+
451
+ if ( targetInventoryType ! == this . dragStartInventoryType ) {
452
+ if ( targetInventoryType == "other" ) {
453
453
const totalWeightAfterTransfer = this . otherInventoryWeight + sourceItem . weight * amountToTransfer ;
454
454
if ( totalWeightAfterTransfer > this . otherInventoryMaxWeight ) {
455
455
throw new Error ( "Insufficient weight capacity in target inventory" ) ;
456
456
}
457
457
}
458
- else if ( targetInventoryType == "player" )
459
- {
458
+ else if ( targetInventoryType == "player" ) {
460
459
const totalWeightAfterTransfer = this . playerWeight + sourceItem . weight * amountToTransfer ;
461
460
if ( totalWeightAfterTransfer > this . maxWeight ) {
462
461
throw new Error ( "Insufficient weight capacity in player inventory" ) ;
463
462
}
464
463
}
464
+ }
465
465
466
466
const targetItem = targetInventory [ targetSlotNumber ] ;
467
467
You can’t perform that action at this time.
0 commit comments