protected void gvItem_PageIndexChanging(object sender, GridViewPageEventArgs e) { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { if (e.NewPageIndex >= 0) { gvItemTable.PageIndex = e.NewPageIndex; BindGridWithFilter(); AdminBLL ws = new AdminBLL(); GetUserData _req = new GetUserData(); GetUserDataResponse _resp = ws.GetUserInfoData(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = _resp.UserID; gvItemTable.DataBind(); } } catch (Exception ex) { logger.Info(ex.Message); } }
void OnUserDataResponse(GetUserDataResponse args) { string requestId = args.RequestId; string userId = string.Empty; if (args.AmazonUserData != null) { userId = args.AmazonUserData.UserId; marketPlace = args.AmazonUserData.Marketplace; } string status = args.Status; string rdata = string.Format("R_ID: {0}\nUID: {1}\nMPlace: {2}\nStatus: {3}", requestId, userId, marketPlace, status); MyDebug.Log("InAppManager::OnUserDataResponse => " + rdata); if (status.ToUpper().Equals("NOT_SUPPORTED")) { isSupported = false; } else { isSupported = true; } }
public AMN_GetUserDataResponse(GetUserDataResponse data) : base(true) { _requestId = data.RequestId; _userId = data.AmazonUserData.UserId; _marketplace = data.AmazonUserData.Marketplace; _status = data.Status; }
// Define event handler private void GetUserDataEventHandler(GetUserDataResponse args) { string requestId = args.RequestId; string userId = args.AmazonUserData.UserId; string marketplace = args.AmazonUserData.Marketplace; string status = args.Status; }
public static async Task <UserData[]> GetUserData(string TargetUsername, DateTime StartDate, DateTime EndDate) { GetUserDataResponse Response = await Connection.Send <GetUserDataResponse>(new GetUserDataRequest() { TargetUsername = TargetUsername, StartDate = StartDate, EndDate = EndDate }); return(Response?.Data ?? new UserData[0]); }
/// <summary> /// Checks if the user has verified his/her email address. /// </summary> /// <param name="user">The user form the firebase response.</param> /// <returns>Returns the verify status of the user.</returns> private bool CheckIfVerified(GetUserDataResponse user) { if (user != null && user.users.Count > 0) { return(user.users[0].emailVerified); } return(false); }
public GetUserDataResponse GetShiftKey(GetStaffShift objGetShiftRequest) { try { AdminDAL objAdminDAL = new AdminDAL(); GetUserDataResponse ret = new GetUserDataResponse(); List <User_Info> lst = objAdminDAL.GetStaffShiftKey(objGetShiftRequest); ret.UserID = lst; return(ret); } catch (Exception ex) { throw ex; } }
public async Task PostGetBaseServicesUserData(int placeholder) { //Log.LogDebug($"Starting PostGetBaseServicesUserData"); // Create the payload for the Post // ToDo: Validators on the input field will make this better // ToDo: wrap in a try catch block and handle errors with a model dialog GetUserDataRequest getUserDataRequest = new GetUserDataRequest(); //Log.LogDebug($"Calling PostJsonAsync<GetUserDataResponse> with getUserDataRequest = {getUserDataRequest}"); GetUserDataResponse getUserDataResponse = await HttpClient.PostJsonAsync <GetUserDataResponse>("/GetBaseServicesUserData", getUserDataRequest); //Log.LogDebug($"Returned from PostJsonAsync<GetUserDataResponse> with GetUserDataResponse = {getUserDataResponse}"); UserData = getUserDataResponse.UserData; //Log.LogDebug($"Leaving PostGetBaseServicesUserData"); }
public GetUserDataResponse GetUserStaffInfo1(GetUserData objGetUserInfoDataRequest) { try { AdminDAL objAdminDAL = new AdminDAL(); GetUserDataResponse ret = new GetUserDataResponse(); List <User_Info> lst = objAdminDAL.GetUserStaffInfo1(objGetUserInfoDataRequest); ret.Staff_ID = lst; return(ret); } catch (Exception ex) { throw ex; } }
private void GetUserDataResponseCallback(GetUserDataResponse eventName) { if (eventName.Status == "NOT_SUPPORTED") { EB.Debug.LogError("GetUserDataResponseCallback: NOT_SUPPORTED"); return; } if (eventName.Status == "FAILED") { EB.Debug.LogError("GetUserDataResponseCallback: FAILED"); return; } EB.Debug.Log("GetUserDataResponseCallback: user = {0}", eventName.ToJson()); _userId = eventName.AmazonUserData.UserId; }
private static bool PacketGetUserDataProc(ref Packet.State __result, ref PacketGetUserData __instance) { Log.Info($"PacketGetUserData proc"); GetUserData query = __instance.query as GetUserData; if (!FileSystem.Configuration.FileExists("UserData.json")) { query.response_ = GetUserDataResponse.create(); query.response_.userData.trophyId = GameDefaultID.TrophyID.getValue(); query.response_.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson("UserData.json", query.response_); } query.response_ = FileSystem.Configuration.LoadJson<GetUserDataResponse>("UserData.json"); return true; }
private void BindGrid() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetUserData _req = new GetUserData(); GetUserDataResponse _resp = ws.GetUserInfoData(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = _resp.UserID; if (_resp.UserID.Count == 0) { userid.Visible = false; } gvItemTable.DataBind(); } catch (Exception ex) { logger.Info(ex.Message); } }
private void BindGrid(int iBTID) { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetStaffShift _req = new GetStaffShift(); _req.ShiftID = iBTID.ToString(); GetUserDataResponse _resp1 = ws.GetShiftKey(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvKeySearch.PageSize = pageSize; gvKeySearch.DataSource = _resp1.UserID; gvKeySearch.DataBind(); } catch (Exception ex) { logger.Info(ex.Message); } }
//-------------------------------------- // EVENTS //-------------------------------------- #if AMAZON_BILLING_ENABLED private void GetUserDataHandler(GetUserDataResponse data) { AMN_GetUserDataResponse result = new AMN_GetUserDataResponse(data); OnGetUserDataReceived(result); }
/// <summary> /// get data /// </summary> /// <returns> GetUserDataResponse object</returns> /// <param name="request"> GetUserDataRequest object</param> /// <param name='jsonRpcCallId'> /// The json rpc call identifier. This is a string generated by the client, which can be used to correlate the response to the request. Max length is 256 characters. A JSON-RPC id must be generated on a per call invocation basis. The Rogerthat platform uses the id of the call to store the call result for a certain amount of time so that if something fails during the communication, the same call (having the same JSON-RPC id) can be resent to the Rogerthat service, allowing to fetch the result, without actually executing the call again. This avoids annoying problems such as duplicate delivery of messages. /// /// You should use a different JSON-RPC id for every call you make. /// /// In case of an intermittent failure such as a network connectivity problem, you can retry the same call using the same JSON-RPC id, without running the risk of duplicate execution of your call (e.g. duplicate message delivery). /// </param> public GetUserDataResponse GetUserData(GetUserDataRequest request, string jsonRpcCallId) { GetUserDataResponse result = new GetUserDataResponse(); WireRequest(0, jsonRpcCallId, "system.get_user_data", (writer) => { request.Write(writer, false); }, (reader) => { result.Read(reader); } ); return result; }
private void BindGridWithFilter() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetUserData objReq = new GetUserData(); string WhereClause = ReturnWhere(); if (!string.IsNullOrEmpty(txtuserid.Text)) { objReq.UserID = txtuserid.Text; } if (!string.IsNullOrEmpty(txtfirstname.Text)) { objReq.FirstName = txtfirstname.Text; } if (!string.IsNullOrEmpty(txtrole.Text)) { objReq.Role = txtrole.Text; } if (!string.IsNullOrEmpty(txtnricno.Text)) { objReq.NRICno = txtnricno.Text; } if (!string.IsNullOrEmpty(WhereClause)) { objReq.WhereClause = WhereClause; } if (!string.IsNullOrEmpty(txtdateto.Text)) { if (!string.IsNullOrEmpty(txtdatefrom.Text)) { objReq.LastLoginTime = txtdatefrom.Text; objReq.LastLoginTime = txtdatefrom.Text; } } if (!string.IsNullOrEmpty(txtdatefrom.Text)) { if (string.IsNullOrEmpty(txtdateto.Text)) { objReq.LastLoginTime = txtdatefrom.Text; } } GetUserDataResponse ret = ws.GetUserInfoData(objReq); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = ret.UserID; if (ret.UserID.Count == 0) { // userid.Visible = false; } gvItemTable.DataBind(); userid.Text = ret.UserID.Count.ToString(); } catch (Exception ex) { logger.Info(ex.Message); } }
private static bool PacketUpsertUserAllProc(ref Packet.State __result, PacketUpsertUserAll __instance) { Log.Info($"!!!!! SAVING !!!!!"); UpsertUserAll query = __instance.query as UpsertUserAll; void UpdateUserData(UserData[] array) { GetUserDataResponse temporary = new GetUserDataResponse(); temporary.userData = array[0]; temporary.userId = Singleton<UserManager>.instance.UserId; temporary.bpRank = (int)UserUtil.calcBpRank(Singleton<UserManager>.instance.BattlePoint); FileSystem.Configuration.SaveJson("UserData.json", temporary); GetUserPreviewResponse temporary1 = new GetUserPreviewResponse(); temporary1.userId = temporary.userId; temporary1.isLogin = false; temporary1.lastLoginDate = temporary.userData.lastPlayDate; temporary1.userName = temporary.userData.userName; temporary1.reincarnationNum = temporary.userData.reincarnationNum; temporary1.level = temporary.userData.level; temporary1.exp = temporary.userData.exp; temporary1.playerRating = temporary.userData.playerRating; temporary1.lastGameId = temporary.userData.lastGameId; temporary1.lastRomVersion = temporary.userData.lastRomVersion; temporary1.lastDataVersion = temporary.userData.lastDataVersion; temporary1.lastPlayDate = temporary.userData.lastPlayDate; temporary1.nameplateId = temporary.userData.nameplateId; temporary1.trophyId = temporary.userData.trophyId; temporary1.cardId = temporary.userData.cardId; temporary1.dispPlayerLv = 1; temporary1.dispRating = 1; temporary1.dispBP = 1; temporary1.headphone = 0; FileSystem.Configuration.SaveJson("UserPrev.json", temporary1); } void UpdateUserOption(MU3.Client.UserOption[] array) { GetUserOptionResponse temporary = GetUserOptionResponse.create(); temporary.userOption = array[0]; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson("UserOption.json", temporary); } void UpdateUserActivity() { void UpdateForType(string fileName, List<MU3.User.UserActivity> array, UserActivityConst.Kind kind) { GetUserActivityResponse temporary = new GetUserActivityResponse(); List<MU3.Client.UserActivity> userActivityList = new List<MU3.Client.UserActivity>(); foreach (var item in array) { MU3.Client.UserActivity activity = new MU3.Client.UserActivity(); item.copyTo(activity); userActivityList.Add(activity); } temporary.userActivityList = userActivityList.ToArray(); temporary.length = temporary.userActivityList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; temporary.kind = (int) kind; FileSystem.Configuration.SaveJson(fileName, temporary); } UserManager instance = Singleton<UserManager>.instance; UpdateForType("UserActivityMusic.json", instance.userActivityMusic, UserActivityConst.Kind.Music); UpdateForType("UserActivityPlay.json", instance.userActivityPlay, UserActivityConst.Kind.PlayActivity); } void UpdateUserRecentRating(MU3.Client.UserRecentRating[] array) { string fileName = "UserRecentRating.json"; GetUserRecentRatingResponse temporary = new GetUserRecentRatingResponse(); temporary.userRecentRatingList = array; temporary.userId = Singleton<UserManager>.instance.UserId; temporary.length = temporary.userRecentRatingList.Length; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserBpBase(MU3.Client.UserBpBase[] array) { string fileName = "UserBpBase.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserBpBaseResponse bpBase = GetUserBpBaseResponse.create(); FileSystem.Configuration.SaveJson(fileName, bpBase); } GetUserBpBaseResponse temporary = FileSystem.Configuration.LoadJson<GetUserBpBaseResponse>(fileName); foreach (var item in array) { temporary.userBpBaseList = new[] { item } .Concat(temporary.userBpBaseList) .ToArray(); } temporary.length = temporary.userBpBaseList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson("UserBpBase.json", temporary); } void UpdateUserCharacter(MU3.Client.UserCharacter[] array) { string fileName = "UserCharacter.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserCharacterResponse userCharacter = GetUserCharacterResponse.create(); FileSystem.Configuration.SaveJson(fileName, userCharacter); } GetUserCharacterResponse temporary = FileSystem.Configuration.LoadJson<GetUserCharacterResponse>(fileName); foreach (var item in array) { temporary.userCharacterList = temporary.userCharacterList .Where(a => a.characterId != item.characterId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userCharacterList.Length; temporary.nextIndex = 0; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserCard(MU3.Client.UserCard[] array) { string fileName = "UserCard.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserCardResponse userCard = GetUserCardResponse.create(); FileSystem.Configuration.SaveJson(fileName, userCard); } GetUserCardResponse temporary = FileSystem.Configuration.LoadJson<GetUserCardResponse>(fileName); foreach (var item in array) { temporary.userCardList = temporary.userCardList .Where(a => a.cardId != item.cardId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userCardList.Length; temporary.nextIndex = 0; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserDeck(MU3.Client.UserDeck[] array) { string fileName = "UserDeckByKey.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserDeckByKeyResponse userDeckByKey = GetUserDeckByKeyResponse.create(); FileSystem.Configuration.SaveJson(fileName, userDeckByKey); } GetUserDeckByKeyResponse temporary = FileSystem.Configuration.LoadJson<GetUserDeckByKeyResponse>(fileName); foreach (var item in array) { temporary.userDeckList = temporary.userDeckList .Where(a => a.deckId != item.deckId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userDeckList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserTrainingRoom(MU3.Client.UserTrainingRoom[] array) { string fileName = "UserTrainingRoomByKey.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserTrainingRoomByKeyResponse userTrainingRoom = GetUserTrainingRoomByKeyResponse.create(); FileSystem.Configuration.SaveJson(fileName, userTrainingRoom); } GetUserTrainingRoomByKeyResponse temporary = FileSystem.Configuration.LoadJson<GetUserTrainingRoomByKeyResponse>(fileName); foreach (var item in array) { temporary.userTrainingRoomList = temporary.userTrainingRoomList .Where(a => a.roomId != item.roomId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userTrainingRoomList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson("UserTrainingRoom.json", temporary); } void UpdateUserStory(MU3.Client.UserStory[] array) { string fileName = "UserStory.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserStoryResponse userStory = GetUserStoryResponse.create(); FileSystem.Configuration.SaveJson(fileName, userStory); } GetUserStoryResponse temporary = FileSystem.Configuration.LoadJson<GetUserStoryResponse>(fileName); foreach (var item in array) { temporary.userStoryList = temporary.userStoryList .Where(a => a.storyId != item.storyId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userStoryList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserChapter(MU3.Client.UserChapter[] array) { string fileName = "UserChapter.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserChapterResponse userChapter = GetUserChapterResponse.create(); FileSystem.Configuration.SaveJson(fileName, userChapter); } GetUserChapterResponse temporary = FileSystem.Configuration.LoadJson<GetUserChapterResponse>(fileName); foreach (var item in array) { temporary.userChapterList = temporary.userChapterList .Where(a => a.chapterId != item.chapterId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userChapterList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserItem(UserItem[] array) { void UpdateForType(string fileName, ItemType itemType) { if (!userItemFS.FileExists(fileName)) { GetUserItemResponse userItemList = GetUserItemResponse.create(); userItemFS.SaveJson(fileName, userItemList); } GetUserItemResponse temporary = userItemFS.LoadJson<GetUserItemResponse>(fileName); foreach (var item in array.Where(a => a.itemKind == (int)itemType)) { temporary.userItemList = temporary.userItemList .Where(a => a.itemId != item.itemId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userItemList.Length; temporary.itemKind = (int)itemType; temporary.nextIndex = 0; temporary.userId = Singleton<UserManager>.instance.UserId; userItemFS.SaveJson(fileName, temporary); } UpdateForType("Trophy.json", ItemType.Trophy); UpdateForType("GachaTicket.json", ItemType.GachaTicket); UpdateForType("LimitBreakItem.json", ItemType.LimitBreakItem); UpdateForType("NamePlate.json", ItemType.NamePlate); UpdateForType("Present.json", ItemType.Present); UpdateForType("ProfileVoice.json", ItemType.ProfileVoice); } void UpdateUserMusicItem(MU3.Client.UserMusicItem[] array) { string fileName = "UserMusicItem.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserMusicItemResponse userMusicItemList = GetUserMusicItemResponse.create(); FileSystem.Configuration.SaveJson(fileName, userMusicItemList); } GetUserMusicItemResponse temporary = FileSystem.Configuration.LoadJson<GetUserMusicItemResponse>(fileName); foreach (var item in array) { temporary.userMusicItemList = temporary.userMusicItemList .Where(a => a.musicId != item.musicId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userMusicItemList.Length; temporary.nextIndex = 0; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserMusic(MU3.Client.UserMusicDetail[] array) { string fileName = "UserMusic.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserMusicResponse userMusicList = GetUserMusicResponse.create(); UserMusicDetail userMusicDetail = new UserMusicDetail(); userMusicList.length = 0; FileSystem.Configuration.SaveJson(fileName, userMusicList); } GetUserMusicResponse temporary = FileSystem.Configuration.LoadJson<GetUserMusicResponse>(fileName); foreach (var item in array) { bool addedItem = false; foreach (var userMusic in temporary.userMusicList) { if (userMusic.length != 0) { if (item.musicId == userMusic.userMusicDetailList[0].musicId) { userMusic.userMusicDetailList = userMusic.userMusicDetailList .Where(a => a.level != item.level) .Concat(new[] { item }) .ToArray(); userMusic.length = userMusic.userMusicDetailList.Length; addedItem = true; break; } } } if (!addedItem) { MU3.Client.UserMusic userMusic = new MU3.Client.UserMusic(); userMusic.userMusicDetailList = userMusic.userMusicDetailList.Add(item).ToArray(); userMusic.length = userMusic.userMusicDetailList.Length; temporary.userMusicList = temporary.userMusicList.Add(userMusic).ToArray(); temporary.length = temporary.userMusicList.Length; } } temporary.nextIndex = 0; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserLoginBonus(MU3.Client.UserLoginBonus[] array) { string fileName = "UserLoginBonus.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserLoginBonusResponse userLoginBonus = GetUserLoginBonusResponse.create(); FileSystem.Configuration.SaveJson(fileName, userLoginBonus); } GetUserLoginBonusResponse temporary = FileSystem.Configuration.LoadJson<GetUserLoginBonusResponse>(fileName); foreach (var item in array) { temporary.userLoginBonusList = temporary.userLoginBonusList .Where(a => a.bonusId != item.bonusId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userLoginBonusList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserEventPoint(MU3.Client.UserEventPoint[] array) { string fileName = "UserEventPoint.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserEventPointResponse userEventPoint = GetUserEventPointResponse.create(); FileSystem.Configuration.SaveJson(fileName, userEventPoint); } GetUserEventPointResponse temporary = FileSystem.Configuration.LoadJson<GetUserEventPointResponse>(fileName); foreach (var item in array) { temporary.userEventPointList = temporary.userEventPointList .Where(a => a.eventId != item.eventId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userEventPointList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserMissionPoint(MU3.Client.UserMissionPoint[] array) { string fileName = "UserMissionPoint.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserMissionPointResponse userEventPoint = GetUserMissionPointResponse.create(); FileSystem.Configuration.SaveJson(fileName, userEventPoint); } GetUserMissionPointResponse temporary = FileSystem.Configuration.LoadJson<GetUserMissionPointResponse>(fileName); foreach (var item in array) { temporary.userMissionPointList = temporary.userMissionPointList .Where(a => a.eventId != item.eventId) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userMissionPointList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } void UpdateUserRatingLog(MU3.Client.UserRatinglog[] array) { string fileName = "UserRatingLog.json"; if (!FileSystem.Configuration.FileExists(fileName)) { GetUserRatinglogResponse userEventPoint = GetUserRatinglogResponse.create(); FileSystem.Configuration.SaveJson(fileName, userEventPoint); } GetUserRatinglogResponse temporary = FileSystem.Configuration.LoadJson<GetUserRatinglogResponse>(fileName); foreach (var item in array) { temporary.userRatinglogList = temporary.userRatinglogList .Where(a => a.highestRating != item.highestRating) .Concat(new[] { item }) .ToArray(); } temporary.length = temporary.userRatinglogList.Length; temporary.userId = Singleton<UserManager>.instance.UserId; FileSystem.Configuration.SaveJson(fileName, temporary); } if (query == null) { Log.Info("!!!!! No data to save. !!!!!"); return false; } var upsert = query.request_.upsertUserAll; UpdateUserData(upsert.userData); UpdateUserOption(upsert.userOption); UpdateUserActivity(); UpdateUserRecentRating(upsert.userRecentRatingList); UpdateUserBpBase(upsert.userBpBaseList); if (!string.IsNullOrEmpty(upsert.isNewMusicDetailList)) UpdateUserMusic(upsert.userMusicDetailList); if (!string.IsNullOrEmpty(upsert.isNewCharacterList)) UpdateUserCharacter(upsert.userCharacterList); if (!string.IsNullOrEmpty(upsert.isNewCardList)) UpdateUserCard(upsert.userCardList); if (!string.IsNullOrEmpty(upsert.isNewDeckList)) UpdateUserDeck(upsert.userDeckList); if (!string.IsNullOrEmpty(upsert.isNewTrainingRoomList)) UpdateUserTrainingRoom(upsert.userTrainingRoomList); if (!string.IsNullOrEmpty(upsert.isNewStoryList)) UpdateUserStory(upsert.userStoryList); if (!string.IsNullOrEmpty(upsert.isNewChapterList)) UpdateUserChapter(upsert.userChapterList); if (!string.IsNullOrEmpty(upsert.isNewItemList)) UpdateUserItem(upsert.userItemList); if (!string.IsNullOrEmpty(upsert.isNewMusicItemList)) UpdateUserMusicItem(upsert.userMusicItemList); if (!string.IsNullOrEmpty(upsert.isNewLoginBonusList)) UpdateUserLoginBonus(upsert.userLoginBonusList); if (!string.IsNullOrEmpty(upsert.isNewEventPointList)) UpdateUserEventPoint(upsert.userEventPointList); if (!string.IsNullOrEmpty(upsert.isNewMissionPointList)) UpdateUserMissionPoint(upsert.userMissionPointList); if (!string.IsNullOrEmpty(upsert.isNewRatinglogList)) UpdateUserRatingLog(upsert.userRatinglogList); if (UserManager.Exists) { Singleton<UserManager>.instance.updateLastRemainedGP(); } typeof(PacketUpsertUserAll).GetMethod("clearFlags", (BindingFlags)62).Invoke(__instance, null); __result = Packet.State.Done; (__instance.query as UpsertUserAll).response_ = new UpsertUserAllResponse() { returnCode = 1 }; return false; }