public BuyItemFromAhAction() {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"] = new MetaProp("Amount", typeof(uint));
            Properties["ItemListType"] = new MetaProp("ItemListType", typeof(ItemType), new DisplayNameAttribute("Buy ..."));
            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            Properties["BidOnItem"] = new MetaProp("BidOnItem", typeof(bool), new DisplayNameAttribute("Bid on Item"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            ItemID = "";
            Amount = 1u;
            ItemListType = ItemType.Item;
            AutoFindAh = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            MaxBuyout = new PropertyBag.GoldEditor("100g0s0c");
            BidOnItem = false;
            BuyAdditively = true;

            Properties["AutoFindAh"].PropertyChanged += new EventHandler(AutoFindAHChanged);
            Properties["ItemListType"].PropertyChanged += new EventHandler(BuyItemFromAhAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["Amount"].Show = true;
            Properties["Location"].Show = false;
        }
        public BuyItemFromAhAction()
        {
            Properties["ItemID"]    = new MetaProp("ItemID", typeof(string));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                                                   new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty <int>),
                                                new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["ItemListType"]  = new MetaProp("ItemListType", typeof(ItemType), new DisplayNameAttribute("Buy ..."));
            Properties["AutoFindAh"]    = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            Properties["BidOnItem"] = new MetaProp("BidOnItem", typeof(bool), new DisplayNameAttribute("Bid on Item"));
            Properties["Location"]  = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            ItemID = "";
            Amount = new DynamicProperty <int>(this, "1");
            RegisterDynamicProperty("Amount");
            ItemListType  = ItemType.Item;
            AutoFindAh    = true;
            _loc          = WoWPoint.Zero;
            Location      = _loc.ToInvariantString();
            MaxBuyout     = new PropertyBag.GoldEditor("100g0s0c");
            BidOnItem     = false;
            BuyAdditively = true;

            Properties["AutoFindAh"].PropertyChanged   += AutoFindAHChanged;
            Properties["ItemListType"].PropertyChanged += BuyItemFromAhActionPropertyChanged;
            Properties["Location"].PropertyChanged     += LocationChanged;
            Properties["Amount"].Show   = true;
            Properties["Location"].Show = false;
        }
Esempio n. 3
0
        public BuyItemAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint),
                                                  new EditorAttribute(typeof(PropertyBag.EntryEditor),
                                                                      typeof(UITypeEditor)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Count"]  = new MetaProp("Count", typeof(DynamicProperty <int>),
                                                new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["BuyItemType"] = new MetaProp("BuyItemType", typeof(BuyItemActionType),
                                                     new DisplayNameAttribute("Buy"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool),
                                                       new DisplayNameAttribute("Buy Additively"));
            ItemID = "";
            Count  = new DynamicProperty <int>(this, "0"); // dynamic expression
            RegisterDynamicProperty("Count");
            BuyItemType   = BuyItemActionType.Material;
            _loc          = WoWPoint.Zero;
            Location      = _loc.ToInvariantString();
            NpcEntry      = 0u;
            BuyAdditively = true;

            Properties["ItemID"].Show                  = false;
            Properties["Count"].Show                   = false;
            Properties["BuyAdditively"].Show           = false;
            Properties["Location"].PropertyChanged    += LocationChanged;
            Properties["BuyItemType"].PropertyChanged += BuyItemActionPropertyChanged;
        }
Esempio n. 4
0
        public MoveToAction()
        {
            Properties["Entry"] = new MetaProp("Entry", typeof(uint),
                                               new EditorAttribute(typeof(PropertyBag.EntryEditor),
                                                                   typeof(UITypeEditor)),
                                               new DisplayNameAttribute(Pb.Strings["Action_Common_Entry"]));

            Properties["Location"] = new MetaProp("Location",
                                                  typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["MoveType"] = new MetaProp("MoveType", typeof(MoveToType),
                                                  new DisplayNameAttribute(Pb.Strings["Action_MoveToAction_MoveToType"]));

            Properties["Pathing"] = new MetaProp("Pathing", typeof(NavigationType),
                                                 new DisplayNameAttribute(Pb.Strings["Action_Common_Use"]));

            Entry    = 0u;
            _loc     = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            MoveType = MoveToType.Location;
            Pathing  = NavigationType.Navigator;

            Properties["Entry"].Show = false;
            Properties["MoveType"].PropertyChanged += MoveToActionPropertyChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
        }
Esempio n. 5
0
        public override void ReadXml(XmlReader reader)
        {
            uint num;

            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }
            uint.TryParse(reader["Count"], out num);
            Count        = num;
            SellItemType = (SellItemActionType)Enum.Parse(typeof(SellItemActionType), reader["SellItemType"]);
            if (reader.MoveToAttribute("NpcEntry"))
            {
                uint.TryParse(reader["NpcEntry"], out num);
                NpcEntry = num;
            }
            if (reader.MoveToAttribute("X"))
            {
                float x, y, z;
                x        = reader["X"].ToSingle();
                y        = reader["Y"].ToSingle();
                z        = reader["Z"].ToSingle();
                loc      = new WoWPoint(x, y, z);
                Location = loc.ToInvariantString();
            }
            reader.ReadStartElement();
        }
        public GetItemfromBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof(int));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));

            Properties["MinFreeBagSlots"]     = new MetaProp("MinFreeBagSlots", typeof(uint), new DisplayNameAttribute("Min Free Bagslots"));
            Properties["GetItemfromBankType"] = new MetaProp("GetItemfromBankType", typeof(BankWithdrawlItemType), new DisplayNameAttribute("Items to Withdraw"));
            Properties["Bank"]               = new MetaProp("Bank", typeof(BankType));
            Properties["AutoFindBank"]       = new MetaProp("AutoFindBank", typeof(bool), new DisplayNameAttribute("Auto find Bank"));
            Properties["Location"]           = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"]           = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["WithdrawAdditively"] = new MetaProp("WithdrawAdditively", typeof(bool), new DisplayNameAttribute("Withdraw Additively"));

            Amount              = 1;
            ItemID              = "";
            MinFreeBagSlots     = 2u;
            GetItemfromBankType = BankWithdrawlItemType.SpecificItem;
            Bank               = BankType.Personal;
            AutoFindBank       = true;
            loc                = WoWPoint.Zero;
            Location           = loc.ToInvariantString();
            NpcEntry           = 0u;
            WithdrawAdditively = true;

            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["AutoFindBank"].PropertyChanged        += new EventHandler(AutoFindBankChanged);
            Properties["GetItemfromBankType"].PropertyChanged += new EventHandler(GetItemfromBankAction_PropertyChanged);
            Properties["Location"].PropertyChanged            += new EventHandler(LocationChanged);
        }
