Returns the equipped melee weapon of a spell target.
This function is to be used within a spell script.
If the spell target is an item, the function checks whether the item is a melee weapon and returns the weapon on a successful check. The weapon need not be equipped.
If the spell target is a creature, the function checks whether the creature has a melee weapon equipped and returns it.
If the targeted creature has no melee weapon equipped or the targeted item is not a melee weapon, OBJECT_INVALID is returned.
This function only produces reliable results if called from a spell script. It calls #include index for more details.
#include " x2_inc_itemprop "
author: motu99, editor: Mistress