Exemplo n.º 1
0
 public override bool Check(AuctionItem auctionItem)
 {
     if (auctionItem.price >= mMinPrice && auctionItem.price <= mMaxPrice)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
 public override bool Check(AuctionItem auctionItem)
 {
     if (auctionItem.objectInfo.ContainsKey((int)SPC.Color))
     {
         ObjectColor color = (ObjectColor)(byte)(int)auctionItem.objectInfo[(int)SPC.Color];
         if (color == mColor)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
 public override bool Check(AuctionItem auctionItem)
 {
     if (auctionItem.objectInfo.ContainsKey((int)SPC.Workshop))
     {
         Workshop workshop = (Workshop)(byte)(int)auctionItem.objectInfo[(int)SPC.Workshop];
         if (mWorkshop == workshop)
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 4
0
        private bool CheckSubFilters(ConcurrentBag <AuctionFilter> subFilters, AuctionItem item)
        {
            bool success = false;

            foreach (var f in subFilters)
            {
                if (f.Check(item))
                {
                    success = true;
                    break;
                }
            }
            return(success);
        }
Exemplo n.º 5
0
        public override bool Check(AuctionItem auctionItem)
        {
            Hashtable objectInfo = auctionItem.objectInfo;

            if (objectInfo != null)
            {
                if (objectInfo.ContainsKey((int)SPC.Level))
                {
                    int itemLevel = objectInfo.GetValue <int>((int)SPC.Level, 0);
                    if (itemLevel >= mMinLevel && itemLevel <= mMaxLevel)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Exemplo n.º 6
0
        private bool CheckFilters(AuctionItem item)
        {
            if (filters.Count == 0)
            {
                return(true);
            }

            bool check = true;

            foreach (var pair in filters)
            {
                if (!CheckSubFilters(pair.Value, item))
                {
                    check = false;
                    break;
                }
            }
            return(check);
        }
Exemplo n.º 7
0
        public override bool Check(AuctionItem auctionItem)
        {
            if (auctionItem.objectInfo.ContainsKey((int)SPC.PlacingType))
            {
                PlacingType placingType = (PlacingType)(int)auctionItem.objectInfo[(int)SPC.PlacingType];

                if (auctionItem.objectInfo.ContainsKey((int)SPC.ItemType))
                {
                    InventoryObjectType itemType = (InventoryObjectType)(byte)(int)auctionItem.objectInfo[(int)SPC.ItemType];
                    if (itemType == InventoryObjectType.Weapon && mAuctionObjectType == AuctionObjectType.Weapon)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Scheme && mAuctionObjectType == AuctionObjectType.Scheme)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Material && mAuctionObjectType == AuctionObjectType.Ore)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.Module && mAuctionObjectType == AuctionObjectType.Module)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.nebula_element && mAuctionObjectType == AuctionObjectType.nebula_element)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.craft_resource && mAuctionObjectType == AuctionObjectType.craft_resource)
                    {
                        return(true);
                    }
                    else if (itemType == InventoryObjectType.pet_scheme && mAuctionObjectType == AuctionObjectType.pet_scheme)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
Exemplo n.º 8
0
 public void WriteItem(AuctionItem item)
 {
     mApplication.DB.Auction.Save(item);
 }
Exemplo n.º 9
0
 public void Put(AuctionItem item)
 {
     mApplication.DB.Auction.Save(item);
 }
Exemplo n.º 10
0
 public abstract bool Check(AuctionItem objectInfo);