From 2be6e286246d87f419d695e066fa9411dca865d5 Mon Sep 17 00:00:00 2001 From: yangjing Date: Wed, 31 Aug 2022 19:45:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9233=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/MMOTable/MMOTableBase.cs | 8 +++- Assets/Plugins/ExcelDll/EPPlus.dll.meta | 41 ++++++++++++++++++- Assets/Plugins/ExcelDll/Excel.dll.meta | 41 ++++++++++++++++++- .../ExcelDll/ICSharpCode.SharpZipLib.dll.meta | 41 ++++++++++++++++++- Assets/Scripts/Core/Table/TableBase.cs | 9 +++- Assets/Scripts/Storage/PlayerData.cs | 3 ++ 6 files changed, 135 insertions(+), 8 deletions(-) diff --git a/Assets/MMOModule/Scripts/MMOTable/MMOTableBase.cs b/Assets/MMOModule/Scripts/MMOTable/MMOTableBase.cs index e5f16e5b..9b115f2f 100644 --- a/Assets/MMOModule/Scripts/MMOTable/MMOTableBase.cs +++ b/Assets/MMOModule/Scripts/MMOTable/MMOTableBase.cs @@ -1,8 +1,10 @@ using System.Data; using System.IO; using System.Collections.Generic; -using Excel; using UnityEngine; +#if UNITY_EDITOR +using Excel; +#endif namespace MMO { @@ -56,6 +58,7 @@ namespace MMO /// private DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum) { +#if UNITY_EDITOR FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); @@ -64,6 +67,9 @@ namespace MMO pColNum = result.Tables[0].Columns.Count; pRowNum = result.Tables[0].Rows.Count; return result.Tables[0].Rows; +#else + return null; +#endif } } } \ No newline at end of file diff --git a/Assets/Plugins/ExcelDll/EPPlus.dll.meta b/Assets/Plugins/ExcelDll/EPPlus.dll.meta index 7968599c..47a958db 100644 --- a/Assets/Plugins/ExcelDll/EPPlus.dll.meta +++ b/Assets/Plugins/ExcelDll/EPPlus.dll.meta @@ -11,17 +11,54 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor second: - enabled: 0 + enabled: 1 settings: DefaultValueInitialized: true + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Assets/Plugins/ExcelDll/Excel.dll.meta b/Assets/Plugins/ExcelDll/Excel.dll.meta index 14b1161b..e638f6e4 100644 --- a/Assets/Plugins/ExcelDll/Excel.dll.meta +++ b/Assets/Plugins/ExcelDll/Excel.dll.meta @@ -11,17 +11,54 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor second: - enabled: 0 + enabled: 1 settings: DefaultValueInitialized: true + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Assets/Plugins/ExcelDll/ICSharpCode.SharpZipLib.dll.meta b/Assets/Plugins/ExcelDll/ICSharpCode.SharpZipLib.dll.meta index eb7ddbc3..8a0cb109 100644 --- a/Assets/Plugins/ExcelDll/ICSharpCode.SharpZipLib.dll.meta +++ b/Assets/Plugins/ExcelDll/ICSharpCode.SharpZipLib.dll.meta @@ -11,17 +11,54 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 - first: Any: second: - enabled: 1 + enabled: 0 settings: {} - first: Editor: Editor second: - enabled: 0 + enabled: 1 settings: DefaultValueInitialized: true + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Assets/Scripts/Core/Table/TableBase.cs b/Assets/Scripts/Core/Table/TableBase.cs index e67ccada..094b5be8 100644 --- a/Assets/Scripts/Core/Table/TableBase.cs +++ b/Assets/Scripts/Core/Table/TableBase.cs @@ -2,8 +2,10 @@ using System.Data; using System.IO; using System.Collections.Generic; -using Excel; using UnityEngine; +#if UNITY_EDITOR +using Excel; +#endif public abstract class TableBase : ScriptableObject where T : ScriptableObject where U : DataBase { @@ -72,6 +74,7 @@ public abstract class TableBase : ScriptableObject where T : ScriptableObj /// private DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum) { +#if UNITY_EDITOR FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); @@ -80,5 +83,9 @@ public abstract class TableBase : ScriptableObject where T : ScriptableObj pColNum = result.Tables[0].Columns.Count; pRowNum = result.Tables[0].Rows.Count; return result.Tables[0].Rows; +#else + return null; +#endif + } } \ No newline at end of file diff --git a/Assets/Scripts/Storage/PlayerData.cs b/Assets/Scripts/Storage/PlayerData.cs index 954d1ec8..943e2583 100644 --- a/Assets/Scripts/Storage/PlayerData.cs +++ b/Assets/Scripts/Storage/PlayerData.cs @@ -354,6 +354,9 @@ public class PlayerData : StorageBase #region guide public bool CheckGuide(int pIndex) { + if (mLoginCount > 1 || mCurrentLevel > 1) + return true; + return mFinishedGuideIndex.Contains(pIndex); }