Ejemplo n.º 1
0
        public SpecialScrollBookGump(PlayerMobile pm, BaseSpecialScrollBook book)
            : base(pm, 150, 200)
        {
            Book = book;

            pm.CloseGump(typeof(SpecialScrollBookGump));
        }
Ejemplo n.º 2
0
        public virtual void BuildSkillsPage()
        {
            AddHtmlLocalized(0, 15, 175, 20, CenterLoc, String.Format("#{0}", BaseSpecialScrollBook.GetCategoryLocalization(Category)), 0, false, false); // Power Scrolls

            if (Category == SkillCategory.None || Book == null || Book.Deleted || Book.SkillInfo == null)
            {
                return;
            }

            List <SkillName> list = Book.SkillInfo[Category];

            int x     = 45;
            int y     = 55;
            int split = list.Count >= 9 ? list.Count / 2 : -1;

            for (int i = 0; i < list.Count; i++)
            {
                SkillName skill = list[i];

                if (split > -1 && i == split)
                {
                    x = 205;
                    y = 55;
                }

                AddHtmlLocalized(x, y, 110, 20, SkillInfo.Table[(int)skill].Localization, false, false);

                if (HasScroll(skill))
                {
                    AddButton(30, y + 4, 2103, 2104, 100 + i, GumpButtonType.Reply, 0);
                }

                y += 15;
            }
        }
Ejemplo n.º 3
0
        public virtual void BuildCategoriesPage()
        {
            AddHtmlLocalized(0, 15, 175, 20, CenterLoc, string.Format("#{0}", Book.GumpTitle), 0, false, false);

            if (Book == null || Book.Deleted || Book.SkillInfo == null)
            {
                return;
            }

            int index = 0;

            foreach (KeyValuePair <SkillCat, List <SkillName> > kvp in Book.SkillInfo)
            {
                AddHtmlLocalized(45, 55 + index * 15, 100, 20, BaseSpecialScrollBook.GetCategoryLocalization(kvp.Key), false, false);

                if (HasScroll(kvp.Value))
                {
                    AddButton(30, 59 + index * 15, 2103, 2104, 10 + (int)kvp.Key, GumpButtonType.Reply, 0);
                }

                index++;
            }
        }