private ProfessionInfo()
        {
            Name = string.Empty;

            Skills = new SkillNameValue[4];
            Stats  = new StatNameValue[3];
        }
Exemple #2
0
        private static bool ValidSkills( SkillNameValue[] skills )
        {
            int total = 0;

            for ( int i = 0; i < skills.Length; ++i )
            {
                if ( skills[i].Value < 0 || skills[i].Value > 50 )
                    return false;

                total += skills[i].Value;

                for ( int j = i + 1; j < skills.Length; ++j )
                {
                    if ( skills[j].Value > 0 && skills[j].Name == skills[i].Name )
                        return false;
                }
            }

            return ( total == 100 || total == 120 );
        }
Exemple #3
0
        private static void SetSkills( Mobile m, SkillNameValue[] skills, int prof )
        {
            switch ( prof )
            {
                case 1: // Warrior
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Anatomy, 30 ),
                            new SkillNameValue( SkillName.Healing, 45 ),
                            new SkillNameValue( SkillName.Swords, 35 ),
                            new SkillNameValue( SkillName.Tactics, 50 )
                        };

                    break;
                }
                case 2: // Magician
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.EvalInt, 30 ),
                            new SkillNameValue( SkillName.Wrestling, 30 ),
                            new SkillNameValue( SkillName.Magery, 50 ),
                            new SkillNameValue( SkillName.Meditation, 50 )
                        };

                    break;
                }
                case 3: // Blacksmith
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Mining, 30 ),
                            new SkillNameValue( SkillName.ArmsLore, 30 ),
                            new SkillNameValue( SkillName.Blacksmith, 50 ),
                            new SkillNameValue( SkillName.Tinkering, 50 )
                        };

                    break;
                }
                case 4: // Necromancer
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Necromancy, 50 ),
                            new SkillNameValue( SkillName.Focus, 30 ),
                            new SkillNameValue( SkillName.SpiritSpeak, 30 ),
                            new SkillNameValue( SkillName.Swords, 30 ),
                            new SkillNameValue( SkillName.Tactics, 20 )
                        };

                    break;
                }
                case 5: // Paladin
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Chivalry, 51 ),
                            new SkillNameValue( SkillName.Swords, 49 ),
                            new SkillNameValue( SkillName.Focus, 30 ),
                            new SkillNameValue( SkillName.Tactics, 30 )
                        };

                    break;
                }
                case 6:	//Samurai
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Bushido, 50 ),
                            new SkillNameValue( SkillName.Swords, 50 ),
                            new SkillNameValue( SkillName.Anatomy, 30 ),
                            new SkillNameValue( SkillName.Healing, 30 )
                    };
                    break;
                }
                case 7:	//Ninja
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Ninjitsu, 50 ),
                            new SkillNameValue( SkillName.Hiding, 50 ),
                            new SkillNameValue( SkillName.Fencing, 30 ),
                            new SkillNameValue( SkillName.Stealth, 30 )
                        };
                    break;
                }
                default:
                {
                    if ( !ValidSkills( skills ) )
                        return;

                    break;
                }
            }

            bool addSkillItems = true;
            bool elf = (m.Race == Race.Elf);

            switch ( prof )
            {
                case 1: // Warrior
                {
                    if ( elf )
                        EquipItem( new LeafChest() );
                    else
                        EquipItem( new LeatherChest() );
                    break;
                }
                case 4: // Necromancer
                {
                    Container regs = new BagOfNecroReagents( 50 );

                    if ( !Core.AOS )
                    {
                        foreach ( Item item in regs.Items )
                            item.LootType = LootType.Newbied;
                    }

                    PackItem( regs );

                    regs.LootType = LootType.Regular;

                    EquipItem( new BoneHelm() );

                    if ( elf )
                    {
                        EquipItem( new ElvenMachete() );
                        EquipItem( NecroHue( new LeafChest() ) );
                        EquipItem( NecroHue( new LeafArms() ) );
                        EquipItem( NecroHue( new LeafGloves() ) );
                        EquipItem( NecroHue( new LeafGorget() ) );
                        EquipItem( NecroHue( new LeafGorget() ) );
                        EquipItem( NecroHue( new ElvenPants() ) );	//TODO: Verify the pants
                        EquipItem( new ElvenBoots() );
                    }
                    else
                    {
                        EquipItem( new BoneHarvester() );
                        EquipItem( NecroHue( new LeatherChest() ) );
                        EquipItem( NecroHue( new LeatherArms() ) );
                        EquipItem( NecroHue( new LeatherGloves() ) );
                        EquipItem( NecroHue( new LeatherGorget() ) );
                        EquipItem( NecroHue( new LeatherLegs() ) );
                        EquipItem( NecroHue( new Skirt() ) );
                        EquipItem( new Sandals( 0x8FD ) );
                    }

                    Spellbook book = new NecromancerSpellbook( (ulong)0x8981 ); // animate dead, evil omen, pain spike, summon familiar, wraith form

                    PackItem( book );

                    book.LootType = LootType.Blessed;

                    addSkillItems = false;

                    break;
                }
                case 5: // Paladin
                {
                    if ( elf )
                    {
                        EquipItem( new ElvenMachete() );
                        EquipItem( new WingedHelm() );
                        EquipItem( new LeafGorget() );
                        EquipItem( new LeafArms() );
                        EquipItem( new LeafChest() );
                        EquipItem( new LeafLegs() );
                        EquipItem( new ElvenBoots() );	//Verify hue
                    }
                    else
                    {
                        EquipItem( new Broadsword() );
                        EquipItem( new Helmet() );
                        EquipItem( new PlateGorget() );
                        EquipItem( new RingmailArms() );
                        EquipItem( new RingmailChest() );
                        EquipItem( new RingmailLegs() );
                        EquipItem( new ThighBoots( 0x748 ) );
                        EquipItem( new Cloak( 0xCF ) );
                        EquipItem( new BodySash( 0xCF ) );
                    }

                    Spellbook book = new BookOfChivalry( (ulong)0x3FF );

                    PackItem( book );

                    book.LootType = LootType.Blessed;

                    addSkillItems = false;

                    break;
                }

                case 6: // Samurai
                {
                    addSkillItems = false;
                    EquipItem( new HakamaShita( 0x2C3 ) );
                    EquipItem( new Hakama( 0x2C3 ) );
                    EquipItem( new SamuraiTabi( 0x2C3 ) );
                    EquipItem( new TattsukeHakama( 0x22D ) );
                    EquipItem( new Bokuto() );

                    if ( elf )
                        EquipItem( new RavenHelm() );
                    else
                        EquipItem( new LeatherJingasa() );

                    PackItem( new Scissors() );
                    PackItem( new Bandage( 50 ) );

                    Spellbook book = new BookOfBushido();
                    PackItem( book );

                    break;
                }
                case 7: // Ninja
                {
                    addSkillItems = false;
                    EquipItem( new Kasa() );

                    int[] hues = new int[] { 0x1A8, 0xEC, 0x99, 0x90, 0xB5, 0x336, 0x89	};
                    //TODO: Verify that's ALL the hues for that above.

                    EquipItem( new TattsukeHakama( hues[Utility.Random(hues.Length)] ) );

                    EquipItem( new HakamaShita( 0x2C3 ) );
                    EquipItem( new NinjaTabi( 0x2C3 ) );

                    if ( elf )
                        EquipItem( new AssassinSpike() );
                    else
                        EquipItem( new Tekagi() );

                    PackItem( new SmokeBomb() );

                    Spellbook book = new BookOfNinjitsu();
                    PackItem( book );

                    break;
                }
            }

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

                if ( snv.Value > 0 && ( snv.Name != SkillName.Stealth || prof == 7 ) && snv.Name != SkillName.RemoveTrap && snv.Name != SkillName.Spellweaving )
                {
                    Skill skill = m.Skills[snv.Name];

                    if ( skill != null )
                    {
                        skill.BaseFixedPoint = snv.Value * 10;

                        if ( addSkillItems )
                            AddSkillItems( snv.Name, m );
                    }
                }
            }
        }
