Esempio n. 1
0
        //Will Not Work until MenuLength is restored and a resource parsing method restored.
        public bool TraverseMenu(String address)
        {
            GotoMenu(address);
            Thread.Sleep((int)CampahStatus.Instance.GlobalDelay);
            if (FFACEInstance.Instance.Menu.Selection == "Bid")
                return true;
            int max = AuctionHouse.MenuLength;

            for (int i = 1; i <= max; i++)
            {
                if (TraverseMenu(address + "," + i))
                {
                    int[] ids = ReadAHItems();
                    foreach (int id in ids)
                    {

                        var item = new AhItem(id, id.ToString(CultureInfo.InvariantCulture), false, address + "," + i);
                        if ((item = AuctionHouse.Add(item)) != null)
                        {
                            item.Stackable = true;
                        }
                    }
                    AuctionHouse.MenuIndex = 1;
                }
            }
            return false;
        }
Esempio n. 2
0
        //Will Not Work until MenuLength is restored and a resource parsing method restored.
        public bool TraverseMenu(String address)
        {
            GotoMenu(address);
            Thread.Sleep((int)CampahStatus.Instance.GlobalDelay);
            if (FFACEInstance.Instance.Menu.Selection == "Bid")
            {
                return(true);
            }
            int max = AuctionHouse.MenuLength;

            for (int i = 1; i <= max; i++)
            {
                if (TraverseMenu(address + "," + i))
                {
                    int[] ids = ReadAHItems();
                    foreach (int id in ids)
                    {
                        var item = new AhItem(id, id.ToString(CultureInfo.InvariantCulture), false, address + "," + i);
                        if ((item = AuctionHouse.Add(item)) != null)
                        {
                            item.Stackable = true;
                        }
                    }
                    AuctionHouse.MenuIndex = 1;
                }
            }
            return(false);
        }
Esempio n. 3
0
 public bool LoadBidList(string file)
 {
     try
     {
         if (!File.Exists(file))
         {
             return(false);
         }
         var xDoc = new XmlDocument();
         xDoc.Load(file);
         XmlNodeList items;
         items = xDoc.GetElementsByTagName("item");
         RunningData.Instance.BidList.Clear();
         foreach (XmlNode item in items)
         {
             int    minimum;
             int    maximum;
             int    increment;
             int    quantity;
             bool   stack;
             string name = item.Attributes["name"].Value;
             if (!int.TryParse(item.Attributes["minimum"].Value, out minimum))
             {
                 return(false);
             }
             if (!int.TryParse(item.Attributes["maximum"].Value, out maximum))
             {
                 return(false);
             }
             if (!int.TryParse(item.Attributes["increment"].Value, out increment))
             {
                 return(false);
             }
             if (!int.TryParse(item.Attributes["quantity"].Value, out quantity))
             {
                 return(false);
             }
             if (!bool.TryParse(item.Attributes["stack"].Value, out stack))
             {
                 return(false);
             }
             AhItem reqitem = AuctionHouse.GetItem(name);//items[name.ToLower()];
             if (reqitem == null)
             {
                 return(false);
             }
             RunningData.Instance.BidList.Add(new ItemRequest(minimum, maximum, increment, quantity, stack, reqitem));
         }
         CampahStatus.Instance.CurrentPath = file;
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Esempio n. 4
0
        public static AhItem Add(AhItem item)
        {
            if (Items.ContainsKey(item.Name))
            {
                return(Items[item.Name]);
            }

            Items.Add(item.Name, item);
            return(null);
        }
Esempio n. 5
0
 public ItemRequest(int min, int max, int inc, int qnty, bool stack, AhItem itemdata)
 {
     Minimum      = min;
     Maximum      = max;
     Increment    = inc;
     Quantity     = qnty;
     Stack        = stack;
     ItemData     = itemdata;
     _boughtCost  = 0;
     _boughtCount = 0;
 }
Esempio n. 6
0
        public static AhItem Add(AhItem item)
        {
            if (Items.ContainsKey(item.Name))
            {
                return Items[item.Name];
            }

            Items.Add(item.Name, item);
            return null;
        }
Esempio n. 7
0
 protected bool Equals(AhItem other)
 {
     return ID == other.ID;
 }
Esempio n. 8
0
 protected bool Equals(AhItem other)
 {
     return(ID == other.ID);
 }