초기커밋
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
|
||||
public class ChangeFriendFolderLocationInterlockAction : FriendInterlockBase
|
||||
{
|
||||
private string m_folder_name;
|
||||
|
||||
public ChangeFriendFolderLocationInterlockAction(UserBase owner, string myGuid, string friendGuid, string folderName) : base(owner, myGuid, friendGuid)
|
||||
{
|
||||
m_folder_name = folderName;
|
||||
}
|
||||
|
||||
|
||||
public override async Task<Result> doAction()
|
||||
{
|
||||
var owner = getOwner();
|
||||
var friend_folder_action = owner.getEntityAction<FriendFolderAction>();
|
||||
|
||||
var result = await owner.runTransactionRunnerSafely(TransactionIdType.PrivateContents, "ChangeFriendFolderLocation", delegateChangeFriendFolderLocation);
|
||||
if (result.isFail()) return result;
|
||||
|
||||
return result;
|
||||
|
||||
async Task<Result> delegateChangeFriendFolderLocation() => await changeFriendFolderLocation(owner);
|
||||
|
||||
}
|
||||
|
||||
private async Task<Result> changeFriendFolderLocation(Player owner)
|
||||
{
|
||||
var friend_folder_action = owner.getEntityAction<FriendFolderAction>();
|
||||
var result = friend_folder_action.changeFriendFolderLocation(getMyGuid(), getFriendGuid(), m_folder_name);
|
||||
var server_logic = GameServerApp.getServerLogic();
|
||||
if (result.isFail()) return result;
|
||||
|
||||
var batch = new QueryBatchEx<QueryRunnerWithDocument>(owner, LogActionType.None, server_logic.getDynamoDbClient());
|
||||
{
|
||||
batch.addQuery(new DBQWriteToAttributeAllWithTransactionRunner());
|
||||
}
|
||||
result = await QueryHelper.sendQueryAndBusinessLog(batch);
|
||||
if (result.isFail()) return result;
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user