コード例 #1
0
        bool validateAppearance()
        {
            // get the resource provider
            IResourceProvider provider = ServiceRegistry.GetService <IResourceProvider>();

            // save the values
            m_appearanceSet     = true;
            m_name              = m_CreateAppearanceGump.Name;
            m_gender            = m_CreateAppearanceGump.Gender;
            m_hairStyleID       = m_CreateAppearanceGump.HairID;
            m_facialHairStyleID = m_CreateAppearanceGump.FacialHairID;
            m_skinHue           = m_CreateAppearanceGump.SkinHue;
            m_hairHue           = m_CreateAppearanceGump.HairHue;
            m_facialHairHue     = m_CreateAppearanceGump.FacialHairHue;
            // make sure name is long enough. 2+ Characters
            // if not, pop up an appropriate error message.
            if (m_name.Length < 2)
            {
                MsgBoxGump.Show(provider.GetString(1075458), MsgBoxTypes.OkOnly); // 1075458: Your character name is too short.
                return(false);
            }
            if (m_name[m_name.Length - 1] == '.')
            {
                MsgBoxGump.Show(provider.GetString(1075457), MsgBoxTypes.OkOnly); // 1075457: Your character name cannot end with a period('.').
                return(false);
            }
            return(true);
        }
コード例 #2
0
 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)
     {
         MsgBoxGump.Show("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)
     {
         MsgBoxGump.Show("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))
     {
         MsgBoxGump.Show("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);
 }
コード例 #3
0
        bool validateSkills()
        {
            var gump = CurrentGump as CreateCharSkillsGump;

            // 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 (gump.Strength + gump.Dexterity + gump.Intelligence != 80)
            {
                MsgBoxGump.Show("Error: your stat values did not add up to 80. Please logout and try to make another character.", MsgBoxTypes.OkOnly);
                return(false);
            }
            if (gump.SkillPoints0 + gump.SkillPoints1 + gump.SkillPoints2 != 100)
            {
                MsgBoxGump.Show("Error: your skill values did not add up to 100. Please logout and try to make another character.", MsgBoxTypes.OkOnly);
                return(false);
            }
            if (gump.SkillIndex0 == -1 || gump.SkillIndex1 == -1 || gump.SkillIndex2 == -1 ||
                (gump.SkillIndex0 == gump.SkillIndex1) ||
                (gump.SkillIndex1 == gump.SkillIndex2) ||
                (gump.SkillIndex0 == gump.SkillIndex2))
            {
                MsgBoxGump.Show("You must have three unique skills chosen!", MsgBoxTypes.OkOnly);
                return(false);
            }
            (CurrentGump as CreateCharSkillsGump).SaveData(_data);
            return(true);
        }
コード例 #4
0
 public override void Update(double totalMS, double frameMS)
 {
     if (!_network.IsConnected)
     {
         if (_userInterface.IsModalControlOpen == false)
         {
             var g = MsgBoxGump.Show("You have lost your connection with the server.", MsgBoxTypes.OkOnly);
             g.OnClose = OnCloseLostConnectionMsgBox;
         }
     }
     else
     {
         Input.Update(frameMS);
         Entities.Update(frameMS);
         Effects.Update(frameMS);
         Statics.Update(frameMS);
     }
 }
コード例 #5
0
        bool validateAppearance()
        {
            // get the resource provider
            var provider = Service.Get <IResourceProvider>();

            // save the values
            (CurrentGump as CreateCharAppearanceGump).SaveData(_data);
            if (_data.Name.Length < 2)
            {
                MsgBoxGump.Show(provider.GetString(1075458), MsgBoxTypes.OkOnly); // 1075458: Your character name is too short.
                return(false);
            }
            if (_data.Name[_data.Name.Length - 1] == '.')
            {
                MsgBoxGump.Show(provider.GetString(1075457), MsgBoxTypes.OkOnly); // 1075457: Your character name cannot end with a period('.').
                return(false);
            }
            return(true);
        }
コード例 #6
0
        private void ReceiveDeleteCharacterResponse(IRecvPacket packet)
        {
            DeleteResultPacket p = (DeleteResultPacket)packet;

            MsgBoxGump.Show(p.Result, MsgBoxTypes.OkOnly);
        }
コード例 #7
0
 void ReceiveDeleteCharacterResponse(DeleteResultPacket packet)
 {
     MsgBoxGump.Show(packet.Result, MsgBoxTypes.OkOnly);
 }