/// <summary> /// 请求所有游戏服务器IP列表 /// </summary> /// <returns></returns> public Message packDelServerInfoResp() { int result = -1; int operateUserID = 0; int idx = 0; string gameIP = null; GMLogAPI logAPI = new GMLogAPI(); try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, message.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); strut = new TLV_Structure(TagName.ServerInfo_Idx, 4, message.m_packet.m_Body.getTLVByTag(TagName.ServerInfo_Idx).m_bValueBuffer); idx = (int)strut.toInteger(); gameIP = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.ServerInfo_IP).m_bValueBuffer); result = CommonInfo.LinkServerIP_Delete(operateUserID, idx, gameIP); if (result == 1) { logAPI.writeTitle(LanguageAPI.API_Delete + LanguageAPI.API_CommonAPI_NewServer, LanguageAPI.API_Delete + LanguageAPI.API_CommonAPI_NewServer + LanguageAPI.API_Success + "!"); logAPI.writeContent(LanguageAPI.API_CommonAPI_GameID, LanguageAPI.API_CommonAPI_ServerIP, LanguageAPI.API_CommonAPI_GameCity); logAPI.writeContent(Convert.ToString(idx), gameIP, gameIP); Console.WriteLine(logAPI.Buffer.ToString()); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.COMMON, ServiceKey.LINK_SERVERIP_DELETE_RESP)); } else { logAPI.writeTitle(LanguageAPI.API_Delete + LanguageAPI.API_CommonAPI_NewServer, LanguageAPI.API_Delete + LanguageAPI.API_CommonAPI_NewServer + LanguageAPI.API_Failure + "!"); logAPI.writeContent(LanguageAPI.API_CommonAPI_GameID, LanguageAPI.API_CommonAPI_ServerIP, LanguageAPI.API_CommonAPI_GameCity); logAPI.writeContent(Convert.ToString(idx), gameIP, gameIP); Console.WriteLine(logAPI.Buffer.ToString()); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.COMMON, ServiceKey.LINK_SERVERIP_DELETE_RESP)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.COMMON, ServiceKey.LINK_SERVERIP_DELETE_RESP)); } }