Dropping an item while PreventDropping is enabled causes onSwing skills to activate
Dropping an item with an onPressQ event while PreventDropping is enabled activates the onPressQ event and allows you to keep the item as expected, but it also causes an onSwing event to activate when the item is returned to the inventory.
For example, the following item would, upon pressing Q to drop the item, activate the CTDodge skill as expected, but it would also cause the CTDiamondSwordAtk skill to activate.
onSwing skills are not activated when dropping or picking up items without PreventDropping, even if the item also has an onPressQ event. Similarly, items with an onSwing skill and the PreventDropping option enabled still activate the onSwing skill when dropped even without an onPressQ event.
Id: diamond_sword
Display: "Diamond Sword Test"
Attributes:
MainHand:
AttackDamage: -1
AttackSpeed: 2
Options:
PreventDropping: true
Unbreakable: true
Lore:
- "&96 Damage"
- "&93 Range"
- "&eRight-Click: Launch a swing attack that hits"
- "&eall nearby enemies."
Skills:
- skill{s=CTDiamondSwordAtk} @self ~onSwing
- skill{s=CTDiamondSwordSwing} @self ~onUse
- skill{s=CTDodge} @self ~onPressQ