You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[4.1] Bug: Actors and Containers - _onDropStackConsumables only stacks Potions of Healing (specifically, Compendium.dnd5e.items.Item.ytlsBjYsZ7OBSEBs)
#4685
On actors and containers, when you drop a consumable item onto the sheet, it no longer stacks, unless it is the item with source UUID "Compendium.dnd5e.items.Item.ytlsBjYsZ7OBSEBs", i.e. a Potion of Healing.
_onDropStackConsumables(itemData,{ container=null}={}){constdroppedSourceId=itemData._stats?.compendiumSource??itemData.flags.core?.sourceId;if(itemData.type!=="consumable"||!droppedSourceId)returnnull;// 👇 That's a potion of healing from the SRDconstsimilarItem=this.actor.sourcedItems.get("Compendium.dnd5e.items.Item.ytlsBjYsZ7OBSEBs",{legacy: false})?.filter(i=>(i.system.container===container)&&(i.name===itemData.name))?.first();if(!similarItem)returnnull;returnsimilarItem.update({"system.quantity": similarItem.system.quantity+Math.max(itemData.system.quantity,1)});}
The text was updated successfully, but these errors were encountered:
On actors and containers, when you drop a consumable item onto the sheet, it no longer stacks, unless it is the item with source UUID "Compendium.dnd5e.items.Item.ytlsBjYsZ7OBSEBs", i.e. a Potion of Healing.
dnd5e/module/applications/actor/sheet-mixin.mjs
Line 44 in a1d6aa9
The code in question:
The text was updated successfully, but these errors were encountered: