초기커밋
This commit is contained in:
32
GameServer/Contents/Cart/Log/CartBusinessLog.cs
Normal file
32
GameServer/Contents/Cart/Log/CartBusinessLog.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using ServerCommon;
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class CartBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private CartLogData m_data_to_log;
|
||||
public CartBusinessLog(CartLogData log_data_param)
|
||||
: base(LogDomainType.Cart)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new CartLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
21
GameServer/Contents/Cart/Log/CartBusinessLogHelper.cs
Normal file
21
GameServer/Contents/Cart/Log/CartBusinessLogHelper.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using ServerCommon;
|
||||
using META_ID = System.UInt32;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
static public class CartBusinessLogHelper
|
||||
{
|
||||
static public CartLogData toLogInfo(List<(META_ID, int)> deltaCartData)
|
||||
{
|
||||
var logData = new CartLogData();
|
||||
logData.setInfo(deltaCartData);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setInfo(this CartLogData logData, List<(META_ID, int)> deltaCartData)
|
||||
{
|
||||
logData.deltaItemDataList = deltaCartData;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user