private void OnClassUpdated(object sender, HookEventArgs args) { Debugger.WriteLine("Updating maid and/or yotogi class info."); MaidInfo maid = SelectedMaid; if (maid == null) { Debugger.WriteLine(LogLevel.Warning, "Maid is NULL!"); return; } if (maid.Maid != args.CallerMaid) { Debugger.WriteLine(LogLevel.Warning, "Caller maid is not the selected one! Aborting..."); return; } if (valueUpdateQueue[currentQueue].ContainsKey(args.Tag)) { Debugger.WriteLine(LogLevel.Error, "Tag already in update queue! Aborting..."); return; } switch (args.Tag) { case MaidChangeType.MaidClassType: valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateMaidClasses()); break; case MaidChangeType.YotogiClassType: valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateYotogiClasses()); break; case MaidChangeType.MaidAndYotogiClass: valueUpdateQueue[currentQueue].Add( args.Tag, () => { maid.UpdateMaidBonusValues(); maid.UpdateMaidClasses(); maid.UpdateYotogiClasses(); }); break; } }