Beispiel #1
0
        public static Dictionary <Attribute, short> GetIncreaseAttributes(this Item equipmentItem, short level, float rate)
        {
            var result = new Dictionary <Attribute, short>();

            if (equipmentItem != null &&
                equipmentItem.IsEquipment())
            {
                result = GameDataHelpers.MakeAttributeAmountsDictionary(equipmentItem.increaseAttributes, result, level, rate);
            }
            return(result);
        }
Beispiel #2
0
        protected override void UpdateData()
        {
            if (uiTextDuration != null)
            {
                var duration = Buff.GetDuration(Level);
                uiTextDuration.gameObject.SetActive(duration != 0);
                uiTextDuration.text = string.Format(durationFormat, duration.ToString("N0"));
            }

            if (uiTextRecoveryHp != null)
            {
                var recoveryHp = Buff.GetRecoveryHp(Level);
                uiTextRecoveryHp.gameObject.SetActive(recoveryHp != 0);
                uiTextRecoveryHp.text = string.Format(recoveryHpFormat, recoveryHp.ToString("N0"));
            }

            if (uiTextRecoveryMp != null)
            {
                var recoveryMp = Buff.GetRecoveryMp(Level);
                uiTextRecoveryMp.gameObject.SetActive(recoveryMp != 0);
                uiTextRecoveryMp.text = string.Format(recoveryMpFormat, recoveryMp.ToString("N0"));
            }

            if (uiTextRecoveryStamina != null)
            {
                var recoveryStamina = Buff.GetRecoveryStamina(Level);
                uiTextRecoveryStamina.gameObject.SetActive(recoveryStamina != 0);
                uiTextRecoveryStamina.text = string.Format(recoveryStaminaFormat, recoveryStamina.ToString("N0"));
            }

            if (uiTextRecoveryFood != null)
            {
                var recoveryFood = Buff.GetRecoveryFood(Level);
                uiTextRecoveryFood.gameObject.SetActive(recoveryFood != 0);
                uiTextRecoveryFood.text = string.Format(recoveryFoodFormat, recoveryFood.ToString("N0"));
            }

            if (uiTextRecoveryWater != null)
            {
                var recoveryWater = Buff.GetRecoveryWater(Level);
                uiTextRecoveryWater.gameObject.SetActive(recoveryWater != 0);
                uiTextRecoveryWater.text = string.Format(recoveryWaterFormat, recoveryWater.ToString("N0"));
            }

            if (uiBuffStats != null)
            {
                uiBuffStats.Data = Buff.GetIncreaseStats(Level);
            }

            if (uiBuffAttributes != null)
            {
                uiBuffAttributes.Data = GameDataHelpers.MakeAttributeAmountsDictionary(Buff.increaseAttributes, new Dictionary <Attribute, short>(), Level, 1f);
            }

            if (uiBuffResistances != null)
            {
                uiBuffResistances.Data = GameDataHelpers.MakeResistanceAmountsDictionary(Buff.increaseResistances, new Dictionary <DamageElement, float>(), Level, 1f);
            }

            if (uiBuffDamages != null)
            {
                uiBuffDamages.Data = GameDataHelpers.MakeDamageAmountsDictionary(Buff.increaseDamages, new Dictionary <DamageElement, MinMaxFloat>(), Level, 1f);
            }
        }
Beispiel #3
0
 public static Dictionary <Attribute, short> GetIncreaseAttributes(this Buff buff, short level)
 {
     return(GameDataHelpers.MakeAttributeAmountsDictionary(buff.increaseAttributes, new Dictionary <Attribute, short>(), level, 1f));
 }
Beispiel #4
0
 public Dictionary <Attribute, short> GetCharacterAttributes(short level)
 {
     return(GameDataHelpers.MakeAttributeAmountsDictionary(attributes, new Dictionary <Attribute, short>(), level, 1f));
 }