bool validateSkills()
 {
     // we need to make sure that the stats add up to 80, skills add up to 100, and 3 unique skills are selected.
     // if not, pop up an appropriate error message.
     if (m_CreateSkillsGump.Strength + m_CreateSkillsGump.Dexterity + m_CreateSkillsGump.Intelligence != 80)
     {
         m_UserInterface.MsgBox("Error: your stat values did not add up to 80. Please logout and try to make another character.", MsgBoxTypes.OkOnly);
         return(false);
     }
     if (m_CreateSkillsGump.SkillPoints0 + m_CreateSkillsGump.SkillPoints1 + m_CreateSkillsGump.SkillPoints2 != 100)
     {
         m_UserInterface.MsgBox("Error: your skill values did not add up to 100. Please logout and try to make another character.", MsgBoxTypes.OkOnly);
         return(false);
     }
     if (m_CreateSkillsGump.SkillIndex0 == -1 || m_CreateSkillsGump.SkillIndex1 == -1 || m_CreateSkillsGump.SkillIndex2 == -1 ||
         (m_CreateSkillsGump.SkillIndex0 == m_CreateSkillsGump.SkillIndex1) ||
         (m_CreateSkillsGump.SkillIndex1 == m_CreateSkillsGump.SkillIndex2) ||
         (m_CreateSkillsGump.SkillIndex0 == m_CreateSkillsGump.SkillIndex2))
     {
         m_UserInterface.MsgBox("You must have three unique skills chosen!", MsgBoxTypes.OkOnly);
         return(false);
     }
     // save the values;
     m_attributes[0]   = m_CreateSkillsGump.Strength;
     m_attributes[1]   = m_CreateSkillsGump.Dexterity;
     m_attributes[2]   = m_CreateSkillsGump.Intelligence;
     m_skillIndexes[0] = m_CreateSkillsGump.SkillIndex0;
     m_skillIndexes[1] = m_CreateSkillsGump.SkillIndex1;
     m_skillIndexes[2] = m_CreateSkillsGump.SkillIndex2;
     m_skillValues[0]  = m_CreateSkillsGump.SkillPoints0;
     m_skillValues[1]  = m_CreateSkillsGump.SkillPoints1;
     m_skillValues[2]  = m_CreateSkillsGump.SkillPoints2;
     m_skillsSet       = true;
     return(true);
 }
        public override void ActivateByButton(int buttonID)
        {
            switch ((Buttons)buttonID)
            {
            case Buttons.Help:
                break;

            case Buttons.Options:
                break;

            case Buttons.LogOut:
                MsgBox g = m_UserInterface.MsgBox("Quit Ultima Online?", MsgBoxTypes.OkCancel);
                g.OnClose = logout_OnClose;
                break;

            case Buttons.Quests:
                break;

            case Buttons.Skills:
                m_UserInterface.AddControl(new SkillsGump(), 80, 80, UserInterfaceService.AddControlType.Toggle);
                break;

            case Buttons.Guild:
                break;

            case Buttons.PeaceWarToggle:
                m_World.Interaction.ToggleWarMode();
                break;

            case Buttons.Status:
                m_UserInterface.AddControl(new StatusGump(), 200, 400, UserInterfaceService.AddControlType.Toggle);
                break;
            }
        }
 public override void Update(double totalMS, double frameMS)
 {
     if (!m_Network.IsConnected)
     {
         if (m_UserInterface.IsModalControlOpen == false)
         {
             MsgBox g = m_UserInterface.MsgBox("You have lost your connection with the server.", MsgBoxTypes.OkOnly);
             g.OnClose = onCloseLostConnectionMsgBox;
         }
     }
     else
     {
         Input.Update(frameMS);
         EntityManager.Update(frameMS);
         Effects.Update(frameMS);
         StaticManager.Update(frameMS);
     }
 }
Example #4
0
        private void ReceiveDeleteCharacterResponse(IRecvPacket packet)
        {
            DeleteCharacterResponsePacket p = (DeleteCharacterResponsePacket)packet;

            m_UserInterface.MsgBox(p.Result, MsgBoxTypes.OkOnly);
        }
Example #5
0
        private void ReceivePopupMessage(IRecvPacket packet)
        {
            PopupMessagePacket p = (PopupMessagePacket)packet;

            m_UserInterface.MsgBox(p.Message, MsgBoxTypes.OkOnly);
        }