private int getLastUnfilledByType(MysteryGift Gift, MysteryGiftAlbum Album) { for (int i = 0; i < Album.Gifts.Length; i++) { if (!Album.Gifts[i].Empty) continue; if (Album.Gifts[i].Type != Gift.Type) continue; return i; } return -1; }
private static int GetLastUnfilledByType(MysteryGift Gift, MysteryGiftAlbum Album) { for (int i = 0; i < Album.Gifts.Length; i++) { if (!Album.Gifts[i].Empty) { continue; } if (Album.Gifts[i].Type != Gift.Type) { continue; } return(i); } return(-1); }