Ok so this problem is driving me crazy. I'm trying to create a ghost that as similar properties to the ones in oblivion/morrowind, where the are immune to all weapons with the exception of silver, daedric, and enchanted. The ghost will have a perk that mods the incoming damage to zero if the conditions are met. The first two are easy and it's the last one that's causing problems. As far as I know, there is no ItemIsEnchanted condition function (that doesn't have to do with tempering). I found a thread a while back which stated that using the GetCurrentCastingType == 1 (contact) will show if there is an enchanted weapon in that hand when run on an actor (in this case the attacker), so I run this functions twice to test if there is an enchanted weapon in either hand. With this, I have my perk working almost to the way it should be with one exception: I can have an enchanted weapon in one hand, but I can make attacks with a non-enchanted weapon in the other and still deal damage.
Is there any condition function I can run on the attackers weapon so I can see which hand it is in or something I can run on the attacker to see which weapon he made his attack with? Or is there a better way of doing this entirely? I've tried attaching the script to the actor with an OnHit event, detected if the weapon was enchanted through SKSE functions, and tried to pseudo calculate what the damage should have been and damage the actor's AV from there, but there is some significant delay between the hit event and the damage dealt from the script even though the script runtime is displaying less than 0.001 seconds so I'd rather not use this method. Also the NormalWeaponsResist AV doesn't even exist so I'm not sure why it's even listed in the wiki.
Thanks!