private static void addByCharacter(Network.Game.GameClient client, string name)
{
Utilities.Logger.Debug("Try to add friend by character [" + name + "]");
var player = World.GetClient(name);
if (player != null)
{
if (!client.Account.Infos.HaveFriend(player.Account.ID))
{
client.Account.Infos.Friends.Add(new Friends.Friend(player.Account.Infos.AccountId));
client.SendFriends();
client.Account.Infos.Save();
}
else
{
//TODO: Have already friend
}
}
else
{
client.Send("cMEf" + name);
}
}