Open ir4ne opened 1 year ago
Reflecting a but: this may even not be a bug. In this context weapon is the weapon used to attack, this means that it's in the inventory. Items in inventory doesn't have a reference attached (items that already exist in the word and if I recall correctly are persistent, save their original reference in ExtraData) So the variable passed to the item is not a reference is a base form, and the error message make perfectly sense.
Maybe I can enhance the event to pass a InventoryReference.
It's stated in xOBSE documentation that IsAmmo and GetWeaponType can be called on reference. But it seems they only work if weapon reference is passed as an argument.
Steps to reproduce:
SetEventHandler "OnHitWith" MyOnHitWithHandler