• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ItemLists.ItemListEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Server.Menus.ItemLists.ItemListEntry的典型用法代码示例。如果您正苦于以下问题:C# ItemListEntry类的具体用法?C# ItemListEntry怎么用?C# ItemListEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ItemListEntry类属于Server.Menus.ItemLists命名空间,在下文中一共展示了ItemListEntry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Eighth

        public static ItemListEntry[] Eighth(Mobile from)
        {
            Type type;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            bool hasres = true;
            int missing = 0;
            ItemListEntry[] entries = new ItemListEntry[8];

            for (int i = 0; i < 8; ++i)
            {
                Type reg = null;
                type = DefInscription.CraftSystem.CraftItems.GetAt(i + 56).ItemType;
                chance = DefInscription.CraftSystem.CraftItems.GetAt(i + 56).GetSuccessChance(from, DefInscription.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0).ItemType, DefInscription.CraftSystem, false, ref allRequiredSkills);
                craftResource = DefInscription.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);
                int size = DefInscription.CraftSystem.CraftItems.SearchFor(type).Ressources.Count;
                hasres = true;

                /*for (int j = 0; j < size; ++j)
                {
                    reg = DefInscription.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(j).ItemType;
                    if ((from.Backpack.GetAmount(reg) < DefInscription.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(j).Amount) && hasres)
                    {
                        hasres = false;
                    }
                }*/

                if ((chance > 0) && hasres && GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i+56).ItemType))
                {
                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("Scroll", "");
                    name = name.Replace("yV", "y V");
                    name = name.Replace("nA", "n A");
                    name = name.Replace("nE", "n E");
                    name = name.Replace("nF", "n F");
                    name = name.Replace("nW", "n W");
                    name = name.Replace("nD", "n D");
                    name = name.Replace("rE", "r E");
                    name = name.Replace("hE", "h E");
                    name = name.Replace("eE", "e E");
                    //name = name.ToLower();

                    entries[i-missing] = new ItemListEntry(String.Format("{0}", name), 8320 + i + 56,0,i);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i-missing]= new ItemListEntry("", -1);
            }

            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:60,代码来源:InscriptionMenu.cs


