Exemplo n.º 1
0
        public AuctionWtbOrderEntry(LsonValue luaObject, string ActiveAccountcreds)
        {
            // try{

            this.ActiveAccountData = ActiveAccountcreds;
            int i = 0;

            if (!int.TryParse((string)luaObject["BuyoutPrice"], out i))
            {
                i = 0;
            }
            this.Price = i;


            this.stackCount = (int)luaObject["stackCount"];

            this.sellValue = (int)luaObject["Price"];

            i = 0;
            if (!int.TryParse((string)luaObject["itemId"], out i))
            {
                i = 0;
            }
            this.itemId = i;

            this.Quality = (int)luaObject["itemQuality"];


            this.Name     = (string)luaObject["itemName"];
            this.ItemLink = (string)luaObject["ItemLink"];
            this.Player   = (string)luaObject["Player"];
        }
Exemplo n.º 2
0
        public AuctionBidEntry(LsonValue luaObject, string CharName)
        {
            luaObject = luaObject["Bid"];

            this.Buyer  = CharName;
            this.Seller = (string)luaObject["seller"];
            if (luaObject.ContainsKey("Player"))
            {
                this.Player = (string)luaObject["Player"];
            }
            else
            {
                this.Player = "";
            }
            int i;

            if (!int.TryParse((string)luaObject["TradeID"], out i))
            {
                i = 0;
            }
            this.TradeID    = i;
            this.ItemID     = (int)luaObject["ItemID"];
            this.ItemLink   = (string)luaObject["ItemLink"];
            this.stackCount = (int)luaObject["stackCount"];
            this.Price      = (int)luaObject["Price"];
        }
Exemplo n.º 3
0
        public static AuctionTradeData LoadFromSavedVars(LsonValue luaObject, string CharName)
        {
            LsonValue items = luaObject;

            if (items.ContainsKey("$AccountWide"))
            {
                LsonValue acctdata = items["$AccountWide"];

                LsonValue           item = (acctdata)["data"]["Listings"];
                List <AuctionEntry> CurAuctionEntries = new List <AuctionEntry>();
                foreach (int key in item.Keys)
                {
                    LsonValue tmpdict = item[key];
                    if (tmpdict.ContainsKey("attributes") && tmpdict.ContainsKey("Listing"))
                    {
                        AuctionEntry CurAuctionEntry = new AuctionEntry(tmpdict, CharName);
                        if (!CurAuctionEntry.ItemData.Item.ID.HasValue)
                        {
                            continue;
                        }
                        CurAuctionEntries.Add(CurAuctionEntry);
                    }
                }
                return(new AuctionTradeData(CharName)
                {
                    AuctionEntries = CurAuctionEntries
                });
            }

            return(new AuctionTradeData(CharName)
            {
            });
        }
Exemplo n.º 4
0
        public AuctionRelistOrderEntry(LsonValue luaObject, string ActiveAccountcreds)
        {
            // try{

            this.ActiveAccountData = ActiveAccountcreds;
            int i = 0;

            if (!int.TryParse((string)luaObject["TradeID"], out i))
            {
                i = 0;
            }
            this.TradeID = i;
        }
Exemplo n.º 5
0
        public AuctionFilledwtbOrderEntry(LsonValue luaObject, string ActiveAccountcreds)
        {
            this.ActiveAccountData = ActiveAccountcreds;
            int i = 0;

            if (!int.TryParse((string)luaObject["WTBID"], out i))
            {
                i = 0;
            }
            this.WTBID = i;


            this.Player = (string)luaObject["Player"];
        }
Exemplo n.º 6
0
        public AuctionPaidOrdersEntry(LsonValue luaObject, string CharName)
        {
            this.Buyer  = CharName;
            this.Seller = (string)luaObject["Seller"];
            this.mailId = (string)luaObject["mailId"];
            int i;

            if (!int.TryParse((string)luaObject["ItemID"], out i))
            {
                i = 0;
            }
            this.ItemID      = i;
            this.stackCount  = (int)luaObject["stack"];
            this.Price       = (int)luaObject["sellPrice"];
            this.codAmount   = (int)luaObject["codAmount"];
            this.itemQuality = (int)luaObject["itemQuality"];
        }
Exemplo n.º 7
0
        public AuctionFilledOrderEntry(LsonValue luaObject, string ActiveAccountcreds)
        {
            // try{

            this.ActiveAccountData = ActiveAccountcreds;
            luaObject = luaObject["Order"];
            int i = 0;

            if (!int.TryParse((string)luaObject["TradeID"], out i))
            {
                i = 0;
            }
            this.TradeID = i;


            if (!int.TryParse((string)luaObject["BidID"], out i))
            {
                i = 0;
            }
            this.BidID = i;
            //this.BidID = (int)luaObject["BidID"];
            // }catch(){
            //}
        }
Exemplo n.º 8
0
 //Get Info about Player Sub
 private String GetStringPlayerInfoLUA(LsonValue PlayerN, String InfoReturned)
 {
     return(FuncsLib.dump["GEM_Events"]["realms"]["Elysium"]["events"][listViewEventsList.Items[FuncsLib.EventSelected].Text]["titulars"][PlayerN][InfoReturned].GetString());
 }
