Эх сурвалжийг харах

修复导表卡牌没有数据的问题

zhaoyang 2 жил өмнө
parent
commit
9e446f5419

+ 4 - 2
GameClient/Assets/Editor/Excel/ExcelReader.cs

@@ -122,6 +122,7 @@ namespace GFGEditor
                         ExcelWorksheet worksheet = Worksheets[j];
                         string[] names = worksheet.Name.Split('_');
                         if (names.Length < 2) continue;
+
                         ExcelWorksheet newWorksheet = null;
                         for (int k = 1; k <= newWorksheets.Count; k++)
                         {
@@ -177,10 +178,11 @@ namespace GFGEditor
                 for (int j = 1; j <= newColumnNum; j++)
                 {
                     string newName = newWorksheet.Cells[3, j].Text.Trim();
-                    string newType = newWorksheet.Cells[2, i].Text.Trim();
+                    string newType = newWorksheet.Cells[2, j].Text.Trim();
                     if (name == newName && type == newType)
                     {
                         needWriteColumn = false;
+                        break;
                     }
                 }
                 if (needWriteColumn)
@@ -213,7 +215,7 @@ namespace GFGEditor
                 {
                     string title = worksheet.Cells[3, j].Text.Trim();
                     if (string.IsNullOrEmpty(title)) continue;
-                    for (int k = column + 1; k <= newColumnNum; k++)
+                    for (int k = 1; k <= newColumnNum; k++)
                     {
                         string newTitle = newWorksheet.Cells[3, k].Text.Trim();
                         if (newTitle == title)