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