public static void UpdateTSMode(Menu Config) { Menu = Config; bool Priority = false; TargetSelector.TargetingMode mode = TargetSelector.GetTargetingMode(); switch (Config.Item("Selected Mode").GetValue <StringList>().SelectedIndex) { case 0: mode = TargetSelector.TargetingMode.AutoPriority; break; case 1: mode = TargetSelector.TargetingMode.Closest; break; case 2: mode = TargetSelector.TargetingMode.LessAttack; break; case 3: mode = TargetSelector.TargetingMode.LessCast; break; case 4: mode = TargetSelector.TargetingMode.LowHP; break; case 5: mode = TargetSelector.TargetingMode.MostAD; break; case 6: mode = TargetSelector.TargetingMode.MostAP; break; case 7: mode = TargetSelector.TargetingMode.NearMouse; break; case 8: Priority = true; break; } if (TargetSelector.GetTargetingMode() != mode && Priority == false) { TargetSelector.SetTargetingMode(mode); } if (selectedTarget.IsDead && selectedTarget != null) { selectedTarget = null; } }