//--------------------------------------------------------
|
// [Author]: YYL
|
// [ Date ]: Friday, June 27, 2025
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
using System.IO;
|
using System.Threading;
|
using System;
|
using UnityEngine;
|
using LitJson;
|
|
public partial class DailyQuestConfig : ConfigBase<int, DailyQuestConfig>
|
{
|
|
public int ID;
|
public string Title;
|
public int RelatedType;
|
public int RelatedID;
|
public int UnLockFuncID;
|
public int OnceActivityTime;
|
public int OnceActivity;
|
public int TotalActiveValue;
|
public int[] RewardID;
|
public string Icon;
|
public string Description;
|
public string QuestTypeDescribe;
|
public int order;
|
public string AwardImg;
|
|
public override int LoadKey(string _key)
|
{
|
int key = GetKey(_key);
|
return key;
|
}
|
|
public override void LoadConfig(string input)
|
{
|
try {
|
string[] tables = input.Split('\t');
|
int.TryParse(tables[0],out ID);
|
|
Title = tables[1];
|
|
int.TryParse(tables[2],out RelatedType);
|
|
int.TryParse(tables[3],out RelatedID);
|
|
int.TryParse(tables[4],out UnLockFuncID);
|
|
int.TryParse(tables[5],out OnceActivityTime);
|
|
int.TryParse(tables[6],out OnceActivity);
|
|
int.TryParse(tables[7],out TotalActiveValue);
|
|
if (tables[8].Contains("["))
|
{
|
RewardID = JsonMapper.ToObject<int[]>(tables[8]);
|
}
|
else
|
{
|
string[] RewardIDStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
RewardID = new int[RewardIDStringArray.Length];
|
for (int i=0;i<RewardIDStringArray.Length;i++)
|
{
|
int.TryParse(RewardIDStringArray[i],out RewardID[i]);
|
}
|
}
|
|
Icon = tables[9];
|
|
Description = tables[10];
|
|
QuestTypeDescribe = tables[11];
|
|
int.TryParse(tables[12],out order);
|
|
AwardImg = tables[13];
|
}
|
catch (Exception exception)
|
{
|
Debug.LogError(exception);
|
}
|
}
|
}
|