Esempio n. 7
0
        public GetMailAction()
        {
            //CheckNewMail
            Properties["ItemID"] = new MetaProp(
                "ItemID",
                typeof(string),
                new DisplayNameAttribute(Strings["Action_Common_ItemEntries"]));

            Properties["MinFreeBagSlots"] = new MetaProp(
                "MinFreeBagSlots",
                typeof(int),
                new DisplayNameAttribute(
                    Strings["Action_Common_MinFreeBagSlots"]));

            Properties["CheckNewMail"] = new MetaProp(
                "CheckNewMail",
                typeof(bool),
                new DisplayNameAttribute(
                    Strings["Action_GetMailAction_CheckNewMail"]));

            Properties["GetMailType"] = new MetaProp(
                "GetMailType",
                typeof(GetMailActionType),
                new DisplayNameAttribute(Strings["Action_GetMailAction_Name"]));

            Properties["AutoFindMailBox"] = new MetaProp(
                "AutoFindMailBox",
                typeof(bool),
                new DisplayNameAttribute(
                    Strings["Action_Common_AutoFindMailbox"]));

            Properties["Location"] = new MetaProp(
                "Location",
                typeof(string),
                new EditorAttribute(
                    typeof(LocationEditor),
                    typeof(UITypeEditor)),
                new DisplayNameAttribute(Strings["Action_Common_Location"]));

            Properties["MaxCODAmount"] = new MetaProp(
                "MaxCODAmount",
                typeof(GoldEditor),
                new TypeConverterAttribute(typeof(GoldEditorConverter)),
                new DisplayNameAttribute(Strings["Action_Common_MaxCODPrice"]));

            ItemID          = "";
            CheckNewMail    = true;
            MaxCODAmount    = new GoldEditor("0g0s0c");
            GetMailType     = GetMailActionType.AllItems;
            AutoFindMailBox = true;
            _loc            = WoWPoint.Zero;
            Location        = _loc.ToInvariantString();
            MinFreeBagSlots = 0;

            Properties["GetMailType"].PropertyChanged     += GetMailActionPropertyChanged;
            Properties["AutoFindMailBox"].PropertyChanged += AutoFindMailBoxChanged;
            Properties["ItemID"].Show               = false;
            Properties["Location"].Show             = false;
            Properties["Location"].PropertyChanged += LocationChanged;
        }
        public CancelAuctionAction()
        {
            Properties["ItemID"]      = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute("Item ID List"));
            Properties["AutoFindAh"]  = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["Location"]    = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"]    = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["MinBuyout"]   = new MetaProp("MinBuyout", typeof(PropertyBag.GoldEditor),
                                                     new DisplayNameAttribute("Min Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));

            ItemID      = "0";
            AutoFindAh  = true;
            _loc        = WoWPoint.Zero;
            Location    = _loc.ToInvariantString();
            UseCategory = false;
            Category    = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            MinBuyout   = new PropertyBag.GoldEditor("0g0s0c");

            Properties["AutoFindAh"].PropertyChanged  += AutoFindAHChanged;
            Properties["Location"].PropertyChanged    += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged    += CategoryChanged;

            Properties["Category"].Show    = false;
            Properties["SubCategory"].Show = false;
            Properties["Location"].Show    = false;
        }
        public MailItemAction()
        {
            Properties["ItemID"]          = new MetaProp("ItemID", typeof(string));
            Properties["AutoFindMailBox"] = new MetaProp("AutoFindMailBox", typeof(bool), new DisplayNameAttribute("Automatically find Mailbox"));
            Properties["Location"]        = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["UseCategory"]     = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"]        = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"]     = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["Amount"]          = new MetaProp("Amount", typeof(DynamicProperty <int>),
                                                         new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));

            ItemID          = "";
            AutoFindMailBox = true;
            _loc            = WoWPoint.Zero;
            Location        = _loc.ToInvariantString();
            UseCategory     = true;
            Category        = WoWItemClass.TradeGoods;
            SubCategory     = WoWItemTradeGoodsClass.None;
            Amount          = new DynamicProperty <int>(this, "0");
            RegisterDynamicProperty("Amount");

            Properties["Location"].Show = false;
            Properties["ItemID"].Show   = false;
            Properties["AutoFindMailBox"].PropertyChanged += AutoFindMailBoxChanged;
            Properties["Location"].PropertyChanged        += LocationChanged;
            Properties["UseCategory"].PropertyChanged     += UseCategoryChanged;
            Properties["Category"].PropertyChanged        += CategoryChanged;
        }
Esempio n. 10
0
        public MoveToAction()
        {
            Properties["Entry"] = new MetaProp("Entry", typeof (uint),
                                               new EditorAttribute(typeof (PropertyBag.EntryEditor),
                                                                   typeof (UITypeEditor)),
                                               new DisplayNameAttribute(Pb.Strings["Action_Common_Entry"]));

            Properties["Location"] = new MetaProp("Location",
                                                  typeof (string),
                                                  new EditorAttribute(typeof (PropertyBag.LocationEditor),
                                                                      typeof (UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["MoveType"] = new MetaProp("MoveType", typeof (MoveToType),
                                                  new DisplayNameAttribute(Pb.Strings["Action_MoveToAction_MoveToType"]));

            Properties["Pathing"] = new MetaProp("Pathing", typeof (NavigationType),
                                                 new DisplayNameAttribute(Pb.Strings["Action_Common_Use"]));

            Entry = 0u;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            MoveType = MoveToType.Location;
            Pathing = NavigationType.Navigator;

            Properties["Entry"].Show = false;
            Properties["MoveType"].PropertyChanged += MoveToActionPropertyChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
        }
        public CancelAuctionAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute("Item ID List"));
            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(PropertyBag.GoldEditor),
                new DisplayNameAttribute("Min Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));

            ItemID = "0";
            AutoFindAh = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            UseCategory = false;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            MinBuyout = new PropertyBag.GoldEditor("0g0s0c");

            Properties["AutoFindAh"].PropertyChanged += new EventHandler(AutoFindAHChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;

            Properties["Category"].Show = false;
            Properties["SubCategory"].Show = false;
            Properties["Location"].Show = false;
        }
Esempio n. 12
0
        public GetItemfromBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty <int>),
                                                new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));

            Properties["MinFreeBagSlots"]     = new MetaProp("MinFreeBagSlots", typeof(uint), new DisplayNameAttribute("Min Free Bagslots"));
            Properties["GetItemfromBankType"] = new MetaProp("GetItemfromBankType", typeof(BankWithdrawlItemType), new DisplayNameAttribute("Items to Withdraw"));
            Properties["Bank"]               = new MetaProp("Bank", typeof(BankType));
            Properties["AutoFindBank"]       = new MetaProp("AutoFindBank", typeof(bool), new DisplayNameAttribute("Auto find Bank"));
            Properties["Location"]           = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"]           = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["WithdrawAdditively"] = new MetaProp("WithdrawAdditively", typeof(bool), new DisplayNameAttribute("Withdraw Additively"));

            Amount = new DynamicProperty <int>(this, "1");
            RegisterDynamicProperty("Amount");
            ItemID              = "";
            MinFreeBagSlots     = 2u;
            GetItemfromBankType = BankWithdrawlItemType.SpecificItem;
            Bank               = BankType.Personal;
            AutoFindBank       = true;
            _loc               = WoWPoint.Zero;
            Location           = _loc.ToInvariantString();
            NpcEntry           = 0u;
            WithdrawAdditively = true;

            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["AutoFindBank"].PropertyChanged        += AutoFindBankChanged;
            Properties["GetItemfromBankType"].PropertyChanged += GetItemfromBankActionPropertyChanged;
            Properties["Location"].PropertyChanged            += LocationChanged;
        }
Esempio n. 13
0
        public BuyItemAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint),
                                                  new EditorAttribute(typeof(PropertyBag.EntryEditor),
                                                                      typeof(UITypeEditor)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Count"] = new MetaProp("Count", typeof(DynamicProperty<int>),
                                               new TypeConverterAttribute(typeof(DynamicProperty<int>.DynamivExpressionConverter)));
            Properties["BuyItemType"] = new MetaProp("BuyItemType", typeof(BuyItemActionType),
                                                     new DisplayNameAttribute("Buy"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool),
                                                       new DisplayNameAttribute("Buy Additively"));
            ItemID = "";
            Count = new DynamicProperty<int>(this, "0"); // dynamic expression
            RegisterDynamicProperty("Count");
            BuyItemType = BuyItemActionType.Material;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;
            BuyAdditively = true;

            Properties["ItemID"].Show = false;
            Properties["Count"].Show = false;
            Properties["BuyAdditively"].Show = false;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["BuyItemType"].PropertyChanged += BuyItemActionPropertyChanged;
        }
Esempio n. 14
0
        public BuyItemFromAhAction()
        {
            Properties["ItemID"]    = new MetaProp("ItemID", typeof(string));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                                                   new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"]        = new MetaProp("Amount", typeof(uint));
            Properties["ItemListType"]  = new MetaProp("ItemListType", typeof(ItemType), new DisplayNameAttribute("Buy ..."));
            Properties["AutoFindAh"]    = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            Properties["BidOnItem"] = new MetaProp("BidOnItem", typeof(bool), new DisplayNameAttribute("Bid on Item"));
            Properties["Location"]  = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            ItemID        = "";
            Amount        = 1u;
            ItemListType  = ItemType.Item;
            AutoFindAh    = true;
            loc           = WoWPoint.Zero;
            Location      = loc.ToInvariantString();
            MaxBuyout     = new PropertyBag.GoldEditor("100g0s0c");
            BidOnItem     = false;
            BuyAdditively = true;

            Properties["AutoFindAh"].PropertyChanged   += new EventHandler(AutoFindAHChanged);
            Properties["ItemListType"].PropertyChanged += new EventHandler(BuyItemFromAhAction_PropertyChanged);
            Properties["Location"].PropertyChanged     += new EventHandler(LocationChanged);
            Properties["Amount"].Show   = true;
            Properties["Location"].Show = false;
        }
