/// <summary> /// 玩家車装备資料資訊 /// </summary> /// <returns></returns> public Message RCCarInventoryInfo_Query() { string serverIP = null; int garageID = 0; 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(); strut = new TLV_Structure(TagName.RayCity_CarIDX, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_CarIDX).m_bValueBuffer); garageID = (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_itemState); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_Account + characterID + lg.RayCityAPI_Car_itemState); ds = CharacterInfo.CarInventoryInfo_Query(serverIP, characterID, garageID); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, 0, 30, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarInventory_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.RayCityAPI_Car_NoitemState, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarInventory_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_NoitemState, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_CarInventory_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }