當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。