// Copy constructor public Commander(Commander commander) { name = commander.name; combatrating = commander.combatrating; traderating = commander.traderating; explorationrating = commander.explorationrating; cqcrating = CQCRating.FromRank(commander.cqcrating.rank); }
public CommanderRatingsEvent(DateTime timestamp, CombatRating combat, TradeRating trade, ExplorationRating exploration, CQCRating cqc, EmpireRating empire, FederationRating federation) : base(timestamp, NAME) { this.combat = combat; this.trade = trade; this.exploration = exploration; this.cqc = cqc; this.empire = empire; this.federation = federation; }
public static CQCRating FromRank(int from) { CQCRating result = RATINGS.FirstOrDefault(v => v.rank == from); if (result == null) { Logging.Report("Unknown CQC Rating rank " + from); } return(result); }
public static CQCRating FromName(string from) { CQCRating result = RATINGS.FirstOrDefault(v => v.name == from); if (result == null) { Logging.Report("Unknown CQC Rating name " + from); } return(result); }
public static CQCRating FromEDName(string from) { string tidiedFrom = from == null ? null : from.ToLowerInvariant(); CQCRating result = RATINGS.FirstOrDefault(v => v.edname.ToLowerInvariant() == tidiedFrom); if (result == null) { Logging.Report("Unknown CQC Rating ED name " + from); } return(result); }