Remove invalid icon tags from player titles.
This commit is contained in:
parent
fe8ef3edff
commit
0b8567e662
@ -2575,7 +2575,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_title = isPlayer() && (value.length() > 21) ? value.substring(0, 20) : value;
|
if (isPlayer())
|
||||||
|
{
|
||||||
|
// Remove all {i<number>} where the number is not in the range 0-34.
|
||||||
|
final String title = value.replaceAll("\\{i-(\\d+)|\\{i(3[5-9]|[4-9]\\d*)\\}", "");
|
||||||
|
|
||||||
|
if (title.length() > 21)
|
||||||
|
{
|
||||||
|
_title = title.substring(0, 20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2586,7 +2586,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_title = isPlayer() && (value.length() > 21) ? value.substring(0, 20) : value;
|
if (isPlayer())
|
||||||
|
{
|
||||||
|
// Remove all {i<number>} where the number is not in the range 0-34.
|
||||||
|
final String title = value.replaceAll("\\{i-(\\d+)|\\{i(3[5-9]|[4-9]\\d*)\\}", "");
|
||||||
|
|
||||||
|
if (title.length() > 21)
|
||||||
|
{
|
||||||
|
_title = title.substring(0, 20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2586,7 +2586,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_title = isPlayer() && (value.length() > 21) ? value.substring(0, 20) : value;
|
if (isPlayer())
|
||||||
|
{
|
||||||
|
// Remove all {i<number>} where the number is not in the range 0-34.
|
||||||
|
final String title = value.replaceAll("\\{i-(\\d+)|\\{i(3[5-9]|[4-9]\\d*)\\}", "");
|
||||||
|
|
||||||
|
if (title.length() > 21)
|
||||||
|
{
|
||||||
|
_title = title.substring(0, 20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2586,7 +2586,24 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_title = isPlayer() && (value.length() > 21) ? value.substring(0, 20) : value;
|
if (isPlayer())
|
||||||
|
{
|
||||||
|
// Remove all {i<number>} where the number is not in the range 0-34.
|
||||||
|
final String title = value.replaceAll("\\{i-(\\d+)|\\{i(3[5-9]|[4-9]\\d*)\\}", "");
|
||||||
|
|
||||||
|
if (title.length() > 21)
|
||||||
|
{
|
||||||
|
_title = title.substring(0, 20);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_title = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user