Hi all!

I've been making some modifications to my old (non ServUO) copy of RunUO, and one thing I'd like to do, is enable the ability to enhance Artifacts, using the special ores/metals.

When trying to enhance, the message that's being called is:

case EnhanceResult.BadItem: message = 1061011; break; // You cannot enhance this type of item with the properties of the selected special material.

I "think" the section that deals with the artifacts, is this:

if (craftItem == null || craftItem.Resources.Count == 0)
return EnhanceResult.BadItem;

As I can't find any other section in enhance.cs, which BadItem might apply to.

Anyone know how I might be able to enable it for artifacts?
 
if (craftItem == null || craftItem.Resources.Count == 0)
return EnhanceResult.BadItem;

It HAS to ask this, and it HAS to return that result, or it would crash. You cannot craft anything that is not on the list of craftable items. Enhancing uses the same list of craftable items as crafting does, therefore the item has to appear on that list so that it knows what material to use.

So, if you want to bypass this somehow, you have to tell it what craft resource it is made from. I am not even sure if that can be just made up or not either. You might have to make the Artifacts craftable somehow, but you have to find out if it really is an artifact. Maybe something like:

Code:
if ((item is BaseWeapon && ((BaseWeapon)item).ArtifactRarity > 0) || (item is BaseArmor && ((BaseArmor)item).ArtifactRarity > 0))

If that results true, then allow it to use the craft resource you want it to use, then skip the "if (craftItem == null ...)" part.
 
Thanks Lokai, yea, I'm afraid my skills in "coding" are copying/pasting and hoping something works lol
 
Back