A weapon equipped in the primary hand will have field[gIsEquip].value = 1, and one equipped in the off hand will have field[wIs2nd].value = 1.
For abilities that apply to equipped things, like the Fighter's armor training abilities, I've actually preferred to apply the effects to everything a character is carrying - that way, you can compare thing A to thing B without having to unequip both or having to mentally calculate the differences that would be sue to that ability. So, I would recommend having this ability apply itself to all weapons, regardless of whether they're equipped or not.
You're on the right track with the #enhancementbons[] macro - that would work if you could target a specific weapon. Here's how to apply a change to many things:
A little bit below the #enhancementbonus[] macro description in the reference information page is the list of General Modifers - there you'll see that enhancement is BonEnhance.
You can search through all the things added to a character with a foreach loop:
Code:
foreach pick in hero from BaseWep where "wCategory.Melee"
That will find all the melee weapons, now for the enhancement bonus:
Code:
eachpick.field[BonEnhance].value = maximum(eachpick.field[BonEnhance].value, 1)
which will set the enhancement bonus of that weapon to the maximum of the Enhancement bonus that's already there or 1. That way, you handle stacking properly - if a weapon already has an enhancement bonus, nothing will be changed, so you don't have to search specifically for non-magical weapons.
Putting that together (and closing the foreach loop):
Code:
foreach pick in hero from BaseWep where "wCategory.Melee"
eachpick.field[BonEnhance].value = maximum(eachpick.field[BonEnhance].value, 1)
nexteach
Timing: Post-Levels/10000, the default timing for a class ability, should work in this case. If it doesn't, please tell me - I haven't tested this.