Open Swunk opened 7 years ago
Ok I will be working on this over the weekend. It is a big thing. I will write T2A menus for the crafting systems. I will keep the way RunUO handling resources for now. The real T2A server did not see different colored ingots as different objects. It just made the item in the same color as the resource had.
That is why it was possible to create "coal armor" from the coal you got in the gift bag at Christmas if you where a murderer. Another example was the ranger armor color sandals from ranger armor newbie tickets before they stop players from using scissors on ranger armor parts a fix.
They fixed it all later by check the hue before crafting. This instead did lead to unusable red color leather from cutting up studded leader gorgets from rangers outside skara brae as a result of this fix.
RunUO has all resources in different objects. Shadow- and Gold- Ore is as far from eatch other as a spear and a empty bowl.
The problem is between Lines 110-154 in craftgumpitem.cs. If you change the formula to this it works and you don't have cliloc errors anymore.
public void DrawSkill() { for ( int i = 0; i < m_CraftItem.Skills.Count; i++ ) { CraftSkill skill = m_CraftItem.Skills.GetAt( i ); double minSkill = skill.MinSkill, maxSkill = skill.MaxSkill;
if ( minSkill < 0 )
minSkill = 0;
AddHtmlLocalized( 170, 132 + (i * 20), 200, 18, 1044060 + (int)skill.SkillToMake, LabelColor, false, false );
AddLabel( 430, 132 + (i * 20), LabelHue, String.Format( "{0:F1}", minSkill ) );
}
CraftSubResCol res = ( m_CraftItem.UseSubRes2 ? m_CraftSystem.CraftSubRes2 : m_CraftSystem.CraftSubRes );
int resIndex = -1;
CraftContext context = m_CraftSystem.GetContext( m_From );
if ( context != null )
resIndex = ( m_CraftItem.UseSubRes2 ? context.LastResourceIndex2 : context.LastResourceIndex );
bool allRequiredSkills = true;
double chance = m_CraftItem.GetSuccessChance( m_From, resIndex > -1 ? res.GetAt( resIndex ).ItemType : null, m_CraftSystem, false, ref allRequiredSkills );
double excepChance = m_CraftItem.GetExceptionalChance( m_CraftSystem, chance, m_From );
if ( chance < 0.0 )
chance = 0.0;
else if ( chance > 1.0 )
chance = 1.0;
AddHtmlLocalized( 170, 80, 250, 18, 1044057, LabelColor, false, false ); // Success Chance:
AddLabel( 430, 80, LabelHue, String.Format( "{0:F1}%", chance * 100 ) );
if ( m_ShowExceptionalChance )
{
if( excepChance < 0.0 )
excepChance = 0.0;
else if( excepChance > 1.0 )
excepChance = 1.0;
AddHtmlLocalized( 170, 100, 250, 18, 1044058, 32767, false, false ); // Exceptional Chance:
AddLabel( 430, 100, LabelHue, String.Format( "{0:F1}%", excepChance * 100 ) );
}
}
This have been temporary fixed in r24 with Delphi79s solution until the menu gets swapped to T2A style.
I was using 5.0.9.1 client and seeing cliloc errors on the crafting gumps in the place you would usually see the skillname for (as far as I could tell) every item in that same spot on the gumps.