当前位置: 首页>>代码示例>>C#>>正文


C# FileFormats.ItemTypeTable类代码示例

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


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

示例1: Create

        public List<IItemAttributeCreator> Create(ItemTypeTable itemType)
        {
            var creatorList = new List<IItemAttributeCreator> {new DefaultAttributeCreator()};

            //if (Item.IsWeapon(itemType)) creatorList.Add(new WeaponAttributeCreator());
            //else if (Item.IsPotion(itemType))  creatorList.Add(new PotionAttributeCreator());

            return creatorList;
        }
开发者ID:God601,项目名称:mooege,代码行数:9,代码来源:AttributeCreatorFactory.cs

示例2: HierarchyToHashList

 public static List<int> HierarchyToHashList(ItemTypeTable itemType)
 {
     List<int> result = new List<int>();
     var types = HierarchyToList(itemType);
     foreach (var type in types)
     {
         result.Add(type.Hash);
     }
     return result;
 }
开发者ID:Im2ortal,项目名称:mooege,代码行数:10,代码来源:ItemGroup.cs

示例3: HierarchyToList

 public static List<ItemTypeTable> HierarchyToList(ItemTypeTable itemType)
 {
     List<ItemTypeTable> result = new List<ItemTypeTable>();
     var curType = itemType;
     if (curType != null)
     {
         result.Add(curType);
         while (curType.ParentType != -1)
         {
             curType = ItemTypes[curType.ParentType];
             result.Add(curType);
         }
     }
     return result;
 }
开发者ID:Im2ortal,项目名称:mooege,代码行数:15,代码来源:ItemGroup.cs

示例4: IsDye

 public static bool IsDye(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Dye");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs

示例5: IsJournalOrScroll

 public static bool IsJournalOrScroll(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Scroll") ||
         ItemGroup.IsSubType(itemType, "Book");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:5,代码来源:Item.cs

示例6: IsRuneOrJewel

 public static bool IsRuneOrJewel(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Gem") ||
         ItemGroup.IsSubType(itemType, "SpellRune");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:5,代码来源:Item.cs

示例7: IsAccessory

 public static bool IsAccessory(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Jewelry");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs

示例8: IsGold

 public static bool IsGold(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Gold");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs

示例9: IsBelt

 public static bool IsBelt(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Belt");
 }
开发者ID:dark0ne,项目名称:mooege,代码行数:4,代码来源:Item.cs

示例10: IsOffhand

 public static bool IsOffhand(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Offhand");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs

示例11: Is2H

 public static bool Is2H(ItemTypeTable type)
 {
     return (type.Array[0] & 0x400) != 0;
 }
开发者ID:Im2ortal,项目名称:mooege,代码行数:4,代码来源:ItemGroup.cs

示例12: IsSubType

        public static bool IsSubType(ItemTypeTable type, int rootTypeHash)
        {
            if (type == null)
                return false;

            if (type.Hash == rootTypeHash)
                return true;
            var curType = type;
            while (curType.ParentType != -1)
            {
                curType = ItemTypes[curType.ParentType];
                if (curType.Hash == rootTypeHash)
                {
                    return true;
                }
            }
            return false;
        }
开发者ID:Im2ortal,项目名称:mooege,代码行数:18,代码来源:ItemGroup.cs

示例13: IsWeapon

 public static bool IsWeapon(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Weapon");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs

示例14: GenerateRandom

 // generates a random item from given type category.
 // we can also set a difficulty mode parameter here, but it seems current db doesnt have nightmare or hell-mode items with valid snoId's /raist.
 public static Item GenerateRandom(Mooege.Core.GS.Actors.Actor player, ItemTypeTable type)
 {
     var itemDefinition = GetRandom(Items.Values
         .Where(def => ItemGroup
             .HierarchyToHashList(ItemGroup.FromHash(def.ItemType1)).Contains(type.Hash)).ToList());
     return CreateItem(player, itemDefinition);
 }
开发者ID:ralje,项目名称:mooege,代码行数:9,代码来源:ItemGenerator.cs

示例15: IsArmor

 public static bool IsArmor(ItemTypeTable itemType)
 {
     return ItemGroup.IsSubType(itemType, "Armor");
 }
开发者ID:angerwin,项目名称:d3sharp,代码行数:4,代码来源:Item.cs


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