コード例 #1
0
		public static void FixPlayer( PlayerMobile mob )
		{
			if ( mob != null )
			{
				Server.Skills skills = mob.Skills;

				int totalDecrease = 0;

				for ( int i = 0; i < skills.Length; i++ )
				{
					Skill skill = skills[i];

					if ( skill.CapFixedPoint > 1000 )
						skill.CapFixedPoint = 1000;

					if ( skill.BaseFixedPoint > 1000 )
					{
						totalDecrease += skill.BaseFixedPoint - 1000;
						skill.BaseFixedPoint = 1000;
					}
				}

				mob.SkillsCap = 7000;

				int totalGiveSkill = Math.Min( totalDecrease, 7000 - skills.Total );

				if ( totalGiveSkill > 0 )
				{
					EtherealSoulStone stone = new EtherealSoulStone( mob.Account.Username );
					stone.SkillValue = (totalGiveSkill / 10.0);
					mob.AddToBackpack( stone );
				}
			}
		}
コード例 #2
0
		public SkillTransferGump(EtherealSoulStone soulstone, Mobile from)
			: base(20, 30)
		{
			m_SoulStone = soulstone;

			AddPage(0);
			AddBackground(0, 0, 260, 351, 5054);

			AddImageTiled(10, 10, 240, 23, 0x52);
			AddImageTiled(11, 11, 238, 21, 0xBBC);

			AddLabel(45, 11, 0, "Select a skill to raise");

			AddPage(1);

			int page = 1;
			int index = 0;

			Skills skills = from.Skills;

			int number;

			if (from.EraSA)
			{
				number = 0;
			}
			else if (from.EraML)
			{
				number = 3;
			}
			else if (from.EraSE)
			{
				number = 4;
			}
			else if (from.EraAOS)
			{
				number = 6;
			}
			else
			{
				number = 9;
			}

			for (int i = 0; i < (skills.Length - number); ++i)
			{
				if (index >= FieldsPerPage)
				{
					AddButton(231, 13, 0x15E1, 0x15E5, 0, GumpButtonType.Page, page + 1);

					++page;
					index = 0;

					AddPage(page);

					AddButton(213, 13, 0x15E3, 0x15E7, 0, GumpButtonType.Page, page - 1);
				}

				Skill skill = skills[i];

				if ( /*(skill.Base + m_SoulStone.SkillValue) <= skill.Cap*/ skill.Base < skill.Cap && skill.Lock != SkillLock.Locked &&
																			skill.Lock != SkillLock.Down)
				{
					AddImageTiled(10, 32 + (index * 22), 240, 23, 0x52);
					AddImageTiled(11, 33 + (index * 22), 238, 21, 0xBBC);

					AddLabelCropped(13, 33 + (index * 22), 150, 21, 0, skill.Name);
					AddImageTiled(180, 34 + (index * 22), 50, 19, 0x52);
					AddImageTiled(181, 35 + (index * 22), 48, 17, 0xBBC);
					AddLabelCropped(182, 35 + (index * 22), 234, 21, 0, skill.Base.ToString("F1"));

					if (from.AccessLevel >= AccessLevel.Player)
					{
						AddButton(231, 35 + (index * 22), 0x15E1, 0x15E5, i + 1, GumpButtonType.Reply, 0);
					}
					else
					{
						AddImage(231, 35 + (index * 22), 0x2622);
					}

					++index;
				}
			}
		}
コード例 #3
0
        public SkillTransferGump(EtherealSoulStone soulstone, Mobile from)
            : base(20, 30)
        {
            m_SoulStone = soulstone;

            AddPage(0);
            AddBackground(0, 0, 260, 351, 5054);

            AddImageTiled(10, 10, 240, 23, 0x52);
            AddImageTiled(11, 11, 238, 21, 0xBBC);

            AddLabel(45, 11, 0, "Select a skill to raise");

            AddPage(1);

            int page  = 1;
            int index = 0;

            Skills skills = from.Skills;

            int number;

            if (from.EraSA)
            {
                number = 0;
            }
            else if (from.EraML)
            {
                number = 3;
            }
            else if (from.EraSE)
            {
                number = 4;
            }
            else if (from.EraAOS)
            {
                number = 6;
            }
            else
            {
                number = 9;
            }

            for (int i = 0; i < (skills.Length - number); ++i)
            {
                if (index >= FieldsPerPage)
                {
                    AddButton(231, 13, 0x15E1, 0x15E5, 0, GumpButtonType.Page, page + 1);

                    ++page;
                    index = 0;

                    AddPage(page);

                    AddButton(213, 13, 0x15E3, 0x15E7, 0, GumpButtonType.Page, page - 1);
                }

                Skill skill = skills[i];

                if (/*(skill.Base + m_SoulStone.SkillValue) <= skill.Cap*/ skill.Base < skill.Cap && skill.Lock != SkillLock.Locked &&
                    skill.Lock != SkillLock.Down)
                {
                    AddImageTiled(10, 32 + (index * 22), 240, 23, 0x52);
                    AddImageTiled(11, 33 + (index * 22), 238, 21, 0xBBC);

                    AddLabelCropped(13, 33 + (index * 22), 150, 21, 0, skill.Name);
                    AddImageTiled(180, 34 + (index * 22), 50, 19, 0x52);
                    AddImageTiled(181, 35 + (index * 22), 48, 17, 0xBBC);
                    AddLabelCropped(182, 35 + (index * 22), 234, 21, 0, skill.Base.ToString("F1"));

                    if (from.AccessLevel >= AccessLevel.Player)
                    {
                        AddButton(231, 35 + (index * 22), 0x15E1, 0x15E5, i + 1, GumpButtonType.Reply, 0);
                    }
                    else
                    {
                        AddImage(231, 35 + (index * 22), 0x2622);
                    }

                    ++index;
                }
            }
        }