Esempio n. 1
0
        public override void SerializeStats(ItemStats stats, DM_ItemStats holder)
        {
            base.SerializeStats(stats, holder);

            var template = holder as DM_WeaponStats;

            var wStats = stats as WeaponStats;

            if (wStats.Attacks != null && wStats.Attacks.Length == 5)
            {
                var weapon = stats.GetComponent <Weapon>();
                CheckAttackDataMultipliers(weapon, wStats.Attacks);
            }

            template.Attacks     = wStats.Attacks;
            template.AttackSpeed = wStats.AttackSpeed;
            template.Impact      = wStats.Impact;
            template.StamCost    = wStats.StamCost;

            template.BaseDamage = Damages.ParseDamageList(wStats.BaseDamage);
        }