Exemplo n.º 9
0
 public AuctionEntry(LsonValue luaObject, string CharName)
 {
     this.ItemData = new AuctionItemData(luaObject);
     this.CharName = CharName;
 }
Exemplo n.º 10
0
        public AuctionItem(LsonValue luaObject)
        {
            LsonValue curAttributes = (luaObject["attributes"]);
            LsonValue curListing    = (luaObject["Listing"]);

            LsonValue curType      = (curAttributes["Type"]);
            LsonValue curCondition = (curAttributes["Condition"]);
            LsonValue curTrait     = (curAttributes["Trait"]);
            LsonValue curEnchant   = (curAttributes["Enchant"]);

            this.ItemType       = (int)curType["ItemType"];
            this.ItemWeaponType = (int)curType["ItemWeaponType"];
            this.ItemArmorType  = (int)curType["ItemArmorType"];
            this.ItemLink       = ToUTF8((string)curAttributes["ItemLink"]);
            this.Name           = ToUTF8((string)curAttributes["itemName"]);
            int?nullable = null;

            this.ID = nullable;
            if (curAttributes.ContainsKey("itemId"))
            {
                this.ID = new int?(int.Parse((string)curAttributes["itemId"]));
            }
            this.Quality = (int)curAttributes["itemQuality"];

            this.Condition  = (int)curCondition["ItemCondition"];
            this.RepairCost = (int)curCondition["ItemRepairCost"];


            this.ArmorRating = (int)curAttributes["ItemArmorRating"];
            this.WeaponPower = (int)curAttributes["ItemWeaponPower"];
            this.StatVal     = (int)curAttributes["itemStatVal"];


            this.ItemCharge         = (int)curEnchant["ItemCharge"];
            this.ItemChargeMax      = (int)curEnchant["ItemChargeMax"];
            this.ItemChargePercent  = (int)curEnchant["ItemChargePercent"];
            this.enchantHeader      = (string)curEnchant["enchantHeader"];
            this.enchantDescription = (string)curEnchant["enchantDescription"];



            this.traitDescription = (string)curTrait["traitDescription"];
            this.traitType        = (string)curTrait["traitType"];
            if (curTrait.ContainsKey("traitSubtypeDescription"))
            {
                this.traitSubtypeDescription = (string)curTrait["traitSubtypeDescription"];
            }
            else
            {
                this.traitSubtypeDescription = "";
            }
            this.traitSubtype = (string)curTrait["traitSubtype"];

            this.setName = (string)curAttributes["setName"];


            this.sellValue = (int)curCondition["ItemSellValueWithBonuses"];



            this.RequiredLevel          = (int)curAttributes["ItemRequiredLevel"];
            this.RequiredChampionPoints = (int)curAttributes["ItemRequiredChampionPoints"];
            this.LevelTotal             = this.RequiredLevel + this.RequiredChampionPoints;
        }
Exemplo n.º 11
0
        public AuctionItemData(LsonValue luaObject)
        {
            int i;

            if (luaObject.ContainsKey("attributes") && luaObject.ContainsKey("Listing"))
            {
                LsonValue curAttributes = (luaObject["attributes"]);
                LsonValue curListing    = (luaObject["Listing"]);

                if (curAttributes.ContainsKey("itemId") && curAttributes.ContainsKey("stackCount") && curListing.ContainsKey("Price"))
                {
                    this.Item          = new AuctionItem(luaObject);
                    this.StartingPrice = 0;
                    this.BuyoutPrice   = 0;


                    this.stackCount = (int)curAttributes["stackCount"];

                    if (!int.TryParse((string)curAttributes["itemId"], out i))
                    {
                        i = 0;
                    }
                    this.itemId = i;
                    // this.itemId = (int)curAttributes["itemId"];

                    if (curListing.ContainsKey("Player"))
                    {
                        this.CharName = (string)curListing["Player"];
                    }


                    if (curListing.ContainsKey("BuyoutPrice"))
                    {
                        //this.BuyoutPrice = (int)curListing["BuyoutPrice"];
                        string tmpbuyout = (string)curListing["BuyoutPrice"];
                        if (tmpbuyout != "" && tmpbuyout != "\"\"")
                        {
                            if (!int.TryParse(tmpbuyout, out i))
                            {
                                i = 0;
                            }
                            this.BuyoutPrice = i;
                        }
                    }


                    if (curListing.ContainsKey("StartingPrice"))
                    {
                        string tmpprice = (string)curListing["StartingPrice"];
                        if (tmpprice != "" && tmpprice != "\"\"")
                        {
                            if (!int.TryParse(tmpprice, out i))
                            {
                                i = 0;
                            }
                            this.StartingPrice = i;
                        }
                    }
                    else
                    {
                        this.StartingPrice = this.BuyoutPrice;
                    }


                    if (curListing.ContainsKey("IsBuyout"))
                    {
                        this.IsBuyout = (int)curListing["IsBuyout"];
                    }
                }
            }
        }