초기커밋
This commit is contained in:
32
GameServer/Contents/Craft/Log/CraftBusinessLog.cs
Normal file
32
GameServer/Contents/Craft/Log/CraftBusinessLog.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 CraftBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private CraftLogData m_data_to_log;
|
||||
public CraftBusinessLog(CraftLogData log_data_param)
|
||||
: base(LogDomainType.Craft)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new CraftLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
83
GameServer/Contents/Craft/Log/CraftBusinessLogHelper.cs
Normal file
83
GameServer/Contents/Craft/Log/CraftBusinessLogHelper.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using ServerCommon.BusinessLogDomain;
|
||||
using ServerCommon;
|
||||
using META_ID = System.UInt32;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
static public class CraftBusinessLogHelper
|
||||
{
|
||||
static public CraftLogData toCraftLogInfo(CraftAttribute craftAttribute)
|
||||
{
|
||||
var logData = new CraftLogData();
|
||||
logData.setCraftInfo(craftAttribute);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public CraftLogData toCraftLogInfo(CraftAttrib craftAttrib)
|
||||
{
|
||||
var logData = new CraftLogData();
|
||||
logData.setCraftInfo(craftAttrib);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setCraftInfo(this CraftLogData logData, CraftAttribute craftAttribute)
|
||||
{
|
||||
logData.AnchorGuid = craftAttribute.AnchorGuid;
|
||||
logData.CraftMetaId = craftAttribute.CraftMetaId;
|
||||
logData.CraftStartTime = craftAttribute.CraftStartTime;
|
||||
logData.CraftFinishTime = craftAttribute.CraftFinishTime;
|
||||
logData.BeaconGuid = craftAttribute.BeaconGuid;
|
||||
logData.CraftCount = craftAttribute.CraftCount;
|
||||
}
|
||||
|
||||
static public void setCraftInfo(this CraftLogData logData, CraftAttrib craftAttrib)
|
||||
{
|
||||
logData.AnchorGuid = craftAttrib.AnchorGuid;
|
||||
logData.CraftMetaId = craftAttrib.CraftMetaId;
|
||||
logData.CraftStartTime = craftAttrib.CraftStartTime;
|
||||
logData.CraftFinishTime = craftAttrib.CraftFinishTime;
|
||||
logData.BeaconGuid = craftAttrib.BeaconGuid;
|
||||
logData.CraftCount = craftAttrib.CraftCount;
|
||||
}
|
||||
|
||||
static public CraftHelpLogData toCraftHelpLogInfo(CraftHelpAttrib craftHelpAttrib)
|
||||
{
|
||||
var logData = new CraftHelpLogData();
|
||||
logData.setCraftHelpInfo(craftHelpAttrib);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public CraftHelpLogData toCraftHelpLogInfo(CraftHelpAttribute craftHelpAttribute)
|
||||
{
|
||||
var logData = new CraftHelpLogData();
|
||||
logData.setCraftHelpInfo(craftHelpAttribute);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setCraftHelpInfo(this CraftHelpLogData logData, CraftHelpAttrib craftHelpAttrib)
|
||||
{
|
||||
logData.HelpUserGuids = craftHelpAttrib.HelpUserGuids;
|
||||
logData.HelpedUserGuids = craftHelpAttrib.HelpedUserGuids;
|
||||
logData.CraftHelpUpdateDay = craftHelpAttrib.CraftHelpUpdateDay;
|
||||
}
|
||||
|
||||
static public void setCraftHelpInfo(this CraftHelpLogData logData, CraftHelpAttribute craftHelpAttribute)
|
||||
{
|
||||
logData.HelpUserGuids = craftHelpAttribute.HelpUserGuids;
|
||||
logData.HelpedUserGuids = craftHelpAttribute.HelpedUserGuids;
|
||||
logData.CraftHelpUpdateDay = craftHelpAttribute.CraftHelpUpdateDay;
|
||||
}
|
||||
|
||||
static public CraftRecipeLogData toCraftRecipeLogInfo(int recipe_meta_id)
|
||||
{
|
||||
var logData = new CraftRecipeLogData();
|
||||
logData.setCraftRecipeInfo(recipe_meta_id);
|
||||
return logData;
|
||||
}
|
||||
|
||||
static public void setCraftRecipeInfo(this CraftRecipeLogData logData, int recipe_meta_id)
|
||||
{
|
||||
logData.recipe_meta_id = (META_ID)recipe_meta_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
32
GameServer/Contents/Craft/Log/CraftHelpBusinessLog.cs
Normal file
32
GameServer/Contents/Craft/Log/CraftHelpBusinessLog.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 CraftHelpBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private CraftHelpLogData m_data_to_log;
|
||||
public CraftHelpBusinessLog(CraftHelpLogData log_data_param)
|
||||
: base(LogDomainType.CraftHelp)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new CraftHelpLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
32
GameServer/Contents/Craft/Log/CraftRecipeBusinessLog.cs
Normal file
32
GameServer/Contents/Craft/Log/CraftRecipeBusinessLog.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 CraftRecipeBusinessLog : ILogInvokerEx
|
||||
{
|
||||
private CraftRecipeLogData m_data_to_log;
|
||||
public CraftRecipeBusinessLog(CraftRecipeLogData log_data_param)
|
||||
: base(LogDomainType.Craft)
|
||||
{
|
||||
m_data_to_log = log_data_param;
|
||||
}
|
||||
|
||||
public override bool hasLog()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void fillup(ref BusinessLog.LogBody body)
|
||||
{
|
||||
body.append(new CraftRecipeLogData(this, m_data_to_log));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user