Will do my best to explain how this all works, with pictures, first lets look at the DB
HODB.jpg
Both the wheel and starter chains are stored in the same table, for a starter chain you can ignore the `starter_link_id`, `chain_order`, `shift_icon`, `spell_id`, and `chance` fields, they have no use for a starter chain. ability1 - ability6 is the icons needed to advance the chain to a wheel.
HOStarter.jpg
1 = `starter_icon`
2 = `abilityX`
If you just started the HO only ability1 will show
HODBStarter.jpg
So 14 and 41, when a spell with one of those HO icons are used it will adavance to ability2 on the chains that contains that icon and drop the rest, if it finds a value of 0xFFFF (65535) it will advance to the wheel
HOWheel.jpg
For the wheel you can ignore the `starter_icon` and `starter_class`.
`starter_link_id` defines what starter chain this wheel will belong to.
`chain_order` is how the wheel needs to be completed, 0 for any, 1 for clockwise, 2 for counter clockwise (icons will flip to the left side of the wheel as well).
`shift_icon` is the symbol used to reroll the wheel, defaults to 41 (coin) but can be changed, this is not implemented yet though.
`spell_id` is the spell to cast when the wheel is complete
`chance` is the chance this wheel will be picked when the starter chain is finished (not implemented yet, currently picks at random of the available wheels)
`ability1` - `ability6` are all used at once in this case and start at the top and go clock wise (for order = any/clockwise), the name below is determined by the spell id given
The lua command to start an HO is StartHeroicOpportunity(Spawn, int8).
Spawn is the caster, target of the HO will be the target of the caster (HO starters are self target spells) this will probably need to be changed to be more reliable.
int8 is the class id will start the ho based on starter chains with a matching `starter_class`.
I chose to have the class id provided by lua so you can customize HO's and have special ones for say a paladin and not all grouped by the base class.