Core/ChatCommands: Add support for enum type arguments

Port From (https://github.com/TrinityCore/TrinityCore/commit/3923650aeb75611023aa1d46a4328838c8e0a33c)
This commit is contained in:
hondacrx
2022-03-03 13:51:22 -05:00
parent bfd3cd9731
commit 0116a7efa5
2 changed files with 7 additions and 9 deletions
+3
View File
@@ -66,6 +66,9 @@ namespace Game.Chat
if (Hyperlink.TryConsume(out value, type, args))
return value;
if (type.IsEnum)
type = type.GetEnumUnderlyingType();
switch (Type.GetTypeCode(type))
{
case TypeCode.SByte: