少年修仙传客户端代码仓库
client_Hale
2019-05-24 241c9ca8ad6954ccedd19e0051e78e3f94e5de0a
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
27个文件已修改
1014 ■■■■ 已修改文件
Core/GameEngine/Model/Config/ActorShowConfig.cs 397 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ActorShowConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientDungeonStageUtility.cs 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientHazyPreciousDungeonStage.cs 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientPersonalBossDungeonStage.cs 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DungeonStage.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIHazyDemonKingModelWrap.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIHazyGrassModelWrap.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIPersonalBossModelWrap.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BossShow/BossShowModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BossShow/BossShowWin.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFightWin.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonTargetBehaviour.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/PersonalBossModel.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/ClientHazyDemonKingStage.cs 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/ClientHazyGrassStage.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingDungeonWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingModel.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingRewardWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingVictoryWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassDungeonWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassModel.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyMapNpcScriptableObject.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/HumanTreasureWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/ActorShowConfig.cs
@@ -1,18 +1,18 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Wednesday, May 15, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class ActorShowConfig
{
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Friday, May 24, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class ActorShowConfig
{
    public readonly int ID;
    public readonly int NpcID;
    public readonly int MapID;
@@ -38,17 +38,18 @@
    public readonly int soundId;
    public readonly int soundTime;
    public readonly int step;
    public ActorShowConfig()
    {
    }
    public ActorShowConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
    public readonly int showName;
    public ActorShowConfig()
    {
    }
    public ActorShowConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out ID); 
            int.TryParse(tables[1],out NpcID); 
@@ -138,175 +139,177 @@
            int.TryParse(tables[23],out soundTime); 
            int.TryParse(tables[24],out step); 
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, ActorShowConfig> configs = new Dictionary<string, ActorShowConfig>();
    public static ActorShowConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("ActorShowConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        ActorShowConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new ActorShowConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static ActorShowConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<ActorShowConfig> GetValues()
    {
        var values = new List<ActorShowConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/ActorShow.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/ActorShow.txt");
        }
        configs.Clear();
        var tempConfig = new ActorShowConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new ActorShowConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new ActorShowConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
            int.TryParse(tables[25],out showName);
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, ActorShowConfig> configs = new Dictionary<string, ActorShowConfig>();
    public static ActorShowConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("ActorShowConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        ActorShowConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new ActorShowConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static ActorShowConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<ActorShowConfig> GetValues()
    {
        var values = new List<ActorShowConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/ActorShow.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/ActorShow.txt");
        }
        configs.Clear();
        var tempConfig = new ActorShowConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new ActorShowConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new ActorShowConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/ActorShowConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: ef8ad14c092549545a7623899eb26c2a
timeCreated: 1557892285
timeCreated: 1558687215
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -66,19 +66,27 @@
            }
        }
        var clientDungeonInfo = new Dungeon()
        {
            mapId = (int)package.ExAttr14 / 1000,
            lineId = (int)package.ExAttr14 % 1000,
        };
        if (ClientDungeonStageUtility.isClientDungeon)
        {
            PlayerDatas.Instance.baseData.MapID = ClientDungeonStageUtility.clientMapId;
        }
        else
        {
            var clientMapRecord = ClientDungeonStageUtility.GetClientDataMapSymbol();
            if (clientMapRecord.mapId != 0 &&
                (DateTime.Now - clientMapRecord.time).TotalMinutes < 3)
            if (clientDungeonInfo.mapId != 0)
            {
                ClientDungeonStageUtility.SetClientDungeon(true, (ushort)clientMapRecord.mapId);
                ClientDungeonStageUtility.dungeonInfo = clientMapRecord.dungeon;
                PlayerDatas.Instance.baseData.MapID = (ushort)clientMapRecord.mapId;
                var clientMapId = ClientDungeonStageUtility.GetClientMapId(clientDungeonInfo.mapId);
                if (clientMapId != 0)
                {
                    ClientDungeonStageUtility.SetClientDungeon(true, (ushort)clientMapId);
                    ClientDungeonStageUtility.dungeonInfo = clientDungeonInfo;
                    PlayerDatas.Instance.baseData.MapID = (ushort)clientMapId;
                }
            }
        }
Fight/Stage/Dungeon/ClientDungeonStageUtility.cs
@@ -11,8 +11,6 @@
    public static ushort clientMapId { get; private set; }
    public static Dungeon dungeonInfo { get; set; }
    const string OFFLINEMAPRECORD = "OfflineMapRecord";
    static Action<Dungeon, bool> clientCustomDungeonResult;
    public static void Init()
@@ -25,20 +23,6 @@
    {
        isClientDungeon = value;
        clientMapId = mapId;
        GlobalTimeEvent.Instance.fiveSecondEvent -= FiveSecondEvent;
        if (value)
        {
            if (IsRequireOfflineReconnect(mapId))
            {
                SetClientDataMapSymbol();
                GlobalTimeEvent.Instance.fiveSecondEvent += FiveSecondEvent;
            }
        }
        else
        {
            ClearClientDataMapSymbol();
        }
    }
    public static void RequestStartClientDungeon(int mapId, int lineId, Action<Dungeon, bool> callBack)
@@ -131,110 +115,24 @@
            exitClientMap = true,
        });
    }
    private static void FiveSecondEvent()
    {
        SetClientDataMapSymbol();
    }
    public static void SetClientDataMapSymbol()
    {
        switch (clientMapId)
        {
            case HazyDemonKingModel.CLIENTDATAMAP:
                {
                    if (!(StageLoad.Instance.currentStage is ClientHazyDemonKingStage))
                    {
                        return;
                    }
                    var stage = StageLoad.Instance.currentStage as ClientHazyDemonKingStage;
                    if (stage.step > ClientHazyDemonKingStage.Step.Fight)
                    {
                        return;
                    }
                }
                break;
            case HazyGrassModel.FAIRY_CLIENTDATAMAP:
            case HazyGrassModel.REIKI_CLIENTDATAMAP:
                {
                    if (!(StageLoad.Instance.currentStage is ClientHazyGrassStage))
                    {
                        return;
                    }
                    var stage = StageLoad.Instance.currentStage as ClientHazyGrassStage;
                    if (stage.hasCompleted)
                    {
                        return;
                    }
                }
                break;
            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
                {
                    if (!(StageLoad.Instance.currentStage is ClientHazyPreciousDungeonStage))
                    {
                        return;
                    }
                    var stage = StageLoad.Instance.currentStage as ClientHazyPreciousDungeonStage;
                    if (stage.step > ClientHazyPreciousDungeonStage.Step.Collect)
                    {
                        return;
                    }
                }
                break;
            case PersonalBossModel.PERSONALBOSS_MAPID:
                {
                    if (!(StageLoad.Instance.currentStage is ClientPersonalBossDungeonStage))
                    {
                        return;
                    }
                    var stage = StageLoad.Instance.currentStage as ClientPersonalBossDungeonStage;
                    if (stage.step > ClientPersonalBossDungeonStage.Step.Fight)
                    {
                        return;
                    }
                }
                break;
        }
        var key = StringUtility.Contact(OFFLINEMAPRECORD, "_", PlayerDatas.Instance.baseData.PlayerID);
        var clientMapRecord = new ClientDataMapSymbol()
        {
            mapId = clientMapId,
            time = DateTime.Now,
            dungeon = dungeonInfo,
        };
        LocalSave.SetString(key, LitJson.JsonMapper.ToJson(clientMapRecord));
    }
    public static void ClearClientDataMapSymbol()
    {
        var key = StringUtility.Contact(OFFLINEMAPRECORD, "_", PlayerDatas.Instance.baseData.PlayerID);
        LocalSave.DeleteKey(key);
    }
    public static ClientDataMapSymbol GetClientDataMapSymbol()
    {
        var key = StringUtility.Contact(OFFLINEMAPRECORD, "_", PlayerDatas.Instance.baseData.PlayerID);
        if (LocalSave.HasKey(key))
        {
            var clientMapRecord = LitJson.JsonMapper.ToObject<ClientDataMapSymbol>(LocalSave.GetString(key));
            return clientMapRecord;
        }
        return default(ClientDataMapSymbol);
    }
    static bool IsRequireOfflineReconnect(int mapId)
    public static int GetClientMapId(int mapId)
    {
        switch (mapId)
        {
            case HazyDemonKingModel.CLIENTDATAMAP:
            case HazyGrassModel.REIKI_CLIENTDATAMAP:
            case HazyGrassModel.FAIRY_CLIENTDATAMAP:
            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
            case HazyDemonKingModel.DATAMAP:
            case HazyDemonKingModel.CROSSSERVERDATAMAP:
                return HazyDemonKingModel.CLIENTDATAMAP;
            case HazyGrassModel.REIKI_DATAMAP:
                return HazyGrassModel.REIKI_CLIENTDATAMAP;
            case HazyGrassModel.FAIRY_DATAMAP:
                return HazyGrassModel.FAIRY_CLIENTDATAMAP;
            case PersonalBossModel.PERSONALBOSS_MAPID:
                return true;
            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
            case TreasureModel.CLIENTDATAMAP:
                return mapId;
        }
        return false;
        return 0;
    }
    private static void OnPlayerLoginOk()
