protected override void UpdateWeapon(MeleeWeaponPrimitiveBase weapon, HuntingHorn resultWeapon) { base.UpdateWeapon(weapon, resultWeapon); HuntingHornNotesPrimitive notes = huntingHornNotes.Table[weapon.Weapon1Id]; resultWeapon.Songs = FindSongs(notes); }
private bool IsSongNoteAvailable(HuntingHornNoteColor note, HuntingHornNotesPrimitive notes) { if (note == HuntingHornNoteColor.Disabled) { return(true); } return(note == notes.Note1 || note == notes.Note2 || note == notes.Note3); }
private HuntingHornSong[] FindSongs(HuntingHornNotesPrimitive notes) { var result = new List <HuntingHornSong>(); foreach (HuntingHornSongPrimitive song in huntingHornSongs.List) { if (IsSongNoteAvailable(song.Note1, notes) && IsSongNoteAvailable(song.Note2, notes) && IsSongNoteAvailable(song.Note3, notes) && IsSongNoteAvailable(song.Note4, notes)) { result.Add(ConvertHuntingHornSong(song)); } } return(result.ToArray()); }