internal virtual void Login(string _userName, string _password, ServerUnit _serverUnit) { if (serverUnit != null) { Kick(); serverUnit.Kick(); serverUnit = null; } if (isWaittingForResponse) { replaceServerUnitCallBack = delegate() { serverUnit = _serverUnit; _serverUnit.GetLoginResult(this); }; } else { serverUnit = _serverUnit; _serverUnit.GetLoginResult(this); } }
internal void GetLoginResult(UserData _userData, ServerUnit _serverUnit) { if (_userData != null) { SuperUserServiceBase userService = Server.getUserService(); userService.SetUserData(_userData); userService.SetServerUnit(_serverUnit); dic.Add(_userData.userName, userService); _serverUnit.GetLoginResult(userService); } else { _serverUnit.GetLoginResult(null); } }
internal override void Login(string _userName, string _password, ServerUnit _serverUnit) { bool result = userData.passward.Equals(_password); if (!result) { _serverUnit.GetLoginResult(null); } else { base.Login(_userName, _password, _serverUnit); } }