@@ -249,12 +147,5 @@
    {
        isClientDungeon = false;
        clientMapId = 0;
    }
    public struct ClientDataMapSymbol
    {
        public int mapId;
        public DateTime time;
        public Dungeon dungeon;
    }
}
Fight/Stage/Dungeon/ClientHazyPreciousDungeonStage.cs
@@ -86,7 +86,8 @@
            step = Step.None;
            var incidentConfig = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
            var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
            var incidentConfig = HazyRegionConfig.Get(incidentId);
            var dungeonId = model.GetDungeonId(incidentConfig.dungeonId, incidentConfig.lineId);
            var config = DungeonConfig.Get(dungeonId);
            stepTimes = LitJson.JsonMapper.ToObject<int[]>(config.StepTime);
@@ -134,6 +135,8 @@
            StartCoroutine(Co_VerityExistBossShow());
            InitializePlayer();
            DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
        }
        private IEnumerator Co_VerityExistBossShow()
@@ -142,6 +145,14 @@
            if (!BossShowModel.Instance.BossShowing)
            {
                BossShowCompletedEvent();
            }
        }
        private void OnPlayerLoginOk()
        {
            if (step <= Step.Fight)
            {
                InitializeBoss();
            }
        }
@@ -157,6 +168,7 @@
            ClientCollectUtility.OnCollectFinished -= OnCollectFinished;
            model.onDungeonResultEvent -= OnDungeonResultEvent;
            PersonalEnemy.OnNpcAppear -= OnNpcAppear;
            DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= OnPlayerLoginOk;
        }
        private void OnDungeonResultEvent()
