//-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, August 02, 2018 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class NPCConfig : ConfigBase { public int NPCID { get ; private set ; } public int NPCType { get ; private set ; } public string MODE { get ; private set; } public string charName { get ; private set; } public int NPCLV { get ; private set ; } public float ModleHeight { get ; private set; } public float ModelRadius { get ; private set; } public float ModeProportion { get ; private set; } public Vector3 UIModeLOffset { get ; private set; } public float UIModeLProportion { get ; private set; } public Vector3 UIModelRotation { get ; private set; } public int CanDeadFly { get ; private set ; } public int Country { get ; private set ; } public int MinAtk { get ; private set ; } public int MaxAtk { get ; private set ; } public int Def { get ; private set ; } public int Realm { get ; private set ; } public int PoisionAtk { get ; private set ; } public int FireAtk { get ; private set ; } public int IceAtk { get ; private set ; } public int PoisionDef { get ; private set ; } public int IceDef { get ; private set ; } public int AtkInterval { get ; private set ; } public int Hit { get ; private set ; } public int MissRate { get ; private set ; } public int SuperHiteRate { get ; private set ; } public int OrgSpeed { get ; private set ; } public int MoveType { get ; private set ; } public int AtkDist { get ; private set ; } public int Skill1 { get ; private set ; } public int Skill2 { get ; private set ; } public int Skill3 { get ; private set ; } public int Skill4 { get ; private set ; } public int Skill5 { get ; private set ; } public int Skill6 { get ; private set ; } public int Skill7 { get ; private set ; } public int Skill8 { get ; private set ; } public int AtkType { get ; private set ; } public int Sight { get ; private set ; } public int MoveArea { get ; private set ; } public int DHP { get ; private set ; } public int MaxHPEx { get ; private set ; } public int IsBoss { get ; private set ; } public int SP { get ; private set ; } public int AIType { get ; private set ; } public int CanAttack { get ; private set ; } public float weight { get ; private set; } public string HeadPortrait { get ; private set; } public int Show { get ; private set ; } public int AtkFeedback { get ; private set ; } public int hurtFeedback { get ; private set ; } public int AutomaticFace { get ; private set ; } public int Dig { get ; private set ; } public int[] Sounds; public int LifeBarCount { get ; private set ; } public int NPCEffect { get ; private set ; } public int NPCSpeakID { get ; private set ; } public override string getKey() { return NPCID.ToString(); } public override void Parse() { try { NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; NPCType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; MODE = rawContents[2].Trim(); charName = rawContents[3].Trim(); NPCLV=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; ModleHeight=IsNumeric(rawContents[5]) ? float.Parse(rawContents[5]):0; ModelRadius=IsNumeric(rawContents[6]) ? float.Parse(rawContents[6]):0; ModeProportion=IsNumeric(rawContents[7]) ? float.Parse(rawContents[7]):0; UIModeLOffset=rawContents[8].Vector3Parse(); UIModeLProportion=IsNumeric(rawContents[9]) ? float.Parse(rawContents[9]):0; UIModelRotation=rawContents[10].Vector3Parse(); CanDeadFly=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; Country=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; MinAtk=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; MaxAtk=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; Def=IsNumeric(rawContents[15]) ? int.Parse(rawContents[15]):0; Realm=IsNumeric(rawContents[16]) ? int.Parse(rawContents[16]):0; PoisionAtk=IsNumeric(rawContents[17]) ? int.Parse(rawContents[17]):0; FireAtk=IsNumeric(rawContents[18]) ? int.Parse(rawContents[18]):0; IceAtk=IsNumeric(rawContents[19]) ? int.Parse(rawContents[19]):0; PoisionDef=IsNumeric(rawContents[20]) ? int.Parse(rawContents[20]):0; IceDef=IsNumeric(rawContents[21]) ? int.Parse(rawContents[21]):0; AtkInterval=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0; Hit=IsNumeric(rawContents[23]) ? int.Parse(rawContents[23]):0; MissRate=IsNumeric(rawContents[24]) ? int.Parse(rawContents[24]):0; SuperHiteRate=IsNumeric(rawContents[25]) ? int.Parse(rawContents[25]):0; OrgSpeed=IsNumeric(rawContents[26]) ? int.Parse(rawContents[26]):0; MoveType=IsNumeric(rawContents[27]) ? int.Parse(rawContents[27]):0; AtkDist=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0; Skill1=IsNumeric(rawContents[29]) ? int.Parse(rawContents[29]):0; Skill2=IsNumeric(rawContents[30]) ? int.Parse(rawContents[30]):0; Skill3=IsNumeric(rawContents[31]) ? int.Parse(rawContents[31]):0; Skill4=IsNumeric(rawContents[32]) ? int.Parse(rawContents[32]):0; Skill5=IsNumeric(rawContents[33]) ? int.Parse(rawContents[33]):0; Skill6=IsNumeric(rawContents[34]) ? int.Parse(rawContents[34]):0; Skill7=IsNumeric(rawContents[35]) ? int.Parse(rawContents[35]):0; Skill8=IsNumeric(rawContents[36]) ? int.Parse(rawContents[36]):0; AtkType=IsNumeric(rawContents[37]) ? int.Parse(rawContents[37]):0; Sight=IsNumeric(rawContents[38]) ? int.Parse(rawContents[38]):0; MoveArea=IsNumeric(rawContents[39]) ? int.Parse(rawContents[39]):0; DHP=IsNumeric(rawContents[40]) ? int.Parse(rawContents[40]):0; MaxHPEx=IsNumeric(rawContents[41]) ? int.Parse(rawContents[41]):0; IsBoss=IsNumeric(rawContents[42]) ? int.Parse(rawContents[42]):0; SP=IsNumeric(rawContents[43]) ? int.Parse(rawContents[43]):0; AIType=IsNumeric(rawContents[44]) ? int.Parse(rawContents[44]):0; CanAttack=IsNumeric(rawContents[45]) ? int.Parse(rawContents[45]):0; weight=IsNumeric(rawContents[46]) ? float.Parse(rawContents[46]):0; HeadPortrait = rawContents[47].Trim(); Show=IsNumeric(rawContents[48]) ? int.Parse(rawContents[48]):0; AtkFeedback=IsNumeric(rawContents[49]) ? int.Parse(rawContents[49]):0; hurtFeedback=IsNumeric(rawContents[50]) ? int.Parse(rawContents[50]):0; AutomaticFace=IsNumeric(rawContents[51]) ? int.Parse(rawContents[51]):0; Dig=IsNumeric(rawContents[52]) ? int.Parse(rawContents[52]):0; string[] SoundsStringArray = rawContents[53].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); Sounds = new int[SoundsStringArray.Length]; for (int i=0;i