public void LoadBalanceBox(DbStaticEffect input) { BuffStats = new List <BuffStat>(); var addme = new BuffStat(); if (input.HealthBonusPercent != 0) { addme = new BuffStat { Amount = input.HealthBonusPercent, Value = BalanceStatics.HealthBonusPercent__Value, NegativeModifier = BalanceStatics.HealthBonusPercent__NegativeModifier, NegativeCap = BalanceStatics.HealthBonusPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.ManaBonusPercent != 0) { addme = new BuffStat { Amount = input.ManaBonusPercent, Value = BalanceStatics.ManaBonusPercent__Value, NegativeModifier = BalanceStatics.ManaBonusPercent__NegativeModifier, NegativeCap = BalanceStatics.ManaBonusPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.ExtraSkillCriticalPercent != 0) { addme = new BuffStat { Amount = input.ExtraSkillCriticalPercent, Value = BalanceStatics.ExtraSkillCriticalPercent__Value, NegativeModifier = BalanceStatics.ExtraSkillCriticalPercent__NegativeModifier, NegativeCap = BalanceStatics.ExtraSkillCriticalPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.HealthRecoveryPerUpdate != 0) { addme = new BuffStat { Amount = input.HealthRecoveryPerUpdate, Value = BalanceStatics.HealthRecoveryPerUpdate__Value, NegativeModifier = BalanceStatics.HealthRecoveryPerUpdate__NegativeModifier, NegativeCap = BalanceStatics.HealthRecoveryPerUpdate__NegativeCap, }; this.BuffStats.Add(addme); } if (input.ManaRecoveryPerUpdate != 0) { addme = new BuffStat { Amount = input.ManaRecoveryPerUpdate, Value = BalanceStatics.ManaRecoveryPerUpdate__Value, NegativeModifier = BalanceStatics.ManaRecoveryPerUpdate__NegativeModifier, NegativeCap = BalanceStatics.ManaRecoveryPerUpdate__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SneakPercent != 0) { addme = new BuffStat { Amount = input.SneakPercent, Value = BalanceStatics.SneakPercent__Value, NegativeModifier = BalanceStatics.SneakPercent__NegativeModifier, NegativeCap = BalanceStatics.SneakPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.EvasionPercent != 0) { addme = new BuffStat { Amount = input.EvasionPercent, Value = BalanceStatics.EvasionPercent__Value, NegativeModifier = BalanceStatics.EvasionPercent__NegativeModifier, NegativeCap = BalanceStatics.EvasionPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.EvasionNegationPercent != 0) { addme = new BuffStat { Amount = input.EvasionNegationPercent, Value = BalanceStatics.EvasionNegationPercent__Value, NegativeModifier = BalanceStatics.EvasionNegationPercent__NegativeModifier, NegativeCap = BalanceStatics.EvasionNegationPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.MeditationExtraMana != 0) { addme = new BuffStat { Amount = input.MeditationExtraMana, Value = BalanceStatics.MeditationExtraMana__Value, NegativeModifier = BalanceStatics.MeditationExtraMana__NegativeModifier, NegativeCap = BalanceStatics.MeditationExtraMana__NegativeCap, }; this.BuffStats.Add(addme); } if (input.CleanseExtraHealth != 0) { addme = new BuffStat { Amount = input.CleanseExtraHealth, Value = BalanceStatics.CleanseExtraHealth__Value, NegativeModifier = BalanceStatics.CleanseExtraHealth__NegativeModifier, NegativeCap = BalanceStatics.CleanseExtraHealth__NegativeCap, }; this.BuffStats.Add(addme); } if (input.MoveActionPointDiscount != 0) { addme = new BuffStat { Amount = input.MoveActionPointDiscount, Value = BalanceStatics.MoveActionPointDiscount__Value, NegativeModifier = BalanceStatics.MoveActionPointDiscount__NegativeModifier, NegativeCap = BalanceStatics.MoveActionPointDiscount__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SpellExtraTFEnergyPercent != 0) { addme = new BuffStat { Amount = input.SpellExtraTFEnergyPercent, Value = BalanceStatics.SpellExtraTFEnergyPercent__Value, NegativeModifier = BalanceStatics.SpellExtraTFEnergyPercent__NegativeModifier, NegativeCap = BalanceStatics.SpellExtraTFEnergyPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SpellExtraHealthDamagePercent != 0) { addme = new BuffStat { Amount = input.SpellExtraHealthDamagePercent, Value = BalanceStatics.SpellExtraHealthDamagePercent__Value, NegativeModifier = BalanceStatics.SpellExtraHealthDamagePercent__NegativeModifier, NegativeCap = BalanceStatics.SpellExtraHealthDamagePercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.CleanseExtraTFEnergyRemovalPercent != 0) { addme = new BuffStat { Amount = input.CleanseExtraTFEnergyRemovalPercent, Value = BalanceStatics.CleanseExtraTFEnergyRemovalPercent__Value, NegativeModifier = BalanceStatics.CleanseExtraTFEnergyRemovalPercent__NegativeModifier, NegativeCap = BalanceStatics.CleanseExtraTFEnergyRemovalPercent__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SpellMisfireChanceReduction != 0) { addme = new BuffStat { Amount = input.SpellMisfireChanceReduction, Value = BalanceStatics.SpellMisfireChanceReduction__Value, NegativeModifier = BalanceStatics.SpellMisfireChanceReduction__NegativeModifier, NegativeCap = BalanceStatics.SpellMisfireChanceReduction__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SpellHealthDamageResistance != 0) { addme = new BuffStat { Amount = input.SpellHealthDamageResistance, Value = BalanceStatics.SpellHealthDamageResistance__Value, NegativeModifier = BalanceStatics.SpellHealthDamageResistance__NegativeModifier, NegativeCap = BalanceStatics.SpellHealthDamageResistance__NegativeCap, }; this.BuffStats.Add(addme); } if (input.SpellTFEnergyDamageResistance != 0) { addme = new BuffStat { Amount = input.SpellTFEnergyDamageResistance, Value = BalanceStatics.SpellTFEnergyDamageResistance__Value, NegativeModifier = BalanceStatics.SpellTFEnergyDamageResistance__NegativeModifier, NegativeCap = BalanceStatics.SpellTFEnergyDamageResistance__NegativeCap, }; this.BuffStats.Add(addme); } if (input.ExtraInventorySpace != 0) { addme = new BuffStat { Amount = input.ExtraInventorySpace, Value = BalanceStatics.ExtraInventorySpace__Value, NegativeModifier = BalanceStatics.ExtraInventorySpace__NegativeModifier, NegativeCap = BalanceStatics.ExtraInventorySpace__NegativeCap, }; this.BuffStats.Add(addme); } }
public void LoadBalanceBox(EffectContribution input) { BuffStats = new List <BuffStat>(); var addme = new BuffStat(); if (input.Discipline != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Discipline), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Perception != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Perception), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Charisma != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Charisma), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Fortitude != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Fortitude), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Agility != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Agility), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Allure != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Allure), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Magicka != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Magicka), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Succour != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Succour), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } if (input.Luck != 0) { addme = new BuffStat { Amount = Convert.ToDecimal(input.Luck), Value = 1, NegativeModifier = 0, NegativeCap = -99999, }; this.BuffStats.Add(addme); } }