@@ -175,7 +187,7 @@
        private void InitializeNpc()
        {
            PersonalEnemy.Create((uint)m_BossNpcId, E_ActorGroup.Enemy, s_BossPosition);
            InitializeBoss();
            clientPrecious = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientCollect>((uint)m_PreciousNpcId, E_ActorGroup.FuncNpc);
            clientPrecious.Pos = s_PreciousPosition;
@@ -196,6 +208,22 @@
            {
                animator.Play(GAStaticDefine.State_IdleHash);
            }
        }
        private void InitializeBoss()
        {
            uint hp = 0;
            uint hpEx = 0;
            var position = s_BossPosition;
            if (clientBoss != null)
            {
                hp = (uint)clientBoss.ActorInfo.Hp;
                hpEx = clientBoss.ActorInfo.HpEx;
                position = clientBoss.Pos;
                PersonalEnemy.Release(clientBoss);
            }
            PersonalEnemy.Create((uint)m_BossNpcId, E_ActorGroup.Enemy, position, hp, hpEx);
        }
        void OnEnterPrepare()
@@ -253,8 +281,6 @@
            model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, (uint)seconds * 1000);
            m_ExitClock = Clock.AlarmAfter(seconds, OnExitDungeon);
            ClientDungeonStageUtility.ClearClientDataMapSymbol();
            UpdateMissionData();
        }
Fight/Stage/Dungeon/ClientPersonalBossDungeonStage.cs
@@ -50,6 +50,8 @@
        }
    }
    static GA_NpcClientFightBoss s_ClientBoss = null;
    static PersonalBossModel model { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
    static DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
@@ -59,7 +61,8 @@
        step = Step.None;
        var config = PersonalBossConfig.Get(model.clientBossNpcId);
        var npcId = model.GetBossNpcId(ClientDungeonStageUtility.dungeonInfo.lineId);
        var config = PersonalBossConfig.Get(npcId);
        if (config != null)
        {
            var dungeonId = dungeonModel.GetDungeonId(PersonalBossModel.PERSONALBOSS_MAPID, config.lineId);
@@ -71,6 +74,7 @@
        }
        dungeonModel.onDungeonResultEvent += OnDungeonResultEvent;
        PersonalEnemy.OnNpcAppear += OnNpcAppear;
    }
    protected override void OnStageLoadFinish()
@@ -80,6 +84,8 @@
        InitializePlayer();
        step = Step.Prepare;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += PlayerLoginOk;
    }
    void InitializePlayer()
@@ -137,8 +143,6 @@
    private void OnEnterOver()
    {
        ClientDungeonStageUtility.ClearClientDataMapSymbol();
        var seconds = s_StepTimes[2];
        dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, (uint)seconds * 1000);
        s_StepClock = Clock.AlarmAfter(seconds, () =>
@@ -149,7 +153,19 @@
    void InitializeNpc()
    {
        PersonalEnemy.Create((uint)model.clientBossNpcId, E_ActorGroup.Enemy, s_NpcPosition);
        uint hp = 0;
        uint hpEx = 0;
        var position = s_NpcPosition;
        if (s_ClientBoss != null)
        {
            hp = (uint)s_ClientBoss.ActorInfo.Hp;
            hpEx = s_ClientBoss.ActorInfo.HpEx;
            position = s_ClientBoss.Pos;
            PersonalEnemy.Release(s_ClientBoss);
        }
        var npcId = model.GetBossNpcId(ClientDungeonStageUtility.dungeonInfo.lineId);
        PersonalEnemy.Create((uint)npcId, E_ActorGroup.Enemy, position, hp, hpEx);
    }
    private void OnDungeonResultEvent()
@@ -157,11 +173,26 @@
        step = Step.Over;
    }
    private void PlayerLoginOk()
    {
        if (step < Step.Over)
        {
            InitializeNpc();
        }
    }
    public override void UnInitialize()
    {
        base.UnInitialize();
        dungeonModel.onDungeonResultEvent -= OnDungeonResultEvent;
        PersonalEnemy.OnNpcAppear -= OnNpcAppear;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= PlayerLoginOk;
        if (s_ClientBoss != null)
        {
            s_ClientBoss = null;
        }
        if (s_StepClock != null)
        {
@@ -170,6 +201,14 @@
        }
    }
    private void OnNpcAppear(GA_NpcClientFightNorm _npc)
    {
        if (_npc != null && _npc is GA_NpcClientFightBoss)
        {
            s_ClientBoss = _npc as GA_NpcClientFightBoss;
        }
    }
