public double GetStat(EArmorStat stat) { switch (stat) { case (EArmorStat.AP_Mod): { return(this._model.Data.APMod); } case (EArmorStat.Block_Mod): { return(this._model.Data.BlockMod); } case (EArmorStat.Damage_Mod): { return(this._model.Data.DamageMod); } case (EArmorStat.Dodge_Mod): { return(this._model.Data.DodgeMod); } case (EArmorStat.Durability): { return(this._model.Data.Durability); } case (EArmorStat.Fatigue_Mod): { return(this._model.Data.FatigueMod); } case (EArmorStat.Flat_Damage_Ignore): { return(this._model.Data.FlatDamageIgnore); } case (EArmorStat.Initative_Mod): { return(this._model.Data.InitiativeMod); } case (EArmorStat.Parry_Mod): { return(this._model.Data.ParryMod); } case (EArmorStat.Stamina_Mod): { return(this._model.Data.StaminaMod); } case (EArmorStat.Value): { return(this._model.Data.Value); } default: return(-1); } }
private void HandleStatsFromFile(string name, EArmorStat x, double v, EEquipmentTier tier) { var stats = ArmorParamTable.Instance; var key = name + "_" + tier.ToString(); switch (x) { case (EArmorStat.AP_Mod): { stats.Table[key].APMod = v; } break; case (EArmorStat.Block_Mod): { stats.Table[key].BlockMod = v; } break; case (EArmorStat.Flat_Damage_Ignore): { stats.Table[key].DamageIgnore = v; } break; case (EArmorStat.Damage_Mod): { stats.Table[key].DamageMod = v; } break; case (EArmorStat.Dodge_Mod): { stats.Table[key].DodgeMod = v; } break; case (EArmorStat.Durability): { stats.Table[key].Durability = (int)v; } break; case (EArmorStat.Fatigue_Mod): { stats.Table[key].FatigueCost = v; } break; case (EArmorStat.Initative_Mod): { stats.Table[key].InitativeMod = v; } break; case (EArmorStat.Parry_Mod): { stats.Table[key].ParryMod = v; } break; case (EArmorStat.Stamina_Mod): { stats.Table[key].StaminaMod = v; } break; case (EArmorStat.Value): { stats.Table[key].Value = v; } break; } }
private void HandleIndex(string name, string value, ref EArmorStat type) { if (EnumUtil <EArmorStat> .TryGetEnumValue(name, ref type)) { this._vulns.Table.Add(type, double.Parse(value)); } }