فهرست منبع

add a clarifying comment to the `/phb next` code

Just to avoid confusion, I added a comment that explains two blocks that first glance would suggest could be merged into a single if/elseif but that really can't.
Lilith 2 سال پیش
والد
کامیت
1a2cca59c1
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      HuntBuddy/Plugin.cs

+ 4 - 0
HuntBuddy/Plugin.cs

@@ -170,6 +170,7 @@ namespace HuntBuddy
 										.Where(filterPredicate)
 										.ToList()
 									: new List<MobHuntEntry>();
+								// if we didn't find any candidates, we try a different method to fill it
 								if (candidates.Count == 0)
 								{
 									PluginLog.Information("Nothing available in current expansion, looking globally");
@@ -180,6 +181,9 @@ namespace HuntBuddy
 											.Where(filterPredicate)
 											.ToList();
 								}
+								// regardless of HOW we got our candidates, assuming we did in fact get them, we pick one
+								// note that this can't be merged into the above block because the above MAY run, and if so MUST run first,
+								// but this block must ALWAYS run, regardless
 								if (candidates.Count >= 1)
 								{
 									PluginLog.Information($"Found {candidates.Count}");