private void UpdateInformation() { InsectGlaiveEventArgs dummyArgs = new InsectGlaiveEventArgs(Context); OnRedBuffUpdate(this, dummyArgs); OnWhiteBuffUpdate(this, dummyArgs); OnOrangeBuffUpdate(this, dummyArgs); OnKinsectChargeBuffChange(this, dummyArgs); OnKinsectChargeBuffUpdate(this, dummyArgs); OnKinsectStaminaUpdate(this, dummyArgs); OnBuffQueueChanged(this, dummyArgs); OnSafijiivaCounterUpdate(this, new JobEventArgs(Context)); }
private void OnKinsectChargeBuffUpdate(object source, InsectGlaiveEventArgs args) { float buffTimer = 0; switch (args.KinsectChargeType) { case KinsectChargeBuff.Red: buffTimer = args.RedKinsectTimer; break; case KinsectChargeBuff.Yellow: buffTimer = args.YellowKinsectTimer; break; } Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() => { ChargeBuffTimer = buffTimer > 60 ? TimeSpan.FromSeconds(buffTimer).ToString("m\\:ss") : TimeSpan.FromSeconds(buffTimer).ToString("ss"); })); }
private void OnKinsectChargeBuffChange(object source, InsectGlaiveEventArgs args) { Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() => { switch (args.KinsectChargeType) { case KinsectChargeBuff.None: KinsectChargeImage = null; break; case KinsectChargeBuff.Red: KinsectChargeImage = "pack://siteoforigin:,,,/HunterPie.Resources/UI/Class/KinsectRedCharge.png"; break; case KinsectChargeBuff.Yellow: KinsectChargeImage = "pack://siteoforigin:,,,/HunterPie.Resources/UI/Class/KinsectYellowCharge.png"; break; } })); }
private void OnBuffQueueChanged(object source, InsectGlaiveEventArgs args) { Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() => { switch (args.BuffQueueSize) { case 0: SecondBuffQueued = FirstBuffQueued = "#CC464646"; break; case 1: SecondBuffQueued = FirstBuffQueued = GetKinsectBuffColorByID(args.FirstBuffQueued); break; case 2: FirstBuffQueued = GetKinsectBuffColorByID(args.FirstBuffQueued); SecondBuffQueued = GetKinsectBuffColorByID(args.SecondBuffQueued); break; } })); }