예제 #1
0
파일: Armors.cs 프로젝트: xtr3sor/OpenMU
        private void CreateSetGroup(int setLevel, IncreasableItemOption option, ICollection <ItemDefinition> group)
        {
            var setForDefense = this.Context.CreateNew <ItemSetGroup>();

            setForDefense.Name             = $"{group.First().Name.Split(' ')[0]} Defense Bonus (Level {setLevel})";
            setForDefense.MinimumItemCount = group.Count;
            setForDefense.Options.Add(option);
            setForDefense.SetLevel = (byte)setLevel;

            foreach (var item in group)
            {
                var itemOfSet = this.Context.CreateNew <ItemOfItemSet>();
                itemOfSet.ItemDefinition = item;
                setForDefense.Items.Add(itemOfSet);
            }
        }
예제 #2
0
        private ItemOptionLink GetOption(AttributeDefinition targetAttribute, float value)
        {
            var option = new IncreasableItemOption
            {
                OptionType        = ItemOptionTypes.Option,
                PowerUpDefinition = new PowerUpDefinition
                {
                    TargetAttribute = targetAttribute,
                    Boost           = new TestPowerUpDefinitionValue(new SimpleElement {
                        Value = value
                    }),
                },
            };

            return(new ItemOptionLink {
                ItemOption = option, Level = 1
            });
        }