ZotyDev / objects-interactions-fx

A Foundry VTT module that provides automation and effects for everything that I and other people might find fun :D
https://foundryvtt.com/packages/object-interaction-fx
MIT License
11 stars 2 forks source link

[BUG]: Ammunition Not Creating Item Piles on Miss #16

Closed KellethDregar closed 1 year ago

KellethDregar commented 1 year ago

Discord Username

No response

Browsers

Chrome

What Happened?

It seems Throwable Weapons now create item piles but it seems ammunition such as arrows does not create them still. Item seems to throw an error with item dropper.

image

Reproduction Steps

1. Create longbow with longbow tag
2. Attack a target
3. When it hits the ammunition will end up in the target inventory, when it misses the ammunition will just be missing, even when setting destruction chance of ammunition to 0

Relevant Log Output

ItemDropper.js:16 Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'toObject')
[Detected 1 package: objects-interactions-fx]
    at ItemDropper.DropAt (ItemDropper.js:16:35)
    at ItemAnimator.js:344:41
DropAt  @   ItemDropper.js:16
(anonymous) @   ItemAnimator.js:344
setTimeout (async)      
RangedWeaponSingleAttack    @   ItemAnimator.js:318
await in RangedWeaponSingleAttack (async)       
(anonymous) @   TagHandler.js:108
Dispatch    @   TagHandler.js:61
(anonymous) @   Main.js:210
#call   @   foundry.js:724
call    @   foundry.js:706
(anonymous) @   Main.js:181
await in (anonymous) (async)        
hookCall    @   utils.js:3667
asyncHooksCallAll   @   utils.js:3630
await in asyncHooksCallAll (async)      
_next   @   workflow.js:938
await in _next (async)      
next    @   workflow.js:262
_next   @   workflow.js:474
await in _next (async)      
next    @   workflow.js:262
doAttackRoll    @   itemhandling.js:520
await in doAttackRoll (async)       
🎁call_wrapper   @   libWrapper-wrapper.js:616
🎁CONFIG.Item.documentClass.prototype.rollAttack#0   @   libWrapper-wrapper.js:189
_next   @   workflow.js:416
await in _next (async)      
next    @   workflow.js:262
_next   @   workflow.js:363
await in _next (async)      
next    @   workflow.js:262
_next   @   workflow.js:348
next    @   workflow.js:262
_next   @   workflow.js:332
await in _next (async)      
next    @   workflow.js:262
_next   @   workflow.js:302
next    @   workflow.js:262
doItemUse   @   itemhandling.js:318
await in doItemUse (async)      
🎁call_wrapper   @   libWrapper-wrapper.js:616
🎁CONFIG.Item.documentClass.prototype.use#0  @   libWrapper-wrapper.js:189
(anonymous) @   utils.js:1491
completeItemUse @   utils.js:1455
doItemUse   @   itemhandling.js:30
🎁call_wrapper   @   libWrapper-wrapper.js:616
🎁CONFIG.Item.documentClass.prototype.use#0  @   libWrapper-wrapper.js:189
rollItemMacro   @   bundle.min.js:1
_handleMacros   @   bundle.min.js:1
doHandleActionEvent @   bundle.min.js:1
handleActionEvent   @   bundle.min.js:1
handleClick @   bundle.min.js:1
(anonymous) @   bundle.min.js:1
dispatch    @   jquery.min.js:2
y.handle    @   jquery.min.js:2
ZotyDev commented 1 year ago

Sorry for this, I'm currently looking for the root cause of this. I've did some minor testing but might have not tested this. Thanks again for reaching out about this bug!

ZotyDev commented 1 year ago

Should be finally fixed. Thanks one more time for reporting these bugs, this is extremely helpful to me :D