Exemple #1
0
        private string getSortFieldValueStr(PlayerSquad squad, string phase) {
            string sort_method = getStringVarValue(phase);

            if (sort_method.CompareTo("kdr_asc_round") == 0 || sort_method.CompareTo("kdr_desc_round") == 0)
                return "kdr_round: " + Math.Round(squad.getRoundKdr(), 2);
            else if (sort_method.CompareTo("score_asc_round") == 0 || sort_method.CompareTo("score_desc_round") == 0)
                return "score_round: " + Math.Round(squad.getRoundScore(), 2);
            else if (sort_method.CompareTo("spm_asc_round") == 0 || sort_method.CompareTo("spm_desc_round") == 0)
                return "spm_round: " + Math.Round(squad.getRoundSpm(), 2);
            else if (sort_method.CompareTo("kpm_asc_round") == 0 || sort_method.CompareTo("kpm_desc_round") == 0)
                return "kpm_round: " + Math.Round(squad.getRoundKpm(), 2);
            else if (sort_method.CompareTo("time_asc_round") == 0 || sort_method.CompareTo("time_desc_round") == 0)
                return "time_round: " + squad.getRoundTime();
            else if (sort_method.CompareTo("random_value") == 0 || sort_method.CompareTo("random_value") == 0)
                return "random_value: " + squad.getRandomValue();
            else if (sort_method.CompareTo("kdr_asc_online") == 0 || sort_method.CompareTo("kdr_desc_online") == 0)
                return "kdr_online: " + Math.Round(squad.getOnlineKdr(), 2);
            else if (sort_method.CompareTo("kpm_asc_online") == 0 || sort_method.CompareTo("kpm_desc_online") == 0)
                return "kpm_online: " + Math.Round(squad.getOnlineKpm(), 2);
            else if (sort_method.CompareTo("spm_asc_online") == 0 || sort_method.CompareTo("spm_desc_online") == 0)
                return "spm_online: " + Math.Round(squad.getOnlineSpm(), 2);
            else if (sort_method.CompareTo("kills_asc_online") == 0 || sort_method.CompareTo("kills_desc_online") == 0)
                return "kills_online: " + Math.Round(squad.getOnlineKills(), 2);
            else if (sort_method.CompareTo("deaths_asc_online") == 0 || sort_method.CompareTo("deaths_desc_online") == 0)
                return "deaths_online: " + Math.Round(squad.getOnlineDeaths(), 2);
            else if (sort_method.CompareTo("skill_asc_online") == 0 || sort_method.CompareTo("skill_desc_online") == 0)
                return "skill_online: " + Math.Round(squad.getOnlineSkill(), 2);
            else if (sort_method.CompareTo("quits_asc_online") == 0 || sort_method.CompareTo("quits_desc_online") == 0)
                return "quits_online: " + Math.Round(squad.getOnlineQuits(), 2);
            else if (sort_method.CompareTo("accuracy_asc_online") == 0 || sort_method.CompareTo("accuracy_desc_online") == 0)
                return "accuracy_online: " + Math.Round(squad.getOnlineAccuracy(), 2);
            else if (sort_method.CompareTo("score_asc_online") == 0 || sort_method.CompareTo("score_desc_online") == 0)
                return "score_online: " + Math.Round(squad.getOnlineScore(), 2);
            else if (sort_method.CompareTo("rank_asc_online") == 0 || sort_method.CompareTo("rank_desc_online") == 0)
                return "rank_online: " + Math.Round(squad.getOnlineRank(), 2);

            DebugWrite("^1^bWARNING^0^n: cannot find squad sort method for ^b" + sort_method + "^0", 1);
            return "";
        }
Exemple #2
0
 private int squad_kills_asc_online_cmp(PlayerSquad left, PlayerSquad right) {
     double lval = left.getOnlineKills();
     double rval = right.getOnlineKills();
     return lval.CompareTo(rval);
 }