초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
using ServerCore; using ServerBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServerCommon
{
public class EndQuest : EntityBase
{
private string m_user_guid = string.Empty;
private UInt32 m_end_quest_id = 0;
private UInt32 m_end_quest_revision = 0;
public EndQuest(EntityBase parent, string userGuid, UInt32 endQuestId, UInt32 endQuestRevision)
: base(EntityType.EndQuest, parent)
{
m_user_guid = userGuid;
m_end_quest_id = endQuestId;
m_end_quest_revision = endQuestRevision;
onInit().GetAwaiter().GetResult();
}
public override async Task<Result> onInit()
{
addEntityAttributes();
return await base.onInit();
}
public override string toBasicString()
{
return $"{this.getTypeName()} - {getRootParent().toBasicString()}";
}
public override string toSummaryString()
{
return $"{this.getTypeName()} - {getRootParent().toBasicString()}";
}
private void addEntityAttributes()
{
var direct_parent = getDirectParent();
NullReferenceCheckHelper.throwIfNull(direct_parent, () => $"direct_parent is null !!!");
addEntityAttribute(new EndQuestAttribute( this
, m_user_guid, m_end_quest_id, m_end_quest_revision
, direct_parent ));
}
public bool isUgq()
{
var quest_attribute = getEntityAttribute<EndQuestAttribute>();
if (quest_attribute is null) return false;
if (quest_attribute.QuestRevision > 0)
{
return true;
}
return false;
}
}
}

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServerCore; using ServerBase;
namespace ServerCommon
{
public class Quest : EntityBase
{
private string m_user_guid = string.Empty;
public Quest(EntityBase parent, string user_guid)
: base(EntityType.Quest, parent)
{
m_user_guid = user_guid;
onInit().GetAwaiter().GetResult();
}
public override async Task<Result> onInit()
{
addEntityAttributes();
return await base.onInit();
}
public override string toBasicString()
{
return $"{this.getTypeName()} - {getRootParent().toBasicString()}";
}
public override string toSummaryString()
{
return $"{this.getTypeName()} - {getRootParent().toBasicString()}";
}
private void addEntityAttributes()
{
var parent = getDirectParent();
NullReferenceCheckHelper.throwIfNull(parent, () => $"parent is null !!!");
addEntityAttribute(new QuestAttribute(this, parent));
}
public QuestDoc getQuestDoc()
{
var attribute = getEntityAttribute<QuestAttribute>();
NullReferenceCheckHelper.throwIfNull(attribute, () => $"attribute is null !!!");
var quest_doc = attribute.m_quest_doc_nullable;
ArgumentNullReferenceCheckHelper.throwIfNull(quest_doc, () => $"quest_doc is null !!!");
return quest_doc;
}
}
}

View File

@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServerCore; using ServerBase;
namespace ServerCommon
{
public class QuestMail : EntityBase
{
public QuestMail(EntityBase parent)
: base(EntityType.QuestMail, parent)
{
onInit().Wait();
}
public override async Task<Result> onInit()
{
addEntityAttributes();
return await base.onInit();
}
private void addEntityAttributes()
{
var parent = getDirectParent();
NullReferenceCheckHelper.throwIfNull(parent, () => $"parent is null !!!");
addEntityAttribute(new QuestMailAttribute(this, parent));
}
public override string toBasicString()
{
return $"{this.getTypeName()} - {getRootParent()?.toBasicString()}";
}
public override string toSummaryString()
{
return $"{this.getTypeName()} - {getRootParent()?.toBasicString()}";
}
}
}