#if UNITY_EDITOR
    private void OnGUI()
    {
Fight/Stage/Dungeon/DungeonStage.cs
@@ -244,8 +244,8 @@
            case 31140:
            case JadeDynastyBossModel.JADEDYNASTY_MAP:
            case HazyDemonKingModel.CLIENTDATAMAP:
            case HazyDemonKingModel.DEMONKINGMAPID1:
            case HazyDemonKingModel.DEMONKINGMAPID2:
            case HazyDemonKingModel.DATAMAP:
            case HazyDemonKingModel.CROSSSERVERDATAMAP:
                WindowCenter.Instance.Open<DungeonPickUpItemCoolDownWin>();
                break;
            case FairyLeagueModel.FAIRY_LEAGUE_DUNGEON:
@@ -265,8 +265,8 @@
                break;
            case HazyGrassModel.REIKI_CLIENTDATAMAP:
            case HazyGrassModel.FAIRY_CLIENTDATAMAP:
            case HazyGrassModel.FairyGrassMapId:
            case HazyGrassModel.ReikiGrassMapId:
            case HazyGrassModel.FAIRY_DATAMAP:
            case HazyGrassModel.REIKI_DATAMAP:
                WindowCenter.Instance.Close<DungeonEndCoolDownWin>();
                WindowCenter.Instance.Open<DungeonCollectItemSuccWin>();
                break;
Lua/Gen/SnxxzUIHazyDemonKingModelWrap.cs
@@ -54,8 +54,8 @@
            
            
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Client_MapID", Snxxz.UI.HazyDemonKingModel.CLIENTDATAMAP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEMONKINGMAPID1", Snxxz.UI.HazyDemonKingModel.DEMONKINGMAPID1);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEMONKINGMAPID2", Snxxz.UI.HazyDemonKingModel.DEMONKINGMAPID2);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEMONKINGMAPID1", Snxxz.UI.HazyDemonKingModel.DATAMAP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "DEMONKINGMAPID2", Snxxz.UI.HazyDemonKingModel.CROSSSERVERDATAMAP);
            
            
            
Lua/Gen/SnxxzUIHazyGrassModelWrap.cs
@@ -48,8 +48,8 @@
            Utils.BeginClassRegister(type, L, __CreateInstance, 5, 0, 0);
            
            
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ReikiGrassMapId", Snxxz.UI.HazyGrassModel.ReikiGrassMapId);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FairyGrassMapId", Snxxz.UI.HazyGrassModel.FairyGrassMapId);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "ReikiGrassMapId", Snxxz.UI.HazyGrassModel.REIKI_DATAMAP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "FairyGrassMapId", Snxxz.UI.HazyGrassModel.FAIRY_DATAMAP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Client_ReikiGrassMapID", Snxxz.UI.HazyGrassModel.REIKI_CLIENTDATAMAP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "Client_FairyGrassMapID", Snxxz.UI.HazyGrassModel.FAIRY_CLIENTDATAMAP);
            
Lua/Gen/SnxxzUIPersonalBossModelWrap.cs
@@ -31,7 +31,6 @@
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBossUnLocked", _m_IsBossUnLocked);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLatestUnLockBoss", _m_GetLatestUnLockBoss);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateRedpoint", _m_UpdateRedpoint);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnMapInitOk", _m_OnMapInitOk);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "bossSelectedEvent", _e_bossSelectedEvent);
            
@@ -311,36 +310,6 @@
            }
            
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_OnMapInitOk(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.PersonalBossModel gen_to_be_invoked = (Snxxz.UI.PersonalBossModel)translator.FastGetCSObj(L, 1);
                {
                    gen_to_be_invoked.OnMapInitOk(  );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_selectedBoss(RealStatePtr L)
System/BossShow/BossShowModel.cs
@@ -34,6 +34,7 @@
        public List<ShowActor> showTargetList { get; private set; }
        public bool BossShowing { get; private set; }
        public Camera showCamera { get; private set; }
        public ShowActor showHero { get; private set; }
        public bool satisfyStep { get; private set; }
        private bool serverNotify = false;
        private int cacheMapId = 0;
@@ -338,6 +339,7 @@
                    }
                }
                showTargetList.Clear();
                showHero = null;
            }
            else
            {
@@ -356,6 +358,11 @@
                        var _instanceid = GetInstanceId();
                        showActor = new ShowActor(actorShowModel.showNpcs[i], i, _instanceid, actorShowModel);
                        m_ShowActorInstanceDict.Add(_instanceid, showActor);
                        if (actorShowModel.showNpcs[i] == 1)
                        {
                            showHero = showActor;
                        }
                    }
                    else
                    {
@@ -382,6 +389,7 @@
                CameraUtility.RemoveCullingMask(CameraManager.uiCamera, LayerUtility.UIEffectLayer);
                if (!WindowCenter.Instance.IsOpen<BossShowWin>())
                {
                    BossShowWin.bossShowId = actorShowModel.ID;
                    WindowCenter.Instance.Open<BossShowWin>();
                }
            }
