// 发送check msg 消息 public int SendCheckAccountMsg() { // 发送验证密码消息 CLAskLogin msg = (CLAskLogin)NetManager.GetNetManager().CreatePacket((int)PACKET_DEFINE.PACKET_CL_ASKLOGIN); byte[] temp = Encoding.ASCII.GetBytes(m_strUserName); Array.Copy(temp, msg.SzAccount, temp.Length); temp = Encoding.ASCII.GetBytes(m_strPassword); Array.Copy(temp, msg.SzPassWord, temp.Length); msg.UVersion = LCRetConnectHandler.verson; NetManager.GetNetManager().SendPacket(msg); LogManager.Log("Send CLAskLogin"); //LogManager.Log("Send Packet: CLAskLogin"); //todo //std::string isGameReLogin = CVariableSystem::GetMe()->GetVariable("IsGameReLogin"); //if (isGameReLogin.empty() || isGameReLogin == "0") //{ // CGameProcedure::s_pEventSystem->PushEvent( GE_GAMELOGIN_SHOW_SYSTEM_INFO_NO_BUTTON, "正在验证密码...."); //} //// 只有返回登录的第一次才不显示这个ui [9/5/2011 Ivan edit] //CVariableSystem::GetMe()->SetVariable("IsGameReLogin", "0"); //s_pVariableSystem->SetVariable( "User_NAME", m_strUserName.c_str() ); s_pVariableSystem.SetVariable("User_NAME", m_strUserName); return 0; }
public static void sendCLAskLogin(string szCount, string password, int verson) { CLAskLogin msg = (CLAskLogin)NetManager.GetNetManager().CreatePacket((int)PACKET_DEFINE.PACKET_CL_ASKLOGIN); byte[] temp = Encoding.ASCII.GetBytes(szCount); Array.Copy(temp, msg.SzAccount, temp.Length); temp = Encoding.ASCII.GetBytes(password); Array.Copy(temp, msg.SzPassWord, temp.Length); msg.UVersion = verson; NetManager.GetNetManager().SendPacket(msg); }