This changes between equipment set 0 and equipment set 1 whenever you hover a plant/ore (BfA only!). Very useful when you have a farmer (herb + miner) with two sets of gloves! (and you dont want to pay for the Firewater pot)
Some improvements that can be made:
-> Instead of changing between equipment set 0 & equipment set 1, change the equipment with name "Herbs" and "Ores" for example (this should be easy, provided it can be done with the wow api, which I'm 99.99% certain it can).
-> Identify whenever you are in combat and either wait until you are not anymore to swap or just dont even try swapping.
-> Maybe its easier to just swap the gloves instead of having to do two equipment sets…