System/BossShow/BossShowWin.cs
@@ -17,6 +17,9 @@
    {
        [SerializeField] UIEffect bossNameEffect;
        [SerializeField] Button skipBtn;
        [SerializeField] HeadUpName m_HeadUpHero;
        public static int bossShowId = 0;
        #region Built-in
        protected override void BindController()
@@ -37,6 +40,18 @@
        {
            BossShowModel.Instance.OnBossNameEvent += OnBossNameEvent;
            skipBtn.gameObject.SetActive(BossShowModel.Instance.satisfyStep);
            var config = ActorShowConfig.Get(bossShowId);
            m_HeadUpHero.target = null;
            m_HeadUpHero.gameObject.SetActive(config != null && config.showName == 1
                && BossShowModel.Instance.showHero != null);
            if (config != null && config.showName == 1
                && BossShowModel.Instance.showHero != null)
            {
                DisplayHeadUpName();
            }
        }
        private void OnBossNameEvent()
@@ -54,7 +69,7 @@
        protected override void OnAfterOpen()
        {
            m_HeadUpHero.SyncPosition(true);
        }
        protected override void OnPreClose()
@@ -67,6 +82,34 @@
        {
        }
        #endregion
        void DisplayHeadUpName()
        {
            m_HeadUpHero.pattern = HeadUpName.Pattern.Hero;
            m_HeadUpHero.camera = BossShowModel.Instance.showCamera;
            var hero = BossShowModel.Instance.showHero;
            if (hero != null)
            {
                var MP_Name = hero.m_Model.transform.GetChildTransformDeeply("A_Name");
                if (!MP_Name)
                {
                    MP_Name = hero.m_Model.transform;
                }
                m_HeadUpHero.target = MP_Name;
            }
            m_HeadUpHero.offset = new Vector3(0, 0, 0);
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            var name = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
            var familyName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.FamilyName);
            m_HeadUpHero.SetPlayerInfo(new HeadUpName.PlayerInfo()
            {
                realm = realmLevel,
                name = name,
                alliance = familyName,
            });
            m_HeadUpHero.SyncPosition(true);
        }
   
    }
System/Dungeon/DungeonFightWin.cs
@@ -284,7 +284,7 @@
                                var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
                                crossServerBossModel.RequestExit();
                                break;
                            case 4000:
                            case TreasureModel.CLIENTDATAMAP:
                            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
                            case PersonalBossModel.PERSONALBOSS_MAPID:
                                ClientDungeonStageUtility.ExitNormalClientDungeon();
@@ -367,10 +367,11 @@
            {
                switch (ClientDungeonStageUtility.clientMapId)
                {
                    case 4000:
                    case TreasureModel.CLIENTDATAMAP:
                    case HazyGrassModel.FAIRY_CLIENTDATAMAP:
                    case HazyGrassModel.REIKI_CLIENTDATAMAP:
                    case PersonalBossModel.PERSONALBOSS_MAPID:
                    case HazyDemonKingModel.CLIENTDATAMAP:
                        ClientDungeonStageUtility.ExitNormalClientDungeon();
                        break;
                }
@@ -420,9 +421,9 @@
                case SkyTowerModel.DATA_MAPID:
                    ProcessSkyTowerExitCoolDownEnd();
                    break;
                case HazyDemonKingModel.DEMONKINGMAPID2:
                case HazyGrassModel.ReikiGrassMapId:
                case HazyGrassModel.FairyGrassMapId:
                case HazyDemonKingModel.CROSSSERVERDATAMAP:
                case HazyGrassModel.REIKI_DATAMAP:
                case HazyGrassModel.FAIRY_DATAMAP:
                    var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
                    crossServerBossModel.RequestExit();
                    break;
System/Dungeon/DungeonModel.cs
@@ -909,8 +909,8 @@
                        WindowCenter.Instance.Open<GatherSoulDungeonHintWin>();
                    }
                    break;
                case HazyGrassModel.ReikiGrassMapId:
                case HazyGrassModel.FairyGrassMapId:
                case HazyGrassModel.REIKI_DATAMAP:
                case HazyGrassModel.FAIRY_DATAMAP:
                    if (!WindowCenter.Instance.IsOpen<HazyGrassDungeonWin>())
                    {
                        WindowCenter.Instance.Open<HazyGrassDungeonWin>();
System/Dungeon/DungeonTargetBehaviour.cs
@@ -76,8 +76,8 @@
                    var weel = Mathf.Clamp(model.mission.wheel, 1, int.MaxValue) - 1;
                    descText.text = config.Info.Length > weel ? config.Info[weel] : config.Info[0];
                    break;
                case HazyGrassModel.FairyGrassMapId:
                case HazyGrassModel.ReikiGrassMapId:
                case HazyGrassModel.FAIRY_DATAMAP:
                case HazyGrassModel.REIKI_DATAMAP:
                    break;
                default:
                    descText.text = config.Info.Length > step ? config.Info[step] : config.Info[0];
System/FindPrecious/PersonalBossModel.cs
@@ -8,7 +8,7 @@
namespace Snxxz.UI
{
    [XLua.LuaCallCSharp]
    public class PersonalBossModel : Model, IMapInitOk
    public class PersonalBossModel : Model
    {
        public const int PERSONALBOSS_MAPID = 31240;
        public const int PERSONAL_REDPOINTID = 76003;
@@ -29,18 +29,6 @@
                        bossSelectedEvent(value);
                    }
                }
            }
        }
        public int clientBossNpcId
        {
            get
            {
                return LocalSave.GetInt("PersonalBossClient_" + PlayerDatas.Instance.PlayerId);
            }
            private set
            {
                LocalSave.SetInt("PersonalBossClient_" + PlayerDatas.Instance.PlayerId, value);
            }
        }
@@ -105,6 +93,19 @@
            }
            return sortedBossIds[0];
        }
        public int GetBossNpcId(int lineId)
        {
            var configs = PersonalBossConfig.GetValues();
            foreach (var config in configs)
            {
                if (config.lineId == lineId)
                {
                    return config.NPCID;
                }
            }
            return 0;
        }
        private void OnPlayerDataChange(PlayerDataType _type)
