93 lines
2.5 KiB
C#
93 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_ChildrenPara{
|
||
|
|
||
|
public const string TAB_FILE_DATA = "ChildrenPara";
|
||
|
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_ChildrenPara()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
public Tab_ChildrenPara(string line)
|
||
|
{
|
||
|
var segments = line.Split('\t');
|
||
|
Id = int.Parse(segments[0]);
|
||
|
MaxSatiety = int.Parse(segments[2]);
|
||
|
MaxClean = int.Parse(segments[3]);
|
||
|
MaxHealth = int.Parse(segments[4]);
|
||
|
MaxMood = int.Parse(segments[5]);
|
||
|
FollowLevel = int.Parse(segments[6]);
|
||
|
InteractAnimationId[0] = int.Parse(segments[7]);
|
||
|
InteractAnimationId[1] = int.Parse(segments[8]);
|
||
|
InteractAnimationId[2] = int.Parse(segments[9]);
|
||
|
InteractAnimationId[3] = int.Parse(segments[10]);
|
||
|
IncGrowthItemId[0] = int.Parse(segments[11]);
|
||
|
IncGrowthItemId[1] = int.Parse(segments[12]);
|
||
|
IncGrowthItemId[2] = int.Parse(segments[13]);
|
||
|
IncGrowthItemId[3] = int.Parse(segments[14]);
|
||
|
IncGrowthItemId[4] = int.Parse(segments[15]);
|
||
|
IncGrowthItemId[5] = int.Parse(segments[16]);
|
||
|
IncGrowthItemId[6] = int.Parse(segments[17]);
|
||
|
|
||
|
}
|
||
|
|
||
|
public int Id { get; private set; }
|
||
|
|
||
|
public int MaxSatiety { get; private set; }
|
||
|
|
||
|
public int MaxClean { get; private set; }
|
||
|
|
||
|
public int MaxHealth { get; private set; }
|
||
|
|
||
|
public int MaxMood { get; private set; }
|
||
|
|
||
|
public int FollowLevel { get; private set; }
|
||
|
|
||
|
public readonly int[] InteractAnimationId = new int[4];
|
||
|
public int getInteractAnimationIdCount() { return InteractAnimationId.Length; }
|
||
|
public int GetInteractAnimationIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < InteractAnimationId.Length)
|
||
|
return InteractAnimationId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
public readonly int[] IncGrowthItemId = new int[7];
|
||
|
public int getIncGrowthItemIdCount() { return IncGrowthItemId.Length; }
|
||
|
public int GetIncGrowthItemIdbyIndex(int idx)
|
||
|
{
|
||
|
if(idx >= 0 && idx < IncGrowthItemId.Length)
|
||
|
return IncGrowthItemId[idx];
|
||
|
return default(int);
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|