private void UpdatePlayerFriends(PlayerModel friend)
{
if (friend == null) return;
friend.Friendex = -1;
String guid = (String.IsNullOrEmpty(friend.EAGUID)) ? INVALID_NAME_TAG_GUID : friend.EAGUID;
String tag = ExtractTag(friend);
if (String.IsNullOrEmpty(tag)) tag = INVALID_NAME_TAG_GUID;
foreach (int key in fFriends.Keys) {
try {
List<String> subList = fFriends[key];
if (subList.Contains(friend.Name)
|| subList.Contains(tag)
|| subList.Contains(guid)) {
friend.Friendex = key;
if (DebugLevel >= 8) ConsoleDebug("UpdatePlayerFriends: (^b" + friend.Name + ", " + tag + ", ^n" + guid + ") in " + key + ": " + String.Join(", ", subList.ToArray()));
break;
}
} catch (Exception e) {
if (DebugLevel >= 7) ConsoleException(e);
}
}
}