Exemplo n.º 1
0
 private static void DumpFilesToNpcData(string path)
 {
     string[] lines = File.ReadAllLines(path);
     for (int i = 0; i < lines.Length; i++)
     {
         string[] tmpString = lines[i].Split('\t');
         NpcData_ tmp       = new NpcData_();
         tmp.Id      = Convert.ToUInt32(tmpString[0]);
         tmp.XSector = byte.Parse(Convert.ToInt16(tmpString[1]).ToString("X").Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
         tmp.YSector = byte.Parse(Convert.ToInt16(tmpString[1]).ToString("X").Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
         tmp.X       = Convert.ToSingle(tmpString[2]);
         tmp.Z       = Convert.ToSingle(tmpString[3]);
         tmp.Y       = Convert.ToSingle(tmpString[4]);
         NpcDatas.Add(tmp);
     }
 }
Exemplo n.º 2
0
 private static void DumpFilesToNpcData(string path)
 {
     string[] lines = File.ReadAllLines(path);
     for (int i = 0; i < lines.Length; i++)
     {
         string[] tmpString = lines[i].Split('\t');
         NpcData_ tmp = new NpcData_();
         tmp.Id = Convert.ToUInt32(tmpString[0]);
         tmp.XSector = byte.Parse(Convert.ToInt16(tmpString[1]).ToString("X").Substring(2, 2), System.Globalization.NumberStyles.HexNumber);
         tmp.YSector = byte.Parse(Convert.ToInt16(tmpString[1]).ToString("X").Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
         tmp.X = Convert.ToSingle(tmpString[2]);
         tmp.Z = Convert.ToSingle(tmpString[3]);
         tmp.Y = Convert.ToSingle(tmpString[4]);
         NpcDatas.Add(tmp);
     }
 }