Exemple #4
0
 public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, int hue, int str, int dex, int intel, CityInfo city, SkillNameValue[] skills, int shirtHue, int pantsHue, int hairID, int hairHue, int beardID, int beardHue, int profession, Race race )
 {
     m_State = state;
     m_Account = a;
     m_Name = name;
     m_Female = female;
     m_Hue = hue;
     m_Str = str;
     m_Dex = dex;
     m_Int = intel;
     m_City = city;
     m_Skills = skills;
     m_ShirtHue = shirtHue;
     m_PantsHue = pantsHue;
     m_HairID = hairID;
     m_HairHue = hairHue;
     m_BeardID = beardID;
     m_BeardHue = beardHue;
     m_Profession = profession;
     m_Race = race;
 }
        private static bool ValidSkills( SkillNameValue[] skills )
        {
            int total = 0;

            for ( int i = 0; i < skills.Length; ++i )
            {
                if ( skills[i].Value < 0 || skills[i].Value > 50 )
                    return false;

                if ( Core.SA || ( Core.ML && skills[i].Name >= SkillName.Mysticism ) || ( Core.SE && skills[i].Name >= SkillName.Spellweaving ) || skills[i].Name >= SkillName.Bushido )
                    return false;

                total += skills[i].Value;

                for ( int j = i + 1; j < skills.Length; ++j )
                    if ( skills[j].Value > 0 && skills[j].Name == skills[i].Name )
                        return false;
            }

            return ( total == 100 );
        }
