Browse Source

Add `/phb list` feature

Done on github's web editor so if it's broken, that's why. Should be all good though, prints a list of (alphabetically-sorted) hunts grouped by expac into your chat.
Lilith 2 years ago
parent
commit
fe45b44b3a
1 changed files with 10 additions and 0 deletions
  1. 10 0
      HuntBuddy/Plugin.cs

+ 10 - 0
HuntBuddy/Plugin.cs

@@ -215,6 +215,16 @@ namespace HuntBuddy
 							}
 						}
 						break;
+					case "ls":
+					case "list":
+						if (this.MobHuntEntries.Count < 1) {
+							Chat.Print("No hunt marks found. If this doesn't sound right, please use `/phb reload` and try again.");
+							break;
+						}
+						foreach (string expac in this.MobHuntEntries.Keys) {
+							Chat.Print($"{expac}: {string.Join(", ", this.MobHuntEntries[expac].Values.SelectMany(e => e).OrderBy(s => s.Name))}");
+						}
+						break;
 					default:
 						this.OpenConfigUi();
 						break;