Esempio n. 15
0
        public override void ReadXml(XmlReader reader)
        {
            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }
            bool autofind;

            bool.TryParse(reader["AutoFindMailBox"], out autofind);
            AutoFindMailBox = autofind;
            bool boolVal = false;

            if (reader.MoveToAttribute("UseCategory"))
            {
                bool.TryParse(reader["UseCategory"], out boolVal);
                UseCategory = boolVal;
            }
            if (reader.MoveToAttribute("Category"))
            {
                Category = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            }
            string subCatType = "";

            if (reader.MoveToAttribute("SubCategoryType"))
            {
                subCatType = reader["SubCategoryType"];
            }
            if (reader.MoveToAttribute("SubCategory") && !string.IsNullOrEmpty(subCatType))
            {
                Type t;
                if (subCatType != "SubCategoryType")
                {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                {
                    t = typeof(SubCategoryType);
                }
                object subVal = Activator.CreateInstance(t);
                subVal      = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
Esempio n. 16
0
        public FlyToAction()
        {
            Properties["Dismount"] = new MetaProp("Dismount", typeof(bool), new DisplayNameAttribute("Dismount on Arrival"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            Location = loc.ToInvariantString();
            Dismount = true;

            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
Esempio n. 17
0
        public TrainSkillAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            _loc     = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged += LocationChanged;
        }
Esempio n. 18
0
        public TrainSkillAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
Esempio n. 19
0
        public SellItemAction()
        {
            Properties["Location"] = new MetaProp(
                "Location",
                typeof(string),
                new EditorAttribute(
                    typeof(LocationEditor),
                    typeof(UITypeEditor)),
                new DisplayNameAttribute(Strings["Action_Common_Location"]));

            Properties["NpcEntry"] = new MetaProp(
                "NpcEntry",
                typeof(uint),
                new EditorAttribute(
                    typeof(EntryEditor),
                    typeof(UITypeEditor)),
                new DisplayNameAttribute(Strings["Action_Common_NpcEntry"]));

            Properties["ItemID"] = new MetaProp(
                "ItemID",
                typeof(string),
                new DisplayNameAttribute(Strings["Action_Common_ItemEntry"]));

            Properties["Count"] = new MetaProp(
                "Count",
                typeof(DynamicProperty <int>),
                new TypeConverterAttribute(
                    typeof(DynamicProperty <int> .DynamivExpressionConverter)),
                new DisplayNameAttribute(Strings["Action_Common_Count"]));

            Properties["SellItemType"] = new MetaProp(
                "SellItemType",
                typeof(SellItemActionType),
                new DisplayNameAttribute(
                    Strings["Action_SellItemAction_SellItemType"]));

            Properties["Sell"] = new MetaProp(
                "Sell",
                typeof(DepositWithdrawAmount),
                new DisplayNameAttribute(Strings["Action_Common_Sell"]));

            ItemID   = "";
            Count    = new DynamicProperty <int>("Count", this, "0");
            _loc     = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;
            Sell     = DepositWithdrawAmount.All;

            Properties["Location"].PropertyChanged     += LocationChanged;
            Properties["SellItemType"].Value            = SellItemActionType.Specific;
            Properties["SellItemType"].PropertyChanged += SellItemActionPropertyChanged;
            Properties["Sell"].PropertyChanged         += SellChanged;
        }
        public SellItemOnAhAction()
        {
            Properties["ItemID"]    = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute("Item ID List"));
            Properties["RunTime"]   = new MetaProp("RunTime", typeof(RunTimeType), new DisplayNameAttribute("Auction Duration"));
            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(PropertyBag.GoldEditor),
                                                   new DisplayNameAttribute("Min Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                                                   new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty <int>),
                                                new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["StackSize"]            = new MetaProp("StackSize", typeof(uint));
            Properties["IgnoreStackSizeBelow"] = new MetaProp("IgnoreStackSizeBelow", typeof(uint), new DisplayNameAttribute("Ignore StackSize Below"));
            Properties["AmountType"]           = new MetaProp("AmountType", typeof(AmountBasedType), new DisplayNameAttribute("Sell"));
            Properties["AutoFindAh"]           = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["Location"]             = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["BidPrecent"]           = new MetaProp("BidPrecent", typeof(float));
            Properties["UndercutPrecent"]      = new MetaProp("UndercutPrecent", typeof(double));
            Properties["UseCategory"]          = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"]             = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"]          = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["PostIfBelowMinBuyout"] = new MetaProp("PostIfBelowMinBuyout", typeof(bool), new DisplayNameAttribute("Post if Below MinBuyout"));

            ItemID    = "";
            MinBuyout = new PropertyBag.GoldEditor("0g10s0c");
            MaxBuyout = new PropertyBag.GoldEditor("100g0s0c");
            RunTime   = RunTimeType._24_Hours;
            Amount    = new DynamicProperty <int>(this, "10");
            RegisterDynamicProperty("Amount");
            StackSize            = 20u;
            IgnoreStackSizeBelow = 1u;
            AmountType           = AmountBasedType.Everything;
            AutoFindAh           = true;
            BidPrecent           = 95f;
            UndercutPrecent      = 0.1;
            _loc                 = WoWPoint.Zero;
            Location             = _loc.ToInvariantString();
            UseCategory          = true;
            Category             = WoWItemClass.TradeGoods;
            SubCategory          = WoWItemTradeGoodsClass.None;
            PostIfBelowMinBuyout = true;

            Properties["AutoFindAh"].PropertyChanged  += AutoFindAHChanged;
            Properties["AmountType"].PropertyChanged  += SellItemToAhActionPropertyChanged;
            Properties["Location"].PropertyChanged    += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged    += CategoryChanged;

            Properties["ItemID"].Show   = false;
            Properties["Amount"].Show   = false;
            Properties["Location"].Show = false;
        }
Esempio n. 21
0
        public CancelAuctionAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof (string),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_ItemEntries"]));

            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof (bool),
                                                    new DisplayNameAttribute(Pb.Strings["Action_Common_AutoFindAH"]));

            Properties["Location"] = new MetaProp("Location", typeof (string),
                                                  new EditorAttribute(typeof (PropertyBag.LocationEditor),
                                                                      typeof (UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["UseCategory"] = new MetaProp("UseCategory", typeof (bool),
                                                     new DisplayNameAttribute(Pb.Strings["Action_Common_UseCategory"]));

            Properties["Category"] = new MetaProp("Category", typeof (WoWItemClass),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_ItemCategory"]));

            Properties["SubCategory"] = new MetaProp("SubCategory", typeof (WoWItemTradeGoodsClass),
                                                     new DisplayNameAttribute(
                                                         Pb.Strings["Action_Common_ItemSubCategory"]));

            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof (PropertyBag.GoldEditor),
                                                   new TypeConverterAttribute(typeof (PropertyBag.GoldEditorConverter)),
                                                   new DisplayNameAttribute(Pb.Strings["Action_Common_MinBuyout"]));

            Properties["IgnoreStackSizeBelow"] = new MetaProp("IgnoreStackSizeBelow", typeof (uint),
                                                              new DisplayNameAttribute(
                                                                  Pb.Strings["Action_Common_IgnoreStackSizeBelow"]));

            ItemID = "0";
            AutoFindAh = true;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            UseCategory = false;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            MinBuyout = new PropertyBag.GoldEditor("0g0s0c");
            IgnoreStackSizeBelow = 1u;

            Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;

            Properties["Category"].Show = false;
            Properties["SubCategory"].Show = false;
            Properties["Location"].Show = false;
        }
Esempio n. 22
0
        public CancelAuctionAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string),
                                                new DisplayNameAttribute(Strings["Action_Common_ItemEntries"]));

            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool),
                                                    new DisplayNameAttribute(Strings["Action_Common_AutoFindAH"]));

            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(LocationEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Strings["Action_Common_Location"]));

            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool),
                                                     new DisplayNameAttribute(Strings["Action_Common_UseCategory"]));

            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass),
                                                  new DisplayNameAttribute(Strings["Action_Common_ItemCategory"]));

            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass),
                                                     new DisplayNameAttribute(
                                                         Strings["Action_Common_ItemSubCategory"]));

            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(GoldEditor),
                                                   new TypeConverterAttribute(typeof(GoldEditorConverter)),
                                                   new DisplayNameAttribute(Strings["Action_Common_MinBuyout"]));

            Properties["IgnoreStackSizeBelow"] = new MetaProp("IgnoreStackSizeBelow", typeof(uint),
                                                              new DisplayNameAttribute(
                                                                  Strings["Action_Common_IgnoreStackSizeBelow"]));

            ItemID               = "0";
            AutoFindAh           = true;
            _loc                 = WoWPoint.Zero;
            Location             = _loc.ToInvariantString();
            UseCategory          = false;
            Category             = WoWItemClass.TradeGoods;
            SubCategory          = WoWItemTradeGoodsClass.None;
            MinBuyout            = new GoldEditor("0g0s0c");
            IgnoreStackSizeBelow = 1u;

            Properties["AutoFindAh"].PropertyChanged  += AutoFindAHChanged;
            Properties["Location"].PropertyChanged    += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged    += CategoryChanged;

            Properties["Category"].Show    = false;
            Properties["SubCategory"].Show = false;
            Properties["Location"].Show    = false;
        }
