public IncreaseLokaiSkillsGump(PlayerMobile mobile, LokaiSkillBall ball, double[] values, int page) : this(mobile, ball, false, page) { m_StartValue = new double[30]; for (int x = 0; x < 30; x++) { m_StartValue[x] = values[x]; } }
public IncreaseLokaiSkillsGump(PlayerMobile mobile, LokaiSkillBall ball, bool first, int page) : base(50, 50) { m_Page = page; m_Ball = ball; m_Points = m_Ball.Points; m_Mobile = mobile; m_LokaiSkills = LokaiSkillUtilities.XMLGetSkills(m_Mobile); if (first) { m_StartValue = new double[30]; m_Page = 0; for (int x = 0; x < 30; x++) { m_StartValue[x] = m_LokaiSkills[x].Base; } } m_Mobile.CloseGump(typeof(IncreaseLokaiSkillsGump)); AddPage(0); AddBackground(0, 0, 476, 440, 0x13BE); AddLabel(10, 7, 2100, "Choose Skills"); if (m_Page > 0) { AddButton(275, 7, 250, 251, 2, GumpButtonType.Reply, 0); // Prev Page } if (m_Page < 2) { AddButton(275, 395, 252, 253, 3, GumpButtonType.Reply, 0); // Next Page } AddLabel(160, 7, 2100, "Points Left: " + m_Points.ToString()); // We only need this "if" condition if we want to make them use it all up right now. // if ( m_Points == 0 ) // { AddButton(305, 335, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0); // OK button // } AddImage(170, -10, 0x58A); m_StartPos = m_Page * 10; int z = 0; for (int i = m_StartPos; i < m_StartPos + 10; i++) { int y = 20 + (30 * (++z)); if (LokaiSkillUtilities.ShowLokaiSkill(i)) { m_LokaiSkill = m_LokaiSkills[i]; AddLabel(10, y, 2124, m_LokaiSkill.Name.ToString()); AddLabel(170, y, 2100, (((double)m_LokaiSkill.BaseFixedPoint) / 10).ToString()); if (CanLowerLokaiSkill(m_LokaiSkill, i, 1)) { AddButton(220, y, 0x1519, 0x1519, 1000 + i, GumpButtonType.Reply, 0); // Decrease } if (CanRaiseLokaiSkill(m_LokaiSkill, i, 1)) { AddButton(240, y, 0x151A, 0x151A, 2000 + i, GumpButtonType.Reply, 0); // Increase } if (CanLowerLokaiSkill(m_LokaiSkill, i, 5)) { AddButton(200, y - 2, 2229, 2229, 3000 + i, GumpButtonType.Reply, 0); // Decrease by 5 } if (CanRaiseLokaiSkill(m_LokaiSkill, i, 5)) { AddButton(256, y - 2, 2229, 2229, 4000 + i, GumpButtonType.Reply, 0); // Increase by 5 } } } }