Beispiel #1
0
        public Dictionary <string, int> GetSkillTotals(bool refresh = false)
        {
            if (_SkillTotals == null || refresh)
            {
                var totals = new Dictionary <string, int>();

                var headTotals  = Head?.GetSkillTotals(refresh) ?? new Dictionary <string, int>();
                var torsoTotals = Torso?.GetSkillTotals(refresh) ?? new Dictionary <string, int>();
                var armTotals   = Arm?.GetSkillTotals(refresh) ?? new Dictionary <string, int>();
                var waistTotals = Waist?.GetSkillTotals(refresh) ?? new Dictionary <string, int>();
                var legTotals   = Leg?.GetSkillTotals(refresh) ?? new Dictionary <string, int>();

                var weaponTotals = _WeaponSlots?.GetSkillTotals() ?? new Dictionary <string, int>();
                var charmTotals  = Charm?.GetSkillTotals() ?? new Dictionary <string, int>();

                TryAddRange(totals, headTotals);
                TryAddRange(totals, torsoTotals);
                TryAddRange(totals, armTotals);
                TryAddRange(totals, waistTotals);
                TryAddRange(totals, legTotals);
                TryAddRange(totals, weaponTotals);
                TryAddRange(totals, charmTotals);

                _SkillTotals = totals;
            }

            return(_SkillTotals);
        }