Exemple #1
0
            private bool IsAStatsCardINeed(IBestiaryInfoElement element, int gameMode)
            {
                NPCStatsReportInfoElement nPCStatsReportInfoElement = element as NPCStatsReportInfoElement;

                if (nPCStatsReportInfoElement == null)
                {
                    return(false);
                }
                if (nPCStatsReportInfoElement.GameMode != gameMode)
                {
                    return(false);
                }
                return(true);
            }
Exemple #2
0
            public int Compare(BestiaryEntry x, BestiaryEntry y)
            {
                NPCStatsReportInfoElement cardX = x.Info.FirstOrDefault <IBestiaryInfoElement>((Func <IBestiaryInfoElement, bool>)(element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement;
                NPCStatsReportInfoElement cardY = y.Info.FirstOrDefault <IBestiaryInfoElement>((Func <IBestiaryInfoElement, bool>)(element => this.IsAStatsCardINeed(element, Main.GameMode))) as NPCStatsReportInfoElement;

                if (cardX == null && cardY != null)
                {
                    return(1);
                }
                if (cardY == null && cardX != null)
                {
                    return(-1);
                }
                return(cardX == null || cardY == null ? 0 : this.Compare(cardX, cardY));
            }
Exemple #3
0
            public int Compare(BestiaryEntry x, BestiaryEntry y)
            {
                NPCStatsReportInfoElement nPCStatsReportInfoElement  = x.Info.FirstOrDefault((IBestiaryInfoElement element) => IsAStatsCardINeed(element, Main.GameMode)) as NPCStatsReportInfoElement;
                NPCStatsReportInfoElement nPCStatsReportInfoElement2 = y.Info.FirstOrDefault((IBestiaryInfoElement element) => IsAStatsCardINeed(element, Main.GameMode)) as NPCStatsReportInfoElement;

                if (nPCStatsReportInfoElement == null && nPCStatsReportInfoElement2 != null)
                {
                    return(1);
                }
                if (nPCStatsReportInfoElement2 == null && nPCStatsReportInfoElement != null)
                {
                    return(-1);
                }
                if (nPCStatsReportInfoElement == null || nPCStatsReportInfoElement2 == null)
                {
                    return(0);
                }
                return(Compare(nPCStatsReportInfoElement, nPCStatsReportInfoElement2));
            }
Exemple #4
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.LifeMax.CompareTo(cardX.LifeMax));
 }
Exemple #5
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.MonetaryValue.CompareTo(cardX.MonetaryValue));
 }
Exemple #6
0
 public override int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY)
 {
     return(cardY.Defense.CompareTo(cardX.Defense));
 }
Exemple #7
0
 public abstract int Compare(NPCStatsReportInfoElement cardX, NPCStatsReportInfoElement cardY);