针对233修改

This commit is contained in:
yangjing 2022-08-31 19:45:55 +08:00
parent cee68cedba
commit 2be6e28624
6 changed files with 135 additions and 8 deletions

View File

@ -1,8 +1,10 @@
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using Excel;
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR
using Excel;
#endif
namespace MMO namespace MMO
{ {
@ -56,6 +58,7 @@ namespace MMO
/// <returns></returns> /// <returns></returns>
private DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum) 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); FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
@ -64,6 +67,9 @@ namespace MMO
pColNum = result.Tables[0].Columns.Count; pColNum = result.Tables[0].Columns.Count;
pRowNum = result.Tables[0].Rows.Count; pRowNum = result.Tables[0].Rows.Count;
return result.Tables[0].Rows; return result.Tables[0].Rows;
#else
return null;
#endif
} }
} }
} }

View File

@ -11,17 +11,54 @@ PluginImporter:
isExplicitlyReferenced: 0 isExplicitlyReferenced: 0
validateReferences: 1 validateReferences: 1
platformData: 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: - first:
Any: Any:
second: second:
enabled: 1 enabled: 0
settings: {} settings: {}
- first: - first:
Editor: Editor Editor: Editor
second: second:
enabled: 0 enabled: 1
settings: settings:
DefaultValueInitialized: true 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: - first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:

View File

@ -11,17 +11,54 @@ PluginImporter:
isExplicitlyReferenced: 0 isExplicitlyReferenced: 0
validateReferences: 1 validateReferences: 1
platformData: 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: - first:
Any: Any:
second: second:
enabled: 1 enabled: 0
settings: {} settings: {}
- first: - first:
Editor: Editor Editor: Editor
second: second:
enabled: 0 enabled: 1
settings: settings:
DefaultValueInitialized: true 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: - first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:

View File

@ -11,17 +11,54 @@ PluginImporter:
isExplicitlyReferenced: 0 isExplicitlyReferenced: 0
validateReferences: 1 validateReferences: 1
platformData: 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: - first:
Any: Any:
second: second:
enabled: 1 enabled: 0
settings: {} settings: {}
- first: - first:
Editor: Editor Editor: Editor
second: second:
enabled: 0 enabled: 1
settings: settings:
DefaultValueInitialized: true 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: - first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:

View File

@ -2,8 +2,10 @@
using System.Data; using System.Data;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using Excel;
using UnityEngine; using UnityEngine;
#if UNITY_EDITOR
using Excel;
#endif
public abstract class TableBase<T, U> : ScriptableObject where T : ScriptableObject where U : DataBase<U> public abstract class TableBase<T, U> : ScriptableObject where T : ScriptableObject where U : DataBase<U>
{ {
@ -72,6 +74,7 @@ public abstract class TableBase<T, U> : ScriptableObject where T : ScriptableObj
/// <returns></returns> /// <returns></returns>
private DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum) 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); FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
@ -80,5 +83,9 @@ public abstract class TableBase<T, U> : ScriptableObject where T : ScriptableObj
pColNum = result.Tables[0].Columns.Count; pColNum = result.Tables[0].Columns.Count;
pRowNum = result.Tables[0].Rows.Count; pRowNum = result.Tables[0].Rows.Count;
return result.Tables[0].Rows; return result.Tables[0].Rows;
#else
return null;
#endif
} }
} }

View File

@ -354,6 +354,9 @@ public class PlayerData : StorageBase<PlayerData>
#region guide #region guide
public bool CheckGuide(int pIndex) public bool CheckGuide(int pIndex)
{ {
if (mLoginCount > 1 || mCurrentLevel > 1)
return true;
return mFinishedGuideIndex.Contains(pIndex); return mFinishedGuideIndex.Contains(pIndex);
} }