public HuntingHornNoteEventArgs(HuntingHorn huntinghorn) { RawNotes = huntinghorn.RawNotes; Notes = huntinghorn.Notes; FirstNoteIndex = huntinghorn.FirstNoteIndex; NotesQueued = huntinghorn.NotesQueued; }
public HuntingHornEventArgs(HuntingHorn huntingHorn) { Songs = huntingHorn.Songs; FirstNoteColor = huntingHorn.FirstNoteColor; SecondNoteColor = huntingHorn.SecondNoteColor; ThirdNoteColor = huntingHorn.ThirdNoteColor; }
private Weapon CreateWeapon(JObject weapon, WeaponType type) { int attack; int affinity; int defense; EldersealLevel eldersealLevel; var name = (string)weapon["name"]; var rarity = (int)weapon["rarity"]; var attributes = (JObject)weapon["attributes"]; ExtractAttributes(attributes, out attack, out affinity, out defense, out eldersealLevel); ElementInfo[] elementInfo = ExtractElementInfo((JArray)weapon["elements"]); int[] slots = ExtractSlots((JArray)weapon["slots"]); int[] sharpness = ExtractSharpness((JObject)weapon["sharpness"]); Weapon outputWeapon; if (type == WeaponType.ChargeBlade) { ChargeBladePhialType phialType = ExtractChargeBladePhialType(attributes); outputWeapon = new ChargeBlade(this, name, phialType, rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } else if (type == WeaponType.HuntingHorn) { // mhw-db.com is missing melodies info outputWeapon = new HuntingHorn(this, name, new Melody[0], rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } else if (type == WeaponType.SwitchAxe) { ExtractSwitchAxePhialInfo(attributes, out SwitchAxePhialType phialType, out int phialValue); outputWeapon = new SwitchAxe(this, name, phialType, phialValue, rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } else if (type == WeaponType.Gunlance) { ExtractGunlanceShellingInfo(attributes, out GunlanceShellingType shellingType, out int shellingLevel); outputWeapon = new Gunlance(this, name, shellingType, shellingLevel, rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } else if (type == WeaponType.InsectGlaive) { KinsectBonusType kinsectBonusType = ExtractInsectGlaiveKinsectBonusType(attributes); outputWeapon = new InsectGlaive(this, name, kinsectBonusType, rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } else { outputWeapon = new Weapon(this, name, type, rarity, attack, affinity, defense, sharpness, null, eldersealLevel, elementInfo, slots); } return(outputWeapon.UpdateId((int)weapon["id"])); }
public HuntingHornSongEventArgs(HuntingHorn huntingHorn) { Songs = huntingHorn.Songs; SongQueue = huntingHorn.SongQueue; RawSongQueue = huntingHorn.RawSongQueue; SongsQueued = huntingHorn.SongsQueued; LastSongIndex = huntingHorn.LastSongIndex; SongIndexesQueue = huntingHorn.SongIndexesQueue; RawSongIndexesQueue = huntingHorn.RawSongIndexesQueue; SongIndexesQueued = huntingHorn.SongIndexesQueued; SongIndexesFirstIndex = huntingHorn.SongIndexesFirstIndex; IsCastingSongs = huntingHorn.IsCastingBuffs; IsCastingInterrupted = huntingHorn.IsCastingInterrupted; }
private void OnNoteColorUpdate(object source, HuntingHornEventArgs args) { if (args.FirstNoteColor == Core.Enums.NoteColorId.None || args.SecondNoteColor == Core.Enums.NoteColorId.None || args.ThirdNoteColor == Core.Enums.NoteColorId.None) { return; } Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() => { cachedBrushes[0] = HuntingHorn.GetColorBasedOnColorId(args.FirstNoteColor); cachedBrushes[1] = HuntingHorn.GetColorBasedOnColorId(args.SecondNoteColor); cachedBrushes[2] = HuntingHorn.GetColorBasedOnColorId(args.ThirdNoteColor); })); }
public void SetContext(HuntingHorn context) { Context = context; SetupComponents(); HookEvents(); }