Ejemplo n.º 1
0
 public ItemData(ITEMCODE _code, string _TempName, string _ImagePath, int _weight, Skill TempSkill)
 {
     TempName  = _TempName;
     Code      = _code;
     ImagePath = _ImagePath;
     weight    = _weight;
     skill     = TempSkill;
 }
Ejemplo n.º 2
0
    public static ItemData GetItem(ITEMCODE Code)
    {
        ItemData item;

        if (Text == null)//아이템 처음들어온거면
        {
            MakeItem();
        }
        List <string> TempStr = Items[(int)Code];

        TempStr.Remove("\r");
        TempName = TempStr[1];
        if (TempStr[4] == "P")
        {//패시브임
            TempSkill = new Skill(TempName);

            //파싱한 내용에 따라서 구현
            OptionSetting(TempStr, 6); //효과
        }
        else
        {                                   //포션임
            string Consumable = TempStr[5]; //사용횟수체크
            int    UsingNum;
            int    TurnNum;
            int    i   = 0;
            string Str = "";

            while (Consumable[i] != 'U')
            {
                Str += Consumable[i];
                i++;
            }
            UsingNum = int.Parse(Str);
            i++;
            while (Consumable[i] != 'T')
            {
                Str += Consumable[i];
                i++;
            }
            TurnNum   = int.Parse(Str);
            TempSkill = new StackSkill(UsingNum, TempName);
            OptionSetting(TempStr, 6);
            //파싱한 내용 따라서 구현
        }
        item      = new ItemData(Code, TempStr[1], TempStr[2], int.Parse(TempStr[3]), TempSkill);
        TempSkill = null;
        return(item);
    }