109 lines
3.7 KiB
C#
109 lines
3.7 KiB
C#
using Amazon.DynamoDBv2.DocumentModel;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
using Nettention.Proud;
|
|
using ServerCommon;
|
|
using ServerCore; using ServerBase;
|
|
using System.Collections.Concurrent;
|
|
using static ClientToGameMessage.Types;
|
|
using static ClientToGameReq.Types;
|
|
|
|
|
|
|
|
namespace GameServer
|
|
{
|
|
// public partial class ClientSession : IEntityWithSession
|
|
// {
|
|
//
|
|
// public void HandleGetClaimInfoReq()
|
|
// {
|
|
//
|
|
// ServerErrorCode errorCode = claimInfoRefresh(_selectedChar);
|
|
//
|
|
// if(errorCode != ServerErrorCode.Success)
|
|
// {
|
|
// clientToGame.Response.ErrorCode = errorCode;
|
|
// Send(RmiContext.ReliableSend, clientToGame);
|
|
// return;
|
|
// }
|
|
//
|
|
// List<ClientToGame> CtoGs = ClaimRewardHelper.MakeClaimSendInfo(_selectedChar, true);
|
|
// Send(RmiContext.ReliableSend, CtoGs[0]);
|
|
//
|
|
// return;
|
|
// }
|
|
//
|
|
// public void claimInfosRefreshAndNoti(object player)
|
|
// {
|
|
// // if (!player.archiveEvents.TryGetValue(EEventType.ClaimReward, out var eventInfos))
|
|
// // {
|
|
// // Log.getLogger().error("archiveEvents is null");
|
|
// // return;
|
|
// // }
|
|
// //
|
|
// // if(eventInfos.RefreshEvent())
|
|
// // {
|
|
// // eventInfos.EventUpdateNoti();
|
|
// // }
|
|
// }
|
|
//
|
|
//
|
|
// public ServerErrorCode claimInfoRefresh(object player)
|
|
// {
|
|
// if (!player.archiveEvents.TryGetValue(EEventType.ClaimReward, out var eventInfos))
|
|
// {
|
|
// Log.getLogger().error("archiveEvents is null");
|
|
// return ServerErrorCode.ServerLogicError;
|
|
// }
|
|
//
|
|
// bool needUpdate = eventInfos.RefreshEvent();
|
|
// return ServerErrorCode.Success;
|
|
// }
|
|
//
|
|
// public void HandleClaimReset()
|
|
// {
|
|
// if (_selectedChar == null)
|
|
// {
|
|
// Log.getLogger().error("_selectedChar is null");
|
|
// throw new Exception("HandleClaimReset() and _selectedChar is null");
|
|
// }
|
|
//
|
|
//
|
|
// // ClaimNormalEntity newNormalEntity = new ClaimNormalEntity(_selectedChar.claimNormalEntity.DocumentForUpdate());
|
|
// // ClaimMembershipEntity newMembershipEntity = new ClaimMembershipEntity(_selectedChar.claimMembershipEntity.DocumentForUpdate());
|
|
// //
|
|
// // newNormalEntity.Attr = new();
|
|
// // newMembershipEntity.Attr = new();
|
|
// // Document docNormal = newNormalEntity.DocumentForUpdate();
|
|
// // Document docMembership = newMembershipEntity.DocumentForUpdate();
|
|
// // var cts = new CancellationTokenSource();
|
|
// //
|
|
// // List<DBDocumentInfo> dBDocumentInfos = new();
|
|
// // dBDocumentInfos.Add(new DBDocumentInfo(docNormal, EDBExecuteType.Update));
|
|
// // dBDocumentInfos.Add(new DBDocumentInfo(docMembership, EDBExecuteType.Update));
|
|
// //
|
|
// // try
|
|
// // {
|
|
// // GameServerApp.Instance.MainDB.Transaction(dBDocumentInfos, 2).WaitAsync(cts.Token);
|
|
// // }
|
|
// // catch (OperationCanceledException)
|
|
// // {
|
|
// // //ErrorLog
|
|
// // return;
|
|
// // }
|
|
// // finally
|
|
// // {
|
|
// // cts.Dispose(); // CancellationTokenSource 해제
|
|
// // }
|
|
// // _selectedChar.claimNormalEntity.ReadFrom(docNormal);
|
|
// // _selectedChar.claimMembershipEntity.ReadFrom(docMembership);
|
|
// return;
|
|
//
|
|
//
|
|
// }
|
|
//
|
|
//
|
|
|
|
|
|
|
|
}
|