Example #1
0
        private void _Create(ItemFormula key, int[] amounts)
        {
            var quality = ItemProvider.GetQuality(key, amounts);

            var itemProvider = new ItemProvider();
            var item         = itemProvider.BuildItem(quality, key.Item, key.Effects);

            _Player.Bag.Add(item);
        }
Example #2
0
        void IBootable.Launch()
        {
            var provider = new ItemProvider();

            _Actor.Bag.Add(provider.BuildItem(1, "AidKit1", new [] { new ItemEffect()
                                                                     {
                                                                         Effects = new [] { new Effect()
                                                                                            {
                                                                                                Type = EFFECT_TYPE.AID, Value = 10
                                                                                            } },
                                                                         Quality = 0.5f
                                                                     } }));

            _Actor.Bag.Add(provider.BuildItem(1, "Axe1", new[] { new ItemEffect()
                                                                 {
                                                                     Effects = new [] { new Effect()
                                                                                        {
                                                                                            Type = EFFECT_TYPE.ATTACK_ADD, Value = 1
                                                                                        } },
                                                                     Quality = 0.5f
                                                                 } }));
            _ToGame(_Map);
        }
Example #3
0
        void IDevelopActor.MakeItem(string name, float quality)
        {
            var formulas = Resource.Instance.Formulas;
            var formula  = (from f in formulas where f.Id == name select f).FirstOrDefault();

            if (formula == null)
            {
                return;
            }

            var ip   = new ItemProvider();
            var item = ip.BuildItem(quality, formula.Item, formula.Effects);

            Bag.Add(item);
        }