コード例 #1
0
        public CraftItem(Type type, TextDefinition groupName, TextDefinition name)
        {
            m_arCraftRes   = new CraftResCol();
            m_arCraftSkill = new CraftSkillCol();

            m_Type = type;

            m_GroupNameString = groupName;
            m_NameString      = name;

            m_GroupNameNumber = groupName;
            m_NameNumber      = name;
        }
コード例 #2
0
		public CraftItem( Type type, TextDefinition groupName, TextDefinition name )
		{
			m_arCraftRes = new CraftResCol();
			m_arCraftSkill = new CraftSkillCol();

			m_Type = type;

			m_GroupNameString = groupName;
			m_NameString = name;

			m_GroupNameNumber = groupName;
			m_NameNumber = name;
		}
コード例 #3
0
        public CraftItem(Type type, TextDefinition groupName, TextDefinition name)
        {
            m_arCraftRes   = new CraftResCol();
            m_arCraftSkill = new CraftSkillCol();

            m_Type = type;

            m_GroupNameString = groupName;
            m_NameString      = name;

            m_GroupNameNumber = groupName;
            m_NameNumber      = name;

            m_RequiredBeverage = BeverageType.Water;
        }
コード例 #4
0
ファイル: CraftItem.cs プロジェクト: LavinasChange/ModernUO
        public CraftItem(Type type, TextDefinition groupName, TextDefinition name)
        {
            Resources = new CraftResCol();
            Skills    = new CraftSkillCol();

            ItemType = type;

            GroupNameString = groupName;
            NameString      = name;

            GroupNameNumber = groupName;
            NameNumber      = name;

            RequiredBeverage = BeverageType.Water;
        }
コード例 #5
0
ファイル: Finish.cs プロジェクト: therealmarkchipp/Teiravon-2
            private void CheckGain()
            {
                int  quality           = 0;
                bool allRequiredSkills = true;

                double minMainSkill = 0.0;
                double maxMainSkill = 0.0;
                double valMainSkill = 0.0;

                m_CraftItem.CheckSkills(m_From, m_TypeRes, m_CraftSystem, ref quality, ref allRequiredSkills);
                CraftSkillCol m_arCraftSkill = m_CraftItem.Skills;

                for (int i = 0; i < m_arCraftSkill.Count; i++)
                {
                    CraftSkill craftSkill = m_arCraftSkill.GetAt(i);

                    double minSkill = craftSkill.MinSkill;
                    double maxSkill = craftSkill.MaxSkill;
                    double valSkill = m_From.Skills[craftSkill.SkillToMake].Value;

                    if (valSkill < minSkill)
                    {
                        allRequiredSkills = false;
                    }

                    if (craftSkill.SkillToMake == m_CraftSystem.MainSkill)
                    {
                        minMainSkill = minSkill;
                        maxMainSkill = maxSkill;
                        valMainSkill = valSkill;
                    }
                    Skill skill = m_From.Skills[craftSkill.SkillToMake];

                    double chance  = (valSkill - minSkill) / (maxSkill - minSkill);
                    bool   success = (chance >= Utility.RandomDouble());
                    if (success)
                    {
                        double ComputedSkillMod = (((1.0 - chance) / 2) * 1.0);

                        if (ComputedSkillMod >= Utility.RandomDouble())
                        {
                            Server.Misc.SkillCheck.Gain(m_From, skill);
                        }
                    }
                }
            }
コード例 #6
0
ファイル: CraftItem.cs プロジェクト: Serado/ServUO
		public CraftItem(Type type, TextDefinition groupName, TextDefinition name)
		{
			m_arCraftRes = new CraftResCol();
			m_arCraftSkill = new CraftSkillCol();

			m_Type = type;

			m_GroupNameString = groupName;
			m_NameString = name;

			m_GroupNameNumber = groupName;
			m_NameNumber = name;

			m_RequiredBeverage = BeverageType.Water;
		}
コード例 #7
0
ファイル: CraftItem.cs プロジェクト: zerodowned/angelisland
		public CraftItem(Type type, int groupName, string name)
		{
			m_arCraftRes = new CraftResCol();
			m_arCraftSkill = new CraftSkillCol();

			m_Type = type;
			m_GroupNameNumber = groupName;
			m_NameString = name;
		}