Represents tab in an NPC shop, containing items.
Пример #1
0
 /// <summary>
 /// Adds empty tab.
 /// </summary>
 /// <param name="tabTitle">Tab title displayed in-game</param>
 /// <param name="randomizeColors">Determines whether item colors are randomized on midnight.</param>
 /// <param name="shouldDisplay">Function that determines whether tab should be displayed, set null if not used.</param>
 /// <returns></returns>
 public NpcShopTab Add(string tabTitle, bool randomizeColors, Func<Creature, NPC, bool> shouldDisplay = null)
 {
     var tab = new NpcShopTab(tabTitle, _tabs.Count, randomizeColors, shouldDisplay);
     lock (_tabs)
         _tabs.Add(tabTitle, tab);
     return tab;
 }
Пример #2
0
        /// <summary>
        /// Adds empty tab.
        /// </summary>
        /// <param name="tabTitle">Tab title displayed in-game</param>
        /// <param name="randomizeColors">Determines whether item colors are randomized on midnight.</param>
        /// <param name="shouldDisplay">Function that determines whether tab should be displayed, set null if not used.</param>
        /// <returns></returns>
        public NpcShopTab Add(string tabTitle, bool randomizeColors, Func <Creature, NPC, bool> shouldDisplay = null)
        {
            var tab = new NpcShopTab(tabTitle, _tabs.Count, randomizeColors, shouldDisplay);

            lock (_tabs)
                _tabs.Add(tabTitle, tab);
            return(tab);
        }