else
{
// Graveen: changed the following to allow GMs to have special chars in their names (_,-, etc..)
// WHRIA
// Regex nameCheck = new Regex("^[A-Z][a-zA-Z]");
if (charName.Length < 3)
{
if (client.Account.PrivLevel == 1)
{
Regex nameCheck = new Regex("^[A-Z][a-zA-Z]");
if (nameCheck.IsMatch(c.Name))
pak.FillString(c.Name, 24);
else
// pak.FillString(c.Name, 24);
pak.FillString(string.Format("CHAR{0}", i - firstSlot), 24);
if (
(
(client.Player == null && client.Account.Characters != null)
|| (client.Player != null && client.Player.Name.ToLower() != charName.ToLower())
) && client.ClientState == GameClient.eClientState.CharScreen)
{
bool charFound = false;
// WHRIA
if (charName.Substring(0,4)=="CHAR")
{
int iSelected = Convert.ToInt32(charName.Substring(4,1));
if (iSelected < client.Account.Characters.Length)
{
Regex nameCheck = new Regex("^[A-Z][a-zA-Z]");
if (!nameCheck.IsMatch(client.Account.Characters[iSelected].Name)
&& client.Account.Characters[iSelected] != null)
{
charFound = true;
charName = client.Account.Characters[iSelected].Name;
client.LoadPlayer(iSelected);
}
}
}
for (int i = 0; i < client.Account.Characters.Length; i++)
{
if (client.Account.Characters[i] != null
&& client.Account.Characters[i].Name == charName)
{
charFound = true;
client.LoadPlayer(i);
break;
}
}
Return to “%s” DOL Code Contributions
Users browsing this forum: No registered users and 1 guest