However, I'm submitting this because of a critical error that's caused by attempting to craft anything while any Unique Item without a "#" in the id in in the bag while crafting. This is problematic with the RoG script from Storm. I would imagine that unless things are implemented differently there, this problem exists there. Basically, the craft code attempts to extract the id_nb from a unique item by finding where the "#" occurs. When it does this, it uses the length of the string up to that point. If there's no "#" the length returns a -1, causes an exception, and the result is nothing can be crafted.
So, this:
in AbstractCraftingSkill.cs
- Code: Select all
if (item.Template is ItemUnique) { string itemid = item.Id_nb.Substring(0, item.Id_nb.LastIndexOf('#')); if (itemid.Equals(itemToCraft.Id_nb) == false) continue; }
- Code: Select all
if (item.Template is ItemUnique) { if (item.Id_nb.Contains("#") == false) continue; string itemid = item.Id_nb.Substring(0, item.Id_nb.LastIndexOf('#')); if (itemid.Equals(itemToCraft.Id_nb) == false) continue; }