コード例 #1
0
    public void WearUp(int itemID, ArmorType type)
    {
        WearDown(type);
        switch (type)
        {
        case ArmorType.Body:
            Pocket.Remove(BodyID);
            BodyID = itemID;
            ChangeCharacteristicsWithItem(BodyID, 2);
            break;

        case ArmorType.Hands:
            Pocket.Remove(HandsID);
            HandsID = itemID;
            ChangeCharacteristicsWithItem(HandsID, 2);
            break;

        case ArmorType.Head:
            Pocket.Remove(HeadID);
            HeadID = itemID;
            ChangeCharacteristicsWithItem(HeadID, 2);
            break;

        case ArmorType.Legs:
            Pocket.Remove(LegsID);
            LegsID = itemID;
            ChangeCharacteristicsWithItem(LegsID, 2);
            break;
        }
    }