//----------------------------------------------------------------------------//
    //                   SHOP GENERATION PRIVATE METHODS
    //----------------------------------------------------------------------------//


    //Generates items from the Common Magic Item Tables
    private void generateCommonShop(int core = 10, int wonderous = 1)
    {
        if (HttpRuntime.Cache.Get("items") == null)
        {
            CacheLoader.loadRandomTables();
        }
        MagicItemTable magicItemsTable = (MagicItemTable)HttpRuntime.Cache.Get("items");

        for (int i = 0; i < core; i++)
        {
            MagicItem item = magicItemsTable.getItem("A");
            item.Shop = shop;
            shop.Items.Add(item, Color.White);
            itemTable.addRow(item, Color.White);
        }
        for (int i = 0; i < wonderous; i++)
        {
            MagicItem item = magicItemsTable.getItem("F");
            item.Shop = shop;
            shop.Items.Add(item, Color.White);
            itemTable.addRow(item, Color.White);
        }
    }
    //Generates items from the Legendary Magic Item Tables
    private void generateLegendaryShop(int core = 4, int wonderous = 2)
    {
        if (HttpRuntime.Cache.Get("items") == null)
        {
            CacheLoader.loadRandomTables();
        }
        MagicItemTable magicItemsTable = (MagicItemTable)HttpRuntime.Cache.Get("items");

        for (int i = 0; i < core; i++)
        {
            MagicItem item = magicItemsTable.getItem("E");
            item.Shop = shop;
            shop.Items.Add(item, Color.White);
            itemTable.addRow(item, Color.White);
        }
        for (int i = 0; i < wonderous; i++)
        {
            MagicItem item = magicItemsTable.getItem("I");
            item.Shop = shop;
            shop.Items.Add(item, Color.White);
            itemTable.addRow(item, Color.White);
        }
        generateVeryRareShop(3, 2);
    }
Example #3
0
        //Generates items from the Common Magic Item Tables
        private void generateCommonShop(int core = 10, int wonderous = 1)
        {
            List <MagicItem> magicItems = new List <MagicItem>();

            for (int i = 0; i < core; i++)
            {
                MagicItem item = MagicItemTable.getItem("A");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
            for (int i = 0; i < wonderous; i++)
            {
                MagicItem item = MagicItemTable.getItem("F");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
        }
Example #4
0
        //Generates items from the Rare Magic Item Tables
        private void generateRareShop(int core = 8, int wonderous = 2)
        {
            List <MagicItem> magicItems = new List <MagicItem>();

            for (int i = 0; i < core; i++)
            {
                MagicItem item = MagicItemTable.getItem("C");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
            for (int i = 0; i < wonderous; i++)
            {
                MagicItem item = MagicItemTable.getItem("G");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
            generateUncommonShop(4, 2);
        }
Example #5
0
        //Generates items from the Legendary Magic Item Tables
        private void generateLegendaryShop(int core = 4, int wonderous = 2)
        {
            List <MagicItem> magicItems = new List <MagicItem>();

            for (int i = 0; i < core; i++)
            {
                MagicItem item = MagicItemTable.getItem("E");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
            for (int i = 0; i < wonderous; i++)
            {
                MagicItem item = MagicItemTable.getItem("I");
                DungeonBuddy.Main.Main.MagicItems.Add(item);
                magicItemShopListView.AddObject(item);
            }
            generateVeryRareShop(3, 2);
        }