/// <summary> /// 类型:方法 /// 名称:GetCharacterOriginalFromNickName /// 作者:taixihuase /// 作用:通过昵称获取用户初始信息 /// 编写日期:2015/7/22 /// </summary> /// <param name="nickName"></param> /// <param name="character"></param> /// <returns></returns> public bool GetCharacterOriginalFromNickname(string nickName, out Character character) { int id = Server.Users.GetUniqueIdFromNickname(nickName); if (id >= 0 && UniqueIdToCharacterOriginal.ContainsKey(id)) { return(GetCharacterOriginal(id, out character)); } character = null; return(false); }
public bool CharacterLoad(Character character) { lock (this) { if (!UniqueIdToCharacterOriginal.ContainsKey(character.UniqueId)) { UniqueIdToCharacterOriginal.Add(character.UniqueId, character); return(true); } return(false); } }