public void Init(ItemDataManager ItemDataManager)
        {
            if (_pages.Count > 0)
            {
                _pages.Clear();
            }
            if (_botPresets.Count > 0)
            {
                _botPresets.Clear();
            }
            if (_items.Count > 0)
            {
                _items.Clear();
            }
            if (_deals.Count > 0)
            {
                _deals.Clear();
            }
            if (_predesignedItems.Count > 0)
            {
                _predesignedItems.Clear();
            }
            if (_recyclerLevels.Count > 0)
            {
                _recyclerLevels.Clear();
            }

            using (IQueryAdapter dbClient = BiosEmuThiago.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("SELECT `id`,`item_id`,`catalog_name`,`cost_credits`,`cost_pixels`,`cost_diamonds`,`cost_gotw`,`amount`,`page_id`,`limited_sells`,`limited_stack`,`offer_active`,`extradata`,`badge`,`offer_id`, `predesigned_id` FROM `catalog_items`");
                DataTable CatalogueItems = dbClient.getTable();

                if (CatalogueItems != null)
                {
                    foreach (DataRow Row in CatalogueItems.Rows)
                    {
                        if (Convert.ToInt32(Row["amount"]) <= 0)
                        {
                            continue;
                        }

                        int  ItemId        = Convert.ToInt32(Row["id"]);
                        int  PageId        = Convert.ToInt32(Row["page_id"]);
                        int  BaseId        = Convert.ToInt32(Row["item_id"]);
                        int  OfferId       = Convert.ToInt32(Row["offer_id"]);
                        uint PredesignedId = Convert.ToUInt32(Row["predesigned_id"]);
                        if (BaseId == 0 && PredesignedId > 0)
                        {
                            var roomPack = _predesignedManager.predesignedRoom[PredesignedId];
                            if (roomPack == null)
                            {
                                continue;
                            }
                            if (roomPack.CatalogItems.Contains(";"))
                            {
                                var cataItems = new Dictionary <int, int>();
                                var itemArray = roomPack.CatalogItems.Split(new char[] { ';' });
                                foreach (var item in itemArray)
                                {
                                    var      items           = item.Split(',');
                                    ItemData PredesignedData = null;
                                    if (!ItemDataManager.GetItem(Convert.ToInt32(items[0]), out PredesignedData))
                                    {
                                        log.Error("Ops, o id {" + ItemId + "}, do pack no catalogo esta com erro!");
                                        continue;
                                    }

                                    cataItems.Add(Convert.ToInt32(items[0]), Convert.ToInt32(items[1]));
                                }

                                this._predesignedItems[PageId] = new PredesignedContent(ItemId, cataItems);
                            }
                        }

                        ItemData Data = null;
                        if (PredesignedId <= 0)
                        {
                            if (!ItemDataManager.GetItem(BaseId, out Data))
                            {
                                log.Error("Ops, o id {" + ItemId + "}, do pack no catalogo esta com erro!");
                                continue;
                            }
                        }

                        if (!this._items.ContainsKey(PageId))
                        {
                            this._items[PageId] = new Dictionary <int, CatalogItem>();
                        }

                        if (OfferId != -1 && !this._itemOffers.ContainsKey(OfferId))
                        {
                            this._itemOffers.Add(OfferId, PageId);
                        }

                        this._items[PageId].Add(Convert.ToInt32(Row["id"]), new CatalogItem(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["item_id"]),
                                                                                            Data, Convert.ToString(Row["catalog_name"]), Convert.ToInt32(Row["page_id"]), Convert.ToInt32(Row["cost_credits"]), Convert.ToInt32(Row["cost_pixels"]), Convert.ToInt32(Row["cost_diamonds"]),
                                                                                            Convert.ToInt32(Row["cost_gotw"]), Convert.ToInt32(Row["amount"]), Convert.ToInt32(Row["limited_sells"]), Convert.ToInt32(Row["limited_stack"]), BiosEmuThiago.EnumToBool(Row["offer_active"].ToString()),
                                                                                            Convert.ToString(Row["extradata"]), Convert.ToString(Row["badge"]), Convert.ToInt32(Row["offer_id"]), Convert.ToInt32(Row["predesigned_id"])));
                    }
                }

                dbClient.SetQuery("SELECT * FROM `catalog_deals`");
                DataTable GetDeals = dbClient.getTable();

                if (GetDeals != null)
                {
                    foreach (DataRow Row in GetDeals.Rows)
                    {
                        int    Id      = Convert.ToInt32(Row["id"]);
                        int    PageId  = Convert.ToInt32(Row["page_id"]);
                        string Items   = Convert.ToString(Row["items"]);
                        string Name    = Convert.ToString(Row["name"]);
                        int    Credits = Convert.ToInt32(Row["cost_credits"]);
                        int    Pixels  = Convert.ToInt32(Row["cost_pixels"]);

                        if (!_deals.ContainsKey(PageId))
                        {
                            _deals[PageId] = new Dictionary <int, CatalogDeal>();
                        }

                        CatalogDeal Deal = new CatalogDeal(Id, PageId, Items, Name, Credits, Pixels, ItemDataManager);
                        _deals[PageId].Add(Deal.Id, Deal);
                    }
                }


                dbClient.SetQuery("SELECT `id`,`parent_id`,`caption`,`page_link`,`visible`,`enabled`,`min_rank`,`min_vip`,`icon_image`,`page_layout`,`page_strings_1`,`page_strings_2` FROM `catalog_pages` ORDER BY `order_num`");
                DataTable CatalogPages = dbClient.getTable();

                if (CatalogPages != null)
                {
                    foreach (DataRow Row in CatalogPages.Rows)
                    {
                        _pages.Add(Convert.ToInt32(Row["id"]), new CatalogPage(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["parent_id"]), Row["enabled"].ToString(), Convert.ToString(Row["caption"]),
                                                                               Convert.ToString(Row["page_link"]), Convert.ToInt32(Row["icon_image"]), Convert.ToInt32(Row["min_rank"]), Convert.ToInt32(Row["min_vip"]), Row["visible"].ToString(), Convert.ToString(Row["page_layout"]),
                                                                               Convert.ToString(Row["page_strings_1"]), Convert.ToString(Row["page_strings_2"]),
                                                                               _items.ContainsKey(Convert.ToInt32(Row["id"])) ? _items[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogItem>(),
                                                                               _deals.ContainsKey(Convert.ToInt32(Row["id"])) ? _deals[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogDeal>(),
                                                                               _predesignedItems.ContainsKey(Convert.ToInt32(Row["id"])) ? _predesignedItems[Convert.ToInt32(Row["id"])] : null,
                                                                               ref _itemOffers));
                    }
                }

                dbClient.SetQuery("SELECT `id`,`name`,`figure`,`motto`,`gender`,`ai_type` FROM `catalog_bot_presets`");
                DataTable bots = dbClient.getTable();

                if (bots != null)
                {
                    foreach (DataRow Row in bots.Rows)
                    {
                        _botPresets.Add(Convert.ToInt32(Row[0]), new CatalogBot(Convert.ToInt32(Row[0]), Convert.ToString(Row[1]), Convert.ToString(Row[2]), Convert.ToString(Row[3]), Convert.ToString(Row[4]), Convert.ToString(Row[5])));
                    }
                }

                _petRaceManager.Init();
                _clothingManager.Init();
            }

            log.Info("» Catalogo -> PRONTO - BY: Thiago Araujo");
        }
