RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Crafting engine

_Epila_

Sorceror
I'm creating new tinker items, there are many of them. I have a base item, lets say a Bracelet. the BaseClass contains a property similar to AoSAttributes.
Code:
        BaseBracelet brac = new GoldBracelet() {  };
        brac.Attributes.BonusDex = 5;
Can I craft those items without having to create derived item for every combination (Mana bracelet, hits, dex, skill...) ?
Code:
class ManaBracelet : BaseBracelet {...}
class StamBracelet : BaseBracelet {...}

I don't care about modifying the Craft engine, but I wonder if there is any way to pass custom properties (not constructor values) to Activator.CreateInstance() like we do in new GoldBracelet() {Hue = 3} and of course a good way to pass these properties/values to the crafting system
Code:
AddCraft(typeof(GoldBracelet), ... , {Attributes.BonusMana=4});
I could use reflection, but it fails to pass the Attributes.BonusMana (property of a property?) and its value in a reliable way
 
Top