So onto the next step:
I have to check if the item can be equipped with the current character.
"c1.Inventory.GetEquipment(item.ID, ItemDropType.Weapon).CanEquip(c1)" should do that and "c1.Inventory.GetEquipment(item.ID, ItemDropType.Weapon).Setting.CheckRequirements(c1)" should make sure that the combatant has the required strength or so to wield it.
And then there is this: "combatant.Equipment.Equip(int PartID, EquipShortcut equip, Inventory inventory, bool reset)" which should actually equip the item.
Problem is how do I get the PartID of the item I have leftclicked on. I have "IShortcut item" but there is no "item.GetPartID".
So how do I do that?
The partID of the Equip function refers to the equipment part you want it to equip (i.e. the ID/index of the equipment part). If you set it to -1, the first useable equipment part will be used (i.e. the first part that is enabled in the equipment's settings).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And as inventory I just use "c1.Inventory", right?
What does "reset" do?
The reset parameter will mark the status of the combatant to do recalculations after changing equipment - you should set this to true. Only set it to false if you're doing multiple equip changes in a row and manually reset it afterwards.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!