JJBB/Assets/Project/Script/GameTables/Table_MissionBase.cs
2024-08-23 15:49:34 +08:00

100 lines
2.5 KiB
C#

//This code create by CodeEngine ,don't modify
using System;
using System.Collections.Generic;
using System.Collections;
using Module.Log;
namespace GCGame.Table
{
public class Tab_MissionBase{
public const string TAB_FILE_DATA = "MissionBase";
private const int _varCount = 17;
public int GetId()
{
return Id;
}
public static bool Validate(string line)
{
var segments = 0;
foreach (char c in line)
if (c == '\t')
segments++;
// Note: skip the 2nd column as it's the description;
var result = segments == _varCount;
if (!result)
LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments));
return result;
}
public Tab_MissionBase()
{
}
public Tab_MissionBase(string line)
{
var segments = line.Split('\t');
Id = int.Parse(segments[0]);
LimitID = int.Parse(segments[2]);
BonusID = int.Parse(segments[3]);
MissionType = int.Parse(segments[4]);
LogicID = int.Parse(segments[5]);
CanAbadon = int.Parse(segments[6]);
NextMission = int.Parse(segments[7]);
AcceptDataID = int.Parse(segments[8]);
CompleteDataID = int.Parse(segments[9]);
ActiveID = int.Parse(segments[10]);
ActiveTimes1 = int.Parse(segments[11]);
Tips1 = int.Parse(segments[12]);
ImpactId[0] = int.Parse(segments[13]);
ImpactId[1] = int.Parse(segments[14]);
ImpactId[2] = int.Parse(segments[15]);
PreloadScene = segments[16].Trim();
PreloadMovie = int.Parse(segments[17]);
}
public int Id { get; private set; }
public int LimitID { get; private set; }
public int BonusID { get; private set; }
public int MissionType { get; private set; }
public int LogicID { get; private set; }
public int CanAbadon { get; private set; }
public int NextMission { get; private set; }
public int AcceptDataID { get; private set; }
public int CompleteDataID { get; private set; }
public int ActiveID { get; private set; }
public int ActiveTimes1 { get; private set; }
public int Tips1 { get; private set; }
public readonly int[] ImpactId = new int[3];
public int getImpactIdCount() { return ImpactId.Length; }
public int GetImpactIdbyIndex(int idx)
{
if(idx >= 0 && idx < ImpactId.Length)
return ImpactId[idx];
return default(int);
}
public string PreloadScene { get; private set; }
public int PreloadMovie { get; private set; }
}
}