public static int SortPlayers(VariableClump a, VariableClump b)
        {
            int av = cfg.GetPartyOrderValue(a.GetValue("jobid"));
            int bv = cfg.GetPartyOrderValue(b.GetValue("jobid"));

            if (av < bv)
            {
                //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") < " + b.GetValue("name") + " (" + bv + ")");
                return(-1);
            }
            if (av > bv)
            {
                //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") > " + b.GetValue("name") + " (" + bv + ")");
                return(1);
            }
            //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") -(" + a.GetValue("name").CompareTo(b.GetValue("name")) + ")- " + b.GetValue("name") + " (" + bv + ")");
            return(a.GetValue("name").CompareTo(b.GetValue("name")));
        }
示例#2
0
        public static int SortPlayers(VariableClump a, VariableClump b)
        {
            int av = cfg.GetPartyOrderValue(a.GetValue("jobid"));
            int bv = cfg.GetPartyOrderValue(b.GetValue("jobid"));

            if (av < bv)
            {
                //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") < " + b.GetValue("name") + " (" + bv + ")");
                return(-1);
            }
            if (av > bv)
            {
                //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") > " + b.GetValue("name") + " (" + bv + ")");
                return(1);
            }
            //System.Diagnostics.Debug.WriteLine(a.GetValue("name") + " (" + av + ") -(" + a.GetValue("name").CompareTo(b.GetValue("name")) + ")- " + b.GetValue("name") + " (" + bv + ")");
            // https://github.com/paissaheavyindustries/Triggernometry/issues/9
            return(b.GetValue("id").CompareTo(a.GetValue("id")));
        }