Beispiel #1
0
            private static void AlterFrom(Item origItem, Item alteredItem)
            {
                if (alteredItem is BaseWeapon)
                {
                    BaseWeapon origWeapon    = origItem as BaseWeapon;
                    BaseWeapon alteredWeapon = alteredItem as BaseWeapon;

                    alteredWeapon.AlterFrom(origWeapon);
                }
                else if (alteredItem is BaseArmor)
                {
                    BaseArmor origArmor    = origItem as BaseArmor;
                    BaseArmor alteredArmor = alteredItem as BaseArmor;

                    alteredArmor.AlterFrom(origArmor);
                }
                else if (alteredItem is BaseClothing)
                {
                    var alteredClothing = alteredItem as BaseClothing;

                    if (origItem is BaseQuiver)
                    {
                        var origQuiver = origItem as BaseQuiver;
                        alteredClothing.AlterFrom(origQuiver);
                    }
                    else if (origItem is BaseClothing)
                    {
                        var origClothing = origItem as BaseClothing;
                        alteredClothing.AlterFrom(origClothing);
                    }
                }
            }