초기커밋
This commit is contained in:
13
ServerCommon/UGQ/MetaGenerator/IUgqMetaGenerator.cs
Normal file
13
ServerCommon/UGQ/MetaGenerator/IUgqMetaGenerator.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using MetaAssets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public interface IUgqMetaGenerator
|
||||
{
|
||||
public List<QuestMetaInfo> generateMetas(ref List<QuestMetaInfo> scripts);
|
||||
}
|
||||
135
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorBase.cs
Normal file
135
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorBase.cs
Normal file
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public abstract class UgqMetaGeneratorBase : IUgqMetaGenerator
|
||||
{
|
||||
protected QuestContentEntity m_content = new();
|
||||
protected int m_current_idx = 0;
|
||||
public UgqMetaGeneratorBase(QuestContentEntity content, int currentIdx)
|
||||
{
|
||||
m_content = content;
|
||||
m_current_idx = currentIdx;
|
||||
}
|
||||
|
||||
public List<QuestMetaInfo> generateMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
generatePrevMetas(ref scripts);
|
||||
generateCurrentMetas(ref scripts);
|
||||
generatePostTaskGroups(ref scripts);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public abstract List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts);
|
||||
public abstract List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts);
|
||||
public virtual List<QuestMetaInfo> generatePostTaskGroups(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
QuestMetaInfo meta = new();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = string.Empty;
|
||||
meta.EventName = string.Empty;
|
||||
meta.EventCondition1 = string.Empty;
|
||||
meta.EventCondition2 = string.Empty;
|
||||
meta.EventCondition3 = string.Empty;
|
||||
|
||||
//마지막 태스크라면 퀘스트 컴플리트 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.QUEST.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = m_content.QuestId.ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete, Task Active 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.ACTIVE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 2).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
|
||||
|
||||
protected Int32 getUgqRewardGroupIdByGrade()
|
||||
{
|
||||
|
||||
bool is_world_beacon = isWorldBeacon(m_content.BeaconId);
|
||||
|
||||
if (is_world_beacon)
|
||||
{
|
||||
switch (m_content.GradeType)
|
||||
{
|
||||
case UgqGradeType.Amature:
|
||||
return MetaHelper.GameConfigMeta.WorldBeaconAmateurUGQReward;
|
||||
case UgqGradeType.RisingStar:
|
||||
return MetaHelper.GameConfigMeta.WorldBeaconRisingstarUGQReward;
|
||||
case UgqGradeType.Master1:
|
||||
return MetaHelper.GameConfigMeta.WorldBeaconMasterOneUGQReward;
|
||||
case UgqGradeType.Master2:
|
||||
return MetaHelper.GameConfigMeta.WorldBeaconMasterTwoUGQReward;
|
||||
case UgqGradeType.Master3:
|
||||
return MetaHelper.GameConfigMeta.WorldBeaconMasterThreeUGQReward;
|
||||
default:
|
||||
Log.getLogger().error($"{m_content.GradeType} type not exist in getUgqRewardGroupIdByGrade");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (m_content.GradeType)
|
||||
{
|
||||
case UgqGradeType.Amature:
|
||||
return MetaHelper.GameConfigMeta.NormalBeaconAmateurUGQReward;
|
||||
case UgqGradeType.RisingStar:
|
||||
return MetaHelper.GameConfigMeta.NormalBeaconRisingstarUGQReward;
|
||||
case UgqGradeType.Master1:
|
||||
return MetaHelper.GameConfigMeta.NormalBeaconMasterOneUGQReward;
|
||||
case UgqGradeType.Master2:
|
||||
return MetaHelper.GameConfigMeta.NormalBeaconMasterTwoUGQReward;
|
||||
case UgqGradeType.Master3:
|
||||
return MetaHelper.GameConfigMeta.NormalBeaconMasterThreeUGQReward;
|
||||
default:
|
||||
Log.getLogger().error($"{m_content.GradeType} type not exist in getUgqRewardGroupIdByGrade");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected bool isWorldBeacon(int beaconId)
|
||||
{
|
||||
if (beaconId > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else return false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCore; using ServerBase;
|
||||
using ServerCommon;
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqMetaGeneratorCostumeEquiped : UgqMetaGeneratorBase
|
||||
{
|
||||
public UgqMetaGeneratorCostumeEquiped(QuestContentEntity content, int currentIdx) : base(content, currentIdx)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
var item_id = m_content.Tasks[m_current_idx].ActionValue;
|
||||
|
||||
MetaData.Instance._ItemTable.TryGetValue((int)item_id, out var itemMetaData);
|
||||
|
||||
ArgumentNullReferenceCheckHelper.throwIfNull(itemMetaData, () => $"player_action is null !!!");
|
||||
var slotType = itemMetaData.TypeSmall.toClothSlotType();
|
||||
|
||||
QuestMetaInfo meta = new();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = EQuestEventTargetType.COSTUME.ToString();
|
||||
meta.EventName = EQuestEventNameType.EQUIPED.ToString();
|
||||
meta.EventCondition1 = slotType.ToString().ToUpper();
|
||||
meta.EventCondition2 = item_id.ToString();
|
||||
meta.EventCondition3 = "";
|
||||
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
//마지막 태스크라면 리워드보상 값 변경 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.REWARD.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.SET.ToString();
|
||||
meta.FunctionCondition1 = getUgqRewardGroupIdByGrade().ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 1).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqMetaGeneratorDialogueEnded : UgqMetaGeneratorBase
|
||||
{
|
||||
public UgqMetaGeneratorDialogueEnded(QuestContentEntity content, int currentIdx) : base(content, currentIdx)
|
||||
{
|
||||
}
|
||||
public override List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
QuestMetaInfo meta = new();
|
||||
|
||||
meta.Index = scripts.Count() + 1;
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = string.Empty;
|
||||
meta.EventName = string.Empty;
|
||||
meta.EventCondition1 = string.Empty;
|
||||
meta.EventCondition2 = string.Empty;
|
||||
meta.EventCondition3 = string.Empty;
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.NPC.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.DIALOGUE_SET.ToString();
|
||||
meta.FunctionCondition1 = m_content.Tasks[m_current_idx].ActionValue.ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
QuestMetaInfo meta = new();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = EQuestEventTargetType.DIALOGUE.ToString();
|
||||
meta.EventName = EQuestEventNameType.ENDED.ToString();
|
||||
meta.EventCondition1 = m_content.Tasks[m_current_idx].DialogId ?? string.Empty;
|
||||
meta.EventCondition2 = "1";
|
||||
meta.EventCondition3 = string.Empty;
|
||||
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
//마지막 태스크라면 리워드보상 값 변경 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.REWARD.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.SET.ToString();
|
||||
meta.FunctionCondition1 = getUgqRewardGroupIdByGrade().ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 1).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
|
||||
76
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorItemBought.cs
Normal file
76
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorItemBought.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqMetaGeneratorItemBought : UgqMetaGeneratorBase
|
||||
{
|
||||
public UgqMetaGeneratorItemBought(QuestContentEntity content, int currentIdx)
|
||||
: base(content, currentIdx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
return scripts;
|
||||
}
|
||||
|
||||
|
||||
public override List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
var item_id = m_content.Tasks[m_current_idx].ActionValue;
|
||||
|
||||
MetaData.Instance._ItemTable.TryGetValue((int)item_id, out var itemMetaData);
|
||||
ArgumentNullReferenceCheckHelper.throwIfNull(itemMetaData, () => $"itemMetaData is null !!!");
|
||||
|
||||
var meta = new QuestMetaInfo();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision); ;
|
||||
meta.EventTarget = EQuestEventTargetType.ITEM.ToString();
|
||||
meta.EventName = EQuestEventNameType.BOUGHT.ToString();
|
||||
meta.EventCondition1 = itemMetaData.TypeLarge.ToString();
|
||||
meta.EventCondition2 = itemMetaData.TypeSmall.ToString();
|
||||
meta.EventCondition3 = item_id.ToString();
|
||||
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
//마지막 태스크라면 리워드보상 값 변경 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.REWARD.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.SET.ToString();
|
||||
meta.FunctionCondition1 = getUgqRewardGroupIdByGrade().ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 1).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
|
||||
}
|
||||
69
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorItemSold.cs
Normal file
69
ServerCommon/UGQ/MetaGenerator/UgqMetaGeneratorItemSold.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCommon;
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
using UGQDatabase.Models;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqMetaGeneratorItemSold : UgqMetaGeneratorBase
|
||||
{
|
||||
public UgqMetaGeneratorItemSold(QuestContentEntity content, int currentIdx) : base(content, currentIdx)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
var item_id = m_content.Tasks[m_current_idx].ActionValue;
|
||||
|
||||
MetaData.Instance._ItemTable.TryGetValue((int)item_id, out var itemMetaData);
|
||||
ArgumentNullReferenceCheckHelper.throwIfNull(itemMetaData, () => $"itemMetaData is null !!!");
|
||||
|
||||
QuestMetaInfo meta = new();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = EQuestEventTargetType.ITEM.ToString();
|
||||
meta.EventName = EQuestEventNameType.SOLD.ToString();
|
||||
meta.EventCondition1 = itemMetaData.TypeLarge.ToString();
|
||||
meta.EventCondition2 = itemMetaData.TypeSmall.ToString();
|
||||
meta.EventCondition3 = item_id.ToString();
|
||||
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
//마지막 태스크라면 리워드보상 값 변경 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.REWARD.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.SET.ToString();
|
||||
meta.FunctionCondition1 = getUgqRewardGroupIdByGrade().ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 1).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqMetaGeneratorToolActived : UgqMetaGeneratorBase
|
||||
{
|
||||
public UgqMetaGeneratorToolActived(QuestContentEntity content, int currentIdx) : base(content, currentIdx)
|
||||
{
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generatePrevMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
return scripts;
|
||||
}
|
||||
|
||||
public override List<QuestMetaInfo> generateCurrentMetas(ref List<QuestMetaInfo> scripts)
|
||||
{
|
||||
var item_id = m_content.Tasks[m_current_idx].ActionValue;
|
||||
|
||||
MetaData.Instance._ItemTable.TryGetValue((int)item_id, out var itemMetaData);
|
||||
|
||||
var meta = new QuestMetaInfo();
|
||||
meta.Index = scripts.Count() + 1;
|
||||
meta.ComposedQuestId = QuestHelper.convertQuestIdAndRevisionToUgqQuestId((UInt32)m_content.QuestId, (UInt32)m_content.Revision);
|
||||
meta.EventTarget = EQuestEventTargetType.TOOL.ToString();
|
||||
meta.EventName = EQuestEventNameType.ACTIVED.ToString();
|
||||
meta.EventCondition1 = item_id.ToString();
|
||||
meta.EventCondition2 = "";
|
||||
meta.EventCondition3 = "";
|
||||
|
||||
var task_count = m_content.Tasks.Count();
|
||||
|
||||
//마지막 태스크라면 리워드보상 값 변경 처리를 해줘야 된다.
|
||||
if (task_count == m_current_idx + 1)
|
||||
{
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.REWARD.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.SET.ToString();
|
||||
meta.FunctionCondition1 = getUgqRewardGroupIdByGrade().ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//아닌경우는 Task Complete 처리 해준다.
|
||||
meta.FunctionTarget = EQuestFunctionTargetType.TASK.ToString();
|
||||
meta.FunctionName = EQuestFunctionNameType.COMPLETE.ToString();
|
||||
meta.FunctionCondition1 = (m_current_idx + 1).ToString();
|
||||
meta.FunctionCondition2 = string.Empty;
|
||||
meta.FunctionCondition3 = string.Empty;
|
||||
}
|
||||
scripts.Add(meta);
|
||||
|
||||
return scripts;
|
||||
}
|
||||
}
|
||||
172
ServerCommon/UGQ/Models/UGQApiModels.cs
Normal file
172
ServerCommon/UGQ/Models/UGQApiModels.cs
Normal file
@@ -0,0 +1,172 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
||||
using UGQDatabase.Models;
|
||||
|
||||
|
||||
namespace ServerCommon.UGQ.Models;
|
||||
|
||||
|
||||
public class ApiErrorResponse
|
||||
{
|
||||
public int ErrorCode { get; set; }
|
||||
public string ErrorMessage { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class ValidationErrorResponse : ApiErrorResponse
|
||||
{
|
||||
public List<string> ValidationErrorMessages { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class UgqAccount
|
||||
{
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public UgqGradeType GradeType { get; set; }
|
||||
public double CreatorPoint { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UgqQuestBoardRequest
|
||||
{
|
||||
[FromQuery(Name = "pageNumber")]
|
||||
public int PageNumber { get; set; }
|
||||
|
||||
[FromQuery(Name = "pageSize")]
|
||||
public int PageSize { get; set; }
|
||||
|
||||
[FromQuery(Name = "gradeType")]
|
||||
public UgqUICategoryGradeType GradeType { get; set; }
|
||||
|
||||
[FromQuery(Name = "searchType")]
|
||||
public UgqSearchType SearchType { get; set; }
|
||||
|
||||
[FromQuery(Name = "searchText")]
|
||||
public string? SearchText { get; set; }
|
||||
|
||||
[FromQuery(Name = "sortType")]
|
||||
public UgqSortType SortType { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestIdRevisionRequest
|
||||
{
|
||||
[FromQuery(Name = "questId")]
|
||||
public long QuestId { get; set; }
|
||||
|
||||
[FromQuery(Name = "revision")]
|
||||
public long Revision { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestAcceptedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public UGQAcceptReason Reason { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestCompletedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public int Amount { get; set; }
|
||||
}
|
||||
|
||||
public class UgqQuestAbortedRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
|
||||
public long Revision { get; set; }
|
||||
|
||||
public UGQAbortReason Reason { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class UgqBookmarkRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqUnbookmarkRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqLikeRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqUnlikeRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UgqReportRequest
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
public string UserGuid { get; set; } = null!;
|
||||
|
||||
public string Contents { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class BeginCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public int Point { get; set; }
|
||||
}
|
||||
|
||||
public class BeginCreatorPointResponse
|
||||
{
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class CancelCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
public string? CancelReason { get; set; }
|
||||
}
|
||||
|
||||
public class CommitCreatorPointRequest
|
||||
{
|
||||
public string UserGuid { get; set; } = null!;
|
||||
|
||||
public string ReceiptId { get; set; } = null!;
|
||||
}
|
||||
|
||||
|
||||
public class GameQuestDataSimple
|
||||
{
|
||||
public long QuestId { get; set; }
|
||||
public long Revision { get; set; }
|
||||
|
||||
public string UserGuid { get; set; } = null!;
|
||||
public string Author { get; set; } = null!;
|
||||
|
||||
public TextEntity Title { get; set; } = new TextEntity();
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public UgqGradeType GradeType { get; set; } = UgqGradeType.Amature;
|
||||
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public QuestContentState State { get; set; }
|
||||
public int Cost { get; set; }
|
||||
|
||||
public bool Shutdown { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user