Add Revert command to /glamour

The /glamour command can be used to apply a glamor to character, but
there's no way to remove a glamour and revert to default without using
the GUI. Introduce a Revert command that can be used to revert a player
back to their default.
This commit is contained in:
Jacob Keller 2023-02-23 19:04:10 -08:00
parent 9dfa948c81
commit 3529351b82

View file

@ -18,7 +18,7 @@ namespace Glamourer
{ {
public class Glamourer : IDalamudPlugin public class Glamourer : IDalamudPlugin
{ {
private const string HelpString = "[Copy|Apply|Save],[Name or PlaceHolder],<Name for Save>"; private const string HelpString = "[Copy|Apply|Save|Revert],[Name or PlaceHolder],<Name for Save>";
public string Name public string Name
=> "Glamourer"; => "Glamourer";
@ -132,6 +132,11 @@ namespace Glamourer
} }
} }
public void RevertCommand(Character player)
{
GlamourerIpc.Revert(player);
}
public void OnGlamour(string command, string arguments) public void OnGlamour(string command, string arguments)
{ {
static void PrintHelp() static void PrintHelp()
@ -193,6 +198,11 @@ namespace Glamourer
SaveCommand(player, split[2]); SaveCommand(player, split[2]);
return; return;
} }
case "revert":
{
RevertCommand(player);
return;
}
default: default:
PrintHelp(); PrintHelp();
return; return;