Core/Unit: Make HandleEmoteCommand typesafe

Port From (https://github.com/TrinityCore/TrinityCore/commit/2e3c612c808bca7601b32ce5dca28b204e652773)
This commit is contained in:
hondacrx
2022-03-03 13:44:00 -05:00
parent b5206453f6
commit bfd3cd9731
4 changed files with 14 additions and 13 deletions
+3 -6
View File
@@ -36,15 +36,12 @@ namespace Game.Chat
class DebugCommands
{
[Command("anim", RBACPermissions.CommandDebugAnim)]
static bool HandleDebugAnimCommand(CommandHandler handler, StringArguments args)
static bool HandleDebugAnimCommand(CommandHandler handler, uint emoteId)
{
if (args.Empty())
return false;
uint animId = args.NextUInt32();
Unit unit = handler.GetSelectedUnit();
if (unit)
unit.HandleEmoteCommand((Emote)animId);
unit.HandleEmoteCommand((Emote)emoteId);
return true;
}