示例2: CartographyMenu

 public CartographyMenu(Mobile m, ItemListEntry[] entries, string Is, BaseTool tool)
     : base("Attempt what scale of map?", entries)
 {
     m_Mobile = m;
     IsFrom = Is;
     m_Tool = tool;
     m_Entries = entries;
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:8,代码来源:CartographyMenu.cs


示例3: BlacksmithMenu

 public BlacksmithMenu(Mobile m, ItemListEntry[] entries, string Is, BaseTool tool)
     : base("What would you like to make?", entries)
 {
     m_Mobile = m;
     IsFrom = Is;
     m_Tool = tool;
     m_Entries = entries;
 }
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:BlacksmithMenu.cs


示例4: TinkeringMenu

 public TinkeringMenu(Mobile m, ItemListEntry[] entries, string Is, BaseTool tool)
     : base("Choose an item.", entries)
 {
     m_Mobile = m;
     IsFrom = Is;
     m_Tool = tool;
     m_Entries = entries;
 }
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:TinkingMenu.cs


示例5: AlchemyMenu

 public AlchemyMenu(Mobile m, ItemListEntry[] entries, string Is, BaseTool tool)
     : base("Choose a formula.", entries)
 {
     m_Mobile = m;
     IsFrom = Is;
     m_Tool = tool;
     m_Entries = entries;
 }
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:AlchemyMenu.cs


示例6: Main

        //MAIN
        public static ItemListEntry[] Main(Mobile from)
        {
            bool Shields = true;
            bool Armor = true;
            bool Weapons = true;
            int missing = 0;

            int resHue = 0;
            int maxAmount = 0;
            Object message = null;
            bool allRequiredSkills = true;
            double chance;

            //Shields
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(23).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(23).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //WoodenKiteShield
            {
                Shields = false;
            }

            //Armor
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(0).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(0).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //RingmailGloves
            {
                Armor = false;
            }

            //Weapons
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(26).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(26).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Dagger
            {
                Weapons = false;
            }

            ItemListEntry[] entries = new ItemListEntry[4];

            entries[0] = new ItemListEntry("Repair", 4015, 0, 0);

            if (Shields)
                entries[1-missing] = new ItemListEntry("Shields", 7026, 0, 1);
            else
                missing++;// entries[1] = new ItemListEntry("", -1);

            if (Armor)
                entries[2 - missing] = new ItemListEntry("Armor", 5141, 0, 2);
            else
                missing++;// entries[2] = new ItemListEntry("", -1);

            if (Weapons)
                entries[3 - missing] = new ItemListEntry("Weapons", 5049, 0, 3);
            else
                missing++;// entries[3] = new ItemListEntry("", -1);

            Array.Resize(ref entries, entries.Length - missing);
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:57,代码来源:BlacksmithMenu.cs


示例7: Chairs

        public static ItemListEntry[] Chairs(Mobile from)
        {
            Type type;
            int itemid;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            int ResAmount = 0;
            int missing = 0;

            ItemListEntry[] entries = new ItemListEntry[9];

            for (int i = 0; i < 9; ++i)
            {
                chance = DefCarpentry.CraftSystem.CraftItems.GetAt(i+6).GetSuccessChance(from, typeof(Board), DefCarpentry.CraftSystem, false, ref allRequiredSkills);
                type = DefCarpentry.CraftSystem.CraftItems.GetAt(i + 6).ItemType;
                craftResource = DefCarpentry.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);
                ResAmount = from.Backpack.GetAmount(typeof(Log)) + from.Backpack.GetAmount(typeof(Board));

                if ((chance > 0) && (ResAmount >= craftResource.Amount))
                {
                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("tS", "t S");
                    name = name.Replace("oC", "o C");
                    name = name.Replace("nC", "n C");
                    name = name.Replace("nB", "n B");
                    name = name.Replace("nT", "n T");
                    name = name.ToLower();
                    if (name == "fancywooden chaircushion")
                        name = "wooden chair";
                    if (name == "wooden chaircushion")
                        name = "wooden chair";

                    itemid = item.ItemID;
                    /*if (itemid == 2903)
                        itemid--;*/

                    entries[i-missing] = new ItemListEntry(String.Format("{0} ({1} wood)", name, craftResource.Amount), itemid, 0, i);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i]= new ItemListEntry("", -1);
            }

            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:54,代码来源:CarpentryMenu.cs


示例8: Main

        public static ItemListEntry[] Main(Mobile from)
        {
            Type type;
            int itemid;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            int ResAmount;
            int missing = 0;

            ItemListEntry[] entries = new ItemListEntry[DefCartography.CraftSystem.CraftItems.Count];

            for (int i = 0; i < DefCartography.CraftSystem.CraftItems.Count; ++i)
            {
                chance = DefCartography.CraftSystem.CraftItems.GetAt(i).GetSuccessChance(from, typeof(BlankMap), DefCartography.CraftSystem, false, ref allRequiredSkills);

                if (chance > 0)
                {
                    type = DefCartography.CraftSystem.CraftItems.GetAt(i).ItemType;
                    craftResource = DefCartography.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);

                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("lM", "l M");
                    name = name.Replace("yM", "y M");
                    name = name.Replace("aC", "a C");
                    name = name.Replace("dM", "d M");
                    name = name.Replace("local map", "A map of the local environs.");
                    name = name.Replace("city map", "A map of suitable for cities.");
                    name = name.Replace("sea chart", "A moderately sized sea chart.");
                    name = name.Replace("world map", "A map of the world.");
                    name = name.ToLower();
                    itemid = item.ItemID;

                    entries[i-missing] = new ItemListEntry(String.Format("{0}", name), 6511 + i,0,i);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i-missing] = new ItemListEntry("", -1);
            }

            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:50,代码来源:CartographyMenu.cs


示例9: Main

        public static ItemListEntry[] Main()
        {
            PolymorphCategory cat = (PolymorphCategory)Categories[0];
            ItemListEntry[] entries = new ItemListEntry[cat.Entries.Length];

            for (int i = 0; i < cat.Entries.Length; i++)
            {
                PolymorphEntry entry = (PolymorphEntry)cat.Entries[i];

                entries[i] = new ItemListEntry(entry.StringName, entry.ArtID);
            }

            return entries;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:14,代码来源:PolymorphMenu.cs


示例10: ItemListMenu

		public ItemListMenu(string question, ItemListEntry[] entries)
		{
			m_Question = question;
			m_Entries = entries;

			do
			{
				m_Serial = m_NextSerial++;
				m_Serial &= 0x7FFFFFFF;
			}
			while (m_Serial == 0);

			m_Serial = (int)((uint)m_Serial | 0x80000000);
		}
开发者ID:zerodowned,项目名称:JustUO-merged-with-EC-Support,代码行数:14,代码来源:ItemListMenu.cs


示例11: Arrows

        public static ItemListEntry[] Arrows(Mobile from)
        {
            Type type;
            int itemid;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            int ResAmount = 0;
            int missing = 0;

            ItemListEntry[] entries = new ItemListEntry[DefBowFletching.CraftSystem.CraftItems.Count];
            for (int i = 0; i < DefBowFletching.CraftSystem.CraftItems.Count; ++i)
            {
                chance = DefBowFletching.CraftSystem.CraftItems.GetAt(i).GetSuccessChance(from, typeof(Log), DefBowFletching.CraftSystem, false, ref allRequiredSkills);

                if (chance > 0)
                {
                    type = DefBowFletching.CraftSystem.CraftItems.GetAt(i).ItemType;
                    craftResource = DefBowFletching.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);

                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.ToLower();
                    itemid = item.ItemID;

                    if (i == 2 || i == 3)
                        entries[i-missing] = new ItemListEntry(String.Format("{0}s", name), itemid, 0, i);
                    else
                        missing++;//entries[i-missing] = new ItemListEntry("", -1);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i-missing] = new ItemListEntry("", -1);
            }
            Array.Resize(ref entries, (DefBowFletching.CraftSystem.CraftItems.Count - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:43,代码来源:BowcraftFletchingMenu.cs


示例12: Bolt

        public static ItemListEntry[] Bolt(Mobile from)
        {
            Type type;
            int itemid;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            int ResAmount;
            int missing = 0;

            ItemListEntry[] entries = new ItemListEntry[3];

            for (int i = 0; i < 3; ++i)
            {
                chance = DefTailoring.CraftSystem.CraftItems.GetAt(i + 14).GetSuccessChance(from, typeof(Cloth), DefTailoring.CraftSystem, false, ref allRequiredSkills);
                type = DefTailoring.CraftSystem.CraftItems.GetAt(i + 14).ItemType;
                craftResource = DefTailoring.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);

                if ((chance > 0) && (from.Backpack.GetAmount(typeof(Cloth)) >= (craftResource).Amount))
                {
                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("tO", "t O");
                    name = name.Replace("fC", "f C");
                    name = name.ToLower();
                    itemid = item.ItemID;

                    entries[i-missing] = new ItemListEntry(String.Format("{0} ({1} cloth)", name, craftResource.Amount), itemid, 0, i);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i-missing] = new ItemListEntry("", -1);
            }

            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:RunUO,代码行数:43,代码来源:TailoringMenu.cs


示例13: Agility

        public static ItemListEntry[] Agility(Mobile from)
        {
            Type type;
            int itemid;
            string name;
            Item item;
            CraftRes craftResource;
            bool allRequiredSkills = true;
            double chance;
            int missing = 0;

            ItemListEntry[] entries = new ItemListEntry[2];

            for (int i = 0; i < 2; ++i)
            {
                chance = DefAlchemy.CraftSystem.CraftItems.GetAt(i + 2).GetSuccessChance(from, typeof(Bloodmoss), DefAlchemy.CraftSystem, false, ref allRequiredSkills);

                if ((chance > 0) && (from.Backpack.GetAmount(typeof(Bloodmoss)) >= DefAlchemy.CraftSystem.CraftItems.SearchFor(DefAlchemy.CraftSystem.CraftItems.GetAt(i+2).ItemType).Ressources.GetAt(0).Amount))
                {
                    type = DefAlchemy.CraftSystem.CraftItems.GetAt(i + 2).ItemType;
                    craftResource = DefAlchemy.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);

                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("rA", "r A");
                    name = name.Replace("yP", "y P");
                    name = name.Replace(" Potion", "");
                    //name = name.ToLower();
                    itemid = item.ItemID;

                    entries[i-missing] = new ItemListEntry(String.Format("{0}", name, craftResource.Amount), itemid, 0, i);

                    if (item != null)
                        item.Delete();
                }
                else
                    missing++;//entries[i-missing] = new ItemListEntry("", -1);
            }
            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:43,代码来源:AlchemyMenu.cs


示例14: Weapons

        //WEAPONS
        private static ItemListEntry[] Weapons(Mobile from)
        {
            bool Swords = true;
            bool Axes = true;
            bool Maces = true;
            bool Polearms = true;
            int missing = 0;

            CraftRes craftResource;
            int resHue = 0;
            int maxAmount = 0;
            Object message = null;
            bool allRequiredSkills = true;
            double chance;

            //Swords
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(26).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(26).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Dagger
            {
                Swords = false;
            }
            //Axes
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(34).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(34).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Double Axe
            {
                Axes = false;
            }
            //Maces
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(45).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(45).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Mace
            {
                Maces = false;
            }
            //Polearms
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(42).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(42).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Spear
            {
                Polearms = false;
            }

            ItemListEntry[] entries = new ItemListEntry[4];

            if (Swords)
                entries[0-missing] = new ItemListEntry("Swords & Blades", 5049, 0, 0);
            else
                missing++;//entries[0] = new ItemListEntry("", -1);

            if (Axes)
                entries[1 - missing] = new ItemListEntry("Axes", 3913, 0, 1);
            else
                missing++;//entries[1] = new ItemListEntry("", -1);

            if (Maces)
                entries[2 - missing] = new ItemListEntry("Maces & Hammers", 5127, 0, 2);
            else
                missing++;//entries[2] = new ItemListEntry("", -1);

            if (Polearms)
                entries[3-missing] = new ItemListEntry("Polearms", 3917, 0, 3);
            else
                missing++;//entries[3] = new ItemListEntry("", -1);

            Array.Resize(ref entries, entries.Length - missing);
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:66,代码来源:BlacksmithMenu.cs


示例15: Shields

        //SHEILDS
        private static ItemListEntry[] Shields(Mobile from)
        {
            Type type;
            Item item = null;
            int itemid;
            string name;
            int missing = 0;

            CraftRes craftResource;
            int resHue = 0;
            int maxAmount = 0;
            Object message = null;

            bool allRequiredSkills = true;
            double chance;

            ItemListEntry[] entries = new ItemListEntry[6];

            for (int i = 0; i < 6; ++i)
            {
                type = DefBlacksmithy.CraftSystem.CraftItems.GetAt(i + 18).ItemType;
                craftResource = DefBlacksmithy.CraftSystem.CraftItems.SearchFor(type).Ressources.GetAt(0);
                chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(i + 18).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);

                if ((from.Backpack.GetAmount(typeof(IronIngot)) >= DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(i + 18).ItemType).Ressources.GetAt(0).Amount) && (chance > 0.0))
                {
                    item = null;
                    try { item = Activator.CreateInstance(type) as Item; }
                    catch { }
                    name = item.GetType().Name;
                    name = name.Replace("S", " S");
                    name = name.Replace("K", " K");
                    name = name.ToLower();
                    itemid = item.ItemID;
                    if (itemid == 7033)
                        itemid = 7032;

                    entries[i-missing] = new ItemListEntry(String.Format("{0} ({1} ingots)", name, craftResource.Amount), itemid, 0, i);
                }
                else
                {
                    missing++;//entries[i-missing] = new ItemListEntry("", -1);
                }

                if (item != null)
                    item.Delete();
            }

            Array.Resize(ref entries, (entries.Length - missing));
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:52,代码来源:BlacksmithMenu.cs


示例16: Main

        public static ItemListEntry[] Main(Mobile from)
        {
            bool allRequiredSkills = true;
            ItemListEntry[] entries = new ItemListEntry[8];
            double min = 0;
            SkillName skillname = SkillName.Magery;
            Skill skill = from.Skills[skillname];
            bool hasSpell = false;
            int count;
            int missing = 0;

            count = 0;
            for (int i = 0; i < 8; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 0) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(0).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[0-missing] = new ItemListEntry("First Circle", 8384, 0, 0);
            else
                missing++;// entries[0] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 8; i < 16; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 1) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(8).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[1 - missing] = new ItemListEntry("Second Circle", 8385,0,1);
            else
                missing++;// entries[1] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 16; i < 24; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 2) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(16).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[2 - missing] = new ItemListEntry("Third Circle", 8386,0,2);
            else
                missing++;// entries[2] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 24; i < 32; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 3) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(24).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[3 - missing] = new ItemListEntry("Forth Circle", 8387,0,3);
            else
                missing++;// entries[3] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 32; i < 40; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 4) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(32).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[4 - missing] = new ItemListEntry("Fifth Circle", 8388,0,4);
            else
                missing++;// entries[4] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 40; i < 48; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 5) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(40).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[5 - missing] = new ItemListEntry("Sixth Circle", 8389,0,5);
            else
                missing++;// entries[5] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 48; i < 56; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 6) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(48).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[6 - missing] = new ItemListEntry("Seventh Circle", 8390,0,6);
            else
                missing++;// entries[6] = new ItemListEntry("", -1);

            count = 0;
            for (int i = 56; i < 64; i++)
                if (GetScroll(from, DefInscription.CraftSystem.CraftItems.GetAt(i).ItemType))
                    count++;

            min = ((100.0 / 7.0) * 7) - 20;
            if ((DefInscription.CraftSystem.CraftItems.GetAt(56).GetSuccessChance(from, typeof(BlackPearl), DefInscription.CraftSystem, false, ref allRequiredSkills) > 0) && (skill.Value >= min) && (count > 0))
                entries[7 - missing] = new ItemListEntry("Eighth Circle", 8391,0,7);
            else
                missing++;// entries[7] = new ItemListEntry("", -1);

            Array.Resize(ref entries, entries.Length - missing);
//.........这里部分代码省略.........
开发者ID:Godkong,项目名称:RunUO,代码行数:101,代码来源:InscriptionMenu.cs


示例17: Armor

        //ARMOR
        private static ItemListEntry[] Armor(Mobile from)
        {
            bool Platemail = true;
            bool Chainmail = true;
            bool Ringmail = true;
            bool Helmets = true;
            int missing = 0;

            CraftRes craftResource;
            int resHue = 0;
            int maxAmount = 0;
            Object message = null;
            bool allRequiredSkills = true;
            double chance;

            //Platemail
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(9).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(9).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Gorget
            {
                Platemail = false;
            }
            //Chainmail
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(5).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(5).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Legs
            {
                Chainmail = false;
            }
            //Ringmail
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(0).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(0).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Gloves
            {
                Ringmail = false;
            }
            //Helmets
            chance = DefBlacksmithy.CraftSystem.CraftItems.GetAt(4).GetSuccessChance(from, typeof(IronIngot), DefBlacksmithy.CraftSystem, false, ref allRequiredSkills);
            if ((from.Backpack.GetAmount(typeof(IronIngot)) < DefBlacksmithy.CraftSystem.CraftItems.SearchFor(DefBlacksmithy.CraftSystem.CraftItems.GetAt(4).ItemType).Ressources.GetAt(0).Amount) || (chance <= 0.0)) //Gloves
            {
                Helmets = false;
            }

            ItemListEntry[] entries = new ItemListEntry[4];

            if (Platemail)
                entries[0-missing] = new ItemListEntry("Platemail", 5141, 0, 0);
            else
                missing++;// entries[0] = new ItemListEntry("", -1);

            if (Chainmail)
                entries[1 - missing] = new ItemListEntry("Chainmail", 5055, 0, 1);
            else
                missing++;//entries[1] = new ItemListEntry("", -1);

            if (Ringmail)
                entries[2 - missing] = new ItemListEntry("Ringmail", 5100, 0, 2);
            else
                missing++;//entries[2] = new ItemListEntry("", -1);

            if (Helmets)
                entries[3 - missing] = new ItemListEntry("Helmets", 5138, 0, 3);
            else
            {
                missing++;//entries[3] = new ItemListEntry("", -1);
            }

            Array.Resize(ref entries, entries.Length - missing);
            return entries;
        }
开发者ID:Godkong,项目名称:Origins,代码行数:68,代码来源:BlacksmithMenu.cs


示例18: InscribeSystem

 static InscribeSystem()
 {
     m_MainMenu = new ItemListEntry[8];
     for (int c=0;c<8;c++)
     {
         ItemListEntry[] entry = new ItemListEntry[8];
         for (int n=0;n<8;n++)
             entry[n] = new CSI_Scroll( c, n, c*8+n );
         m_MainMenu[c] = new CraftSubMenu( TileData.ItemTable[CircleIDOffset+c].Name, CircleIDOffset+c, entry );
     }
 }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:11,代码来源:Inscribe.cs


示例19: CraftMenu

 public CraftMenu( CraftSystem system, ItemListEntry[] entries )
     : base("What would you like to make?", entries)
 {
     m_System = system;
 }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:5,代码来源:CraftCore.cs


示例20: GetEquip

            private static ItemListEntry[] GetEquip( Mobile m )
            {
                ItemListEntry[] entries = new ItemListEntry[m.Items.Count];

                for ( int i = 0; i < m.Items.Count; ++i )
                {
                    Item item = m.Items[i];

                    entries[i] = new ItemListEntry( String.Format( "{0}: {1}", item.Layer, item.GetType().Name ), item.ItemID, item.Hue );
                }

                return entries;
            }
开发者ID:notsentient,项目名称:RunZHA,代码行数:13,代码来源:Handlers.cs



注:本文中的Server.Menus.ItemLists.ItemListEntry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MirDatabase.MonsterInfo类代码示例发布时间:2022-05-26
下一篇:
C# Items.WayPoint类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap