jaska
Initiate
I'm trying to build a custom skill gump to replace the client one. I've ran into some problems though. I'm sure that there's a more elegant way of doing this, but what I've done is that I've made a list of all the skills a player would be able to activate from the skill list and now I'm trying to add a button next to them. Except that I can't get it to work.
Basically what I'm asking is, how do I turn a m.Skills into a SkillName? m.Skills.Name didn't work unfortunately.
What should I put in after the list.Contains? I've done the list like this:
Basically what I'm asking is, how do I turn a m.Skills into a SkillName? m.Skills.Name didn't work unfortunately.
Code:
for (int i = 0, n = 0; i < m.Skills.Length; i++)
{
Skill skill = m.Skills[i];
if (skill.Cap > 0.0)
{
int x = 69;
int y = 106 + (18 * n);
string cap = ( System.Convert.ToString(skill.Base) );
if (list.Contains( ???????? ))
{
AddButton(x, y, 1209, 1210, i + 1, GumpButtonType.Reply, 0);
}
AddHtmlLocalized( x + 15, y - 2, 200, 20, AosSkillBonuses.GetLabel(skill.SkillName), 0x7FFF, false, false);
AddHtml( x + 150, y, 200, 23, cap, (bool)false, (bool)false); // skillin määrä
n++;
}
}
What should I put in after the list.Contains? I've done the list like this:
Code:
List<SkillName> list = new List<SkillName>();
list.Add(SkillName.Anatomy);
list.Add(SkillName.EvalInt);