public async UniTaskVoid HandleRequestChangePartySetting(RequestHandlerData requestHandler, RequestChangePartySettingMessage request, RequestProceedResultDelegate <ResponseChangePartySettingMessage> result) { #if UNITY_STANDALONE && !CLIENT_BUILD await UniTask.Yield(); IPlayerCharacterData playerCharacter; if (!GameInstance.ServerUserHandlers.TryGetPlayerCharacter(requestHandler.ConnectionId, out playerCharacter)) { result.InvokeError(new ResponseChangePartySettingMessage() { message = UITextKeys.UI_ERROR_NOT_LOGGED_IN, }); return; } ValidatePartyRequestResult validateResult = GameInstance.ServerPartyHandlers.CanChangePartySetting(playerCharacter); if (!validateResult.IsSuccess) { result.InvokeError(new ResponseChangePartySettingMessage() { message = validateResult.GameMessage, }); return; } // Save to database AsyncResponseData <PartyResp> updateResp = await DbServiceClient.UpdatePartyAsync(new UpdatePartyReq() { PartyId = validateResult.PartyId, ShareExp = request.shareExp, ShareItem = request.shareItem }); if (!updateResp.IsSuccess) { result.InvokeError(new ResponseChangePartySettingMessage() { message = UITextKeys.UI_ERROR_INTERNAL_SERVER_ERROR, }); return; } // Update cache validateResult.Party.Setting(request.shareExp, request.shareItem); GameInstance.ServerPartyHandlers.SetParty(validateResult.PartyId, validateResult.Party); // Broadcast via chat server if (ClusterClient.IsNetworkActive) { ClusterClient.SendPartySetting(MMOMessageTypes.UpdateParty, validateResult.PartyId, request.shareExp, request.shareItem); } GameInstance.ServerGameMessageHandlers.SendSetPartySettingToMembers(validateResult.Party); result.InvokeSuccess(new ResponseChangePartySettingMessage()); #endif }