42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using OTGIntegrated.Items;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace OTGIntegrated.Quests
|
||
|
|
{
|
||
|
|
[Serializable]
|
||
|
|
public sealed class QuestRewardItem
|
||
|
|
{
|
||
|
|
public ItemData item;
|
||
|
|
[Min(1)] public int amount = 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
[CreateAssetMenu(fileName = "QuestData", menuName = "OTG Integrated/Quest Data")]
|
||
|
|
public sealed class QuestData : ScriptableObject
|
||
|
|
{
|
||
|
|
public string questId;
|
||
|
|
public string displayName;
|
||
|
|
[TextArea(3, 7)] public string description;
|
||
|
|
public string giverNpcId;
|
||
|
|
public string turnInNpcId;
|
||
|
|
public List<QuestGoal> goals = new List<QuestGoal>();
|
||
|
|
[Min(0)] public int rewardExperience;
|
||
|
|
[Min(0)] public int rewardTalentPoints;
|
||
|
|
public List<QuestRewardItem> rewardItems = new List<QuestRewardItem>();
|
||
|
|
|
||
|
|
private void OnValidate()
|
||
|
|
{
|
||
|
|
if (string.IsNullOrWhiteSpace(questId))
|
||
|
|
{
|
||
|
|
questId = name;
|
||
|
|
}
|
||
|
|
|
||
|
|
if (string.IsNullOrWhiteSpace(displayName))
|
||
|
|
{
|
||
|
|
displayName = questId;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|