Core/Chat: Fixed chat language translations for messages containing item links using new 11.1.5 color format

Port From (https://github.com/TrinityCore/TrinityCore/commit/f84cd43b36c557aff5673ded28d2c557bacddb98)
This commit is contained in:
Hondacrx
2025-08-18 20:54:23 -04:00
parent 8b82e1c494
commit df197587a3
+13 -2
View File
@@ -187,7 +187,13 @@ namespace Game.Chat
case 'c': case 'c':
case 'C': case 'C':
// skip color // skip color
i += 9; if (i + 2 >= source.Length)
break;
if (source[i + 2] == 'n')
i = source.IndexOf(':', i); // numeric color id
else
i += 9;
break; break;
case 'r': case 'r':
++i; ++i;
@@ -232,7 +238,12 @@ namespace Game.Chat
static char upper_backslash(char c) static char upper_backslash(char c)
{ {
return c == '/' ? '\\' : char.ToUpper(c); if (c == '/')
return '\\';
if (c >= 'a' && c <= 'z')
return (char)('A' + (char)(c - 'a'));
else
return c;
} }
static uint[] s_hashtable = static uint[] s_hashtable =