@@ -197,25 +198,7 @@
        public void RequestGotoDungeon(int _bossId)
        {
            var config = PersonalBossConfig.Get(_bossId);
            clientBossNpcId = _bossId;
            ClientDungeonStageUtility.GotoNormalClientDungeon(PERSONALBOSS_MAPID, PERSONALBOSS_MAPID, config.lineId);
        }
        public void OnMapInitOk()
        {
            //var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
            //var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
            //
            //switch (dataMapId)
            //{
            //    case PERSONALBOSS_MAPID:
            //        var sendInfo = new CA508_tagCMDoFBAction();
            //        sendInfo.ActionType = 0;
            //        sendInfo.ActionInfo = (uint)selectedBoss;
            //        GameNetSystem.Instance.SendInfo(sendInfo);
            //        MapTransferUtility.Instance.MoveToNPC(selectedBoss);
            //        break;
            //}
        }
    }
System/HazyRegion/ClientHazyDemonKingStage.cs
@@ -9,11 +9,10 @@
    static readonly Vector3 playerBornPosition = new Vector3(10, 6.38f, 6.67f);
    static readonly Vector3 bossBornPosition = new Vector3(8.35f, 6.37f, 9.7f);
    static GA_NpcClientFightBoss clientFightBoss = null;
    static GA_NpcClientFightBoss s_ClientBoss = null;
    float stepTimer = 0f;
    float existTime = 10f;
    float exitTime = 10f;
    Step m_Step = Step.Fight;
    public Step step
@@ -21,22 +20,7 @@
        get { return m_Step; }
        set
        {
            if (m_Step != value)
            {
                m_Step = value;
                switch (m_Step)
                {
                    case Step.Fight:
                        stepTimer = 0f;
                        break;
                    case Step.Settle:
                        stepTimer = 0f;
                        break;
                    case Step.Exit:
                        stepTimer = 0f;
                        break;
                }
            }
            m_Step = value;
        }
    }
@@ -62,13 +46,15 @@
        InitializeBoss();
        step = Step.Fight;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += PlayerLoginOkEvent;
    }
    public static uint GetClientBossSid()
    {
        if (clientFightBoss != null)
        if (s_ClientBoss != null)
        {
            return clientFightBoss.ServerInstID;
            return s_ClientBoss.ServerInstID;
        }
        return 0;
    }
@@ -87,63 +73,44 @@
    void InitializeBoss()
    {
        var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
        PersonalEnemy.Create((uint)config.npcId, E_ActorGroup.Enemy, bossBornPosition);
        uint hp = 0;
        uint hpEx = 0;
        var position = bossBornPosition;
        if (s_ClientBoss != null)
        {
            hp = (uint)s_ClientBoss.ActorInfo.Hp;
            hpEx = s_ClientBoss.ActorInfo.HpEx;
            position = s_ClientBoss.Pos;
            PersonalEnemy.Release(s_ClientBoss);
        }
        var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
        var config = HazyRegionConfig.Get(incidentId);
        PersonalEnemy.Create((uint)config.npcId, E_ActorGroup.Enemy, position, hp, hpEx);
    }
    private void OnDungeonResultEvent()
    {
        step = Step.Settle;
        ClientDungeonStageUtility.ClearClientDataMapSymbol();
        dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 10 * 1000);
    }
    private void OnNpcAppear(GA_NpcClientFightNorm _npc)
    {
        var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
        var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
        var config = HazyRegionConfig.Get(incidentId);
        if (_npc.NpcConfig.NPCID == config.npcId)
        {
            clientFightBoss = _npc as GA_NpcClientFightBoss;
            s_ClientBoss = _npc as GA_NpcClientFightBoss;
        }
    }
    protected override void OnUpdate()
    private void PlayerLoginOkEvent()
    {
        base.OnUpdate();
        if (clientFightBoss != null && clientFightBoss.ActorInfo.serverDie)
        if (step <= Step.Fight)
        {
            OnBossDie();
        }
        switch (step)
        {
            case Step.Fight:
                if (clientFightBoss == null)
                {
                    stepTimer += Time.deltaTime;
                    if (stepTimer > 5f)
                    {
                        stepTimer = 0f;
                    }
                }
                break;
            case Step.Settle:
                stepTimer += Time.deltaTime;
                if (stepTimer >= existTime)
                {
                    step = Step.Exit;
                    ClientDungeonStageUtility.ExitNormalClientDungeon();
                }
                break;
        }
    }
    void OnBossDie()
    {
        if (clientFightBoss != null)
        {
            clientFightBoss = null;
            InitializeBoss();
        }
    }
@@ -151,13 +118,14 @@
    {
        base.UnInitialize();
        if (clientFightBoss != null)
        if (s_ClientBoss != null)
        {
            clientFightBoss = null;
            s_ClientBoss = null;
        }
        dungeonModel.onDungeonResultEvent -= OnDungeonResultEvent;
        PersonalEnemy.OnNpcAppear -= OnNpcAppear;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= PlayerLoginOkEvent;
    }
#if UNITY_EDITOR
@@ -175,6 +143,5 @@
        None,
        Fight,
        Settle,
        Exit
    }
}
System/HazyRegion/ClientHazyGrassStage.cs
@@ -9,9 +9,14 @@
{
    static readonly Vector3 PlayerBornPosition1 = new Vector3(19.401f, 4.985f, 5.494f);
    static List<Vector3> s_NpcPositions = new List<Vector3>();
    static List<int> s_RandomIndexs = new List<int>();
    static readonly int s_EnemyNpcId = 40208005;
    static Vector3 s_EnemyPosition = Vector3.zero;
    static GA_NpcClientFightNorm s_ClientMonster = null;
    bool hasInitializedNpc = false;
    public bool hasCompleted { get; private set; }
@@ -45,6 +50,7 @@
        ClientCollectUtility.OnCollectFinished += OnCollectFinished;
        dungeonModel.onDungeonResultEvent += OnDungeonResultEvent;
        PersonalEnemy.OnNpcAppear += OnNpcAppear;
    }
    protected override void OnStageLoadFinish()
@@ -55,6 +61,7 @@
        InitializeNpc();
        model.onMapNpcCountRefresh += OnMapNpcCountRefresh;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += PlayerLoginOk;
    }
    public override void UnInitialize()
@@ -66,6 +73,8 @@
        ClientCollectUtility.OnCollectFinished -= OnCollectFinished;
        dungeonModel.onDungeonResultEvent -= OnDungeonResultEvent;
        model.onMapNpcCountRefresh -= OnMapNpcCountRefresh;
        PersonalEnemy.OnNpcAppear -= OnNpcAppear;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= PlayerLoginOk;
    }
    private void OnMapNpcCountRefresh()
@@ -81,7 +90,6 @@
        dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 10 * 1000);
        hasCompleted = true;
        ClientDungeonStageUtility.ClearClientDataMapSymbol();
    }
    private void OnCollectFinished(uint _sid)
@@ -132,15 +140,16 @@
    void InitializeNpc()
    {
        var config = ScriptableObjectLoader.LoadSoHazyMapNpc(ClientDungeonStageUtility.clientMapId);
        var positions = config.GetNpcPositions();
        s_NpcPositions = config.GetNpcPositions(hazyRegionModel.hazyRegionOpenTimes);
        s_RandomIndexs.Clear();
        for (int i = 0; i < positions.Count; i++)
        for (int i = 0; i < s_NpcPositions.Count; i++)
        {
            s_RandomIndexs.Add(i);
        }
        var mapId = model.GetGrassMapId(hazyRegionModel.processingIncidentId);
        var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
        var mapId = model.GetGrassMapId(incidentId);
        var npcInfos = model.GetGrassNpcInfos(mapId);
        var npcJsonDatas = GetLocalNpcData();
@@ -196,12 +205,9 @@
        if (hasInitializedNpc)
        {
            var enemyPosition = positions[UnityEngine.Random.Range(0, positions.Count)];
            s_EnemyPosition = s_NpcPositions[UnityEngine.Random.Range(0, s_NpcPositions.Count)];
            if (ClientDungeonStageUtility.clientMapId == HazyGrassModel.FAIRY_CLIENTDATAMAP)
            {
                PersonalEnemy.Create((uint)s_EnemyNpcId, E_ActorGroup.Enemy, enemyPosition);
            }
            InitializeMonster();
        }
        if (hasInitializedNpc)
@@ -214,10 +220,7 @@
    {
        hasInitializedNpc = true;
        var config = ScriptableObjectLoader.LoadSoHazyMapNpc(ClientDungeonStageUtility.clientMapId);
        var positions = config.GetNpcPositions();
        var position = positions[index];
        var position = s_NpcPositions[index];
        GA_NpcClientCollect _npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientCollect>((uint)npcId,
                E_ActorGroup.FuncNpc);
@@ -243,6 +246,32 @@
        });
    }
    void InitializeMonster()
    {
        var position = s_EnemyPosition;
        if (s_ClientMonster != null)
        {
            position = s_ClientMonster.Pos;
            PersonalEnemy.Release(s_ClientMonster);
        }
        if (ClientDungeonStageUtility.clientMapId == HazyGrassModel.FAIRY_CLIENTDATAMAP)
        {
            PersonalEnemy.Create((uint)s_EnemyNpcId, E_ActorGroup.Enemy, position);
        }
    }
    private void OnNpcAppear(GA_NpcClientFightNorm _npc)
    {
        s_ClientMonster = _npc;
    }
    private void PlayerLoginOk()
    {
        InitializeMonster();
    }
    void UnloadAllNpc()
    {
        foreach (var _npc in s_CollectNpcs.Values)
@@ -257,6 +286,11 @@
        }
        s_CollectNpcs.Clear();
        if (s_ClientMonster != null)
        {
            s_ClientMonster = null;
        }
    }
    #region 本地Npc数据
