/// <summary> /// GM帳號查询,已封停和未封停 /// </summary> /// <returns></returns> public Message GMAccount_Query(int index, int pageSize) { string serverIP = null; string account = null; int accountState = 0; DataSet ds = null; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ServerIP).m_bValueBuffer); account = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_NyUserID).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.RayCity_AccountState, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_AccountState).m_bValueBuffer); accountState = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_GMAccount + account + lg.RayCityAPI_BanAccount); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_GMAccount + account + lg.RayCityAPI_BanAccount); ds = GlobalAccount.GMAccount_Query(serverIP, account, accountState); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, index, pageSize, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_GMUser_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.API_Error, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_GMUser_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.API_Error, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_GMUser_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 删除公告内容 /// </summary> /// <returns></returns> public Message RayCity_BoardList_Delete() { int result = -1; int operateUserID = 0; string serverIP = null; int taskID = 0; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ServerIP).m_bValueBuffer); strut = new TLV_Structure(TagName.RayCity_NoticeID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_NoticeID).m_bValueBuffer); taskID = (int)strut.toInteger(); result = GlobalAccount.RayCityBoardList_Delete(operateUserID, serverIP, taskID); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + serverIP + lg.RayCityAPI_Notices + lg.API_Delete + lg.API_Success); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + serverIP + lg.RayCityAPI_Notices + lg.API_Delete + lg.API_Success); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_BoardList_Delete_Resp)); } else { SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + serverIP + lg.RayCityAPI_Notices + lg.API_Delete + lg.API_Failure); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + serverIP + lg.RayCityAPI_Notices + lg.API_Delete + lg.API_Failure); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_BoardList_Delete_Resp)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(lg.RayCityAPI_Notices + lg.API_Delete + lg.API_Failure, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_BoardList_Delete_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查看玩家消费合计记录 /// </summary> /// <returns></returns> public Message CardUserConsumeInfo_QuerySum() { string serverIP = null; string account = null; int actionType = 0; System.Data.DataSet ds = null; try { account = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.CARD_username).m_bValueBuffer); TLV_Structure tlvStrut = new TLV_Structure(TagName.CARD_ActionType, 4, msg.m_packet.m_Body.getTLVByTag(TagName.CARD_ActionType).m_bValueBuffer); actionType = (int)tlvStrut.toInteger(); SqlHelper.log.WriteLog(lg.API_Display + lg.NineYou + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.CardDetail_Account + account + lg.CardDetail_SumConsumeRecord); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.NineYou + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.CardDetail_Account + account + lg.CardDetail_SumConsumeRecord); ds = CardDetailInfo.CardUserConsumeInfo_QuerySum(account, actionType); if (ds != null && ds.Tables[0].Rows.Count > 0) { return(Message.COMMON_MES_RESP(Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[0]), Msg_Category.CARD_ADMIN, ServiceKey.CARD_USERCONSUME_SUM_QUERY_RESP, TagName.CARD_SumTotal, TagFormat.TLV_INTEGER)); } else { return(Message.COMMON_MES_RESP(lg.CardDetail_NoSumConsumeRecord, Msg_Category.CARD_ADMIN, ServiceKey.CARD_USERCONSUME_SUM_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { return(Message.COMMON_MES_RESP(lg.CardDetail_NoSumConsumeRecord, Msg_Category.CARD_ADMIN, ServiceKey.CARD_USERCONSUME_SUM_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 道具查询(模糊查询) /// </summary> /// <returns></returns> public Message JW2_ITEM_SELECT(int index, int pageSize) { DataSet ds = null; string ItemName = ""; string type = ""; int type_item = -1; try { //ip地址 ItemName = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ItemName).m_bValueBuffer); type = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_GOODSTYPE).m_bValueBuffer); //道具名/道具ID TLV_Structure strut = new TLV_Structure(TagName.JW2_UserSN, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ItemPos).m_bValueBuffer); type_item = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.JW2API_BrowseServerAddress); Console.WriteLine(DateTime.Now + lg.JW2API_BrowseServerItem); ds = JW2DataInfo.JW2ItemDataInfo.ITEM_SELECT(ItemName, type, type_item); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, 0, ds.Tables[0].Rows.Count, false, ""); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_ITEM_SELECT_RESP, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.JW2API_NoItemInfo, Msg_Category.JW2_ADMIN, ServiceKey.JW2_ITEM_SELECT_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog(lg.JW2API_ItemQuery + ex.Message); return(Message.COMMON_MES_RESP(lg.JW2API_NoItemInfo, Msg_Category.JW2_ADMIN, ServiceKey.JW2_ITEM_SELECT_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查看玩家情侣历史 /// </summary> /// <returns></returns> public Message JW2_COUPLELOG_QUERY(int index, int pageSize) { string serverIP = ""; //int uid = 0; DataSet ds = null; int type = -1; int userSN = -1; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.JW2_UserSN, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_UserSN).m_bValueBuffer); userSN = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.JW2API_BrowseServerAddress + CommonInfo.serverIP_Query(serverIP) + lg.JW2API_PlayerAccount + userSN + lg.JW2API_COUPLELOG); Console.WriteLine(DateTime.Now + lg.JW2API_BrowseServerAddress + CommonInfo.serverIP_Query(serverIP) + lg.JW2API_PlayerAccount + userSN + lg.JW2API_COUPLELOG); ds = JW2DataInfo.JW2LoginDataInfo.COUPLELOG_QUERY(serverIP, userSN); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, index, pageSize, false, serverIP); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_COUPLELOG_QUERY_RESP, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.JW2API_NoQueryCOUPLELOG, Msg_Category.JW2_ADMIN, ServiceKey.JW2_COUPLELOG_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog(lg.JW2API_QueryCOUPLELOG + serverIP + lg.JW2API_PlayerAccount + userSN + "->" + ex.Message); return(Message.COMMON_MES_RESP(lg.JW2API_NoQueryCOUPLELOG, Msg_Category.JW2_ADMIN, ServiceKey.JW2_COUPLELOG_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 家族成员领取小宠物蛋信息查询 /// </summary> /// <returns></returns> public Message JW2_SmallPetAgg_Query() { string serverIP = ""; DataSet ds = null; string BeginTime = ""; string EndTime = ""; int userSN = 0; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.JW2_UserSN, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_UserSN).m_bValueBuffer); userSN = (int)strut.toInteger(); BeginTime = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.BeginTime).m_bValueBuffer); EndTime = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.EndTime).m_bValueBuffer); SqlHelper.log.WriteLog("浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "家族成员:" + userSN + "领取小宠物蛋信息查询!"); Console.WriteLine(DateTime.Now + " - 浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "家族成员:" + userSN + "领取小宠物蛋信息查询!"); ds = JW2DataInfo.JW2MessengerDataInfo.SmallPetAgg_Query(serverIP, userSN, BeginTime, EndTime); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, 0, ds.Tables[0].Rows.Count, false, serverIP); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_SmallPetAgg_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP("没有该家族基金购买日志", Msg_Category.JW2_ADMIN, ServiceKey.JW2_SmallPetAgg_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog("家族成员领取小宠物蛋信息查询->JW2_SmallPetAgg_Query->服务器IP->" + serverIP + "->家族成员->" + userSN + "->开始时间->" + BeginTime + "->结束时间->" + EndTime + "->" + ex.Message); return(Message.COMMON_MES_RESP("家族成员领取小宠物蛋信息查询", Msg_Category.JW2_ADMIN, ServiceKey.JW2_SmallPetAgg_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 删除玩家礼物盒上道具 /// </summary> /// <returns></returns> public Message GiftBox_MessageItem_Delete() { int result = -1; int operateUserID = 0; string serverIP = null; string userID = null; int itemCode = 0; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.O2JAM2_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); userID = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.O2JAM2_UserID).m_bValueBuffer); strut = new TLV_Structure(TagName.O2JAM2_ItemCode, 4, msg.m_packet.m_Body.getTLVByTag(TagName.O2JAM2_ItemCode).m_bValueBuffer); itemCode = (int)strut.toInteger(); result = ItemShopInfo.giftBox_Delete(operateUserID, serverIP, userID, itemCode); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + userID + lg.O2JAM2API_ItemShopAPI_GiftItem + itemCode + lg.API_Delete + lg.API_Success + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + userID + lg.O2JAM2API_ItemShopAPI_GiftItem + itemCode + lg.API_Delete + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_ITEMSHOP_DELETE_RESP)); } else { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + userID + lg.O2JAM2API_ItemShopAPI_GiftItem + itemCode + lg.API_Delete + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + userID + lg.O2JAM2API_ItemShopAPI_GiftItem + itemCode + lg.API_Delete + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_ITEMSHOP_DELETE_RESP)); } } catch (System.Exception ex) { return(Message.COMMON_MES_RESP(lg.O2JAM2API_AccountInfoAPI_NoAccount, Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_ITEMSHOP_DELETE_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查看玩家家族信息 /// </summary> /// <returns></returns> public Message JW2_User_Family_Query() { string serverIP = ""; //int uid = 0; DataSet ds = null; int type = -1; int userSN = -1; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.JW2_UserSN, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_UserSN).m_bValueBuffer); userSN = (int)strut.toInteger(); SqlHelper.log.WriteLog("浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + userSN + "家族信息!"); Console.WriteLine(DateTime.Now + " - 浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + userSN + "家族信息!"); ds = JW2DataInfo.JW2MessengerDataInfo.User_Family_Query(serverIP, userSN); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, 0, ds.Tables[0].Rows.Count, false, serverIP); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_User_Family_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP("没有该玩家家族信息", Msg_Category.JW2_ADMIN, ServiceKey.JW2_User_Family_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog("查看玩家家族信息->JW2_User_Family_Query->服务器IP->" + serverIP + "->用户->" + userSN + "->" + ex.Message); return(Message.COMMON_MES_RESP("没有该玩家家族信息", Msg_Category.JW2_ADMIN, ServiceKey.JW2_User_Family_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查看家族排名信息 /// </summary> /// <returns></returns> public Message JW2_BasicBank_Query(int index, int pageSize) { string serverIP = ""; //int uid = 0; DataSet ds = null; int FamilyID = 0; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.JW2_UserSN, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_FAMILYID).m_bValueBuffer); FamilyID = (int)strut.toInteger(); SqlHelper.log.WriteLog("浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "家族ID:" + FamilyID + "排名信息!"); Console.WriteLine(DateTime.Now + " - 浏览劲舞团2+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "家族ID:" + FamilyID + "排名信息!"); ds = JW2DataInfo.JW2MessengerDataInfo.BasicRank_Query(serverIP, FamilyID); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, index, pageSize, false, serverIP); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_BasicBank_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP("没有该家族排名信息", Msg_Category.JW2_ADMIN, ServiceKey.JW2_BasicBank_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog("查看家族排名信息->JW2_BasicBank_Query->服务器IP->" + serverIP + "->家族->" + FamilyID + "->" + ex.Message); return(Message.COMMON_MES_RESP("没有该家族排名信息", Msg_Category.JW2_ADMIN, ServiceKey.JW2_BasicBank_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
private PatchMessage[,] DecodeRecive(int iRow, int iField, TLV_Structure tTlv, PatchMessage[,] tBody) { switch (tTlv.m_Tag) { case TagName.UpdateFileName: // 0x0101 Format:STRING tBody[iRow, iField].eTag = TagFormat.TLV_STRING; tBody[iRow, iField].oContent = tTlv.toString(); break; case TagName.UpdateFilePath: // 0x0102 Format:STRING tBody[iRow, iField].eTag = TagFormat.TLV_STRING; tBody[iRow, iField].oContent = tTlv.toString(); break; case TagName.UpdateFileVersion: // 0x0103 Format:STRING tBody[iRow, iField].eTag = TagFormat.TLV_STRING; tBody[iRow, iField].oContent = tTlv.toString(); break; case TagName.UpdateFileSize: // 0x0104Format:DateTime tBody[iRow, iField].eTag = TagFormat.TLV_DATE; tBody[iRow, iField].oContent = tTlv.toInteger(); break; } return(tBody); }
//发送任务信息查询 public Message TaskList_OnwerQuery() { int taskID = 0; string city = null; System.Data.DataSet ds = null; try { TLV_Structure tlvStrut = new TLV_Structure(TagName.SDO_TaskID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_TaskID).m_bValueBuffer); taskID = (int)tlvStrut.toInteger(); SqlHelper.log.WriteLog(lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + ":" + taskID); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + ":" + taskID); //从数据库里面将频道列表读出来 ds = NoticeDataInfo.BoardTask_OwnerQuery(taskID); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { city += ds.Tables[0].Rows[i].ItemArray[0].ToString() + ","; } return(Message.COMMON_MES_RESP(city, Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDMESSAGE_REQ_RESP, TagName.SDO_ServerIP, TagFormat.TLV_STRING)); } else { return(Message.COMMON_MES_RESP(lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList, Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDMESSAGE_REQ_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP(lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList, Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 更新劲舞团玩家呢称 /// </summary> /// <returns></returns> public Message Audition_NickName_Update() { int result = -1; int operateUserID = 0; string serverIP = null; string account = null; string nickName = null; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.AU_ServerIP).m_bValueBuffer); account = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.AU_ACCOUNT).m_bValueBuffer); nickName = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.AU_UserNick).m_bValueBuffer); result = AUMemberInfo.Audition_UserNick_Update(operateUserID, serverIP, account, nickName); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Display + lg.AU_AU + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.AU_AUAvatarListAPI_Account + account + lg.API_Update + lg.AU_AUMemberInfoAPI_NickName + lg.API_Success + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.AU_AU + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.AU_AUAvatarListAPI_Account + account + lg.API_Update + lg.AU_AUMemberInfoAPI_NickName + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.AU_ADMIN, ServiceKey.AU_USERNICK_UPDATE_RESP)); } else { SqlHelper.log.WriteLog(lg.API_Display + lg.AU_AU + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.AU_AUAvatarListAPI_Account + account + lg.API_Update + lg.AU_AUMemberInfoAPI_NickName + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.AU_AU + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.AU_AUAvatarListAPI_Account + account + lg.API_Update + lg.AU_AUMemberInfoAPI_NickName + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.AU_ADMIN, ServiceKey.AU_USERNICK_UPDATE_RESP)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(e.Message, Msg_Category.AU_ADMIN, ServiceKey.AU_USERNICK_UPDATE_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 删除玩家身上道具 /// </summary> /// <returns></returns> public Message ItemShop_Delete() { int result = -1; int operateUserID = 0; int userIndexID = 0; string serverIP = null; int itemCode = 0; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_UserIndexID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_UserIndexID).m_bValueBuffer); userIndexID = (int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_ItemCode, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ItemCode).m_bValueBuffer); itemCode = (int)strut.toInteger(); result = ItemShopInfo.itemShop_Delete(operateUserID, serverIP, userIndexID, itemCode); if (result == 1) { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.API_Delete + lg.SDOAPI_SDOItemLogInfoAPI_Account + userIndexID + lg.SDOAPI_SDOItemShopAPI_PersonalItem + itemCode + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_ITEMSHOP_DELETE_RESP)); } else { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.API_Delete + lg.SDOAPI_SDOItemLogInfoAPI_Account + userIndexID + lg.SDOAPI_SDOItemShopAPI_PersonalItem + itemCode + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_ITEMSHOP_DELETE_RESP)); } } catch (System.Exception ex) { return(Message.COMMON_MES_RESP(ex.Message, Msg_Category.SDO_ADMIN, ServiceKey.SDO_ITEMSHOP_DELETE_RESP)); } }
/// <summary> /// 剔除玩家登陆帐号 /// </summary> /// <returns></returns> public Message O2JAM2UserLogin_Delete() { int result = -1; int operateUserID = 0; string serverIP = null; string account = null; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.O2JAM2_ServerIP).m_bValueBuffer); account = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.O2JAM2_UserID).m_bValueBuffer); result = AccountInfo.O2JAM2_UserLogin_Delete(operateUserID, serverIP, account); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + account + lg.O2JAM2API_AccountInfoAPI_AccountKick + lg.API_Success + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + account + lg.O2JAM2API_AccountInfoAPI_AccountKick + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_USERLOGIN_DELETE_RESP)); } else { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + account + lg.O2JAM2API_AccountInfoAPI_AccountKick + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM2API_BAF + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.O2JAM2API_AccountInfoAPI_Account + account + lg.O2JAM2API_AccountInfoAPI_AccountKick + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_USERLOGIN_DELETE_RESP)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(lg.O2JAM2API_AccountInfoAPI_NoAccount, Msg_Category.O2JAM2_ADMIN, ServiceKey.O2JAM2_USERLOGIN_DELETE_RESP)); } }
/// <summary> /// 服务器玩家帐号解封 /// </summary> /// <returns></returns> public Message O2JAMMemberOpen_Update() { int result = -1; int operateUserID = 0; string serverIP = null; string account = null; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); account = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Account).m_bValueBuffer); result = MemberInfo.SDO_Banishment_Open(operateUserID, serverIP, account); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM_O2JAM + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.O2JAM_CharacterInfoAPI_Account + account + lg.O2JAM_MemberInfoAPI_AccountUnlock + lg.API_Success + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM_O2JAM + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.O2JAM_CharacterInfoAPI_Account + account + lg.O2JAM_MemberInfoAPI_AccountUnlock + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_ACCOUNT_OPEN_RESP)); } else { SqlHelper.log.WriteLog(lg.API_Display + lg.O2JAM_O2JAM + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.O2JAM_CharacterInfoAPI_Account + account + lg.O2JAM_MemberInfoAPI_AccountUnlock + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.O2JAM_O2JAM + "+>" + lg.API_CommonAPI_ServerIP + serverIP + lg.O2JAM_CharacterInfoAPI_Account + account + lg.O2JAM_MemberInfoAPI_AccountUnlock + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_ACCOUNT_OPEN_RESP)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(e.Message, Msg_Category.SDO_ADMIN, ServiceKey.SDO_ACCOUNT_OPEN_RESP)); } }
/// <summary> /// 请求游戏服务器IP列表 /// </summary> /// <returns></returns> public Message packServerInfoResp() { int gameID = 0; int gameDbID = 0; TLV_Structure tlvStrut = new TLV_Structure(TagName.ServerInfo_GameID, 4, message.m_packet.m_Body.getTLVByTag(TagName.ServerInfo_GameID).m_bValueBuffer); gameID = (int)tlvStrut.toInteger(); tlvStrut = new TLV_Structure(TagName.ServerInfo_GameDBID, 4, message.m_packet.m_Body.getTLVByTag(TagName.ServerInfo_GameDBID).m_bValueBuffer); gameDbID = (int)tlvStrut.toInteger(); DataSet ds = CommonInfo.serverIP_Query(gameID, gameDbID); if (ds != null && ds.Tables[0].Rows.Count <= 0) { return(Message.COMMON_MES_RESP(LanguageAPI.API_CommonAPI_GameListEmpty, Msg_Category.COMMON, ServiceKey.SERVERINFO_IP_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } else { Query_Structure[] structList = new Query_Structure[ds.Tables[0].Rows.Count]; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Query_Structure strut = new Query_Structure((uint)ds.Tables[0].Rows[i].ItemArray.Length); byte[] bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[0]); strut.AddTagKey(TagName.ServerInfo_IP, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[1]); strut.AddTagKey(TagName.ServerInfo_City, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[2]); strut.AddTagKey(TagName.ServerInfo_GameName, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); structList[i] = strut; } return(Message.COMMON_MES_RESP(structList, Msg_Category.COMMON, ServiceKey.SERVERINFO_IP_QUERY_RESP, 3)); } }
/// <summary> /// lg.SDAPI_SDItemLogInfoAPI_Account+lg.SDAPI_SDItemMsG3+lg.SDAPI_SDChallengeDataAPI_ProbabilityList /// </summary> /// <returns></returns> public Message SD_Firend_Query(int index, int pageSize) { string serverIP = null; //int uid = 0; DataSet ds = null; int userid = 0; string username = null; try { serverIP = Encoding.Unicode.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SD_ServerIP).m_bValueBuffer); username = Encoding.Unicode.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SD_UserName).m_bValueBuffer); //用户 TLV_Structure strut = new TLV_Structure(TagName.f_idx, 4, msg.m_packet.m_Body.getTLVByTag(TagName.f_idx).m_bValueBuffer); userid = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.SDAPI_SDItemMsG + lg.SDAPI_SD + "+>" + lg.SDAPI_SDItemMsG1 + CommonInfo.serverIP_Query(serverIP) + lg.SDAPI_SDItemLogInfoAPI_Account + username + lg.SDAPI_SDItemMsG3 + lg.SDAPI_SDChallengeDataAPI_ProbabilityList + "!"); Console.WriteLine(DateTime.Now + " - " + lg.SDAPI_SDItemMsG + lg.SDAPI_SD + "+>" + lg.SDAPI_SDItemMsG1 + CommonInfo.serverIP_Query(serverIP) + lg.SDAPI_SDItemLogInfoAPI_Account + username + lg.SDAPI_SDItemMsG3 + lg.SDAPI_SDChallengeDataAPI_ProbabilityList + "!"); ds = SDAccountInfo.Firend_Query(serverIP, userid); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, index, pageSize, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.SD_ADMIN, ServiceKey.SD_Firend_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.SDAPI_SDItemMsG5 + lg.SDAPI_SDChallengeDataAPI_NoChallengeScene + lg.SDAPI_SDItemLogInfoAPI_Account + lg.SDAPI_SDItemMsG3 + lg.SDAPI_SDChallengeDataAPI_ProbabilityList, Msg_Category.SD_ADMIN, ServiceKey.SD_Firend_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog(lg.SDAPI_SDItemMsG1 + serverIP + ex.Message); return(Message.COMMON_MES_RESP(lg.SDAPI_SDItemMsG5 + lg.SDAPI_SDChallengeDataAPI_NoChallengeScene + lg.SDAPI_SDItemLogInfoAPI_Account + lg.SDAPI_SDItemMsG3 + lg.SDAPI_SDChallengeDataAPI_ProbabilityList, Msg_Category.SD_ADMIN, ServiceKey.SD_Firend_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查询玩家情侣派对卡 /// </summary> /// <returns></returns> public Message JW2_CoupleParty_Card() { string serverIP = ""; //int uid = 0; DataSet ds = null; int userSN = 0; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.JW2_ServerIP).m_bValueBuffer); //角色id TLV_Structure strut = new TLV_Structure(TagName.Magic_PetID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.JW2_UserSN).m_bValueBuffer); userSN = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.JW2API_BrowseServerAddress + CommonInfo.serverIP_Query(serverIP) + lg.JW2API_BrowseServerAddress + userSN.ToString() + lg.JW2API_CouplesPartyCard); Console.WriteLine(DateTime.Now + lg.JW2API_BrowseServerAddress + CommonInfo.serverIP_Query(serverIP) + lg.JW2API_PlayerSN + userSN.ToString() + lg.JW2API_CouplesPartyCard); ds = JW2DataInfo.JW2AccountDataInfo.CoupleParty_Card(serverIP, userSN); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.JW2_buildTLV(ds, 0, ds.Tables[0].Rows.Count, false, serverIP); return(Message.COMMON_MES_RESP(structList, Msg_Category.JW2_ADMIN, ServiceKey.JW2_CoupleParty_Card_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.JW2API_NoPlayerCouplesPartyCard, Msg_Category.JW2_ADMIN, ServiceKey.JW2_CoupleParty_Card_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { SqlHelper.errLog.WriteLog(lg.JW2API_QueryPlayerCouplesPartyCard + serverIP + lg.JW2API_PlayerAccount + userSN + "->" + ex.Message); return(Message.COMMON_MES_RESP(lg.JW2API_NoPlayerCouplesPartyCard, Msg_Category.JW2_ADMIN, ServiceKey.JW2_CoupleParty_Card_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 激活玩家的跳舞毯状态 /// </summary> /// <returns></returns> public Message SDOMemberDanceOpen_Update() { int result = -1; int operateUserID = 0; string serverIP = null; string account = null; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); account = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Account).m_bValueBuffer); result = MemberInfo.memberDanceInfo_Active(operateUserID, serverIP, account); if (result == 1) { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.SDOAPI_SDOItemLogInfoAPI_Account + account + lg.SDOAPI_SDOMemberInfoAPI_PadActive + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_MEMBERDANCE_OPEN_RESP)); } else { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.SDOAPI_SDOItemLogInfoAPI_Account + account + lg.SDOAPI_SDOMemberInfoAPI_PadActive + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_MEMBERDANCE_OPEN_RESP)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(e.Message, Msg_Category.SDO_ADMIN, ServiceKey.SDO_MEMBERDANCE_OPEN_RESP)); } }
//发送任务信息删除 public Message TaskList_Delete() { int result = -1; int userbyID = 0; int taskID = 0; try { //操作员ID TLV_Structure tlvStrut = new TLV_Structure(TagName.UserByID, 3, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); userbyID = (int)tlvStrut.toInteger(); //任务ID tlvStrut = new TLV_Structure(TagName.SDO_TaskID, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_TaskID).m_bValueBuffer); taskID = (int)tlvStrut.toInteger(); SqlHelper.log.WriteLog(lg.API_Delete + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Delete + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + "!"); result = NoticeDataInfo.BoardTask_delete(userbyID, taskID); if (result == 1) { return(Message.COMMON_MES_RESP("SCUESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_UPDATE_RESP)); } else { return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_UPDATE_RESP)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP(lg.API_Update + lg.API_Failure, Msg_Category.SDO_ADMIN, ServiceKey.SDO_ACCOUNT_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查询玩家技能資訊 /// </summary> /// <returns></returns> public Message RayCity_PlayerSkill_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_SkillInfo); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + CommonInfo.serverIP_Query(serverIP) + lg.RayCityAPI_SkillInfo); ds = ItemShopInfo.PlayerSkill_Query(serverIP, characterID); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, 0, 40, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_PlayerSkill_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.RayCityAPI_NoSkillInfo, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_PlayerSkill_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_NoSkillInfo, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_PlayerSkill_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 查询所有道具資訊 /// </summary> /// <returns></returns> public Message RayCity_ItemShop_Query(int index, int pageSize) { string itemName = null; int itemCode = 0; string serverIP = null; DataSet ds = null; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ServerIP).m_bValueBuffer); itemName = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ItemName).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.RayCity_ItemID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ItemID).m_bValueBuffer); itemCode = (int)strut.toInteger(); SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + lg.RayCityAPI_ItemInfo); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Address + lg.RayCityAPI_ItemInfo); ds = ItemShopInfo.RayCity_ItemShop_Query(itemCode, itemName, serverIP); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = Message.buildTLV(ds, index, pageSize, false); return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ItemShop_Query_Resp, (int)structList[0].structLen)); } else { return(Message.COMMON_MES_RESP(lg.RayCityAPI_NoItemInfo, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ItemShop_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP(lg.RayCityAPI_NoItemInfo, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ItemShop_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 删除公告表 /// </summary> /// <returns></returns> public Message CR_CallBoardInfo_Delete() { int result = -1; int userByID = 0; string serverIP = null; int boardId = 0; try { TLV_Structure tlv = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); userByID = (int)tlv.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.CR_ServerIP).m_bValueBuffer); tlv = new TLV_Structure(TagName.CR_BoardID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.CR_BoardID).m_bValueBuffer); boardId = (int)tlv.toInteger(); result = CRCallBoardInfo.CallBoardInfo_Delete(userByID, serverIP, boardId); if (result == 1) { SqlHelper.log.WriteLog(lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Success + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.CR_ADMIN, ServiceKey.CR_CALLBOARD_DELETE_RESP)); } else { SqlHelper.log.WriteLog(lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.CR_ADMIN, ServiceKey.CR_CALLBOARD_DELETE_RESP)); } } catch (System.Exception ex) { SqlHelper.log.WriteLog(lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Failure + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.CR_CR + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.CR_CallBoardAPI_AllNoticeInfo + boardId + lg.API_Delete + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP(ex.Message, Msg_Category.CR_ADMIN, ServiceKey.CR_CALLBOARD_DELETE_RESP)); } }
/// <summary> /// 查看玩家消费记录 /// </summary> /// <returns></returns> public Message UserConsume_QuerySum() { string serverIP = null; string account = null; DateTime beginDate; DateTime endDate; int moneyType = -1; DataSet ds = null; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); account = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Account).m_bValueBuffer); TLV_Structure tlvStrut = new TLV_Structure(TagName.SDO_BeginTime, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_BeginTime).m_bValueBuffer); beginDate = tlvStrut.toDate(); tlvStrut = new TLV_Structure(TagName.SDO_EndTime, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_EndTime).m_bValueBuffer); endDate = tlvStrut.toDate(); tlvStrut = new TLV_Structure(TagName.SDO_MoneyType, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_MoneyType).m_bValueBuffer); moneyType = (int)tlvStrut.toInteger(); Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + lg.SDOAPI_SDOItemLogInfoAPI_Account + account + lg.SDOAPI_SDOItemShopAPI_ConsumeRecord + "!"); ds = ItemShopInfo.userConsume_QuerySum(serverIP, account, moneyType, beginDate, endDate); if (ds != null && ds.Tables[0].Rows.Count > 0) { return(Message.COMMON_MES_RESP(Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[0]), Msg_Category.SDO_ADMIN, ServiceKey.SDO_CONSUME_QUERY_RESP, TagName.SDO_ChargeSum, TagFormat.TLV_INTEGER)); } else { return(Message.COMMON_MES_RESP(lg.SDOAPI_SDOItemShopAPI_NoChargeRecord, Msg_Category.SDO_ADMIN, ServiceKey.SDO_USERCONSUMESUM_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { return(Message.COMMON_MES_RESP(lg.SDOAPI_SDOItemShopAPI_NoChargeRecord, Msg_Category.SDO_ADMIN, ServiceKey.SDO_USERCONSUMESUM_QUERY_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 玩家资料信息修改 /// </summary> /// <returns></returns> public Message SDOCharacterInfo_Update() { int result = -1; string serverIP = null; string account = null; int level = 0; int experience = 0; int operateUserID = 0; int battle = 0; int win = 0; int draw = 0; int lose = 0; int MCash = 0; int GCash = 0; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); account = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Account).m_bValueBuffer); // strut = new TLV_Structure(TagName.SDO_Level,4,msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Level).m_bValueBuffer); // level =(int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_Exp, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Exp).m_bValueBuffer); experience = (int)strut.toInteger(); // strut = new TLV_Structure(TagName.SDO_GameTotal,4,msg.m_packet.m_Body.getTLVByTag(TagName.SDO_GameTotal).m_bValueBuffer); // battle =(int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_GameWin, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_GameWin).m_bValueBuffer); win = (int)strut.toInteger(); // strut = new TLV_Structure(TagName.SDO_DogFall,4,msg.m_packet.m_Body.getTLVByTag(TagName.SDO_DogFall).m_bValueBuffer); // draw =(int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_GameFall, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_GameFall).m_bValueBuffer); lose = (int)strut.toInteger(); strut = new TLV_Structure(TagName.SDO_MCash, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_MCash).m_bValueBuffer); MCash = (int)strut.toInteger(); // strut = new TLV_Structure(TagName.SDO_GCash, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_GCash).m_bValueBuffer); // GCash = (int)strut.toInteger(); result = CharacterInfo.characterInfo_Update(operateUserID, serverIP, account, level, experience, battle, win, draw, lose, MCash, GCash); if (result == -1) { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + " " + account + lg.SDOAPI_SDOCharacterInfoAPI_NoAccount); return(Message.COMMON_MES_RESP(lg.SDOAPI_SDOCharacterInfoAPI_NoAccount, Msg_Category.SDO_ADMIN, ServiceKey.SDO_CHARACTERINFO_UPDATE_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } else if (result == 1) { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + " " + account + lg.API_Update + lg.SDOAPI_SDOCharacterInfoAPI_AccountInfo + lg.API_Success + "!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_CHARACTERINFO_UPDATE_RESP)); } else { Console.WriteLine(DateTime.Now + " - " + lg.API_Display + lg.SDOAPI_SDO + "+>" + lg.API_CommonAPI_ServerIP + CommonInfo.serverIP_Query(serverIP) + " " + account + lg.API_Update + lg.SDOAPI_SDOCharacterInfoAPI_AccountInfo + lg.API_Failure + "!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_CHARACTERINFO_UPDATE_RESP)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP(ex.Message, Msg_Category.SDO_ADMIN, ServiceKey.SDO_CHARACTERINFO_UPDATE_RESP)); } }
/// <summary> /// /// </summary> /// <returns></returns> public Message SDOUserNick_Update() { int result = -1; int operateUserID = 0; string serverIP = null; string account = null; string nickName = null; try { TLV_Structure strut = new TLV_Structure(TagName.UserByID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); account = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Account).m_bValueBuffer); nickName = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_NickName).m_bValueBuffer); result = MemberInfo.UserNick_Update(operateUserID, serverIP, account, nickName); if (result == 1) { SqlHelper.log.WriteLog("超级舞者+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + account + "更新呢称成功!"); Console.WriteLine(DateTime.Now + " - 超级舞者+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + account + "更新呢称成功!"); return(Message.COMMON_MES_RESP("SUCESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_USERNICK_UPDATE_RESP)); } else { SqlHelper.log.WriteLog("超级舞者+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + account + "更新呢称失败!"); Console.WriteLine(DateTime.Now + " - 超级舞者+>服务器地址" + CommonInfo.serverIP_Query(serverIP) + "玩家" + account + "更新呢称失败!"); return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_USERNICK_UPDATE_RESP)); } } catch (System.Exception e) { return(Message.COMMON_MES_RESP(e.Message, Msg_Category.SDO_ADMIN, ServiceKey.SDO_USERNICK_UPDATE_RESP)); } }
/// <summary> /// 查询玩家宠物信息 /// </summary> /// <returns></returns> public Message SDO_PetInfo_Query() { string serverIP = null; int userIndexID = 0; System.Data.DataSet ds = null; try { serverIP = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); TLV_Structure strut = new TLV_Structure(TagName.SDO_UserIndexID, 4, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_UserIndexID).m_bValueBuffer); userIndexID = (int)strut.toInteger(); SqlHelper.log.WriteLog("流覽超級舞者+>" + CommonInfo.serverIP_Query(serverIP) + "玩家" + userIndexID + "寵物資訊!"); Console.WriteLine(DateTime.Now + " - 流覽超級舞者+>" + CommonInfo.serverIP_Query(serverIP) + "玩家" + userIndexID + "寵物資訊!"); ds = ItemShopInfo.SDOPetInfo_Query(serverIP, userIndexID); if (ds != null && ds.Tables[0].Rows.Count > 0) { Query_Structure[] structList = new Query_Structure[ds.Tables[0].Rows.Count]; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Query_Structure strut1 = new Query_Structure((uint)ds.Tables[0].Rows[i].ItemArray.Length); byte[] bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[0]); strut1.AddTagKey(TagName.SDO_NickName, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[1]); strut1.AddTagKey(TagName.SDO_ItemName, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_TIMESTAMP, ds.Tables[0].Rows[i].ItemArray[2]); strut1.AddTagKey(TagName.SDO_DateLimit, TagFormat.TLV_TIMESTAMP, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds.Tables[0].Rows[i].ItemArray[3]); strut1.AddTagKey(TagName.SDO_State, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_INTEGER, ds.Tables[0].Rows[i].ItemArray[4]); strut1.AddTagKey(TagName.SDO_Level, TagFormat.TLV_INTEGER, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_INTEGER, ds.Tables[0].Rows[i].ItemArray[5]); strut1.AddTagKey(TagName.SDO_Exp, TagFormat.TLV_INTEGER, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_INTEGER, ds.Tables[0].Rows[i].ItemArray[6]); strut1.AddTagKey(TagName.SDO_Food, TagFormat.TLV_INTEGER, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_INTEGER, ds.Tables[0].Rows[i].ItemArray[7]); strut1.AddTagKey(TagName.SDO_mood, TagFormat.TLV_INTEGER, (uint)bytes.Length, bytes); structList[i] = strut1; } return(Message.COMMON_MES_RESP(structList, Msg_Category.SDO_ADMIN, ServiceKey.SDO_PetInfo_Query_RESP, 8)); } else { return(Message.COMMON_MES_RESP("沒有相關寵物資訊", Msg_Category.SDO_ADMIN, ServiceKey.SDO_PetInfo_Query_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP("沒有相關寵物資訊", Msg_Category.SDO_ADMIN, ServiceKey.SDO_PetInfo_Query_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
/// <summary> /// 插入一个新的GM帐号 /// </summary> public Message GM_InsertUserInfo() { int result = -1; int operateUserID = 0; int departID = 0; string userName = null; string passWd = null; string realName = null; DateTime limit = DateTime.Now; int status= 0; try { //操作员ID TLV_Structure strut = new TLV_Structure(TagName.UserByID,4,msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); operateUserID = (int)strut.toInteger(); //部门ID strut = new TLV_Structure(TagName.DepartID,4,msg.m_packet.m_Body.getTLVByTag(TagName.DepartID).m_bValueBuffer); departID = (int)strut.toInteger(); //用户名 userName = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.UserName).m_bValueBuffer); //密码 passWd =Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.PassWord).m_bValueBuffer); //中文名 realName =Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RealName).m_bValueBuffer); //状态值 TLV_Structure tlvStruct = new TLV_Structure(TagName.User_Status,4,msg.m_packet.m_Body.getTLVByTag(TagName.User_Status).m_bValueBuffer); status =(int)tlvStruct.toInteger(); //使用时限 tlvStruct = new TLV_Structure(TagName.Limit,3,msg.m_packet.m_Body.getTLVByTag(TagName.Limit).m_bValueBuffer); limit =tlvStruct.toDate(); //是否管理员 tlvStruct = new TLV_Structure(TagName.SysAdmin,4,msg.m_packet.m_Body.getTLVByTag(TagName.SysAdmin).m_bValueBuffer); int sysAdmin =(int)tlvStruct.toInteger(); result = GMUserInfo.insertRow(operateUserID,departID,userName,passWd,realName,limit,status,sysAdmin); if(result==1) { logAPI.writeTitle(LanguageAPI.API_Add + LanguageAPI.API_UserInfoAPI_AccountInfo,LanguageAPI.API_Add + LanguageAPI.API_UserInfoAPI_AccountInfo + LanguageAPI.API_Success + "!"); logAPI.writeContent(LanguageAPI.Logic_UserValidate_User,LanguageAPI.API_UserInfoAPI_Password,LanguageAPI.API_UserInfoAPI_LimitDay); logAPI.writeData(userName,passWd,limit.ToString()); Console.WriteLine(logAPI.Buffer.ToString()); return Message.Common_USER_CREATE_RESP("SUCESS"); } else { logAPI.writeTitle(LanguageAPI.API_Add + LanguageAPI.API_UserInfoAPI_AccountInfo,LanguageAPI.API_Add + LanguageAPI.API_UserInfoAPI_AccountInfo + LanguageAPI.API_Failure + "!"); logAPI.writeContent(LanguageAPI.Logic_UserValidate_User,LanguageAPI.API_UserInfoAPI_Password,LanguageAPI.API_UserInfoAPI_LimitDay); logAPI.writeData(userName,passWd,limit.ToString()); Console.WriteLine(logAPI.Buffer.ToString()); return Message.Common_USER_CREATE_RESP("FAILURE"); } } catch(Common.Logic.Exception ex) { Console.WriteLine(ex.Message); return Message.Common_USER_CREATE_RESP(ex.Message); } }
/// <summary> /// 玩家活动卡查询 /// </summary> /// <returns></returns> public Message RcUserActiveCard_Query() { string activeCode = null; string strDesc = null; int atype = 0; System.Collections.ArrayList ds = new System.Collections.ArrayList(); try { activeCode = Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_activename).m_bValueBuffer); TLV_Structure strut1 = new TLV_Structure(TagName.RayCity_ActionType, 4, msg.m_packet.m_Body.getTLVByTag(TagName.RayCity_ActionType).m_bValueBuffer); atype = (int)strut1.toInteger(); SqlHelper.log.WriteLog(lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Account + activeCode + lg.RayCityAPI_ActiveCard_Query); Console.WriteLine(DateTime.Now + lg.API_Look + lg.RayCityAPI_Name + "+>" + lg.RayCityAPI_Account + activeCode + lg.RayCityAPI_ActiveCard_Query); if (atype == 1) { ds = CharacterInfo.ActiveCard_Query(activeCode, 1, ref strDesc); } else if (atype == 2) { ds = CharacterInfo.ActiveCard_Query(activeCode, 2, ref strDesc); } if (ds != null && ds.Count > 0) { Query_Structure[] structList = new Query_Structure[1]; Query_Structure strut = new Query_Structure((uint)ds.Count); byte[] bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds[0]); strut.AddTagKey(TagName.RayCity_rccdkey, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds[1]); strut.AddTagKey(TagName.RayCity_getuser, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds[2]); strut.AddTagKey(TagName.RayCity_gettime, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds[3]); strut.AddTagKey(TagName.RayCity_use_state, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); bytes = TLV_Structure.ValueToByteArray(TagFormat.TLV_STRING, ds[4]); strut.AddTagKey(TagName.RayCity_activename, TagFormat.TLV_STRING, (uint)bytes.Length, bytes); structList[0] = strut; return(Message.COMMON_MES_RESP(structList, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ActiveCard_Query_Resp, 5)); } else { return(Message.COMMON_MES_RESP(strDesc, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ActiveCard_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception) { return(Message.COMMON_MES_RESP(strDesc, Msg_Category.RAYCITY_ADMIN, ServiceKey.RayCity_ActiveCard_Query_Resp, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }
//发送任务信息更新 public Message TaskList_Update() { string serverIP = ""; int userbyID = 0; int taskID = 0; DateTime beginTime = DateTime.Now; DateTime endTime = DateTime.Now; int interval = 0; int status = 0; string boardMessage = ""; int result = -1; try { //操作员ID TLV_Structure tlvStrut = new TLV_Structure(TagName.UserByID, 3, msg.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); userbyID = (int)tlvStrut.toInteger(); //发送状态 tlvStrut = new TLV_Structure(TagName.SDO_Status, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Status).m_bValueBuffer); status = (int)tlvStrut.toInteger(); //任务ID tlvStrut = new TLV_Structure(TagName.SDO_TaskID, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_TaskID).m_bValueBuffer); taskID = (int)tlvStrut.toInteger(); if (status == 0) { serverIP = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_ServerIP).m_bValueBuffer); tlvStrut = new TLV_Structure(TagName.SDO_BeginTime, 6, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_BeginTime).m_bValueBuffer); beginTime = tlvStrut.toTimeStamp(); tlvStrut = new TLV_Structure(TagName.SDO_EndTime, 6, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_EndTime).m_bValueBuffer); endTime = tlvStrut.toTimeStamp(); //发送间隔 tlvStrut = new TLV_Structure(TagName.SDO_Interval, 3, msg.m_packet.m_Body.getTLVByTag(TagName.SDO_Interval).m_bValueBuffer); interval = (int)tlvStrut.toInteger(); boardMessage = System.Text.Encoding.Default.GetString(msg.m_packet.m_Body.getTLVByTag(TagName.SDO_BoardMessage).m_bValueBuffer); } SqlHelper.log.WriteLog(lg.API_Update + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + "!"); Console.WriteLine(DateTime.Now + " - " + lg.API_Update + lg.SDOAPI_SDO + "+>" + lg.SDOAPI_SDONoticeInfoAPI_SendNoticeList + "!"); result = NoticeDataInfo.BoardTask_Update(serverIP, userbyID, taskID, beginTime, endTime, interval, status, boardMessage); if (result == 1) { return(Message.COMMON_MES_RESP("SCUESS", Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_UPDATE_RESP)); } else { return(Message.COMMON_MES_RESP("FAILURE", Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_UPDATE_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } } catch (System.Exception ex) { Console.WriteLine(ex.Message); return(Message.COMMON_MES_RESP(lg.API_Update + lg.API_Failure, Msg_Category.SDO_ADMIN, ServiceKey.SDO_BOARDTASK_UPDATE_RESP, TagName.ERROR_Msg, TagFormat.TLV_STRING)); } }