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; }
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; }
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; }
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; }
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); } } } }
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; }