public UseSkillButtonGump(SkillEntry skill)
            : base(skill.ID, 0)
        {
            while (UserInterface.GetControl<UseSkillButtonGump>(skill.ID) != null)
            {
                UserInterface.GetControl<UseSkillButtonGump>(skill.ID).Dispose();
            }

            m_Skill = skill;
            m_World = ServiceRegistry.GetService<WorldModel>();

            IsMoveable = true;
            HandlesMouseInput = true;

            m_BG = new ResizePic[3];
            m_BG[0] = (ResizePic)AddControl(new ResizePic(this, 0, 0, 0x24B8, 120, 40));
            m_BG[1] = (ResizePic)AddControl(new ResizePic(this, 0, 0, 0x24EA, 120, 40));
            m_BG[2] = (ResizePic)AddControl(new ResizePic(this, 0, 0, 0x251C, 120, 40));
            m_Caption = (HtmlGumpling)AddControl(new HtmlGumpling(this, 0, 10, 120, 20, 0, 0, "<center>" + m_Skill.Name));

            for (int i = 0; i < 3; i++)
            {
                m_BG[i].MouseDownEvent += EventMouseDown;
                m_BG[i].MouseUpEvent += EventMouseUp;
                m_BG[i].MouseClickEvent += EventMouseClick;
            }
        }
 public void ChangeSkillLock(SkillEntry skill)
 {
     if (skill == null)
         return;
     byte nextLockState = (byte)(skill.LockType + 1);
     if (nextLockState > 2)
         nextLockState = 0;
     m_Network.Send(new SetSkillLockPacket((ushort)skill.Index, nextLockState));
     skill.LockType = nextLockState;
 }
Exemple #3
0
 private void OnSkillChanged(SkillEntry entry)
 {
     m_MustUpdateSkills = true;
 }