Skip to content

Commit

Permalink
fix: Fixes duplicate command listed. (#1677)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman committed Feb 12, 2024
1 parent 4479555 commit 48e47f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Projects/UOContent/Commands/HelpInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ public static void FillTable()
.ReplaceOrdinal("<", "(")
.ReplaceOrdinal(">", ")");

if (e.Handler.Target == null && usage == null && desc == null)
if (e.Handler.Target != null && usage == null && desc == null)
{
continue;
}

var aliasesAttr = mi.GetCustomAttribute(typeof(AliasesAttribute), false) as AliasesAttribute;
var aliases = aliasesAttr?.Aliases;

list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases, usage, null, desc));
list.Add(new CommandInfo(e.AccessLevel, e.Command, aliases, usage ?? e.Command, null, desc ?? "No description available."));
}

for (var i = 0; i < TargetCommands.AllCommands.Count; ++i)
Expand All @@ -130,7 +130,7 @@ public static void FillTable()

desc = desc
.ReplaceOrdinal("<", "(")
.ReplaceOrdinal(">", ")");
.ReplaceOrdinal(">", ")") ?? "No description available.";

List<string> modsList = [];

Expand Down
2 changes: 2 additions & 0 deletions Projects/UOContent/Engines/Factions/Core/Faction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,8 @@ public static void FactionItemReset_OnCommand(CommandEventArgs e)
e.Mobile.SendMessage($"{count} items reset");
}

[Usage("FactionCommander")]
[Description("Sets the targeted player as the faction commander.")]
public static void FactionCommander_OnCommand(CommandEventArgs e)
{
e.Mobile.SendMessage("Target a player to make them the faction commander.");
Expand Down
Binary file modified docs/commands/commands.7z
Binary file not shown.

0 comments on commit 48e47f9

Please sign in to comment.