public GiftCondition ToGiftCondition(GameData gameData) { var newGC = new GiftCondition(); newGC.type = Type; newGC.dateGiftType = DateGiftType; newGC.inverse = Inverse; newGC.itemDefinition = gameData.Items.Get(ItemDefinitionID); return(newGC); }
public GiftConditionInfo(GiftCondition giftCondition) { if (giftCondition == null) { throw new ArgumentNullException(nameof(giftCondition)); } Type = giftCondition.type; ItemDefinitionID = giftCondition.itemDefinition?.id ?? -1; DateGiftType = giftCondition.dateGiftType; Inverse = giftCondition.inverse; }