Change 'fix equip' for dual wield

I have a character which I would like to be dual wield. However, for story reasons I need one of the weapons to be 'fixed'.
By default if I set that weapon to fix, then both weapon slots are affected, which is unfortunate.
I am using Yanfly's Battle Engine, but no script which affects equipment.

Can anyone help me out with how this might be done?
Thanks.
If you change the value of variable 99 (you know how to change) to 1, then the first index should be fixed.
Code:
class Game_Actor
  def equip_change_ok?(slot_id)
    return false if ($game_variables[99] - 1) == slot_id
    return false if equip_type_fixed?(equip_slots[slot_id])
    return false if equip_type_sealed?(equip_slots[slot_id])
    return true
  end
end
This is untested tho
@TheoAllen I changed the variable to 48, set it to one, but both slots are still fixed.
If the second weapon slot is always fixed, you can try a work around using a shield type equip renamed to a weapon and fix that.
However there are two problems with that:
1) you better rename the "shield" to "second hand" or it will read off in the screen.
2) this only works if you never want the player to equip something else in the second slot - if that fixed second weapon is only temporarily and the player gets to change this weapon sometimes, then you'll need true dual wield and this is impossible to do.
@Andar Thanks for the workaround. That limitation of never being able to equip something else there may cause me problems later on, so if the snippet can be tweaked to get it to work, I would prefer that.
@TheoAllen I changed the variable to 48, set it to one, but both slots are still fixed.
If you use that snippet, you should remove the "Fix Equip" feature from that weapon, otherwise the weapon's type itself will be get fixed still.
There is no feature that would let you lock equipment slots, only equipment types, sadly, so if you use the mentioned fix feature, the weapon slots (all of them) will get fixed.

But that snippet won't work if you have multiple party members. Unless you want to lock the same equipment slot for all of your actors at the same time, but what are the chances of that being the case, right?

You can try this snippet I made:
Spoiler

I think, it can do what you want.
@Sixth That seems to have worked. I have both weapons equipped, I can change what's in slot one, but not in slot 2, which is exactly what I want.
Thank you very much indeed.

Original thread: https://forums.rpgmakerweb.com/threads/change-fix-equip-for-dual-wield.94894/