public static MaterialBase GetItem(long objNo, bool isRandomValue)
    {
        TableMaterialData data = Array.Find(Table, i => i.ObjNo == objNo);
        MaterialBase      item = new MaterialBase();

        item.Initialize();
        AttachData(item, data, isRandomValue);

        return(item);
    }
    public static MaterialBase GetItem(MaterialType type)
    {
        TableMaterialData data = Array.Find(Table, i => i.Mtype == type);

        MaterialBase item = new MaterialBase();

        item.Initialize();
        AttachData(item, data, false);
        return(item);
    }
    private static void AttachData(MaterialBase item, TableMaterialData data, bool isRandomValue)
    {
        item.ObjNo = data.ObjNo;
        item.MType = data.Mtype;
        if (GameStateInformation.IsEnglish == false)
        {
            item.DisplayName = data.DisplayName;
            item.Description = data.Description;
        }
        else
        {
            item.DisplayName = data.DisplayNameEn;
            item.Description = data.DescriptionEn;
        }
        item.ThrowDexterity = data.ThrowDexterity;
        item.StrengthValue  = data.Strength;

        if (isRandomValue == false)
        {
            return;
        }

        int optioncount = CommonFunction.ConvergenceRandom(data.OptionAddStart, data.OptionAddContinue, data.OptionAddReduce);
        int index       = 0;

        for (int i = 0; i < optioncount; i++)
        {
            //30回回して終わらなかったら強制終了
            if (index > 30)
            {
                break;
            }
            index++;
            uint       rnd    = CommonFunction.GetRandomUInt32();
            BaseOption newOpt = TableOptionCommon.GetValue(data.OBType, rnd, data.OptionPowStart, data.OptionPowContinue, data.OptionPowReduce);

            //同じオプションがすでに含まれていたらもう一度算出
            if (CommonFunction.IsNull(newOpt) == true)
            {
                i--;
                continue;
            }
            BaseOption containOpt = item.Options.Find(o => o.ObjNo == newOpt.ObjNo);
            if (CommonFunction.IsNull(containOpt) == false)
            {
                i--;
                continue;
            }
            item.Options.Add(newOpt);
        }
    }