Exemple #6
0
        private static bool ValidSkills( SkillNameValue[] skills )
        {
            int total = 0;

            for ( int i = 0; i < skills.Length; ++i )
            {
                if ( skills[i].Value < 0 || skills[i].Value > 50 )
                    return false;

                if(( !Core.SE && (int)skills[i].Name > 51 ) || ( !Core.AOS && (int)skills[i].Name > 48 ))
                    return false;

                total += skills[i].Value;

                for ( int j = i + 1; j < skills.Length; ++j )
                {
                    if ( skills[j].Value > 0 && skills[j].Name == skills[i].Name )
                        return false;
                }
            }

            return ( total == 100 );
        }
 public CharacterCreatedEventArgs( NetState state, IAccount a, string name, bool female, int hue, int str, int dex, int intel, CityInfo city, SkillNameValue[] skills, int shirtHue, int pantsHue, int hairID, int hairHue, int beardID, int beardHue, int profession, Race race)
     : this(state, a, name, female, hue, str, dex, intel, city, skills, shirtHue, pantsHue, hairID, hairHue, beardID, beardHue, profession, race, 0, 0)
 {
 }
		private static void SetSkills( Mobile m, SkillNameValue[] skills, int prof )
		{
			switch ( prof )
			{
				case 1: // Warrior
				{
					skills = new SkillNameValue[]
						{
							new SkillNameValue( SkillName.Anatomy, 30 ),
							new SkillNameValue( SkillName.Healing, 45 ),
							new SkillNameValue( SkillName.Swords, 35 ),
							new SkillNameValue( SkillName.Tactics, 50 )
						};

					break;
				}
				case 2: // Magician
				{
					skills = new SkillNameValue[]
						{
							new SkillNameValue( SkillName.EvalInt, 30 ),
							new SkillNameValue( SkillName.Wrestling, 30 ),
							new SkillNameValue( SkillName.Magery, 50 ),
							new SkillNameValue( SkillName.Meditation, 50 )
						};

					break;
				}
				case 3: // Blacksmith
				{
					skills = new SkillNameValue[]
						{
							new SkillNameValue( SkillName.Mining, 30 ),
							new SkillNameValue( SkillName.ArmsLore, 30 ),
							new SkillNameValue( SkillName.Blacksmith, 50 ),
							new SkillNameValue( SkillName.Tinkering, 50 )
						};

					break;
				}
//				case 4: // Necromancer
//				{
//					if ( !Core.AOS )
//						goto default;
//
//					skills = new SkillNameValue[]
//						{
//							new SkillNameValue( SkillName.Necromancy, 50 ),
//							new SkillNameValue( SkillName.Focus, 30 ),
//							new SkillNameValue( SkillName.SpiritSpeak, 30 ),
//							new SkillNameValue( SkillName.Swords, 30 ),
//							new SkillNameValue( SkillName.Tactics, 20 )
//						};
//
//					break;
//				}
//				case 5: // Paladin
//				{
//					if ( !Core.AOS )
//						goto default;
//
//					skills = new SkillNameValue[]
//						{
//							new SkillNameValue( SkillName.Chivalry, 51 ),
//							new SkillNameValue( SkillName.Swords, 49 ),
//							new SkillNameValue( SkillName.Focus, 30 ),
//							new SkillNameValue( SkillName.Tactics, 30 )
//						};
//
//					break;
//				}
				default:
				{
					if ( !ValidSkills( skills ) )
						return;

					break;
				}
			}

			bool addSkillItems = true;

			switch ( prof )
			{
				case 1: // Warrior
				{
					EquipItem( new LeatherChest() );
					break;
				}
//				case 4: // Necromancer
//				{
//					Container regs = new BagOfNecroReagents( 50 );
//
//					if ( !Core.AOS )
//					{
//						foreach ( Item item in regs.Items )
//							item.LootType = LootType.Newbied;
//					}
//
//					PackItem( regs );
//
//					regs.LootType = LootType.Regular;
//
//					EquipItem( new BoneHarvester() );
//					EquipItem( new BoneHelm() );
//
//					EquipItem( NecroHue( new LeatherChest() ) );
//					EquipItem( NecroHue( new LeatherArms() ) );
//					EquipItem( NecroHue( new LeatherGloves() ) );
//					EquipItem( NecroHue( new LeatherGorget() ) );
//					EquipItem( NecroHue( new LeatherLegs() ) );
//					EquipItem( NecroHue( new Skirt() ) );
//					EquipItem( new Sandals( 0x8FD ) );
//
//					Spellbook book = new NecromancerSpellbook( (ulong)0x8981 ); // animate dead, evil omen, pain spike, summon familiar, wraith form
//
//					PackItem( book );
//
//					book.LootType = LootType.Blessed;
//
//					addSkillItems = false;
//
//					break;
//				}
//				case 5: // Paladin
//				{
//					EquipItem( new Broadsword() );
//					EquipItem( new Helmet() );
//					EquipItem( new PlateGorget() );
//					EquipItem( new RingmailArms() );
//					EquipItem( new RingmailChest() );
//					EquipItem( new RingmailLegs() );
//					EquipItem( new ThighBoots( 0x748 ) );
//					EquipItem( new Cloak( 0xCF ) );
//					EquipItem( new BodySash( 0xCF ) );
//
//					Spellbook book = new BookOfChivalry( (ulong)0x3FF );
//
//					PackItem( book );
//
//					book.LootType = LootType.Blessed;
//
//					break;
//				}
			}

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

				if ( snv.Value > 0 && snv.Name != SkillName.Stealth && snv.Name != SkillName.RemoveTrap )
				{
					Skill skill = m.Skills[snv.Name];

					if ( skill != null )
					{
						skill.BaseFixedPoint = snv.Value * 10;

						if ( addSkillItems )
							AddSkillItems( snv.Name );
					}
				}
			}
		}
        private static void SetSkills( Mobile m, SkillNameValue[] skills, int prof )
        {
            switch ( prof )
            {
                case 1: // Warrior
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Anatomy, 30 ),
                            new SkillNameValue( SkillName.Healing, 45 ),
                            new SkillNameValue( SkillName.Swords, 35 ),
                            new SkillNameValue( SkillName.Tactics, 50 )
                        };

                    break;
                }
                case 2: // Magician
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Invocation, 30 ),
                            new SkillNameValue( SkillName.UnarmedFighting, 30 ),
                            new SkillNameValue( SkillName.Magery, 50 ),
                            new SkillNameValue( SkillName.Meditation, 50 )
                        };

                    break;
                }
                case 3: // Blacksmith
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Mining, 30 ),
                            new SkillNameValue( SkillName.Craftsmanship, 30 ),
                            new SkillNameValue( SkillName.Blacksmith, 50 ),
                            new SkillNameValue( SkillName.Tinkering, 50 )
                        };

                    break;
                }
                case 4: // Necromancer
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Polearms, 50 ),
                            new SkillNameValue( SkillName.Concentration, 30 ),
                            new SkillNameValue( SkillName.Linguistics, 30 ),
                            new SkillNameValue( SkillName.Swords, 30 ),
                            new SkillNameValue( SkillName.Tactics, 20 )
                        };

                    break;
                }
                case 5: // Paladin
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Faith, 51 ),
                            new SkillNameValue( SkillName.Swords, 49 ),
                            new SkillNameValue( SkillName.Concentration, 30 ),
                            new SkillNameValue( SkillName.Tactics, 30 )
                        };

                    break;
                }
                case 6:	//Samurai
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Leadership, 50 ),
                            new SkillNameValue( SkillName.Swords, 50 ),
                            new SkillNameValue( SkillName.Anatomy, 30 ),
                            new SkillNameValue( SkillName.Healing, 30 )
                    };
                    break;
                }
                case 7:	//Ninja
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.ExoticWeaponry, 50 ),
                            new SkillNameValue( SkillName.Hiding, 50 ),
                            new SkillNameValue( SkillName.Fencing, 30 ),
                            new SkillNameValue( SkillName.Stealth, 30 )
                        };
                    break;
                }
                default:
                {
                    if ( !ValidSkills( skills ) )
                        return;

                    break;
                }
            }
        }
        private static void SetSkills( Mobile m, SkillNameValue[] skills, int prof )
        {
            switch ( prof )
            {
                case 1: // Warrior
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Healing, 25 ),
                            new SkillNameValue( SkillName.Swords, 25 ),
                            new SkillNameValue( SkillName.Tactics, 50 )
                        };

                    break;
                }
                case 2: // Magician
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Wrestling, 25 ),
                            new SkillNameValue( SkillName.Magery, 50 ),
                            //new SkillNameValue( SkillName.Meditation, 25 )
                        };

                    break;
                }
                case 3: // Blacksmith
                {
                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Mining, 25 ),
                            new SkillNameValue( SkillName.ArmsLore, 25 ),
                            new SkillNameValue( SkillName.Blacksmith, 50 )
                        };

                    break;
                }
                case 4: // Necromancer
                {
                    if ( !Core.AOS )
                        goto default;

                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Necromancy, 50 ),
                            new SkillNameValue( SkillName.Focus, 30 ),
                            new SkillNameValue( SkillName.SpiritSpeak, 30 ),
                            new SkillNameValue( SkillName.Swords, 30 ),
                            new SkillNameValue( SkillName.Tactics, 20 )
                        };

                    break;
                }
                case 5: // Paladin
                {
                    if ( !Core.AOS )
                        goto default;

                    skills = new SkillNameValue[]
                        {
                            new SkillNameValue( SkillName.Chivalry, 51 ),
                            new SkillNameValue( SkillName.Swords, 49 ),
                            new SkillNameValue( SkillName.Focus, 30 ),
                            new SkillNameValue( SkillName.Tactics, 30 )
                        };

                    break;
                }
                default:
                {
                    if ( !ValidSkills( skills ) )
                        return;

                    break;
                }
            }

            bool addSkillItems = true;

            switch ( prof )
            {
                case 1: // Warrior
                {
                    EquipItem( new LeatherChest() );
                    EquipItem( new LeatherLegs() );
                    break;
                }
                case 4: // Necromancer
                {
                    addSkillItems = false;
                    break;
                }
                case 5: // Paladin
                {
                    break;
                }
            }

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

                if ( snv.Value > 0 && snv.Name != SkillName.Stealth && snv.Name != SkillName.RemoveTrap )
                {
                    Skill skill = m.Skills[snv.Name];

                    if ( skill != null )
                    {
                        skill.BaseFixedPoint = snv.Value * 10;

                        if ( addSkillItems )
                            AddSkillItems( snv.Name );
                    }
                }
            }
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            switch (version)
            {
                case 1:
                    {
                        m_CurrentUser = reader.ReadMobile();
                        goto case 0;
                    }
                case 0:
                    {
                        m_UserLocation = reader.ReadPoint3D();
                        m_UserMap = reader.ReadMap();

                        m_FollowSkill = new SkillNameValue((SkillName)reader.ReadInt(), reader.ReadInt());
                        m_FollowSecondSkill = new SkillNameValue((SkillName)reader.ReadInt(), reader.ReadInt());
                        m_RemainSkill = new SkillNameValue((SkillName)reader.ReadInt(), reader.ReadInt());
                        m_ActionSkill = new SkillNameValue((SkillName)reader.ReadInt(), reader.ReadInt());

                        m_Recharges = reader.ReadEncodedInt();
                        m_Charges = Math.Min(reader.ReadEncodedInt(), MaxCharges);

                        this.Subject = (Mobile)reader.ReadMobile();
                        m_SubjectName = reader.ReadString();

                        m_State = MagicBallState.Idle;

                        break;
                    }
            }
            if (m_CurrentUser != null)
            {
                Mobile undo = m_CurrentUser;
                undo.Location = UserLocation;
                undo.Map = UserMap;
                undo.Hidden = false;
                undo.Paralyzed = false;
            }
        }