Esempio n. 23
0
        public FlyToAction()
        {
            Properties["Dismount"] = new MetaProp("Dismount", typeof(bool),
                                                  new DisplayNameAttribute(Pb.Strings["Action_FlyToAction_Dismount"]));

            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Location = _loc.ToInvariantString();
            Dismount = true;

            Properties["Location"].PropertyChanged += LocationChanged;
        }
Esempio n. 24
0
        public override void ReadXml(XmlReader reader)
        {
            uint num;

            uint.TryParse(reader["NpcEntry"], out num);
            NpcEntry = num;
            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
Esempio n. 25
0
        public override void ReadXml(XmlReader reader)
        {
            bool dismount;

            bool.TryParse(reader["Dismount"], out dismount);
            Dismount = dismount;
            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
        public SellItemAction() {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Count"] = new MetaProp("Count", typeof(uint));
            Properties["SellItemType"] = new MetaProp("SellItemType", typeof(SellItemActionType), new DisplayNameAttribute("Sell Item Type"));

            ItemID = "";
            Count = 0u;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["SellItemType"].Value = SellItemActionType.Specific;
            Properties["SellItemType"].PropertyChanged += new EventHandler(SellItemAction_PropertyChanged);
        }
Esempio n. 27
0
        public MoveToAction()
        {
            Properties["Entry"] = new MetaProp("Entry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["MoveType"] = new MetaProp("MoveType", typeof(MoveToType), new DisplayNameAttribute("MoveTo Type"));
            Properties["Pathing"] = new MetaProp("Pathing", typeof(NavigationType), new DisplayNameAttribute("Use"));

            Entry = 0u;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            MoveType = MoveToType.Location;
            Pathing = NavigationType.Navigator;

            Properties["Entry"].Show = false;
            Properties["MoveType"].PropertyChanged += new EventHandler(MoveToAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
Esempio n. 28
0
        public MoveToAction()
        {
            Properties["Entry"]    = new MetaProp("Entry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["MoveType"] = new MetaProp("MoveType", typeof(MoveToType), new DisplayNameAttribute("MoveTo Type"));
            Properties["Pathing"]  = new MetaProp("Pathing", typeof(NavigationType), new DisplayNameAttribute("Use"));

            Entry    = 0u;
            loc      = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            MoveType = MoveToType.Location;
            Pathing  = NavigationType.Navigator;

            Properties["Entry"].Show = false;
            Properties["MoveType"].PropertyChanged += new EventHandler(MoveToAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
Esempio n. 29
0
        public TrainSkillAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint),
                                                  new EditorAttribute(typeof(PropertyBag.EntryEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_NpcEntry"]));

            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged += LocationChanged;
        }
Esempio n. 30
0
        public SellItemAction()
        {
            Properties["Location"]     = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"]     = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"]       = new MetaProp("ItemID", typeof(string));
            Properties["Count"]        = new MetaProp("Count", typeof(uint));
            Properties["SellItemType"] = new MetaProp("SellItemType", typeof(SellItemActionType), new DisplayNameAttribute("Sell Item Type"));

            ItemID   = "";
            Count    = 0u;
            loc      = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged     += new EventHandler(LocationChanged);
            Properties["SellItemType"].Value            = SellItemActionType.Specific;
            Properties["SellItemType"].PropertyChanged += new EventHandler(SellItemAction_PropertyChanged);
        }
Esempio n. 31
0
        public override void ReadXml(XmlReader reader)
        {
            uint val;

            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }

            MaxBuyout = new PropertyBag.GoldEditor(reader["MaxBuyout"]);
            uint.TryParse(reader["Amount"], out val);
            Amount       = val;
            ItemListType = (ItemType)Enum.Parse(typeof(ItemType), reader["ItemListType"]);
            bool boolVal;

            bool.TryParse(reader["AutoFindAh"], out boolVal);
            AutoFindAh = boolVal;

            if (reader.MoveToAttribute("BuyAdditively"))
            {
                bool.TryParse(reader["BuyAdditively"], out boolVal);
                BuyAdditively = boolVal;
            }

            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            if (reader.MoveToAttribute("BidOnItem"))
            {
                bool.TryParse(reader["BidOnItem"], out boolVal);
                BidOnItem = boolVal;
            }
            reader.ReadStartElement();
        }
        public override void ReadXml(XmlReader reader)
        {
            uint id;

            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }

            uint.TryParse(reader["Amount"], out id);
            Amount = (int)id;
            Bank   = (BankType)Enum.Parse(typeof(BankType), reader["Bank"]);
            GetItemfromBankType = (BankWithdrawlItemType)Enum.Parse(typeof(BankWithdrawlItemType), reader["GetItemfromBankType"]);
            uint.TryParse(reader["NpcEntry"], out id);
            NpcEntry = id;
            bool boolVal;

            bool.TryParse(reader["AutoFindBank"], out boolVal);
            AutoFindBank = boolVal;
            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            if (reader.MoveToAttribute("MinFreeBagSlots"))
            {
                uint.TryParse(reader["MinFreeBagSlots"], out id);
                MinFreeBagSlots = id;
            }
            if (reader.MoveToAttribute("WithdrawAdditively"))
            {
                bool.TryParse(reader["WithdrawAdditively"], out boolVal);
                WithdrawAdditively = boolVal;
            }
            reader.ReadStartElement();
        }
        public SellItemAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"]   = new MetaProp("ItemID", typeof(string));
            Properties["Count"]    = new MetaProp("Count", typeof(DynamicProperty <int>),
                                                  new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["SellItemType"] = new MetaProp("SellItemType", typeof(SellItemActionType), new DisplayNameAttribute("Sell Item Type"));

            ItemID = "";
            Count  = new DynamicProperty <int>(this, "0");
            RegisterDynamicProperty("Count");
            _loc     = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged     += LocationChanged;
            Properties["SellItemType"].Value            = SellItemActionType.Specific;
            Properties["SellItemType"].PropertyChanged += SellItemActionPropertyChanged;
        }
        public SellItemAction()
        {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Count"] = new MetaProp("Count", typeof(DynamicProperty<int>),
                new TypeConverterAttribute(typeof(DynamicProperty<int>.DynamivExpressionConverter)));
            Properties["SellItemType"] = new MetaProp("SellItemType", typeof(SellItemActionType), new DisplayNameAttribute("Sell Item Type"));

            ItemID = "";
            Count = new DynamicProperty<int>(this,"0");
            RegisterDynamicProperty("Count");
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;

            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["SellItemType"].Value = SellItemActionType.Specific;
            Properties["SellItemType"].PropertyChanged += SellItemActionPropertyChanged;
        }
Esempio n. 35
0
        public override void ReadXml(XmlReader reader)
        {
            MoveType = (MoveToType)Enum.Parse(typeof(MoveToType), reader["MoveType"]);
            if (reader.MoveToAttribute("Pathing"))
            {
                Pathing = (NavigationType)Enum.Parse(typeof(NavigationType), reader["Pathing"]);
            }
            uint num;

            uint.TryParse(reader["Entry"], out num);
            Entry = num;
            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
        public override void ReadXml(XmlReader reader)
        {
            ItemID    = reader["ItemID"];
            MinBuyout = new PropertyBag.GoldEditor(reader["MinBuyout"]);
            bool boolVal;

            bool.TryParse(reader["AutoFindAh"], out boolVal);
            AutoFindAh = boolVal;
            bool.TryParse(reader["UseCategory"], out boolVal);
            UseCategory = boolVal;
            Category    = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            string subCatType = "";

            subCatType = reader["SubCategoryType"];
            if (!string.IsNullOrEmpty(subCatType))
            {
                Type t;
                if (subCatType != "SubCategoryType")
                {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                {
                    t = typeof(SubCategoryType);
                }
                object subVal = Activator.CreateInstance(t);
                subVal      = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            float x, y, z;

            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
Esempio n. 37
0
        public BuyItemAction() {
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Count"] = new MetaProp("Count", typeof(uint));
            Properties["BuyItemType"] = new MetaProp("BuyItemType", typeof(BuyItemActionType), new DisplayNameAttribute("Buy"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            ItemID = "";
            Count = 0u;
            BuyItemType = BuyItemActionType.Material;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;
            BuyAdditively = true;

            Properties["ItemID"].Show = false;
            Properties["Count"].Show = false;
            Properties["BuyAdditively"].Show = false;
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["BuyItemType"].PropertyChanged += new EventHandler(BuyItemAction_PropertyChanged);
        }
        public PutItemInBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty <int>),
                                                new TypeConverterAttribute(typeof(DynamicProperty <int> .DynamivExpressionConverter)));
            Properties["ItemID"]       = new MetaProp("ItemID", typeof(string));
            Properties["Bank"]         = new MetaProp("Bank", typeof(BankType));
            Properties["AutoFindBank"] = new MetaProp("AutoFindBank", typeof(bool), new DisplayNameAttribute("Auto find Bank"));
            Properties["Location"]     = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"]     = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["GuildTab"]     = new MetaProp("GuildTab", typeof(uint));
            Properties["UseCategory"]  = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"]     = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"]  = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));

            Amount = new DynamicProperty <int>(this, "0");
            RegisterDynamicProperty("Amount");
            ItemID       = "";
            Bank         = BankType.Personal;
            AutoFindBank = true;
            _loc         = WoWPoint.Zero;
            Location     = _loc.ToInvariantString();
            NpcEntry     = 0u;
            GuildTab     = 0u;
            UseCategory  = true;
            Category     = WoWItemClass.TradeGoods;
            SubCategory  = WoWItemTradeGoodsClass.None;

            Properties["ItemID"].Show   = false;
            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["GuildTab"].Show = false;

            Properties["AutoFindBank"].PropertyChanged += AutoFindBankChanged;
            Properties["Bank"].PropertyChanged         += PutItemInBankActionPropertyChanged;
            Properties["Location"].PropertyChanged     += LocationChanged;
            Properties["UseCategory"].PropertyChanged  += UseCategoryChanged;
            Properties["Category"].PropertyChanged     += CategoryChanged;
        }
        public override void ReadXml(XmlReader reader)
        {
            uint val;

            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }
            if (reader.MoveToAttribute("CheckNewMail"))
            {
                bool boolVal;
                bool.TryParse(reader["CheckNewMail"], out boolVal);
                CheckNewMail = boolVal;
            }
            GetMailType = (GetMailActionType)Enum.Parse(typeof(GetMailActionType), reader["GetMailType"]);
            bool autofind;

            bool.TryParse(reader["AutoFindMailBox"], out autofind);
            AutoFindMailBox = autofind;
            float x, y, z;

            x        = reader["X"].ToSingle();
            x        = reader["X"].ToSingle();
            y        = reader["Y"].ToSingle();
            z        = reader["Z"].ToSingle();
            loc      = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            if (reader.MoveToAttribute("MinFreeBagSlots"))
            {
                uint.TryParse(reader["MinFreeBagSlots"], out val);
                MinFreeBagSlots = val;
            }
            reader.ReadStartElement();
        }
        public MailItemAction() {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["AutoFindMailBox"] = new MetaProp("AutoFindMailBox", typeof(bool), new DisplayNameAttribute("Automatically find Mailbox"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));

            ItemID = "";
            AutoFindMailBox = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            UseCategory = true;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;

            Properties["Location"].Show = false;
            Properties["ItemID"].Show = false;
            Properties["AutoFindMailBox"].PropertyChanged += new EventHandler(AutoFindMailBoxChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;
        }
Esempio n. 41
0
        public BuyItemAction()
        {
            Properties["Location"]      = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"]      = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["ItemID"]        = new MetaProp("ItemID", typeof(string));
            Properties["Count"]         = new MetaProp("Count", typeof(uint));
            Properties["BuyItemType"]   = new MetaProp("BuyItemType", typeof(BuyItemActionType), new DisplayNameAttribute("Buy"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            ItemID        = "";
            Count         = 0u;
            BuyItemType   = BuyItemActionType.Material;
            loc           = WoWPoint.Zero;
            Location      = loc.ToInvariantString();
            NpcEntry      = 0u;
            BuyAdditively = true;

            Properties["ItemID"].Show                  = false;
            Properties["Count"].Show                   = false;
            Properties["BuyAdditively"].Show           = false;
            Properties["Location"].PropertyChanged    += new EventHandler(LocationChanged);
            Properties["BuyItemType"].PropertyChanged += new EventHandler(BuyItemAction_PropertyChanged);
        }
Esempio n. 42
0
        public override void ReadXml(XmlReader reader)
        {
            uint val;

            if (reader.MoveToAttribute("ItemID"))
            {
                ItemID = reader["ItemID"];
            }
            else if (reader.MoveToAttribute("Entry"))
            {
                ItemID = reader["Entry"];
            }
            uint.TryParse(reader["Count"], out val);
            Count       = val;
            BuyItemType = (BuyItemActionType)Enum.Parse(typeof(BuyItemActionType), reader["BuyItemType"]);
            if (reader.MoveToAttribute("NpcEntry"))
            {
                uint.TryParse(reader["NpcEntry"], out val);
                NpcEntry = val;
            }
            if (reader.MoveToAttribute("BuyAdditively"))
            {
                bool boolVal = false;
                bool.TryParse(reader["BuyAdditively"], out boolVal);
                BuyAdditively = boolVal;
            }
            if (reader.MoveToAttribute("X"))
            {
                float x, y, z;
                x        = reader["X"].ToSingle();
                y        = reader["Y"].ToSingle();
                z        = reader["Z"].ToSingle();
                loc      = new WoWPoint(x, y, z);
                Location = loc.ToInvariantString();
            }
            reader.ReadStartElement();
        }
Esempio n. 43
0
        public GetMailAction()
        {
            //CheckNewMail
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["MinFreeBagSlots"] = new MetaProp("MinFreeBagSlots", typeof(uint), new DisplayNameAttribute("Min Free Bagslots"));
            Properties["CheckNewMail"] = new MetaProp("CheckNewMail", typeof(bool), new DisplayNameAttribute("Check for New Mail"));
            Properties["GetMailType"] = new MetaProp("GetMailType", typeof(GetMailActionType), new DisplayNameAttribute("Get Mail"));
            Properties["AutoFindMailBox"] = new MetaProp("AutoFindMailBox", typeof(bool), new DisplayNameAttribute("Auto find Mailbox"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            ItemID = "";
            CheckNewMail = true;
            GetMailType = (GetMailActionType)GetMailActionType.AllItems;
            AutoFindMailBox = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            MinFreeBagSlots = 2u;

            Properties["GetMailType"].PropertyChanged += new EventHandler(GetMailAction_PropertyChanged);
            Properties["AutoFindMailBox"].PropertyChanged += new EventHandler(AutoFindMailBoxChanged);
            Properties["ItemID"].Show = false;
            Properties["Location"].Show = false;
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
Esempio n. 44
0
        public GetItemfromBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof (DynamicProperty<int>),
                                                new TypeConverterAttribute(
                                                    typeof (DynamicProperty<int>.DynamivExpressionConverter)),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_Amount"]));

            Properties["ItemID"] = new MetaProp("ItemID", typeof (string),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_ItemEntries"]));

            Properties["MinFreeBagSlots"] = new MetaProp("MinFreeBagSlots", typeof (uint),
                                                         new DisplayNameAttribute(
                                                             Pb.Strings["Action_Common_MinFreeBagSlots"]));

            Properties["GetItemfromBankType"] = new MetaProp("GetItemfromBankType",
                                                             typeof (BankWithdrawlItemType),
                                                             new DisplayNameAttribute(
                                                                 Pb.Strings["Action_Common_ItemsToWithdraw"]));

            Properties["Bank"] = new MetaProp("Bank", typeof (BankType),
                                              new DisplayNameAttribute(Pb.Strings["Action_Common_Bank"]));

            Properties["AutoFindBank"] = new MetaProp("AutoFindBank", typeof (bool),
                                                      new DisplayNameAttribute(Pb.Strings["Action_Common_AutoFindBank"]));

            Properties["Location"] = new MetaProp("Location", typeof (string),
                                                  new EditorAttribute(typeof (PropertyBag.LocationEditor),
                                                                      typeof (UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["NpcEntry"] = new MetaProp("NpcEntry",
                                                  typeof (uint),
                                                  new EditorAttribute(typeof (PropertyBag.EntryEditor),
                                                                      typeof (UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_NpcEntry"]));

            Properties["WithdrawAdditively"] = new MetaProp("WithdrawAdditively", typeof (bool),
                                                            new DisplayNameAttribute(
                                                                Pb.Strings["Action_Common_WithdrawAdditively"]));

            Properties["Withdraw"] = new MetaProp("Withdraw", typeof (DepositWithdrawAmount),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Withdraw"]));

            Amount = new DynamicProperty<int>(this, "1");
            RegisterDynamicProperty("Amount");
            ItemID = "";
            MinFreeBagSlots = 2u;
            GetItemfromBankType = BankWithdrawlItemType.SpecificItem;
            Bank = BankType.Personal;
            AutoFindBank = true;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            NpcEntry = 0u;
            WithdrawAdditively = true;
            Withdraw = DepositWithdrawAmount.All;

            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["Amount"].Show = false;

            Properties["AutoFindBank"].PropertyChanged += AutoFindBankChanged;
            Properties["GetItemfromBankType"].PropertyChanged += GetItemfromBankActionPropertyChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["Withdraw"].PropertyChanged += WithdrawChanged;
        }
Esempio n. 45
0
        public GetMailAction()
        {
            //CheckNewMail
            Properties["ItemID"] = new MetaProp("ItemID", typeof (string),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_ItemEntries"]));

            Properties["MinFreeBagSlots"] = new MetaProp("MinFreeBagSlots", typeof (int),
                                                         new DisplayNameAttribute(
                                                             Pb.Strings["Action_Common_MinFreeBagSlots"]));

            Properties["CheckNewMail"] = new MetaProp("CheckNewMail", typeof (bool),
                                                      new DisplayNameAttribute(
                                                          Pb.Strings["Action_GetMailAction_CheckNewMail"]));

            Properties["GetMailType"] = new MetaProp("GetMailType", typeof (GetMailActionType),
                                                     new DisplayNameAttribute(Pb.Strings["Action_GetMailAction_Name"]));

            Properties["AutoFindMailBox"] = new MetaProp("AutoFindMailBox", typeof (bool),
                                                         new DisplayNameAttribute(
                                                             Pb.Strings["Action_Common_AutoFindMailbox"]));

            Properties["Location"] = new MetaProp("Location", typeof (string),
                                                  new EditorAttribute(typeof (PropertyBag.LocationEditor),
                                                                      typeof (UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            ItemID = "";
            CheckNewMail = true;
            GetMailType = GetMailActionType.AllItems;
            AutoFindMailBox = true;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            MinFreeBagSlots = 0;

            Properties["GetMailType"].PropertyChanged += GetMailActionPropertyChanged;
            Properties["AutoFindMailBox"].PropertyChanged += AutoFindMailBoxChanged;
            Properties["ItemID"].Show = false;
            Properties["Location"].Show = false;
            Properties["Location"].PropertyChanged += LocationChanged;
        }
Esempio n. 46
0
 public override void ReadXml(XmlReader reader)
 {
     uint num;
     uint.TryParse(reader["NpcEntry"], out num);
     NpcEntry = num;
     float x, y, z;
     x = reader["X"].ToSingle();
     y = reader["Y"].ToSingle();
     z = reader["Z"].ToSingle();
     loc = new WoWPoint(x, y, z);
     Location = loc.ToInvariantString();
     reader.ReadStartElement();
 }
Esempio n. 47
0
        public SellItemOnAhAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string), new DisplayNameAttribute("Item ID List"));
            Properties["RunTime"] = new MetaProp("RunTime", typeof(RunTimeType), new DisplayNameAttribute("Auction Duration"));
            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(PropertyBag.GoldEditor),
                new DisplayNameAttribute("Min Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"] = new MetaProp("Amount", typeof(uint));
            Properties["StackSize"] = new MetaProp("StackSize", typeof(uint));
            Properties["AmountType"] = new MetaProp("AmountType", typeof(AmountBasedType), new DisplayNameAttribute("Sell"));
            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["BidPrecent"] = new MetaProp("BidPrecent", typeof(float));
            Properties["UndercutPrecent"] = new MetaProp("UndercutPrecent", typeof(float));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["PostIfBelowMinBuyout"] = new MetaProp("PostIfBelowMinBuyout", typeof(bool), new DisplayNameAttribute("Post if Below MinBuyout"));

            ItemID = "";
            MinBuyout = new PropertyBag.GoldEditor("0g10s0c");
            MaxBuyout = new PropertyBag.GoldEditor("100g0s0c");
            RunTime = RunTimeType._24_Hours;
            Amount = 10u;
            StackSize = 20u;
            AmountType = AmountBasedType.Everything;
            AutoFindAh = true;
            BidPrecent = 95f;
            UndercutPrecent = 0.1f;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            UseCategory = true;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            PostIfBelowMinBuyout = true;

            Properties["AutoFindAh"].PropertyChanged += new EventHandler(AutoFindAHChanged);
            Properties["AmountType"].PropertyChanged += new EventHandler(SellItemToAhAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;

            Properties["ItemID"].Show = false;
            Properties["Amount"].Show = false;
            Properties["Location"].Show = false;
        }
Esempio n. 48
0
        public override void ReadXml(XmlReader reader)
        {
            uint val;
            if (reader.MoveToAttribute("ItemID"))
                ItemID = reader["ItemID"];
            else if (reader.MoveToAttribute("ItemName"))
                ItemID = reader["ItemName"];
            MinBuyout = new PropertyBag.GoldEditor(reader["MinBuyout"]);
            MaxBuyout = new PropertyBag.GoldEditor(reader["MaxBuyout"]);
            RunTime = (RunTimeType)Enum.Parse(typeof(RunTimeType), reader["RunTime"]);
            uint.TryParse(reader["Amount"], out val);
            Amount = val;
            uint.TryParse(reader["StackSize"], out val);
            StackSize = val;
            AmountType = (AmountBasedType)Enum.Parse(typeof(AmountBasedType), reader["AmountType"]);
            bool boolVal;
            bool.TryParse(reader["AutoFindAh"], out boolVal);
            AutoFindAh = boolVal;
            BidPrecent = reader["BidPrecent"].ToSingle();
            UndercutPrecent = reader["UndercutPrecent"].ToSingle();
            if (reader.MoveToAttribute("UseCategory"))
            {
                bool.TryParse(reader["UseCategory"], out boolVal);
                UseCategory = boolVal;
            }
            if (reader.MoveToAttribute("Category"))
            {
                Category = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            }
            string subCatType = "";
            if (reader.MoveToAttribute("SubCategoryType"))
            {
                subCatType = reader["SubCategoryType"];
            }
            if (reader.MoveToAttribute("SubCategory") && !string.IsNullOrEmpty(subCatType))
            {
                Type t;
                if (subCatType != "SubCategoryType")
                {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                    t = typeof(SubCategoryType);
                object subVal = Activator.CreateInstance(t);
                subVal = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            float x, y, z;
            x = reader["X"].ToSingle();
            y = reader["Y"].ToSingle();
            z = reader["Z"].ToSingle();
            loc = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            if (reader.MoveToAttribute("PostIfBelowMinBuyout"))
            {
                bool.TryParse(reader["PostIfBelowMinBuyout"], out boolVal);
                PostIfBelowMinBuyout = boolVal;
            }
            reader.ReadStartElement();
        }
        public override void ReadXml(XmlReader reader)
        {
            uint id;
            uint.TryParse(reader["Amount"], out id);
            Amount = (int)id;
            if (reader.MoveToAttribute("ItemID"))
                ItemID = reader["ItemID"];
            else if (reader.MoveToAttribute("Entry"))
                ItemID = reader["Entry"];
            uint.TryParse(reader["NpcEntry"], out id);
            NpcEntry = id;
            uint.TryParse(reader["GuildTab"], out id);
            GuildTab = id;
            bool boolVal = false;
            if (reader.MoveToAttribute("UseCategory"))
            {
                bool.TryParse(reader["UseCategory"], out boolVal);
                UseCategory = boolVal;
            }
            if (reader.MoveToAttribute("Category"))
            {
                Category = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            }
            string subCatType = "";
            if (reader.MoveToAttribute("SubCategoryType"))
            {
                subCatType = reader["SubCategoryType"];
            }
            if (reader.MoveToAttribute("SubCategory") && !string.IsNullOrEmpty(subCatType))
            {
                Type t;
                if (subCatType != "SubCategoryType")
                {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                    t = typeof(SubCategoryType);
                object subVal = Activator.CreateInstance(t);
                subVal = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            bool autoFind;
            bool.TryParse(reader["AutoFindBank"], out autoFind);
            AutoFindBank = autoFind;
            Bank = (BankType)Enum.Parse(typeof(BankType), reader["Bank"]);
            float x, y, z;
            x = reader["X"].ToSingle();
            y = reader["Y"].ToSingle();
            z = reader["Z"].ToSingle();
            loc = new WoWPoint(x, y, z);
            Properties["Location"].Value = loc.ToInvariantString();
            reader.ReadStartElement();
        }
        public override void ReadXml(XmlReader reader)
        {
            uint id;
            if (reader.MoveToAttribute("ItemID"))
                ItemID = reader["ItemID"];
            else if (reader.MoveToAttribute("Entry"))
                ItemID = reader["Entry"];

            uint.TryParse(reader["Amount"], out id);
            Amount = (int)id;
            Bank = (BankType)Enum.Parse(typeof(BankType), reader["Bank"]);
            GetItemfromBankType = (BankWithdrawlItemType)Enum.Parse(typeof(BankWithdrawlItemType), reader["GetItemfromBankType"]);
            uint.TryParse(reader["NpcEntry"], out id);
            NpcEntry = id;
            bool boolVal;
            bool.TryParse(reader["AutoFindBank"], out boolVal);
            AutoFindBank = boolVal;
            float x, y, z;
            x = reader["X"].ToSingle();
            y = reader["Y"].ToSingle();
            z = reader["Z"].ToSingle();
            loc = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            if (reader.MoveToAttribute("MinFreeBagSlots"))
            {
                uint.TryParse(reader["MinFreeBagSlots"], out id);
                MinFreeBagSlots = id;
            }
            if (reader.MoveToAttribute("WithdrawAdditively"))
            {
                bool.TryParse(reader["WithdrawAdditively"], out boolVal);
                WithdrawAdditively = boolVal;
            }
            reader.ReadStartElement();
        }
Esempio n. 51
0
 public override void ReadXml(XmlReader reader)
 {
     MoveType = (MoveToType)Enum.Parse(typeof(MoveToType), reader["MoveType"]);
     if (reader.MoveToAttribute("Pathing"))
         Pathing = (NavigationType)Enum.Parse(typeof(NavigationType), reader["Pathing"]);
     uint num;
     uint.TryParse(reader["Entry"], out num);
     Entry = num;
     float x, y, z;
     x = reader["X"].ToSingle();
     y = reader["Y"].ToSingle();
     z = reader["Z"].ToSingle();
     loc = new WoWPoint(x, y, z);
     Location = loc.ToInvariantString();
     reader.ReadStartElement();
 }
        public MailItemAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["AutoFindMailBox"] = new MetaProp("AutoFindMailBox", typeof(bool), new DisplayNameAttribute("Automatically find Mailbox"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty<int>),
                new TypeConverterAttribute(typeof(DynamicProperty<int>.DynamivExpressionConverter)));

            ItemID = "";
            AutoFindMailBox = true;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            UseCategory = true;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            Amount = new DynamicProperty<int>(this, "0");
            RegisterDynamicProperty("Amount");

            Properties["Location"].Show = false;
            Properties["ItemID"].Show = false;
            Properties["AutoFindMailBox"].PropertyChanged += AutoFindMailBoxChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;
        }
Esempio n. 53
0
 public override void ReadXml(XmlReader reader)
 {
     uint val;
     if (reader.MoveToAttribute("ItemID"))
         ItemID = reader["ItemID"];
     else if (reader.MoveToAttribute("Entry"))
         ItemID = reader["Entry"];
     if (reader.MoveToAttribute("CheckNewMail"))
     {
         bool boolVal;
         bool.TryParse(reader["CheckNewMail"], out boolVal);
         CheckNewMail = boolVal;
     }
     GetMailType = (GetMailActionType)Enum.Parse(typeof(GetMailActionType), reader["GetMailType"]);
     bool autofind;
     bool.TryParse(reader["AutoFindMailBox"], out autofind);
     AutoFindMailBox = autofind;
     float x, y, z;
     x = reader["X"].ToSingle();
     x = reader["X"].ToSingle();
     y = reader["Y"].ToSingle();
     z = reader["Z"].ToSingle();
     loc = new WoWPoint(x, y, z);
     Location = loc.ToInvariantString();
     if (reader.MoveToAttribute("MinFreeBagSlots"))
     {
         uint.TryParse(reader["MinFreeBagSlots"], out val);
         MinFreeBagSlots = val;
     }
     reader.ReadStartElement();
 }
Esempio n. 54
0
        public SellItemOnAhAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_ItemEntries"]));

            Properties["RunTime"] = new MetaProp("RunTime", typeof(RunTimeType),
                                                 new DisplayNameAttribute(
                                                     Pb.Strings["Action_SellItemOnAhAction_AuctionDuration"]));

            Properties["MinBuyout"] = new MetaProp("MinBuyout", typeof(PropertyBag.GoldEditor),
                                                   new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)),
                                                   new DisplayNameAttribute(Pb.Strings["Action_Common_MinBuyout"]));

            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                                                   new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)),
                                                   new DisplayNameAttribute(Pb.Strings["Action_Common_MaxBuyout"]));

            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty<int>),
                                                new TypeConverterAttribute(
                                                    typeof(DynamicProperty<int>.DynamivExpressionConverter)),
                                                new DisplayNameAttribute(Pb.Strings["Action_Common_Amount"]));

            Properties["StackSize"] = new MetaProp("StackSize", typeof(uint),
                                                   new DisplayNameAttribute(Pb.Strings["Action_Common_StackSize"]));

            Properties["IgnoreStackSizeBelow"] = new MetaProp("IgnoreStackSizeBelow", typeof(uint),
                                                              new DisplayNameAttribute(
                                                                  Pb.Strings["Action_Common_IgnoreStackSizeBelow"]));

            Properties["AmountType"] = new MetaProp("AmountType", typeof(AmountBasedType),
                                                    new DisplayNameAttribute(Pb.Strings["Action_Common_Sell"]));

            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool),
                                                    new DisplayNameAttribute(Pb.Strings["Action_Common_AutoFindAH"]));

            Properties["Location"] = new MetaProp("Location", typeof(string),
                                                  new EditorAttribute(typeof(PropertyBag.LocationEditor),
                                                                      typeof(UITypeEditor)),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_Location"]));

            Properties["BidPrecent"] = new MetaProp("BidPrecent", typeof(float),
                                                    new DisplayNameAttribute(
                                                        Pb.Strings["Action_SellItemOnAhAction_BidPercent"]));

            Properties["UndercutPrecent"] = new MetaProp("UndercutPrecent", typeof(double),
                                                         new DisplayNameAttribute(
                                                             Pb.Strings["Action_SellItemOnAhAction_UndercutPercent"]));

            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool),
                                                     new DisplayNameAttribute(Pb.Strings["Action_Common_UseCategory"]));

            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass),
                                                  new DisplayNameAttribute(Pb.Strings["Action_Common_ItemCategory"]));

            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass),
                                                     new DisplayNameAttribute(
                                                         Pb.Strings["Action_Common_ItemSubCategory"]));

            Properties["PostIfBelowMinBuyout"] = new MetaProp("PostIfBelowMinBuyout", typeof(bool),
                                                              new DisplayNameAttribute(
                                                                  Pb.Strings[
                                                                      "Action_SellItemOnAhAction_PostIfBelowMinBuyout"]));

            ItemID = "";
            MinBuyout = new PropertyBag.GoldEditor("0g10s0c");
            MaxBuyout = new PropertyBag.GoldEditor("100g0s0c");
            RunTime = RunTimeType._24_Hours;
            Amount = new DynamicProperty<int>(this, "10");
            RegisterDynamicProperty("Amount");
            StackSize = 20u;
            IgnoreStackSizeBelow = 1u;
            AmountType = AmountBasedType.Everything;
            AutoFindAh = true;
            BidPrecent = 95f;
            UndercutPrecent = 0.1;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            UseCategory = true;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;
            PostIfBelowMinBuyout = true;

            Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged;
            Properties["AmountType"].PropertyChanged += SellItemToAhActionPropertyChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;

            Properties["ItemID"].Show = false;
            Properties["Amount"].Show = false;
            Properties["Location"].Show = false;
        }
        public override void ReadXml(XmlReader reader) {
            if (reader.MoveToAttribute("ItemID"))
                ItemID = reader["ItemID"];
            else if (reader.MoveToAttribute("Entry"))
                ItemID = reader["Entry"];
            bool autofind;
            bool.TryParse(reader["AutoFindMailBox"], out autofind);
            AutoFindMailBox = autofind;
            bool boolVal = false;
            if (reader.MoveToAttribute("UseCategory")) {
                bool.TryParse(reader["UseCategory"], out boolVal);
                UseCategory = boolVal;
            }
            if (reader.MoveToAttribute("Category")) {
                Category = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            }
            string subCatType = "";
            if (reader.MoveToAttribute("SubCategoryType")) {
                subCatType = reader["SubCategoryType"];
            }
            if (reader.MoveToAttribute("SubCategory") && !string.IsNullOrEmpty(subCatType)) {
                Type t;
                if (subCatType != "SubCategoryType") {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                    t = typeof(SubCategoryType);
                object subVal = Activator.CreateInstance(t);
                subVal = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            float x, y, z;
            x = reader["X"].ToSingle();
            y = reader["Y"].ToSingle();
            z = reader["Z"].ToSingle();
            loc = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
        public override void ReadXml(XmlReader reader)
        {
            ItemID = reader["ItemID"];
            MinBuyout = new PropertyBag.GoldEditor(reader["MinBuyout"]);
            bool boolVal;
            bool.TryParse(reader["AutoFindAh"], out boolVal);
            AutoFindAh = boolVal;
            bool.TryParse(reader["UseCategory"], out boolVal);
            UseCategory = boolVal;
            Category = (WoWItemClass)Enum.Parse(typeof(WoWItemClass), reader["Category"]);
            string subCatType = "";
            subCatType = reader["SubCategoryType"];
            if (!string.IsNullOrEmpty(subCatType))
            {
                Type t;
                if (subCatType != "SubCategoryType")
                {
                    string typeName = string.Format("Styx.{0}", subCatType);
                    t = Assembly.GetEntryAssembly().GetType(typeName);
                }
                else
                    t = typeof(SubCategoryType);
                object subVal = Activator.CreateInstance(t);
                subVal = Enum.Parse(t, reader["SubCategory"]);
                SubCategory = subVal;
            }

            float x, y, z;
            x = reader["X"].ToSingle();
            y = reader["Y"].ToSingle();
            z = reader["Z"].ToSingle();
            loc = new WoWPoint(x, y, z);
            Location = loc.ToInvariantString();
            reader.ReadStartElement();
        }
Esempio n. 57
0
 public override void ReadXml(XmlReader reader) {
     uint val;
     if (reader.MoveToAttribute("ItemID"))
         ItemID = reader["ItemID"];
     else if (reader.MoveToAttribute("Entry"))
         ItemID = reader["Entry"]; 
     uint.TryParse(reader["Count"], out val);
     Count = val;
     BuyItemType = (BuyItemActionType)Enum.Parse(typeof(BuyItemActionType), reader["BuyItemType"]);
     if (reader.MoveToAttribute("NpcEntry"))
     {
         uint.TryParse(reader["NpcEntry"], out val);
         NpcEntry = val;
     }
     if (reader.MoveToAttribute("BuyAdditively"))
     {
         bool boolVal = false;
         bool.TryParse(reader["BuyAdditively"], out boolVal);
         BuyAdditively = boolVal;
     }
     if (reader.MoveToAttribute("X"))
     {
         float x, y, z;
         x = reader["X"].ToSingle();
         y = reader["Y"].ToSingle();
         z = reader["Z"].ToSingle();
         loc = new WoWPoint(x, y, z);
         Location = loc.ToInvariantString();
     }
     reader.ReadStartElement();
 }
        public GetItemfromBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof(int));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));

            Properties["MinFreeBagSlots"] = new MetaProp("MinFreeBagSlots", typeof(uint), new DisplayNameAttribute("Min Free Bagslots"));
            Properties["GetItemfromBankType"] = new MetaProp("GetItemfromBankType", typeof(BankWithdrawlItemType), new DisplayNameAttribute("Items to Withdraw"));
            Properties["Bank"] = new MetaProp("Bank", typeof(BankType));
            Properties["AutoFindBank"] = new MetaProp("AutoFindBank", typeof(bool), new DisplayNameAttribute("Auto find Bank"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["WithdrawAdditively"] = new MetaProp("WithdrawAdditively", typeof(bool), new DisplayNameAttribute("Withdraw Additively"));

            Amount = 1;
            ItemID = "";
            MinFreeBagSlots = 2u;
            GetItemfromBankType = BankWithdrawlItemType.SpecificItem;
            Bank = BankType.Personal;
            AutoFindBank = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;
            WithdrawAdditively = true; 

            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["AutoFindBank"].PropertyChanged += new EventHandler(AutoFindBankChanged);
            Properties["GetItemfromBankType"].PropertyChanged += new EventHandler(GetItemfromBankAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
        }
        public BuyItemFromAhAction()
        {
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["MaxBuyout"] = new MetaProp("MaxBuyout", typeof(PropertyBag.GoldEditor),
                new DisplayNameAttribute("Max Buyout"), new TypeConverterAttribute(typeof(PropertyBag.GoldEditorConverter)));
            Properties["Amount"] = new MetaProp("Amount", typeof(DynamicProperty<int>),
                new TypeConverterAttribute(typeof(DynamicProperty<int>.DynamivExpressionConverter)));
            Properties["ItemListType"] = new MetaProp("ItemListType", typeof(ItemType), new DisplayNameAttribute("Buy ..."));
            Properties["AutoFindAh"] = new MetaProp("AutoFindAh", typeof(bool), new DisplayNameAttribute("Auto find AH"));
            Properties["BuyAdditively"] = new MetaProp("BuyAdditively", typeof(bool), new DisplayNameAttribute("Buy Additively"));

            Properties["BidOnItem"] = new MetaProp("BidOnItem", typeof(bool), new DisplayNameAttribute("Bid on Item"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));

            ItemID = "";
            Amount = new DynamicProperty<int>(this, "1");
            RegisterDynamicProperty("Amount");
            ItemListType = ItemType.Item;
            AutoFindAh = true;
            _loc = WoWPoint.Zero;
            Location = _loc.ToInvariantString();
            MaxBuyout = new PropertyBag.GoldEditor("100g0s0c");
            BidOnItem = false;
            BuyAdditively = true;

            Properties["AutoFindAh"].PropertyChanged += AutoFindAHChanged;
            Properties["ItemListType"].PropertyChanged += BuyItemFromAhActionPropertyChanged;
            Properties["Location"].PropertyChanged += LocationChanged;
            Properties["Amount"].Show = true;
            Properties["Location"].Show = false;
        }
        public PutItemInBankAction()
        {
            Properties["Amount"] = new MetaProp("Amount", typeof(int));
            Properties["ItemID"] = new MetaProp("ItemID", typeof(string));
            Properties["Bank"] = new MetaProp("Bank", typeof(BankType));
            Properties["AutoFindBank"] = new MetaProp("AutoFindBank", typeof(bool), new DisplayNameAttribute("Auto find Bank"));
            Properties["Location"] = new MetaProp("Location", typeof(string), new EditorAttribute(typeof(PropertyBag.LocationEditor), typeof(UITypeEditor)));
            Properties["NpcEntry"] = new MetaProp("NpcEntry", typeof(uint), new EditorAttribute(typeof(PropertyBag.EntryEditor), typeof(UITypeEditor)));
            Properties["GuildTab"] = new MetaProp("GuildTab", typeof(uint));
            Properties["UseCategory"] = new MetaProp("UseCategory", typeof(bool), new DisplayNameAttribute("Use Category"));
            Properties["Category"] = new MetaProp("Category", typeof(WoWItemClass), new DisplayNameAttribute("Item Category"));
            Properties["SubCategory"] = new MetaProp("SubCategory", typeof(WoWItemTradeGoodsClass), new DisplayNameAttribute("Item SubCategory"));

            Amount = 0;
            ItemID = "";
            Bank = BankType.Personal;
            AutoFindBank = true;
            loc = WoWPoint.Zero;
            Location = loc.ToInvariantString();
            NpcEntry = 0u;
            GuildTab = 0u;
            UseCategory = true;
            Category = WoWItemClass.TradeGoods;
            SubCategory = WoWItemTradeGoodsClass.None;

            Properties["ItemID"].Show = false;
            Properties["Location"].Show = false;
            Properties["NpcEntry"].Show = false;
            Properties["GuildTab"].Show = false;

            Properties["AutoFindBank"].PropertyChanged += new EventHandler(AutoFindBankChanged);
            Properties["Bank"].PropertyChanged += new EventHandler(PutItemInBankAction_PropertyChanged);
            Properties["Location"].PropertyChanged += new EventHandler(LocationChanged);
            Properties["UseCategory"].PropertyChanged += UseCategoryChanged;
            Properties["Category"].PropertyChanged += CategoryChanged;
        }