Ejemplo n.º 2
0
        public void Init(ItemDataManager ItemDataManager)
        {
            _pages.Clear();
            _botPresets.Clear();
            _items.Clear();
            _deals.Clear();
            _promotions.Clear();

            using (var dbClient = Program.DatabaseManager.GetQueryReactor())
            {
                dbClient.SetQuery("SELECT `id`,`item_id`,`catalog_name`,`cost_credits`,`cost_pixels`,`cost_diamonds`,`amount`,`page_id`,`limited_sells`,`limited_stack`,`offer_active`,`extradata`,`badge`,`offer_id` FROM `catalog_items`");
                var CatalogueItems = dbClient.GetTable();

                if (CatalogueItems != null)
                {
                    foreach (DataRow Row in CatalogueItems.Rows)
                    {
                        if (Convert.ToInt32(Row["amount"]) <= 0)
                        {
                            continue;
                        }

                        var ItemId  = Convert.ToInt32(Row["id"]);
                        var PageId  = Convert.ToInt32(Row["page_id"]);
                        var BaseId  = Convert.ToInt32(Row["item_id"]);
                        var OfferId = Convert.ToInt32(Row["offer_id"]);

                        if (!ItemDataManager.GetItem(BaseId, out var Data))
                        {
                            Logger.Error("Couldn't load Catalog Item " + ItemId + ", no furniture record found.");
                            continue;
                        }

                        if (!_items.ContainsKey(PageId))
                        {
                            _items[PageId] = new Dictionary <int, CatalogItem>();
                        }

                        if (OfferId != -1 && !_itemOffers.ContainsKey(OfferId))
                        {
                            _itemOffers.Add(OfferId, PageId);
                        }

                        _items[PageId].Add(Convert.ToInt32(Row["id"]), new CatalogItem(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["item_id"]),
                                                                                       Data, Convert.ToString(Row["catalog_name"]), Convert.ToInt32(Row["page_id"]), Convert.ToInt32(Row["cost_credits"]), Convert.ToInt32(Row["cost_pixels"]), Convert.ToInt32(Row["cost_diamonds"]),
                                                                                       Convert.ToInt32(Row["amount"]), Convert.ToInt32(Row["limited_sells"]), Convert.ToInt32(Row["limited_stack"]), Row["offer_active"].ToString() == "1",
                                                                                       Convert.ToString(Row["extradata"]), Convert.ToString(Row["badge"]), Convert.ToInt32(Row["offer_id"])));
                    }
                }

                dbClient.SetQuery("SELECT `id`, `items`, `name`, `room_id` FROM `catalog_deals`");
                var GetDeals = dbClient.GetTable();

                if (GetDeals != null)
                {
                    foreach (DataRow Row in GetDeals.Rows)
                    {
                        var Id     = Convert.ToInt32(Row["id"]);
                        var Items  = Convert.ToString(Row["items"]);
                        var Name   = Convert.ToString(Row["name"]);
                        var RoomId = Convert.ToInt32(Row["room_id"]);

                        var Deal = new CatalogDeal(Id, Items, Name, RoomId, ItemDataManager);

                        if (!_deals.ContainsKey(Id))
                        {
                            _deals.Add(Deal.Id, Deal);
                        }
                    }
                }


                dbClient.SetQuery("SELECT `id`,`parent_id`,`caption`,`page_link`,`visible`,`enabled`,`min_rank`,`min_vip`,`icon_image`,`page_layout`,`page_strings_1`,`page_strings_2` FROM `catalog_pages` ORDER BY `order_num`");
                var CatalogPages = dbClient.GetTable();

                if (CatalogPages != null)
                {
                    foreach (DataRow Row in CatalogPages.Rows)
                    {
                        _pages.Add(Convert.ToInt32(Row["id"]), new CatalogPage(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["parent_id"]), Row["enabled"].ToString(), Convert.ToString(Row["caption"]),
                                                                               Convert.ToString(Row["page_link"]), Convert.ToInt32(Row["icon_image"]), Convert.ToInt32(Row["min_rank"]), Convert.ToInt32(Row["min_vip"]), Row["visible"].ToString(), Convert.ToString(Row["page_layout"]),
                                                                               Convert.ToString(Row["page_strings_1"]), Convert.ToString(Row["page_strings_2"]),
                                                                               _items.ContainsKey(Convert.ToInt32(Row["id"])) ? _items[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogItem>(), ref _itemOffers));
                    }
                }

                dbClient.SetQuery("SELECT `id`,`name`,`figure`,`motto`,`gender`,`ai_type` FROM `catalog_bot_presets`");
                var bots = dbClient.GetTable();

                if (bots != null)
                {
                    foreach (DataRow row in bots.Rows)
                    {
                        _botPresets.Add(Convert.ToInt32(row[0]), new CatalogBot(Convert.ToInt32(row[0]), Convert.ToString(row[1]), Convert.ToString(row[2]), Convert.ToString(row[3]), Convert.ToString(row[4]), Convert.ToString(row[5])));
                    }
                }

                dbClient.SetQuery("SELECT * FROM `catalog_promotions`");
                var GetPromotions = dbClient.GetTable();

                if (GetPromotions != null)
                {
                    foreach (DataRow row in GetPromotions.Rows)
                    {
                        if (!_promotions.ContainsKey(Convert.ToInt32(row["id"])))
                        {
                            _promotions.Add(Convert.ToInt32(row["id"]), new CatalogPromotion(Convert.ToInt32(row["id"]), Convert.ToString(row["title"]), Convert.ToString(row["image"]), Convert.ToInt32(row["unknown"]), Convert.ToString(row["page_link"]), Convert.ToInt32(row["parent_id"])));
                        }
                    }
                }

                _petRaceManager.Init();
                _clothingManager.Init();
            }

            Logger.Trace("Catalog Manager -> LOADED");
        }
