/// <summary> /// 玩家車資料資訊 /// </summary> /// <returns></returns> public Message RCCarInfo_Query() { string serverIP = null; int characterID = 0; DataSet ds = null; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.RayCity_CharacterID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_CharacterID).m_bValueBuffer); characterID = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_Account + characterID + lg.RayCityAPI_Car_CurrentState); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_Account + characterID + lg.RayCityAPI_Car_CurrentState); ds = CharacterInfo.CarInfo_Query(serverIP, characterID); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, 0, 20, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarList_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.RayCityAPI_Car_NoCurrentState, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarList_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog("伺服器IP" + serverIP + ex.Message); return(Message.COMMON_MES_RESP(lg.RayCityAPI_Car_NoCurrentState, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarList_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }