少年修仙传客户端代码仓库
client_linchunjie
2018-11-05 00f08a07816b46748a1737d238950ca1a5dfb1f2
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
6个文件已修改
107 ■■■■ 已修改文件
Core/GameEngine/Model/TelPartialConfig/ActorShowConfig.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/MapTransferUtility.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/AssetVersion/AssetVersionUtility.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/SystemSetting/SystemSetting.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/ActorShowConfig.cs
@@ -35,5 +35,21 @@
            }
            return false;
        }
        public static bool GetActoreShowConfigByMapIdAndLineId(int mapId, int lineId, out ActorShowConfig config)
        {
            foreach (var item in actorShowDic.Values)
            {
                if (item.MapID == mapId && (item.line == lineId || item.line == 1000))
                {
                    config = item;
                    return true;
                }
            }
            config = null;
            return false;
        }
    }
}
Fight/MapTransferUtility.cs
@@ -804,7 +804,7 @@
        if (!AssetSource.sceneFromEditor)
        {
            var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(mapId, 0);
            var assetValid = AssetVersionUtility.IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()));
            var assetValid = AssetVersionUtility.IsSceneAssetValid(mapId, 0);
            if (!assetValid)
            {
                InGameDownLoad.Instance.TryDownLoad(InGameDownLoad.Dominant.Whole);
Fight/Stage/StageManager.cs
@@ -17,40 +17,32 @@
    public event Action<float> loadingProgressEvent;
    bool m_IsServerPreparing = false;
    public bool isServerPreparing
    {
    public bool isServerPreparing {
        get { return m_IsServerPreparing; }
        set { m_IsServerPreparing = value; }
    }
    public Stage.E_StageType StageType
    {
        get
        {
    public Stage.E_StageType StageType {
        get {
            return m_StageType;
        }
    }
    public Stage CurrentStage
    {
        get
        {
    public Stage CurrentStage {
        get {
            return m_CurrentStage;
        }
    }
    int m_CurrentMapId;
    public int currentMapId
    {
    public int currentMapId {
        get { return m_CurrentMapId; }
        private set { m_CurrentMapId = value; }
    }
    int m_CurrentMapResID;
    public int currentMapResId
    {
        get
        {
    public int currentMapResId {
        get {
            return m_CurrentMapResID;
        }
        private set { m_CurrentMapResID = value; }
@@ -61,11 +53,9 @@
    float m_LoadingProgress = 0f;
    float loadingProgress
    {
    float loadingProgress {
        get { return m_LoadingProgress; }
        set
        {
        set {
            m_LoadingProgress = value;
            if (loadingProgressEvent != null)
            {
@@ -97,7 +87,7 @@
        }
        else
        {
            var assetValid = AssetVersionUtility.IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()));
            var assetValid = AssetVersionUtility.IsSceneAssetValid(PlayerDatas.Instance.baseData.MapID, DTCA127_tagMCStartChangeMap.LineID);
            if (assetValid)
            {
                SnxxzGame.Instance.StartCoroutine(LoadCoroutine<T>(stageId, mapResConfig.ID, mapResConfig.MapResources, true));
System/AssetVersion/AssetVersionUtility.cs
@@ -5,6 +5,7 @@
using System.IO;
using Snxxz.UI;
using System.Threading;
using TableConfig;
public class AssetVersionUtility
{
@@ -174,6 +175,45 @@
        }
    }
    public static bool IsSceneAssetValid(int mapId, int lineId)
    {
        var dataMapId = 0;
        var mapConfig = Config.Instance.Get<MapConfig>(mapId);
        if (mapConfig.MapFBType != 0)
        {
            var model = ModelCenter.Instance.GetModel<DungeonModel>();
            dataMapId = model.GetDataMapIdByMapId(mapId);
        }
        else
        {
            dataMapId = mapId;
        }
        var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(dataMapId, lineId);
        if (!IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower())))
        {
            return false;
        }
        ActorShowConfig actorShowConfig = null;
        if (ActorShowConfig.GetActoreShowConfigByMapIdAndLineId(dataMapId, lineId, out actorShowConfig))
        {
            var npcs = actorShowConfig.showNpcs;
            foreach (var item in npcs)
            {
                var npcConfig = Config.Instance.Get<NPCConfig>(item);
                var assetbundleName = StringUtility.Contact("prefab_race_", npcConfig.MODE.ToLower());
                if (!IsAssetValid(assetbundleName))
                {
                    return false;
                }
            }
        }
        return true;
    }
    public static string GetAssetFilePath(string _assetKey)
    {
        var path = string.Empty;
System/Dungeon/DungeonModel.cs
@@ -1176,8 +1176,12 @@
        {
            if (!AssetSource.sceneFromEditor)
            {
                var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(_dataMapId, _lineId);
                var assetValid = AssetVersionUtility.IsAssetValid(StringUtility.Contact("maps/", mapResConfig.MapResources.ToLower()));
                var dungeonConfig = Config.Instance.Get<DungeonConfig>(GetDungeonId(_dataMapId, _lineId));
                var assetValid = true;
                if (dungeonConfig != null)
                {
                    assetValid = AssetVersionUtility.IsSceneAssetValid(dungeonConfig.MapID, _lineId);
                }
                if (!assetValid)
                {
System/SystemSetting/SystemSetting.cs
@@ -93,8 +93,7 @@
    public void SetPlayerSyncCount(int _syncCount)
    {
        SettingMgr.Instance.SetAccountSetStr("PlayerSyncCount", _syncCount.ToString());
        LocalSave.SetInt("PlayerSyncCount", _syncCount);
        if (m_PlayerSyncCount != _syncCount)
        {
            m_PlayerSyncCount = _syncCount;
@@ -109,7 +108,7 @@
    {
        if (m_PlayerSyncCount == -1)
        {
            var result = SettingMgr.Instance.GetAccountSetIntInfo("PlayerSyncCount");
            var result = LocalSave.GetInt("PlayerSyncCount", -1);
            if (result == -1)
            {
                var quality = GetCurrentQualityLevel();
@@ -119,10 +118,10 @@
                        m_PlayerSyncCount = 15;
                        break;
                    case GameQuality.Low:
                        m_PlayerSyncCount = 10;
                        m_PlayerSyncCount = 5;
                        break;
                    case GameQuality.Medium:
                        m_PlayerSyncCount = 5;
                        m_PlayerSyncCount = 10;
                        break;
                }
            }