コード例 #1
0
 public void addAuctions(List <Auction> list)
 {
     list.ForEach(addAuction);
     if (fullSellOfferList.Count > maxLen)
     {
         fullSellOfferList.RemoveRange(maxLen, fullSellOfferList.Count - maxLen); this.sellOfferFilter.filtersChanged = true;
     }
     sellOfferListFiltered.Sort(Auction.getComparison(sellSortMode));
 }
コード例 #2
0
        public List <Auction> getOwnOffers()
        {
            List <Auction> sellOwnOfferListFiltered = new List <Auction>(this.fullOWNOfferList);

            /*foreach (Auction x in this.fullOfferList)
             * {
             *  //if (x.message.Split(';')[4] == App.MyProfile.ProfileInfo.id.ToString()) sellOwnOfferListFiltered.Add(x);
             *
             * }*/

            sellOwnOfferListFiltered.Sort(Auction.getComparison(AuctionHouse.SortMode.CARD));

            return(new List <Auction>(sellOwnOfferListFiltered));
        }
コード例 #3
0
        public List <Auction> getCreateOffers()
        {
            if (this.helpf.playerstoreAllCardsChanged)
            {
                this.updateCardFilter();
            }
            if (createCardsFilter.filtersChanged)
            {
                //sellOfferListFiltered = new List<Auction> (fullSellOfferList);
                createOfferListFiltered.Clear();
                //createOfferListFiltered.AddRange(this.helpf.allOwnTradeableAuctions);
                foreach (Auction c in this.helpf.allOwnTradeableAuctions)
                {
                    bool found = false;
                    foreach (Auction a in this.addAuctionList)
                    {
                        if (a.card.id == c.card.id)
                        {
                            found = true;
                            break;
                        }
                    }
                    if (found)
                    {
                        continue;
                    }
                    createOfferListFiltered.Add(c);
                }
                foreach (Auction c in this.createOfferListFiltered)
                {
                    int index = helpf.cardidToArrayIndex(c.card.getType());
                    if (index >= 1)
                    {
                        c.setPrice(prcs.getPrice(index, sttngs.wtbAHpriceType));
                    }
                    //if (c.price == 0) c.setPrice(1);


                    if (index >= 0)
                    {
                        c.setPrice(Prices.Instance.getPrice(index, ScrollsPostPriceType.BLACKMARKET));
                    }
                }
                createOfferListFiltered.RemoveAll(createCardsFilter.isFiltered);
                createCardsFilter.filtersChanged = false;
                createOfferListFiltered.Sort(Auction.getComparison(AuctionHouse.SortMode.PRICE_REVERSE)); //.CARD
            }
            return(new List <Auction>(createOfferListFiltered));
        }
コード例 #4
0
        public List <Auction> getOwnOffers()
        {
            List <Auction> sellOwnOfferListFiltered = new List <Auction>();

            foreach (Auction x in this.fullSellOfferList)
            {
                if (x.message.Split(';')[4] == App.MyProfile.ProfileInfo.id)
                {
                    sellOwnOfferListFiltered.Add(x);
                }
            }

            sellOwnOfferListFiltered.Sort(Auction.getComparison(sellSortMode));

            return(new List <Auction>(sellOwnOfferListFiltered));
        }
コード例 #5
0
ファイル: AuctionHouse.cs プロジェクト: noHero123/auction.mod
        public List <Auction> getSellOffers()
        {
            newSellOffers = false;
            if (this.helpf.auctionHouseAllCardsChanged)
            {
                this.updateCardFilter();
            }
            if (sellOfferFilter.filtersChanged || this.sellSortMode != this.sellSortModeCopy)
            {
                //sellOfferListFiltered = new List<Auction> (fullSellOfferList);
                sellOfferListFiltered.Clear(); sellOfferListFiltered.AddRange(fullSellOfferList);
                sellOfferListFiltered.RemoveAll(sellOfferFilter.isFiltered);
                sellOfferFilter.filtersChanged = false;
                this.sellSortModeCopy          = this.sellSortMode;
                sellOfferListFiltered.Sort(Auction.getComparison(sellSortMode));
                sellOfferListFiltered.RemoveAll(spamFilter.isFilteredBySpamFilter);
            }

            return(new List <Auction>(sellOfferListFiltered));
        }
コード例 #6
0
ファイル: AuctionHouse.cs プロジェクト: noHero123/auction.mod
        public List <Auction> getBuyOffers()
        {
            newBuyOffers = false;
            if (this.helpf.auctionHouseAllCardsChanged)
            {
                this.updateCardFilter();
            }
            if (buyOfferFilter.filtersChanged || this.buySortMode != this.buySortModeCopy)
            {
                buyOfferListFiltered = new List <Auction> (fullBuyOfferList);// is even refiltered if sortmode changed, so order issnt changed at sort-change
                buyOfferListFiltered.RemoveAll(buyOfferFilter.isFiltered);
                buyOfferFilter.filtersChanged = false;

                this.buySortModeCopy = this.buySortMode;
                buyOfferListFiltered.Sort(Auction.getComparison(buySortMode));
                buyOfferListFiltered.RemoveAll(spamFilter.isFilteredBySpamFilter);
            }

            return(new List <Auction>(buyOfferListFiltered));
        }