private string CombatantFormatSwitch(CombatantData Data, string VarName, string Extra) { int len = 0; switch (VarName) { case "name": return Data.Name; case "NAME": len = Int32.Parse(Extra); return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME3": len = 3; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME4": len = 4; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME5": len = 5; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME6": len = 6; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME7": len = 7; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME8": len = 8; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME9": len = 9; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME10": len = 10; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME11": len = 11; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME12": len = 12; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME13": len = 13; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME14": len = 14; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "NAME15": len = 15; return Data.Name.Length - len > 0 ? Data.Name.Remove(len, Data.Name.Length - len).Trim() : Data.Name; case "DURATION": return Data.Duration.TotalSeconds.ToString("0"); case "duration": return Data.DurationS; case "maxhit": return Data.GetMaxHit(true); case "MAXHIT": return Data.GetMaxHit(false); case "maxheal": return Data.GetMaxHeal(true, false); case "MAXHEAL": return Data.GetMaxHeal(false, false); case "maxhealward": return Data.GetMaxHeal(true, true); case "MAXHEALWARD": return Data.GetMaxHeal(false, true); case "damage": return Data.Damage.ToString(); case "damage-k": return (Data.Damage / 1000.0).ToString("0.00"); case "damage-m": return (Data.Damage / 1000000.0).ToString("0.00"); case "DAMAGE-k": return (Data.Damage / 1000.0).ToString("0"); case "DAMAGE-m": return (Data.Damage / 1000000.0).ToString("0"); case "healed": return Data.Healed.ToString(); case "swings": return Data.Swings.ToString(); case "hits": return Data.Hits.ToString(); case "crithits": return Data.CritHits.ToString(); case "critheals": return Data.CritHeals.ToString(); case "crithit%": return Data.CritDamPerc.ToString("0'%"); case "fcrithit%": return GetFilteredCritChance(Data).ToString("0'%"); case "critheal%": return Data.CritHealPerc.ToString("0'%"); case "heals": return Data.Heals.ToString(); case "cures": return Data.CureDispels.ToString(); case "misses": return Data.Misses.ToString(); case "hitfailed": return Data.Blocked.ToString(); case "TOHIT": return Data.ToHit.ToString("0"); case "DPS": return Data.DPS.ToString("0"); case "DPS-k": return (Data.DPS / 1000.0).ToString("0"); case "ENCDPS": return Data.EncDPS.ToString("0"); case "ENCDPS-k": return (Data.EncDPS / 1000.0).ToString("0"); case "ENCHPS": return Data.EncHPS.ToString("0"); case "ENCHPS-k": return (Data.EncHPS / 1000.0).ToString("0"); case "tohit": return Data.ToHit.ToString("F"); case "dps": return Data.DPS.ToString("F"); case "dps-k": return (Data.DPS / 1000.0).ToString("F"); case "encdps": return Data.EncDPS.ToString("F"); case "encdps-k": return (Data.EncDPS / 1000.0).ToString("F"); case "enchps": return Data.EncHPS.ToString("F"); case "enchps-k": return (Data.EncHPS / 1000.0).ToString("F"); case "healstaken": return Data.HealsTaken.ToString(); case "damagetaken": return Data.DamageTaken.ToString(); case "powerdrain": return Data.PowerDamage.ToString(); case "powerheal": return Data.PowerReplenish.ToString(); case "kills": return Data.Kills.ToString(); case "deaths": return Data.Deaths.ToString(); case "damage%": return Data.DamagePercent; case "healed%": return Data.HealedPercent; case "threatstr": return Data.GetThreatStr("Threat (Out)"); case "threatdelta": return Data.GetThreatDelta("Threat (Out)").ToString(); case "n": return "\n"; case "t": return "\t"; default: return VarName; } }