|
@@ -28,6 +28,7 @@ namespace GFGEditor
|
|
private static List<int> _allIndexs = new List<int>();
|
|
private static List<int> _allIndexs = new List<int>();
|
|
private static Dictionary<string, string> _idDic = new Dictionary<string, string>();
|
|
private static Dictionary<string, string> _idDic = new Dictionary<string, string>();
|
|
private static Dictionary<string, string> _itemTypeDicByName = new Dictionary<string, string>();
|
|
private static Dictionary<string, string> _itemTypeDicByName = new Dictionary<string, string>();
|
|
|
|
+ private static Dictionary<string, string> _headAniDicByName = new Dictionary<string, string>();
|
|
|
|
|
|
public static void GenerateCode(ExcelWorksheet worksheet, string configName, string configArrayName)
|
|
public static void GenerateCode(ExcelWorksheet worksheet, string configName, string configArrayName)
|
|
{
|
|
{
|
|
@@ -371,6 +372,8 @@ namespace GFGEditor
|
|
|
|
|
|
private static void WriteRowDataToSqlite(ExcelRange worksheet, string configArrayName, int row)
|
|
private static void WriteRowDataToSqlite(ExcelRange worksheet, string configArrayName, int row)
|
|
{
|
|
{
|
|
|
|
+ string headAniKey = "";
|
|
|
|
+ string headAniValue = "";
|
|
List<string> values = new List<string>();
|
|
List<string> values = new List<string>();
|
|
var keyValue = worksheet[row, 1].Text.Trim();
|
|
var keyValue = worksheet[row, 1].Text.Trim();
|
|
foreach (var i in _indexs)
|
|
foreach (var i in _indexs)
|
|
@@ -389,11 +392,32 @@ namespace GFGEditor
|
|
HandleItemCfgField(keyValue, name, ref value);
|
|
HandleItemCfgField(keyValue, name, ref value);
|
|
values.Add(value);
|
|
values.Add(value);
|
|
}
|
|
}
|
|
|
|
+ else if (configArrayName == nameof(StoryDialogCfgArray) && name == "headAni" && !string.IsNullOrEmpty(value))
|
|
|
|
+ {
|
|
|
|
+ HandleStoryDialogCfgField(keyValue, name, ref value);
|
|
|
|
+ values.Add(value);
|
|
|
|
+ }
|
|
else
|
|
else
|
|
{
|
|
{
|
|
string _value = GetValue(configArrayName, worksheet, name, row, i);
|
|
string _value = GetValue(configArrayName, worksheet, name, row, i);
|
|
values.Add(_value);
|
|
values.Add(_value);
|
|
}
|
|
}
|
|
|
|
+ if (configArrayName == nameof(HeadAniCfgArray))
|
|
|
|
+ {
|
|
|
|
+ if (name == "name")
|
|
|
|
+ {
|
|
|
|
+ headAniKey = value;
|
|
|
|
+ }
|
|
|
|
+ else if (name == "headAni")
|
|
|
|
+ {
|
|
|
|
+ headAniValue = value;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (configArrayName == nameof(HeadAniCfgArray) && !string.IsNullOrEmpty(headAniKey) && !string.IsNullOrEmpty(headAniValue))
|
|
|
|
+ {
|
|
|
|
+ _headAniDicByName.Add(headAniKey, headAniValue);
|
|
}
|
|
}
|
|
SQLiteHelper.Instance.InsertValues(configArrayName, values.ToArray());
|
|
SQLiteHelper.Instance.InsertValues(configArrayName, values.ToArray());
|
|
}
|
|
}
|
|
@@ -437,7 +461,19 @@ namespace GFGEditor
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ private static void HandleStoryDialogCfgField(string idStr, string fieldName, ref string value)
|
|
|
|
+ {
|
|
|
|
|
|
|
|
+ if (!_headAniDicByName.ContainsKey(value))
|
|
|
|
+ {
|
|
|
|
+ ET.Log.Error(string.Format("剧情对话.xlsx 头像动画 {0} 无资源", value));
|
|
|
|
+ value = "";
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ value = _headAniDicByName[value];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
private static void CreateParamsString(List<string> keyNames, List<string> keyTypes, out string paramStr, out string colNames, out string colValues)
|
|
private static void CreateParamsString(List<string> keyNames, List<string> keyTypes, out string paramStr, out string colNames, out string colValues)
|
|
{
|
|
{
|
|
paramStr = "";
|
|
paramStr = "";
|