Пример #1
0
        public void LoadCurrentGearEnchantsBuffs(CharacterCalculationsBase currentCalculations)
        {
            List <ComparisonCalculationBase> itemCalculations = new List <ComparisonCalculationBase>();

            if (Character != null)
            {
                foreach (CharacterSlot slot in Enum.GetValues(typeof(CharacterSlot)))
                {
                    if (Character[slot] != null)
                    {
                        itemCalculations.Add(Calculations.GetItemCalculations(Character[slot], Character, slot));
                    }
                }

                foreach (ComparisonCalculationBase calc in Calculations.GetEnchantCalculations(ItemSlot.None, Character, currentCalculations, true))
                {
                    itemCalculations.Add(calc);
                }

                foreach (ComparisonCalculationBase calc in Calculations.GetBuffCalculations(Character, currentCalculations, "Current"))
                {
                    itemCalculations.Add(calc);
                }
            }

            comparisonGraph1.RoundValues      = true;
            comparisonGraph1.CustomRendered   = false;
            comparisonGraph1.ItemCalculations = itemCalculations.ToArray();
            comparisonGraph1.EquipSlot        = CharacterSlot.None;
            _characterSlot = CharacterSlot.None;
        }
Пример #2
0
 public void LoadEnchantsBySlot(Item.ItemSlot slot, CharacterCalculationsBase currentCalculations)
 {
     if (Items != null && Character != null)
     {
         comparisonGraph1.RoundValues      = true;
         comparisonGraph1.CustomRendered   = false;
         comparisonGraph1.ItemCalculations = Calculations.GetEnchantCalculations(slot, Character, currentCalculations).ToArray();
         comparisonGraph1.EquipSlot        = Character.CharacterSlot.None;
     }
 }
Пример #3
0
 private void LoadEnchantsBySlot(CharacterSlot slot)
 {
     if (_characterSlot != slot)
     {
         _characterSlot = slot;
         List <ComparisonCalculationBase> itemCalculations = null;
         if (Character != null && CurrentCalculations != null)
         {
             itemCalculations = Calculations.GetEnchantCalculations(Item.GetItemSlotByCharacterSlot(slot), Character, CurrentCalculations, false);
         }
         itemCalculations.Sort(new System.Comparison <ComparisonCalculationBase>(CompareItemCalculations));
         ItemCalculations = itemCalculations.ToArray();
     }
 }