System/HazyRegion/HazyDemonKingDungeonWin.cs
@@ -41,7 +41,8 @@
        {
            get
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
                var config = HazyRegionConfig.Get(incidentId);
                if (config != null)
                {
                    return config.dungeonType;
System/HazyRegion/HazyDemonKingModel.cs
@@ -17,8 +17,8 @@
        public const int CLIENTDATAMAP = 2000;
        public const int DEMONKINGMAPID1 = 22030;
        public const int DEMONKINGMAPID2 = 32030;
        public const int DATAMAP = 22030;
        public const int CROSSSERVERDATAMAP = 32030;
        public event Action onPlayerInfoRefresh;
        public event Action onPlayerCountRefresh;
@@ -284,7 +284,7 @@
        public void RequestExitDungeon()
        {
            if (PlayerDatas.Instance.baseData.MapID == DEMONKINGMAPID1)
            if (PlayerDatas.Instance.baseData.MapID == DATAMAP)
            {
                ModelCenter.Instance.GetModel<DungeonModel>().ExitCurrentDungeon();
            }
System/HazyRegion/HazyDemonKingRewardWin.cs
@@ -48,7 +48,8 @@
        void Display()
        {
            var config = HazyRegionConfig.Get(model.processingIncidentId);
            var incidentId = model.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
            var config = HazyRegionConfig.Get(incidentId);
            var npcConfig = NPCConfig.Get(config.npcId);
            m_BossName.text = npcConfig.charName;
System/HazyRegion/HazyDemonKingVictoryWin.cs
@@ -32,7 +32,8 @@
        {
            get
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(model.dungeonResult.dataMapID, model.dungeonResult.lineID);
                var config = HazyRegionConfig.Get(incidentId);
                if (config != null)
                {
                    return config.dungeonType;
System/HazyRegion/HazyGrassDungeonWin.cs
@@ -61,7 +61,8 @@
        {
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
                var config = HazyRegionConfig.Get(incidentId);
                m_DungeonTarget.Init(config.dungeonId);
            }
            else
@@ -79,7 +80,8 @@
            var mapId = 0;
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                mapId = hazyGrassModel.GetGrassMapId(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
                mapId = hazyGrassModel.GetGrassMapId(incidentId);
            }
            else
            {
System/HazyRegion/HazyGrassModel.cs
@@ -10,8 +10,8 @@
        Dictionary<int, List<int>> m_MapNpcs = new Dictionary<int, List<int>>();
        Dictionary<int, int> m_MapNpcCount = new Dictionary<int, int>();
        public const int ReikiGrassMapId = 32040;
        public const int FairyGrassMapId = 32050;
        public const int REIKI_DATAMAP = 32040;
        public const int FAIRY_DATAMAP = 32050;
        public const int REIKI_CLIENTDATAMAP = 3240;
        public const int FAIRY_CLIENTDATAMAP = 3250;
@@ -47,8 +47,8 @@
            var mapNpcConfigs = MapNpcRefreshConfig.GetValues();
            foreach (var config in mapNpcConfigs)
            {
                if (config.MapID == ReikiGrassMapId
                    || config.MapID == FairyGrassMapId)
                if (config.MapID == REIKI_DATAMAP
                    || config.MapID == FAIRY_DATAMAP)
                {
                    List<int> _npcs = null;
                    if (!m_MapNpcs.TryGetValue(config.MapID, out _npcs))
@@ -106,7 +106,8 @@
            var dungeonHintId = 0;
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
                var config = HazyRegionConfig.Get(incidentId);
                if (config != null)
                {
                    dungeonHintId = dungeonModel.GetDungeonHintId(config.dungeonId, 0);
@@ -226,7 +227,8 @@
                && (ClientDungeonStageUtility.clientMapId == REIKI_CLIENTDATAMAP
                || ClientDungeonStageUtility.clientMapId == FAIRY_CLIENTDATAMAP))
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
                var config = HazyRegionConfig.Get(incidentId);
                if (config != null)
                {
                    var collectCount = dungeonModel.GetDugneonNpcCollectCount(npcId);
@@ -264,8 +266,8 @@
        public void ReceivePackage(HA714_tagMCNPCCntList package)
        {
            if (package.MapID != ReikiGrassMapId
                && package.MapID != FairyGrassMapId)
            if (package.MapID != REIKI_DATAMAP
                && package.MapID != FAIRY_DATAMAP)
            {
                return;
            }
System/HazyRegion/HazyMapNpcScriptableObject.cs
@@ -7,10 +7,21 @@
#endif
public class HazyMapNpcScriptableObject : ScriptableObject
{
    [SerializeField, Header("订制次数")] int[] m_CustomCounts;
    [SerializeField, Header("订制位置")] List<CustomPositions> m_CustomNpcPositions;
    [SerializeField] List<Vector3> m_NpcPositions;
    public List<Vector3> GetNpcPositions()
    public List<Vector3> GetNpcPositions(int count)
    {
        if (m_CustomCounts != null && m_CustomCounts.Length > 0
            && m_CustomNpcPositions != null)
        {
            var index = Array.IndexOf(m_CustomCounts, count);
            if (index != -1 && index < m_CustomNpcPositions.Count)
            {
                return m_CustomNpcPositions[index].positions;
            }
        }
        return m_NpcPositions;
    }
@@ -23,6 +34,13 @@
        }
    }
#endif
    [Serializable]
    public struct CustomPositions
    {
        public List<Vector3> positions;
    }
}
#if UNITY_EDITOR
System/Treasure/HumanTreasureWin.cs
@@ -312,7 +312,7 @@
            {
                if (model.selectedTreasure == 101)
                {
                    ClientDungeonStageUtility.GotoNormalClientDungeon(4000, 0, 0);
                    ClientDungeonStageUtility.GotoNormalClientDungeon(TreasureModel.CLIENTDATAMAP, TreasureModel.CLIENTDATAMAP, 0);
                    return;
                }
                if (PlayerDatas.Instance.baseData.LV >= config.ChallengeLevel)
System/Treasure/TreasureModel.cs
@@ -28,6 +28,7 @@
        List<int> eightFurnacesAchievements = new List<int>();
        List<int> treasureUnOpens = new List<int>();
        public const int CLIENTDATAMAP = 4000;
        public const int TREASURE_DATAMAPID = 41110;
        public const int TREASURE_MAPID = 41110;
        public const int TREASURE_GUIDE_ID = 102;