Ejemplo n.º 3
0
        public void Init(ItemDataManager ItemDataManager)
        {
            if (_pages.Count > 0)
            {
                _pages.Clear();
            }

            if (_bcpages.Count > 0)
            {
                _bcpages.Clear();
            }

            if (_botPresets.Count > 0)
            {
                _botPresets.Clear();
            }

            if (_items.Count > 0)
            {
                _items.Clear();
            }

            if (_bcitems.Count > 0)
            {
                _bcitems.Clear();
            }

            if (_deals.Count > 0)
            {
                _deals.Clear();
            }

            if (_predesignedItems.Count > 0)
            {
                _predesignedItems.Clear();
            }

            using (IQueryAdapter dbClient = NeonEnvironment.GetDatabaseManager().GetQueryReactor())
            {
                dbClient.SetQuery("SELECT `id`,`item_id`,`catalog_name`,`cost_credits`,`cost_pixels`,`cost_diamonds`,`amount`,`page_id`,`limited_sells`,`limited_stack`,`offer_active`,`extradata`,`badge`,`offer_id`,`cost_honor`,`predesigned_id` FROM `catalog_items`");
                DataTable CatalogueItems = dbClient.getTable();

                if (CatalogueItems != null)
                {
                    foreach (DataRow Row in CatalogueItems.Rows)
                    {
                        if (Convert.ToInt32(Row["amount"]) <= 0)
                        {
                            continue;
                        }

                        int  ItemId        = Convert.ToInt32(Row["id"]);
                        int  PageId        = Convert.ToInt32(Row["page_id"]);
                        int  BaseId        = Convert.ToInt32(Row["item_id"]);
                        int  OfferId       = Convert.ToInt32(Row["offer_id"]);
                        uint PredesignedId = Convert.ToUInt32(Row["predesigned_id"]);
                        if (BaseId == 0 && PredesignedId > 0)
                        {
                            PredesignedRooms.PredesignedRooms roomPack = _predesignedManager.predesignedRoom[PredesignedId];
                            if (roomPack == null)
                            {
                                continue;
                            }

                            if (roomPack.CatalogItems.Contains(";"))
                            {
                                Dictionary <int, int> cataItems = new Dictionary <int, int>();
                                string[] itemArray = roomPack.CatalogItems.Split(new char[] { ';' });
                                foreach (string item in itemArray)
                                {
                                    string[] items = item.Split(',');
                                    if (!ItemDataManager.GetItem(Convert.ToInt32(items[0]), out ItemData PredesignedData))
                                    {
                                        log.Error("Catalog Bundle " + ItemId + " has no furniture data.");
                                        continue;
                                    }

                                    cataItems.Add(Convert.ToInt32(items[0]), Convert.ToInt32(items[1]));
                                }

                                _predesignedItems[PageId] = new PredesignedContent(ItemId, cataItems);
                            }
                        }

                        ItemData Data = null;
                        if (PredesignedId <= 0)
                        {
                            if (!ItemDataManager.GetItem(BaseId, out Data))
                            {
                                log.Error("Couldn't load Catalog Item " + ItemId + ", no furniture record found. {3}");
                                continue;
                            }
                        }

                        if (!_items.ContainsKey(PageId))
                        {
                            _items[PageId] = new Dictionary <int, CatalogItem>();
                        }

                        if (OfferId != -1 && !_itemOffers.ContainsKey(OfferId))
                        {
                            _itemOffers.Add(OfferId, PageId);
                        }

                        _items[PageId].Add(Convert.ToInt32(Row["id"]), new CatalogItem(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["item_id"]),
                                                                                       Data, Convert.ToString(Row["catalog_name"]), Convert.ToInt32(Row["page_id"]), Convert.ToInt32(Row["cost_credits"]), Convert.ToInt32(Row["cost_pixels"]), Convert.ToInt32(Row["cost_diamonds"]),
                                                                                       Convert.ToInt32(Row["amount"]), Convert.ToInt32(Row["limited_sells"]), Convert.ToInt32(Row["limited_stack"]), NeonEnvironment.EnumToBool(Row["offer_active"].ToString()),
                                                                                       Convert.ToString(Row["extradata"]), Convert.ToString(Row["badge"]), Convert.ToInt32(Row["offer_id"]), Convert.ToInt32(Row["cost_honor"]),
                                                                                       Convert.ToInt32(Row["predesigned_id"])));
                    }
                }


                dbClient.SetQuery("SELECT `id`,`item_id`,`catalog_name`,`cost_credits`,`cost_pixels`,`cost_diamonds`,`amount`,`page_id`,`limited_sells`,`limited_stack`,`offer_active`,`extradata`,`badge`,`offer_id`,`cost_honor`,`predesigned_id` FROM `catalog_bc_items`");
                DataTable BCCatalogueItems = dbClient.getTable();

                if (BCCatalogueItems != null)
                {
                    foreach (DataRow Row in BCCatalogueItems.Rows)
                    {
                        if (Convert.ToInt32(Row["amount"]) <= 0)
                        {
                            continue;
                        }

                        int  ItemId        = Convert.ToInt32(Row["id"]);
                        int  PageId        = Convert.ToInt32(Row["page_id"]);
                        int  BaseId        = Convert.ToInt32(Row["item_id"]);
                        int  OfferId       = Convert.ToInt32(Row["offer_id"]);
                        uint PredesignedId = Convert.ToUInt32(Row["predesigned_id"]);
                        if (BaseId == 0 && PredesignedId > 0)
                        {
                            PredesignedRooms.PredesignedRooms roomPack = _predesignedManager.predesignedRoom[PredesignedId];
                            if (roomPack == null)
                            {
                                continue;
                            }

                            if (roomPack.CatalogItems.Contains(";"))
                            {
                                Dictionary <int, int> cataItems = new Dictionary <int, int>();
                                string[] itemArray = roomPack.CatalogItems.Split(new char[] { ';' });
                                foreach (string item in itemArray)
                                {
                                    string[] items = item.Split(',');
                                    if (!ItemDataManager.GetItem(Convert.ToInt32(items[0]), out ItemData PredesignedData))
                                    {
                                        log.Error("Couldn't load Catalog BC Item " + ItemId + ", no furniture record found. {2}");
                                        continue;
                                    }

                                    cataItems.Add(Convert.ToInt32(items[0]), Convert.ToInt32(items[1]));
                                }

                                _predesignedItems[PageId] = new PredesignedContent(ItemId, cataItems);
                            }
                        }

                        ItemData Data = null;
                        if (PredesignedId <= 0)
                        {
                            if (!ItemDataManager.GetItem(BaseId, out Data))
                            {
                                log.Error("Couldn't load BC Item " + ItemId + ", no furniture record found. {1}");
                                continue;
                            }
                        }

                        if (!_bcitems.ContainsKey(PageId))
                        {
                            _bcitems[PageId] = new Dictionary <int, BCCatalogItem>();
                        }

                        if (OfferId != -1 && !_itemOffers.ContainsKey(OfferId))
                        {
                            _itemOffers.Add(OfferId, PageId);
                        }

                        _bcitems[PageId].Add(Convert.ToInt32(Row["id"]), new BCCatalogItem(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["item_id"]),
                                                                                           Data, Convert.ToString(Row["catalog_name"]), Convert.ToInt32(Row["page_id"]), Convert.ToInt32(Row["cost_credits"]), Convert.ToInt32(Row["cost_pixels"]), Convert.ToInt32(Row["cost_diamonds"]),
                                                                                           Convert.ToInt32(Row["amount"]), Convert.ToInt32(Row["limited_sells"]), Convert.ToInt32(Row["limited_stack"]), NeonEnvironment.EnumToBool(Row["offer_active"].ToString()),
                                                                                           Convert.ToString(Row["extradata"]), Convert.ToString(Row["badge"]), Convert.ToInt32(Row["offer_id"]), Convert.ToInt32(Row["cost_honor"]),
                                                                                           Convert.ToInt32(Row["predesigned_id"])));
                    }
                }


                dbClient.SetQuery("SELECT * FROM `catalog_deals`");
                DataTable GetDeals = dbClient.getTable();

                if (GetDeals != null)
                {
                    foreach (DataRow Row in GetDeals.Rows)
                    {
                        int    Id      = Convert.ToInt32(Row["id"]);
                        int    PageId  = Convert.ToInt32(Row["page_id"]);
                        string Items   = Convert.ToString(Row["items"]);
                        string Name    = Convert.ToString(Row["name"]);
                        int    Credits = Convert.ToInt32(Row["cost_credits"]);
                        int    Pixels  = Convert.ToInt32(Row["cost_pixels"]);

                        if (!_deals.ContainsKey(PageId))
                        {
                            _deals[PageId] = new Dictionary <int, CatalogDeal>();
                        }

                        CatalogDeal Deal = new CatalogDeal(Id, PageId, Items, Name, Credits, Pixels, ItemDataManager);
                        _deals[PageId].Add(Deal.Id, Deal);
                    }
                }



                dbClient.SetQuery("SELECT `id`,`parent_id`,`caption`,`page_link`,`visible`,`enabled`,`min_rank`,`min_vip`,`icon_image`,`page_layout`,`page_strings_1`,`page_strings_2` FROM `catalog_pages` ORDER BY `order_num`");
                DataTable CatalogPages = dbClient.getTable();

                if (CatalogPages != null)
                {
                    foreach (DataRow Row in CatalogPages.Rows)
                    {
                        _pages.Add(Convert.ToInt32(Row["id"]), new CatalogPage(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["parent_id"]), Row["enabled"].ToString(), Convert.ToString(Row["caption"]),
                                                                               Convert.ToString(Row["page_link"]), Convert.ToInt32(Row["icon_image"]), Convert.ToInt32(Row["min_rank"]), Convert.ToInt32(Row["min_vip"]), Row["visible"].ToString(), Convert.ToString(Row["page_layout"]),
                                                                               Convert.ToString(Row["page_strings_1"]), Convert.ToString(Row["page_strings_2"]),
                                                                               _items.ContainsKey(Convert.ToInt32(Row["id"])) ? _items[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogItem>(),
                                                                               _deals.ContainsKey(Convert.ToInt32(Row["id"])) ? _deals[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogDeal>(),
                                                                               _predesignedItems.ContainsKey(Convert.ToInt32(Row["id"])) ? _predesignedItems[Convert.ToInt32(Row["id"])] : null,
                                                                               ref _itemOffers));
                    }
                }

                dbClient.SetQuery("SELECT `id`,`parent_id`,`caption`,`page_link`,`visible`,`enabled`,`min_rank`,`min_vip`,`icon_image`,`page_layout`,`page_strings_1`,`page_strings_2` FROM `catalog_bc_pages` ORDER BY `order_num`");
                DataTable BCCatalogPages = dbClient.getTable();

                if (BCCatalogPages != null)
                {
                    foreach (DataRow Row in BCCatalogPages.Rows)
                    {
                        _bcpages.Add(Convert.ToInt32(Row["id"]), new BCCatalogPage(Convert.ToInt32(Row["id"]), Convert.ToInt32(Row["parent_id"]), Row["enabled"].ToString(), Convert.ToString(Row["caption"]),
                                                                                   Convert.ToString(Row["page_link"]), Convert.ToInt32(Row["icon_image"]), Convert.ToInt32(Row["min_rank"]), Convert.ToInt32(Row["min_vip"]), Row["visible"].ToString(), Convert.ToString(Row["page_layout"]),
                                                                                   Convert.ToString(Row["page_strings_1"]), Convert.ToString(Row["page_strings_2"]),
                                                                                   _bcitems.ContainsKey(Convert.ToInt32(Row["id"])) ? _bcitems[Convert.ToInt32(Row["id"])] : new Dictionary <int, BCCatalogItem>(),
                                                                                   _deals.ContainsKey(Convert.ToInt32(Row["id"])) ? _deals[Convert.ToInt32(Row["id"])] : new Dictionary <int, CatalogDeal>(),
                                                                                   _predesignedItems.ContainsKey(Convert.ToInt32(Row["id"])) ? _predesignedItems[Convert.ToInt32(Row["id"])] : null,
                                                                                   ref _itemOffers));
                    }
                }

                dbClient.SetQuery("SELECT `id`,`name`,`figure`,`motto`,`gender`,`ai_type` FROM `catalog_bot_presets`");
                DataTable bots = dbClient.getTable();



                if (bots != null)
                {
                    foreach (DataRow Row in bots.Rows)
                    {
                        _botPresets.Add(Convert.ToInt32(Row[0]), new CatalogBot(Convert.ToInt32(Row[0]), Convert.ToString(Row[1]), Convert.ToString(Row[2]), Convert.ToString(Row[3]), Convert.ToString(Row[4]), Convert.ToString(Row[5])));
                    }
                }

                _petRaceManager.Init();
                _clothingManager.Init();
            }

            log.Info(">> Catalog Manager -> READY!");
        }