Exemple #1
0
        public override int CompareTo(object obj)
        {
            int result = 0;

            bool isRevers = BannerChecklistUI.instance.isSortRevers();

            switch (BannerChecklistUI.instance.GetSortMode())
            {
            case SortMode.ItemID:
                if (isRevers)
                {
                    result = item.netID > (obj as UIBannerSlot).item.netID ? -1 : 1;
                }
                else
                {
                    result = item.netID < (obj as UIBannerSlot).item.netID ? -1 : 1;
                }
                break;

            case SortMode.KillCount:
                if (isRevers)
                {
                    result = CheckBanner.BannerItemToKillCount(item).Max(x => x.Value) > CheckBanner.BannerItemToKillCount((obj as UIBannerSlot).item).Max(x => x.Value) ? -1 : 1;
                }
                else
                {
                    result = CheckBanner.BannerItemToKillCount(item).Max(x => x.Value) < CheckBanner.BannerItemToKillCount((obj as UIBannerSlot).item).Max(x => x.Value) ? -1 : 1;
                }
                break;
            }

            return(result);
        }
Exemple #2
0
        protected override void DrawSelf(SpriteBatch spriteBatch)
        {
            Dictionary <int, int> killCount = CheckBanner.BannerItemToKillCount(item);

            disable = killCount.Max(x => x.Value) <= 50;

            base.DrawSelf(spriteBatch);
            if (IsMouseHovering)
            {
                Tool.tooltip = $"{item.Name} [{string.Join(",", killCount.Select(x => x.Value))}]";
                BannerChecklist.instance.bannerChecklistTool.drawNPCList = CheckBanner.BannerItemToNPCs(item);
            }
        }