From e005994d32105faa2cccdedfa2de4eaa8223fe0a Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 26 三月 2019 11:38:55 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Core/GameEngine/Model/Config/VIPKillNPCConfig.cs | 71 +++++++++++++++++++++++------------
1 files changed, 47 insertions(+), 24 deletions(-)
diff --git a/Core/GameEngine/Model/Config/VIPKillNPCConfig.cs b/Core/GameEngine/Model/Config/VIPKillNPCConfig.cs
index 1d75101..0ecb9f8 100644
--- a/Core/GameEngine/Model/Config/VIPKillNPCConfig.cs
+++ b/Core/GameEngine/Model/Config/VIPKillNPCConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: Fish
-// [ Date ]: Wednesday, February 13, 2019
+// [ Date ]: Thursday, February 14, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -9,6 +9,7 @@
using System;
using UnityEngine;
+[XLua.LuaCallCSharp]
public partial class VIPKillNPCConfig
{
@@ -132,19 +133,30 @@
}
for (int i = 3; i < lines.Length; i++)
{
- var line = lines[i];
- var index = line.IndexOf("\t");
- var id = line.Substring(0, index);
+ try
+ {
+ var line = lines[i];
+ var index = line.IndexOf("\t");
+ if (index == -1)
+ {
+ continue;
+ }
+ var id = line.Substring(0, index);
- if (preParse)
+ if (preParse)
+ {
+ var config = new VIPKillNPCConfig(line);
+ configs[id] = config;
+ (config as IConfigPostProcess).OnConfigParseCompleted();
+ }
+ else
+ {
+ rawDatas[id] = line;
+ }
+ }
+ catch (System.Exception ex)
{
- var config = new VIPKillNPCConfig(line);
- configs[id] = config;
- (config as IConfigPostProcess).OnConfigParseCompleted();
- }
- else
- {
- rawDatas[id] = line;
+ Debug.LogError(ex);
}
}
inited = true;
@@ -160,20 +172,31 @@
}
for (int i = 3; i < lines.Length; i++)
{
- var line = lines[i];
- var index = line.IndexOf("\t");
- var id = line.Substring(0, index);
+ try
+ {
+ var line = lines[i];
+ var index = line.IndexOf("\t");
+ if (index == -1)
+ {
+ continue;
+ }
+ var id = line.Substring(0, index);
- if (preParse)
- {
- var config = new VIPKillNPCConfig(line);
- configs[id] = config;
- (config as IConfigPostProcess).OnConfigParseCompleted();
+ if (preParse)
+ {
+ var config = new VIPKillNPCConfig(line);
+ configs[id] = config;
+ (config as IConfigPostProcess).OnConfigParseCompleted();
+ }
+ else
+ {
+ rawDatas[id] = line;
+ }
}
- else
- {
- rawDatas[id] = line;
- }
+ catch (System.Exception ex)
+ {
+ Debug.LogError(ex);
+ }
}
inited = true;
--
Gitblit v1.8.0