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:
@@ -187,6 +187,12 @@ namespace Game.Chat
|
|||||||
case 'c':
|
case 'c':
|
||||||
case 'C':
|
case 'C':
|
||||||
// skip color
|
// skip color
|
||||||
|
if (i + 2 >= source.Length)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (source[i + 2] == 'n')
|
||||||
|
i = source.IndexOf(':', i); // numeric color id
|
||||||
|
else
|
||||||
i += 9;
|
i += 9;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
@@ -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 =
|
||||||
|
|||||||
Reference in New Issue
Block a user